ROM Hacking Need a helping hand? You can get help on any ROM Hacking-related problems or questions you have here.

Closed Thread
 
Thread Tools
  #7826    
Old February 4th, 2013 (6:44 PM).
LocksmithArmy's Avatar
LocksmithArmy LocksmithArmy is offline
Mew!
     
    Join Date: Feb 2013
    Age: 28
    Gender: Male
    Posts: 415

    So I have a small script issue
    I made a new map (in fire red) and put mew in it...

    the map script looks like this:

    Spoiler:

    #org 0x34EE61
    '-----------------------------------
    #raw 0x05
    #dword 0x81624C9
    #raw 0x03
    #dword 0x8456735
    #raw 0x00

    #org 0x81624C9
    '-----------------------------------
    checkflag 0x807
    if true call 0x81624D3 ' Flag is set
    end

    #org 0x81624D3
    '-----------------------------------
    special2 LASTRESULT 0xB4
    compare LASTRESULT 0x7
    if != jump 0x81A77A9 ' Not Equal To
    disappear LASTTALKED
    return

    #org 0x81A77A9
    '-----------------------------------
    return

    #org 0x8456735
    '-----------------------------------
    checkflag 0x1FE
    if false call 0x8456745 ' Flag is unset
    end

    #org 0x8456745
    '-----------------------------------
    clearflag 0x1FF
    return

    and the mew event (similar to mewtwo, he only shows up one time) looks like so:

    Spoiler:
    #org 0x871CEF9
    '-----------------------------------
    special INIT_STEPCOUNT
    compare LASTRESULT 0x2
    if == jump 0x81A7AE0 ' Equal To
    special GET_STEPCOUNT
    lock
    faceplayer
    checksound
    cry MEW 0x2
    message 0x8177F9F ' Mew!
    showmsg
    waitcry
    pause 0x14
    playsound 0x156 0x0
    waitbutton
    battle MEW 7 NONE
    setflag 0x807
    special BATTLE_PIXELLATE
    waitspecial
    clearflag 0x807
    special2 LASTRESULT 0xB4
    compare LASTRESULT 0x1
    if == jump 0x874005E ' Equal To
    compare LASTRESULT 0x4
    if == jump 0x871A334 ' Equal To
    compare LASTRESULT 0x5
    if == jump 0x871A334 ' Equal To
    setflag 0x1FE
    release
    end

    #org 0x81A7AE0
    '-----------------------------------
    release
    end

    #org 0x874005E
    '-----------------------------------
    setflag 0x1FE
    jump 0x81A922D

    #org 0x81A922D
    '-----------------------------------
    fadescreen FADEOUT_BLACK
    disappear LASTTALKED
    fadescreen FADEIN_BLACK
    release
    end

    #org 0x871A334
    '-----------------------------------
    setvar 0x8004 0x97
    jump 0x81A9236

    #org 0x81A9236
    '-----------------------------------
    fadescreen FADEOUT_BLACK
    disappear LASTTALKED
    fadescreen FADEIN_BLACK
    storepokemon 0x0 0x8004
    msgbox 0x81A63C4 ' The \v\h02 flew away...
    callstd MSG_NOCLOSE ' Non-closing message
    release
    ' Release commands close any open messages
    end

    #org 0x8177F9F
    = Mew!

    #org 0x81A63C4
    = The \v\h02 flew away!

    and the code works fine... mew shows up... in his special new map... and you fight him... he dissapears... never to be seen again... yay

    but after i impliment this code I get this odd unrelated glitch...
    I would show you a screen shot but it would not let me...
    I get these little dots in the text box that describes the HM...

    like go to your flying pokemon, select hit and highlight FLY (dont actually fly) and notice the description (it says "Fly to a known Town." it has little pink dots above the text and there is no beveled bottom to the box...
    you can still read the text and fly still works (its like this for all out of battle moves)

    where did I go wrong... can anyone help me fix my script... if I remove it the box is normal, so its gotta either be mew or the map... the map inserted alone with no script on it works fine... once I add the script about mew not showing up after hes fought and the event where you see and fight mew is when it messes up.

    PS another quick one, if anyone knows the offset for the event that releases one of the mystical dogs (after you beat the elite 4) id really appreciate it...


    Relevant Advertising!

      #7827    
    Old February 4th, 2013 (7:11 PM). Edited February 4th, 2013 by karatekid552.
    karatekid552's Avatar
    karatekid552 karatekid552 is offline
    What happens if I push it?....
       
      Join Date: Nov 2012
      Location: Do you really want to know? Really?
      Gender: Male
      Nature: Bold
      Posts: 1,766

      Quote:
      Originally Posted by mariosr10 View Post
      @tajaros
      Thanks man!That did the trick!Guess i should now move to XSE!
      So, it is recommended to use flags from 200 to 900?
      Does it matter if i use the flag 200 for every script i make?
      Thanks again :-)

      You must use a different flag for every script. Flags are like one time use.

      Here is a good list of flags that are off limits unless you delete the scripts that use them: http://www.pokecommunity.com/showthread.php?p=6829256#post6829256

      If you find yourself needing a lot more flags, I have a method, but it is only for dire need cases.

      Quote:
      Originally Posted by LocksmithArmy View Post
      So I have a small script issue
      I made a new map (in fire red) and put mew in it...

      the map script looks like this:

      Spoiler:

      #org 0x34EE61
      '-----------------------------------
      #raw 0x05
      #dword 0x81624C9
      #raw 0x03
      #dword 0x8456735
      #raw 0x00

      #org 0x81624C9
      '-----------------------------------
      checkflag 0x807
      if true call 0x81624D3 ' Flag is set
      end

      #org 0x81624D3
      '-----------------------------------
      special2 LASTRESULT 0xB4
      compare LASTRESULT 0x7
      if != jump 0x81A77A9 ' Not Equal To
      disappear LASTTALKED
      return

      #org 0x81A77A9
      '-----------------------------------
      return

      #org 0x8456735
      '-----------------------------------
      checkflag 0x1FE
      if false call 0x8456745 ' Flag is unset
      end

      #org 0x8456745
      '-----------------------------------
      clearflag 0x1FF
      return

      and the mew event (similar to mewtwo, he only shows up one time) looks like so:

      Spoiler:
      #org 0x871CEF9
      '-----------------------------------
      special INIT_STEPCOUNT
      compare LASTRESULT 0x2
      if == jump 0x81A7AE0 ' Equal To
      special GET_STEPCOUNT
      lock
      faceplayer
      checksound
      cry MEW 0x2
      message 0x8177F9F ' Mew!
      showmsg
      waitcry
      pause 0x14
      playsound 0x156 0x0
      waitbutton
      battle MEW 7 NONE
      setflag 0x807
      special BATTLE_PIXELLATE
      waitspecial
      clearflag 0x807
      special2 LASTRESULT 0xB4
      compare LASTRESULT 0x1
      if == jump 0x874005E ' Equal To
      compare LASTRESULT 0x4
      if == jump 0x871A334 ' Equal To
      compare LASTRESULT 0x5
      if == jump 0x871A334 ' Equal To
      setflag 0x1FE
      release
      end

      #org 0x81A7AE0
      '-----------------------------------
      release
      end

      #org 0x874005E
      '-----------------------------------
      setflag 0x1FE
      jump 0x81A922D

      #org 0x81A922D
      '-----------------------------------
      fadescreen FADEOUT_BLACK
      disappear LASTTALKED
      fadescreen FADEIN_BLACK
      release
      end

      #org 0x871A334
      '-----------------------------------
      setvar 0x8004 0x97
      jump 0x81A9236

      #org 0x81A9236
      '-----------------------------------
      fadescreen FADEOUT_BLACK
      disappear LASTTALKED
      fadescreen FADEIN_BLACK
      storepokemon 0x0 0x8004
      msgbox 0x81A63C4 ' The \v\h02 flew away...
      callstd MSG_NOCLOSE ' Non-closing message
      release
      ' Release commands close any open messages
      end

      #org 0x8177F9F
      = Mew!

      #org 0x81A63C4
      = The \v\h02 flew away!

      and the code works fine... mew shows up... in his special new map... and you fight him... he dissapears... never to be seen again... yay

      but after i impliment this code I get this odd unrelated glitch...
      I would show you a screen shot but it would not let me...
      I get these little dots in the text box that describes the HM...

      like go to your flying pokemon, select hit and highlight FLY (dont actually fly) and notice the description (it says "Fly to a known Town." it has little pink dots above the text and there is no beveled bottom to the box...
      you can still read the text and fly still works (its like this for all out of battle moves)

      where did I go wrong... can anyone help me fix my script... if I remove it the box is normal, so its gotta either be mew or the map... the map inserted alone with no script on it works fine... once I add the script about mew not showing up after hes fought and the event where you see and fight mew is when it messes up.

      PS another quick one, if anyone knows the offset for the event that releases one of the mystical dogs (after you beat the elite 4) id really appreciate it...

      To take a screenshot of any screen, just hit print screen on the keyboard and paste it into paint. It's a good way if your emulator is not allowing them.

      I personally think it is a pallet problem. I'm probably wrong, but it might be that the pallets need to be refreshed after mew disappears. There is a special to refresh maps in JPAN's study on the Special and Special2 commands. Give it a try and see if it works.

      Also, try warping after the battle and see if that solves the problem. It could get us closer to solving it with more information.

      __________________


      Paired with Simba

        #7828    
      Old February 4th, 2013 (7:31 PM).
      FBI's Avatar
      FBI FBI is offline
      Free supporter
      • Silver Tier
       
      Join Date: Jan 2013
      Location: Unknown Island
      Gender: Male
      Posts: 1,770

      Quote:
      Originally Posted by karatekid552 View Post

      To take a screenshot of any screen, just hit print screen on the keyboard and paste it into paint. It's a good way if your emulator is not allowing them.

      He only has 1 post, so I assume he means he doesn't know how to post it on PC.

      Quote:
      I personally think it is a pallet problem. I'm probably wrong, but it might be that the pallets need to be refreshed after mew disappears. There is a special to refresh maps in JPAN's study on the Special and Special2 commands. Give it a try and see if it works.

      Also, try warping after the battle and see if that solves the problem. It could get us closer to solving it with more information.

      This is likely too, however there are also incosistencies within the script.

      Quote:
      #org 0x81624C9
      '-----------------------------------
      checkflag 0x807
      if true call 0x81624D3 ' Flag is set
      end

      #org 0x81624D3
      '-----------------------------------
      special2 LASTRESULT 0xB4
      compare LASTRESULT 0x7
      if != jump 0x81A77A9 'Using jump implies you don't want to run the rest of the code given the if condition is true.
      disappear LASTTALKED Only disappears if you captured it. Intended?
      return

      #org 0x81A77A9
      '-----------------------------------
      return -- Without a place to return to

      #org 0x8456735
      '-----------------------------------
      checkflag 0x1FE
      if false call 0x8456745 ' Flag is unset
      end

      #org 0x8456745
      '-----------------------------------
      clearflag 0x1FF
      return

      That random return there is probably causing the random text appearing (at least I hope it is).

      __________________

      ...

        #7829    
      Old February 4th, 2013 (10:28 PM).
      SpadeEdge16's Avatar
      SpadeEdge16 SpadeEdge16 is offline
         
        Join Date: May 2012
        Gender: Male
        Posts: 154

        Okay, so what the heck is going on here? I've made plenty of trainer battle scripts before, they're even as easy as copying and pasting the whole thing. So why does this keep happening? I've tried changing the trainers on A Trainer, remaking the script, deleting the event and putting new sprites on the map, and compiling an old battle script that worked in my last hack and this keeps happening. Random glitches that won't even let me battle them.

        Attached Images
        File Type: jpg Untitled.jpg‎ (207.4 KB, 12 views) (Save to Dropbox)
          #7830    
        Old February 5th, 2013 (3:31 AM). Edited February 5th, 2013 by karatekid552.
        karatekid552's Avatar
        karatekid552 karatekid552 is offline
        What happens if I push it?....
           
          Join Date: Nov 2012
          Location: Do you really want to know? Really?
          Gender: Male
          Nature: Bold
          Posts: 1,766

          Quote:
          Originally Posted by SpadeEdge16 View Post
          Okay, so what the heck is going on here? I've made plenty of trainer battle scripts before, they're even as easy as copying and pasting the whole thing. So why does this keep happening? I've tried changing the trainers on A Trainer, remaking the script, deleting the event and putting new sprites on the map, and compiling an old battle script that worked in my last hack and this keeps happening. Random glitches that won't even let me battle them.

          I saw this while playing Snakewood yesterday. It is really weird how some trainer battles will that. I think it might be the settings in A-map. Would you be able to post both the script and a screenshot of A-map?

          Quote:
          Originally Posted by FBI agent View Post
          He only has 1 post, so I assume he means he doesn't know how to post it on PC.

          This is likely too, however there are also incosistencies within the script.

          That random return there is probably causing the random text appearing (at least I hope it is).

          Oh, I didn't even check his post count. With the special B4 (easily one of my favorites) it will return the value of the end result of a wild battle. If the Pokemon was captured it returns 0x7. So, by having anything other than that, he must want to jump back to before the wild battle. It may have just been a compiling error, if he was using the old XSE, but maybe not. But now as I look at it more, why is that in the map script? and that map script is completely wrong... Look at the top of it. Those raw's show that he inserted the wrong offset or it wasn't written properly.

          An offset just one byte off can cause strange things like this to happen as XSE will try and read the script starting there, so it won't notice if there isn't a command there, it will just read the hex numbers and try and make commands out of them.

          In the battle script. Special B4 will never return 0x5. Here is a quote from JPAN-

          Quote:
          0B4 after battle, ceratin variables are set. b4 reads them and places on a given variable the status at battle end. *key 0x1 = fainted, 0x7 = captured, 0x4 = escaped*

          So, the compare series in the second script needs to be altered.

          Here the special I was talking about earlier:

          Quote:
          08e Forces map refresh, that is, puts into effect all changes made by setmaptile command

          Add this in after mew disappears to see if it will help. Also, make sure you repoint or recompile dynamically. Never add to a script without doing one of those two things.

          __________________


          Paired with Simba

            #7831    
          Old February 5th, 2013 (4:39 AM).
          FBI's Avatar
          FBI FBI is offline
          Free supporter
          • Silver Tier
           
          Join Date: Jan 2013
          Location: Unknown Island
          Gender: Male
          Posts: 1,770

          Quote:
          Originally Posted by karatekid552 View Post
          I saw this while playing Snakewood yesterday. It is really weird how some trainer battles will that. I think it might be the settings in A-map. Would you be able to post both the script and a screenshot of A-map?

          Oh, I didn't even check his post count. With the special B4 (easily one of my favorites) it will return the value of the end result of a wild battle. If the Pokemon was captured it returns 0x7. So, by having anything other than that, he must want to jump back to before the wild battle. It may have just been a compiling error, if he was using the old XSE, but maybe not. But now as I look at it more, why is that in the map script? and that map script is completely wrong... Look at the top of it. Those raw's show that he inserted the wrong offset or it wasn't written properly.

          An offset just one byte off can cause strange things like this to happen as XSE will try and read the script starting there, so it won't notice if there isn't a command there, it will just read the hex numbers and try and make commands out of them.

          In the battle script. Special B4 will never return 0x5. Here is a quote from JPAN-

          So, the compare series in the second script needs to be altered.

          Here the special I was talking about earlier:

          Add this in after mew disappears to see if it will help. Also, make sure you repoint or recompile dynamically. Never add to a script without doing one of those two things.

          He's using an existing script, hence the offsets starting around 0x162000s. Also the special doesn't seem to be a problem, I think it was put there by the original creators. The idea that it's a level script sortof wonders me too. I'll edit this after I check out cerulean cave's level scripts and such.

          __________________

          ...

            #7832    
          Old February 5th, 2013 (7:26 AM).
          Aryan143's Avatar
          Aryan143 Aryan143 is offline
          The Fennekin Fan!
             
            Join Date: Jul 2012
            Location: Delhi, India
            Age: 17
            Gender: Male
            Nature: Modest
            Posts: 756

            This is the script I am making. I want that a mankey comes to me and asks to join me when I step on a specific tile and then a Pidgey comes to me immediately and evolves to Pidgeotto and then battles me. Note that 0x2 is because that I replaces no. 2 sprite with Mankey.

            Spoiler:
            '---------------
            #org 0x750000
            msgbox 0x8750067 MSG_NORMAL '"Someone's here."
            showsprite 0x2
            msgbox 0x8750079 MSG_YESNO '"This Mankey looks cute!\nDo you wa..."
            compare LASTRESULT 0x1
            if 0x1 goto 0x87500B5
            compare LASTRESULT 0x0
            if 0x0 goto 0x87500D3
            hidesprite 0x2
            showsprite 0x74
            msgbox 0x87500E3 MSG_NORMAL '"This Pidgey forces you to\n a batt..."
            msgbox 0x875011F MSG_NORMAL '"Wait!Pidgey is evolving!"
            fadescreen 0x1
            hidesprite 0x74
            fadescreen 0x0
            showsprite 0x72
            cry 0x17 0x0
            msgbox 0x875013A MSG_NORMAL '"PIDGEOTTO: Pidddddge!"
            wildbattle 0x11 0xA 0x0
            fadescreen 0x1
            fadescreen 0x0
            hidesprite 0x72
            setobedience 0xE1E3
            setobedience 0xE1E3
            '---------------
            #org 0x7500B5
            givepokemon 0x38 0x5 0x0 0x0 0x0 0x0
            fanfare 0x13E
            msgbox 0x8750152 MSG_NORMAL '"It seems happy."
            waitfanfare
            release
            end

            '---------------
            #org 0x7500D3
            msgbox @0x8750153 MSG_NORMAL
            release
            end

            '---------
            ' Strings
            '---------
            #org 0x750067
            = Someone's here.

            #org 0x750079
            = This Mankey looks cute!\nDo you want to take\p it with you?

            #org 0x7500E3
            = This Pidgey forces you to\n a battle.\pBut it's not strong.

            #org 0x75011F
            = Wait!Pidgey is evolving!

            #org 0x75013A
            = PIDGEOTTO: Pidddddge!

            #org 0x750152
            = It seems happy.

            #org 0x750153
            = Then go home!

            __________________

            Check out my gaming company:

              #7833    
            Old February 5th, 2013 (11:16 AM). Edited February 5th, 2013 by LocksmithArmy.
            LocksmithArmy's Avatar
            LocksmithArmy LocksmithArmy is offline
            Mew!
               
              Join Date: Feb 2013
              Age: 28
              Gender: Male
              Posts: 415

              Quote:
              Originally Posted by FBI agent View Post
              He only has 1 post, so I assume he means he doesn't know how to post it on PC.

              This is likely too, however there are also incosistencies within the script.

              That random return there is probably causing the random text appearing (at least I hope it is).

              lol no what I ment was... Pokecommunity required 15 posts before I can post links to another site... and I have my screenshots on my own site I was just going to [ img] them with links

              and sure enough that fixed the mew issue... thanks

              but now... i cant open the rom in AdvanceMap... it freezes if I try to open any map... itll load the rom... but only about a quarter of the connection list... but im not able to open the maps it does bring up on the list... kinda odd...

              the game is completely playable tho...

              but there is still a couple of things I would like to edit... i wanna get all the mystical dogs released into kanto... not just 1... if anyone knows the offset for that i wouldnt need advancemap to finish the hack lol. (even with advance map im having issue finding these darn dogs)

              to be more specific on the dogs:
              I dont need the dogs stats or anything that has to do with the roaming or where to find them... I simply need the code that releases the one dog...
              it has to check your starter pokemon... so it will either compair 4031 (0-2) or it will use some Special 129 command... neither of which have i found anywhere near the elite four or in pallat town after the elite four... (there are a few compair 4031s but they are all for the rivals battles)... if anyone has any specific data on when these dogs are release or exactly what event causes it... cause if its beating the elite four... it must be in the start up somewhere or someplace I dont know how to get too... (my skill set is limited) checking if the elite four has been beat, then checking your starter... then releasing the dog... grrr

                #7834    
              Old February 5th, 2013 (1:36 PM). Edited February 5th, 2013 by karatekid552.
              karatekid552's Avatar
              karatekid552 karatekid552 is offline
              What happens if I push it?....
                 
                Join Date: Nov 2012
                Location: Do you really want to know? Really?
                Gender: Male
                Nature: Bold
                Posts: 1,766

                Quote:
                Originally Posted by LocksmithArmy View Post
                lol no what I ment was... Pokecommunity required 15 posts before I can post links to another site... and I have my screenshots on my own site I was just going to [ img] them with links

                and sure enough that fixed the mew issue... thanks

                but now... i cant open the rom in AdvanceMap... it freezes if I try to open any map... itll load the rom... but only about a quarter of the connection list... but im not able to open the maps it does bring up on the list... kinda odd...

                the game is completely playable tho...

                but there is still a couple of things I would like to edit... i wanna get all the mystical dogs released into kanto... not just 1... if anyone knows the offset for that i wouldnt need advancemap to finish the hack lol. (even with advance map im having issue finding these darn dogs)

                to be more specific on the dogs:
                I dont need the dogs stats or anything that has to do with the roaming or where to find them... I simply need the code that releases the one dog...
                it has to check your starter pokemon... so it will either compair 4031 (0-2) or it will use some Special 129 command... neither of which have i found anywhere near the elite four or in pallat town after the elite four... (there are a few compair 4031s but they are all for the rivals battles)... if anyone has any specific data on when these dogs are release or exactly what event causes it... cause if its beating the elite four... it must be in the start up somewhere or someplace I dont know how to get too... (my skill set is limited) checking if the elite four has been beat, then checking your starter... then releasing the dog... grrr

                The A-map problem happened to me on Emerald on one computer, but the exact same program and file (everything of mine is one flash drive) worked on a different one. So, I would say delete A-map and just redownload it to a new folder. Also try cleaning your temp files and registry with a good program called CCcleaner.

                I would type up the compare commands that you believe to be involved, and compile it. Then, select the compare commands in a hex editor and search for that string of bytes. The only match should be in the script you are looking for. It is probably not in a regular script but rather built into the game's engine itself.

                You could also try searching in the hex editor for what the special would look like compiled which should be 26 31 40 29 01. It should only be in the game once. I'll try myself, but this is how you would go about finding it.

                Also, [img] tags require a link... So they won't work either. It kinda bugs you, but it is a good system to prevent spam so I can't argue it.

                Edit: There are only three offsets containing the normal special 0x129. It doesn't use the special2 command, and therefore would just look like 25 29 10. I will try and find which one is right.

                Edit2: I think I found it, just testing to make sure everything else lines up.

                Edit3: Oh my god... The script it's in, it can't be... It's in the script where Cielo connects with with Lanett on One Island... So the dogs aren't released after the Elite Four... It's when you can trade with Ruby and Saphire!

                Script offset is 0x170EC5 line #87.

                __________________


                Paired with Simba

                  #7835    
                Old February 5th, 2013 (1:56 PM).
                LocksmithArmy's Avatar
                LocksmithArmy LocksmithArmy is offline
                Mew!
                   
                  Join Date: Feb 2013
                  Age: 28
                  Gender: Male
                  Posts: 415

                  Quote:
                  Originally Posted by karatekid552 View Post
                  The A-map problem happened to me on Emerald on one computer, but the exact same program and file (everything of mine is one flash drive) worked on a different one. So, I would say delete A-map and just redownload it to a new folder. Also try cleaning your temp files and registry with a good program called CCcleaner.

                  I would type up the compare commands that you believe to be involved, and compile it. Then, select the compare commands in a hex editor and search for that string of bytes. The only match should be in the script you are looking for. It is probably not in a regular script but rather built into the game's engine itself.

                  You could also try searching in the hex editor for what the special would look like compiled which should be 25 29 01 31 40. It should only be in the game once. I'll try myself, but this is how you would go about finding it.

                  Also, [img] tags require a link... So they won't work either. It kinda bugs you, but it is a good system to prevent spam so I can't argue it.

                  lol I know they require a link, i was using them when it told me i couldnt do it so i had to explain why i couldnt give a screenshot... its alright tho.. Ive been around forums enough to see my share of spammers

                  I shall deffinately try searching through a hex editor like you said... while I may not be able to read alot out of a hex editor, it should give me an offset that I can use in pksv...
                  the compair 4031 is used by the rival every time you fight him... special 129 simply calls on the data stored in var 4031... 2 ways to do the same thing... i have yet to see special 129 used tho. ... (heres hoping its used for this) they will only have an outcome of 0, 1, or 2 depending on which starter you chose

                  for the rival battles it looks like:

                  Spoiler:
                  compare 0x4031 0x2
                  if == call 0x8162B1E ' Equal To
                  compare 0x4031 0x1
                  if == call 0x8162B31 ' Equal To
                  compare 0x4031 0x0
                  if == call 0x8162B44 ' Equal To

                  with each offset being a different battle sequence... so each battle has 3 different offsets for 3 different battles that could be performed at that point... so fighting him in oaks lab and in the elite four would look completely different, I could not compile this script and search for it or I would find... that exact battle (which happens to be his first elite four battle) I could search compare 0x4031 and follow each of those offsets to see if they are a battle or some non rival related event tho... having a new way to search the rom should prove promesing

                  and thanks for the tip on advancemap... hopefully that will work

                    #7836    
                  Old February 5th, 2013 (1:59 PM).
                  karatekid552's Avatar
                  karatekid552 karatekid552 is offline
                  What happens if I push it?....
                     
                    Join Date: Nov 2012
                    Location: Do you really want to know? Really?
                    Gender: Male
                    Nature: Bold
                    Posts: 1,766

                    Quote:
                    Originally Posted by LocksmithArmy View Post
                    lol I know they require a link, i was using them when it told me i couldnt do it so i had to explain why i couldnt give a screenshot... its alright tho.. Ive been around forums enough to see my share of spammers

                    I shall deffinately try searching through a hex editor like you said... while I may not be able to read alot out of a hex editor, it should give me an offset that I can use in pksv...
                    the compair 4031 is used by the rival every time you fight him... special 129 simply calls on the data stored in var 4031... 2 ways to do the same thing... i have yet to see special 129 used tho. ... (heres hoping its used for this) they will only have an outcome of 0, 1, or 2 depending on which starter you chose

                    for the rival battles it looks like:

                    Spoiler:
                    compare 0x4031 0x2
                    if == call 0x8162B1E ' Equal To
                    compare 0x4031 0x1
                    if == call 0x8162B31 ' Equal To
                    compare 0x4031 0x0
                    if == call 0x8162B44 ' Equal To

                    with each offset being a different battle sequence... so each battle has 3 different offsets for 3 different battles that could be performed at that point... so fighting him in oaks lab and in the elite four would look completely different, I could not compile this script and search for it or I would find... that exact battle (which happens to be his first elite four battle) I could search compare 0x4031 and follow each of those offsets to see if they are a battle or some non rival related event tho... having a new way to search the rom should prove promesing

                    and thanks for the tip on advancemap... hopefully that will work

                    You posted after I had found it. Look up at my last post, edit3.

                    It was the only one of the three locations I could find that actually was in a real used script. And it's placement makes sense.

                    __________________


                    Paired with Simba

                      #7837    
                    Old February 5th, 2013 (2:01 PM).
                    FBI's Avatar
                    FBI FBI is offline
                    Free supporter
                    • Silver Tier
                     
                    Join Date: Jan 2013
                    Location: Unknown Island
                    Gender: Male
                    Posts: 1,770

                    Quote:
                    Originally Posted by Aryan143 View Post
                    This is the script I am making. I want that a mankey comes to me and asks to join me when I step on a specific tile and then a Pidgey comes to me immediately and evolves to Pidgeotto and then battles me. Note that 0x2 is because that I replaces no. 2 sprite with Mankey.

                    Spoiler:
                    '---------------
                    #org 0x750000
                    msgbox 0x8750067 MSG_NORMAL '"Someone's here."
                    showsprite 0x2
                    msgbox 0x8750079 MSG_YESNO '"This Mankey looks cute!\nDo you wa..."
                    compare LASTRESULT 0x1
                    if 0x1 goto 0x87500B5
                    compare LASTRESULT 0x0
                    if 0x0 goto 0x87500D3
                    hidesprite 0x2
                    showsprite 0x74
                    msgbox 0x87500E3 MSG_NORMAL '"This Pidgey forces you to\n a batt..."
                    msgbox 0x875011F MSG_NORMAL '"Wait!Pidgey is evolving!"
                    fadescreen 0x1
                    hidesprite 0x74
                    fadescreen 0x0
                    showsprite 0x72
                    cry 0x17 0x0
                    msgbox 0x875013A MSG_NORMAL '"PIDGEOTTO: Pidddddge!"
                    wildbattle 0x11 0xA 0x0
                    fadescreen 0x1
                    fadescreen 0x0
                    hidesprite 0x72
                    setobedience 0xE1E3
                    setobedience 0xE1E3
                    '---------------
                    #org 0x7500B5
                    givepokemon 0x38 0x5 0x0 0x0 0x0 0x0
                    fanfare 0x13E
                    msgbox 0x8750152 MSG_NORMAL '"It seems happy."
                    waitfanfare
                    release
                    end

                    '---------------
                    #org 0x7500D3
                    msgbox @0x8750153 MSG_NORMAL
                    release
                    end

                    '---------
                    ' Strings
                    '---------
                    #org 0x750067
                    = Someone's here.

                    #org 0x750079
                    = This Mankey looks cute!\nDo you want to take\p it with you?

                    #org 0x7500E3
                    = This Pidgey forces you to\n a battle.\pBut it's not strong.

                    #org 0x75011F
                    = Wait!Pidgey is evolving!

                    #org 0x75013A
                    = PIDGEOTTO: Pidddddge!

                    #org 0x750152
                    = It seems happy.

                    #org 0x750153
                    = Then go home!

                    If this is one of those green script tiles, you've got a ton of structure errors in the script. The first and most obvious error is that even after the script on this tile is run once, it will keep running everytime you walk into it simple because you haven't used any flags (or variables)!
                    The second is probably the reason you're having the error you are having. It's the whole "jump" thing. I might make a video or something on jump vs call. People keep getting those messed up and causing their scripts to function incorrectly.

                    When you are starting out, or are working on a script that is "difficult", you must first identify what you want happening. That sound simple and stupid, but what I mean is you want to evaluate different situations that the event will get you into. For example, this one here allows the player to have a choice to adopt the Mankey. What if the player says no? Does the Mankey go away and the Pidgey/Pideotto still attack? Does the Mankey stay there forever until you feel like adopting it? These are good questions that you should answer first. There are also the yes cases. Say I accepted it's offer to join my team, but my current team is full (what then?). What if I accepted the offer, but then later lost in battle to Pidgeotto?

                    So then lets, look at the script again. When reviewing it, I'm going to make the following assumptions:
                    - The player MUST accept the Mankey's offer, or it will keep asking until you say yes.
                    - The player is allowed to give it a nickname
                    - If the player doesn't have space in the party, he/she must come back with an open slot

                    Quote:
                    #org 0x750000
                    msgbox 0x8750067 MSG_NORMAL
                    showsprite 0x2 'First problem, the mankey appears before you instantly (looks bad ingame).
                    msgbox 0x8750079 MSG_YESNO
                    compare LASTRESULT 0x1 ' If yes, we jump (go to this jump now and read my comments on it).
                    if 0x1 goto 0x87500B5
                    compare LASTRESULT 0x0' If no, we jump (go to this jump now and read my comments on it).
                    if 0x0 goto 0x87500D3
                    hidesprite 0x2 'From here down, nothing is run. This is because you checked no and yes.
                    showsprite 0x74
                    msgbox 0x87500E3 MSG_NORMAL '"This Pidgey forces you to\n a batt..."
                    msgbox 0x875011F MSG_NORMAL '"Wait!Pidgey is evolving!"
                    fadescreen 0x1
                    hidesprite 0x74
                    fadescreen 0x0
                    showsprite 0x72
                    cry 0x17 0x0
                    msgbox 0x875013A MSG_NORMAL '"PIDGEOTTO: Pidddddge!"
                    wildbattle 0x11 0xA 0x0
                    fadescreen 0x1
                    fadescreen 0x0
                    hidesprite 0x72
                    setobedience 0xE1E3
                    setobedience 0xE1E3'Forgot release end here, also, you don't need to set obedience at all

                    '---------------
                    #org 0x7500B5 ' No checks are made to see if party is full, also not allowed to nickname
                    givepokemon 0x38 0x5 0x0 0x0 0x0 0x0
                    fanfare 0x13E
                    msgbox 0x8750152 MSG_NORMAL '"It seems happy."
                    waitfanfare
                    release 'Release and end implies end of the script. We don't fight Pidgey is player says YES.
                    end 'Now go back to the main body

                    '---------------
                    #org 0x7500D3 'Just a simple message, don't need to jump for this, you can put it in main body
                    msgbox @0x8750153 MSG_NORMAL
                    release 'Release and end implies end of the script. We don't fight Pidgey if player says YES.
                    end 'Now go back to the main body

                    Now we see that you've miss used your jumps and the logic is a little flawed in the script because of it. Here's a template of what it should look like:

                    Spoiler:

                    Code:
                    #dyn 0x740000 ' Firstly this is in PKSV not XSE, compile it in PKSV and Decompile it in XSE to fully understand
                    #org @start
                    compare 0x5001 0x2
                    if == jump @end' If it's 0x2 I assume the full script is completed
                    compare 0x5001 0x1
                    if == jump @check_want' If it's 0x1 then I didn't have room for mankey last time I was here
                    msgbox @appears 'The message you had
                    callstd MSG_NORMAL
                    clearflag 0x202 'Set mankey's personID to 202, and set this flag in a green script tile before this script(player's room is a good place)
                    reappear 0x2 'Mankey appears
                    setvar 0x5001 0x1 ' I set 5001 to 1, ensuring I've already had mankey appear
                    jump @check_want ' I jump to the yesno message, you'll see why

                    #org @check_want msgbox @want ' Ask if I want mankey callstd MSG_YESNO compare LASTRESULT YES ' If yes I jump to @get (yes I jump, not call) if == jump @get msgbox @too_cute 'If I said I don't want mankey, it says something like makey's cute though and loops again callstd MSG_NORMAL jump @check_want 'Part that makes it loop

                    #org @get countpokemon ' Checks the amount of 'mon in my party copyvar 0x5002 LASTRESULT ' I'm setting 0x5002 to this value for a reason, you'll see why compare 0x5002 0x6 ' Check if the number of party 'mon are 6 if == jump @makeroom addpokemon MANKEY 0x5 NONE 0x0 0x0 0x0 ' If less than six give me mankey storepokemon 0x0 MANKEY ' Equivalent to XSE's bufferpokemon message @obtain fanfare 0x101 showmsg 'Shows the message I prepared waitfanfare msgbox @give_nick 'Ask if I want to nickname it, I'm not forcing a nickname though callstd MSG_YESNO compare LASTRESULT YES 'If yes call @nickname. I'm calling here, not jumping because I will returning to this point later if == call @nickname disappear 0x2 'Mankey disappears setflag 0x202 ' set 202 setvar 0x5001 0x2 jump @battle_section ' I don't need to make the jump, but it makes the script more readable

                    #org @nickname copyvar 0x8004 0x5002 ' Now I copy 0x5002's value (1-6) into 0x8004 subtractvar 0x8004 0x1 ' I subtract one, because for nickname special you need to set 0x8004 to pokemon slot number (0-5) fadescreen FADEOUT_BLACK special NAME_POKEMON waitspecial return 'I return back the where this subroutine was called

                    #org @battle_section clearflag 0x201 reappear 0x74 ' Mistake? Or you really have someone's person ID set to 116? msgbox @force_battle 'The pidgey wants to battle text callstd MSG_NORMAL pause 0x40 'Now I create the ingame illusion that it's evolving by quickly flashing the screen white fadescreen 0x0 pause 0x40 msgbox @evolving 'pidgey evolving message callstd MSG_NORMAL fadescreen 0x0 pause 0x10 fadescreen 0x0 disappear 0x74 ' I don't believe these person IDs you have lol reappear 0x72 cry 0x17 0x0 'Not sure if right cry, I just copied what you had msgbox @scream ' Part where it screams "Pidddddddddgey!" callstd MSG_NORMAL setflag 0x201 'Set flag 201 to keep the pidgey/pidgeotto disappeared battle 0x11 0xA 0x0 'Again not sure if right, I just copied what you had fadescreen 0x1 disappear 0x72'pidgeotto disappears fadescreen 0x0 releaseall 'FINALLY WE END end

                    #org @makeroom msgbox @full_party'tell the player to come back with less than six, also event is paused for duration callstd MSG_NOCLOSE release end

                    #org @end releaseall'script already complete, but player walking in tile anyways end

                    #org @force_battle = Pidgey wants to battle!\nIt's not very strong though[.]

                    #org @scream = PIDEOTTO: Pidddddge!

                    #org @give_nick = Give MANKEY a nickname?

                    #org @evolving = Wait! Pidgey is evolving!

                    #org @forced_battle = This pidgey forces you to\na battle.\pBut it's not strong.

                    #org @too_cute = Awww[.]\nIt's eyes gleam with love!\lI can't just leave it.

                    #org @want = This Mankey looks cute!\nDo you want to take it with you?

                    #org @full_party = I don't have room[.]\nBetter come back for it later!

                    #org @obtain = \v\h01 obtained a \v\h02!

                    REQUIRED TO MAKE THIS WORK:
                    - Pidgey and Pidgeotto person ids set to 202 in A-MAP
                    - Mankey person ID set to 201 in A-MAP
                    - Flags 201, 202 unused, and set before this event (in players room = best place)
                    - variables 5001, 5002 unused
                    - Pidgey Person event number in Advance map set to 116
                    - Pideotto Person event number in Advance map set to 114

                    Technical Notes:
                    - This is for FireRed
                    - This was written in pksv
                    - I have not tested this, but I planned it out while writing the post so it will work
                    - I'm using the variable 0x5001 to keep track of how much of the script was complete

                    General Notes:
                    - Call is generally used when you want to do little things then come back to the main script
                    - Jump is used when you don't want the rest of the script to run given a condition
                    - Also, you can take this 1 step further with the special 0xB4. You can check if it was defeated, and if it was you can do a little "Pidgeotto ran away from further shame" or something

                    Aside from the few technical issues there, what about the Mankey's relation to the story (I know that this is unrelated to the script, but it's for you own understanding). Why is this random Mankey comming up to me and wanting to join my team? It sounds absurd and doesn't really make sense for it to volunteer itself to a life long commitment.

                    Well, next time don't expect a reply this detailed. I sorta felt nice on this one, and noticed a lot of people in this thread don't plan things through on bigger scripts (they just dive in). If you don't understand anything about the script I put up feel free to ask questions, I will try to answer them :)

                    __________________

                    ...

                      #7838    
                    Old February 5th, 2013 (2:09 PM). Edited February 5th, 2013 by LocksmithArmy.
                    LocksmithArmy's Avatar
                    LocksmithArmy LocksmithArmy is offline
                    Mew!
                       
                      Join Date: Feb 2013
                      Age: 28
                      Gender: Male
                      Posts: 415

                      Quote:
                      Originally Posted by karatekid552 View Post
                      You posted after I had found it. Look up at my last post, edit3.

                      It was the only one of the three locations I could find that actually was in a real used script. And it's placement makes sense.

                      you sir... are amazing...

                      thank you so much

                      stupid interwebz gave me wrong info... everywhere I looked said it was released after the elite four... nowonder i couldnt find it

                      now its time to stare at this code till i magically understand it (thats kinda how i learn... thru osmosis)

                      especially since ive never played this part of the game... im hacking thru only a gen 1 and 2 knowledge set..

                        #7839    
                      Old February 5th, 2013 (2:14 PM).
                      karatekid552's Avatar
                      karatekid552 karatekid552 is offline
                      What happens if I push it?....
                         
                        Join Date: Nov 2012
                        Location: Do you really want to know? Really?
                        Gender: Male
                        Nature: Bold
                        Posts: 1,766

                        Quote:
                        Originally Posted by LocksmithArmy View Post
                        you sir... are amazing...

                        thank you so much

                        stupid interwebz gave me wrong info... everywhere I looked said it was released after the elite four... nowonder i couldnt find it

                        now its time to stare at this code till i magically understand it (thats kinda how i learn... thru osmosis)

                        especially since ive never played this part of the game... im hacking thru only a gen 1 and 2 knowledge set..

                        That is what I always believed. Which is why I was so shocked. The other two locations, I could never make a logical script out of. In one, the special was followed by setmapflag 0x2294 or something like that and the other was just random commands with really high setflags and such.

                        I think it is one of those things that Game Freak lied about in the game walkthrough guide thing in order to make it seem more heroic and also to force the player to keep searching and end up going to the Sevi Islands instead of just throwing down the game. It might have also been to help discourage hackers from finding it by hiding it somewhere else, but obviously if that was the case... It didn't work:p.

                        Diegoisawesome's tutorial is a great place to learn scripting if you need some help.

                        __________________


                        Paired with Simba

                          #7840    
                        Old February 5th, 2013 (2:24 PM). Edited February 5th, 2013 by LocksmithArmy.
                        LocksmithArmy's Avatar
                        LocksmithArmy LocksmithArmy is offline
                        Mew!
                           
                          Join Date: Feb 2013
                          Age: 28
                          Gender: Male
                          Posts: 415

                          Quote:
                          Originally Posted by karatekid552 View Post
                          That is what I always believed. Which is why I was so shocked. The other two locations, I could never make a logical script out of. In one, the special was followed by setmapflag 0x2294 or something like that and the other was just random commands with really high setflags and such.

                          I think it is one of those things that Game Freak lied about in the game walkthrough guide thing in order to make it seem more heroic and also to force the player to keep searching and end up going to the Sevi Islands instead of just throwing down the game. It might have also been to help discourage hackers from finding it by hiding it somewhere else, but obviously if that was the case... It didn't work:p.

                          Diegoisawesome's tutorial is a great place to learn scripting if you need some help.

                          ive got it saved, ive started through it, but usually stop to do some work on this hack lol

                          it seems that Special 129 is the thing that actually releases the pokemon... because immediately after it, the script is ended, there is no call for me to follow and alter... I need to find out how to redefine what these specials do...

                          so how do you decide what hex values to search for... ive decided to search for every instance of: "compare 0x4031"

                          I assembeled it, saved it, opened it in a hex editor and searched for those numbers... with no luck...

                          I wish I could just open the entire rom in pksv... im sure it would take time... but I can wait

                            #7841    
                          Old February 5th, 2013 (10:34 PM).
                          SpadeEdge16's Avatar
                          SpadeEdge16 SpadeEdge16 is offline
                             
                            Join Date: May 2012
                            Gender: Male
                            Posts: 154

                            Karatekid, here's the scripts, both compiled and not. Also is the map with the events of the map, the two trainers that mess up are the two person events in the upper left. The one from my previous post is the higher up of the two, to be specific.

                            Spoiler:
                            #dynamic 0x800000
                            #org @start
                            trainerbattle 0x0 0x50 0x0 @challenge @defeat
                            msgbox @hey 0x6
                            release
                            end

                            #org @hey
                            = My POKEMON will be taken care of\neven if they do lose a lot.

                            #org @challenge
                            = My POKEMON are so tiny!\nBut I know they can be tough too!

                            #org @defeat
                            = Oh, no!\nMaybe I didn't feed them enough...


                            Spoiler:
                            '---------------
                            #org 0x806CEC
                            trainerbattle 0x0 0x50 0x0 0x8806D44 0x8806D80
                            msgbox 0x8806D05 0x6 '"My POKEMON will be taken care of\n..."
                            release
                            end

                            '---------
                            ' Strings
                            '---------
                            #org 0x806D44
                            = My POKEMON are so tiny!\nBut I know they can be tough too!

                            #org 0x806D80
                            = Oh, no!\nMaybe I didn't feed them enough...

                            #org 0x806D05
                            = My POKEMON will be taken care of\neven if they do lose a lot.


                            http://i30.photobucket.com/albums/c304/starkat_/ROUTE1_evt_zpsad6e6c11.png

                              #7842    
                            Old February 6th, 2013 (1:43 AM).
                            FBI's Avatar
                            FBI FBI is offline
                            Free supporter
                            • Silver Tier
                             
                            Join Date: Jan 2013
                            Location: Unknown Island
                            Gender: Male
                            Posts: 1,770

                            Quote:
                            Originally Posted by SpadeEdge16 View Post
                            Karatekid, here's the scripts, both compiled and not. Also is the map with the events of the map, the two trainers that mess up are the two person events in the upper left. The one from my previous post is the higher up of the two, to be specific.
                            Spoiler:
                            #dynamic 0x800000
                            #org @start
                            trainerbattle 0x0 0x50 0x0 @challenge @defeat
                            msgbox @hey 0x6
                            release
                            end

                            #org @hey
                            = My POKEMON will be taken care of\neven if they do lose a lot.

                            #org @challenge
                            = My POKEMON are so tiny!\nBut I know they can be tough too!

                            #org @defeat
                            = Oh, no!\nMaybe I didn't feed them enough...


                            Spoiler:
                            '---------------
                            #org 0x806CEC
                            trainerbattle 0x0 0x50 0x0 0x8806D44 0x8806D80
                            msgbox 0x8806D05 0x6 '"My POKEMON will be taken care of\n..."
                            release
                            end

                            '---------
                            ' Strings
                            '---------
                            #org 0x806D44
                            = My POKEMON are so tiny!\nBut I know they can be tough too!

                            #org 0x806D80
                            = Oh, no!\nMaybe I didn't feed them enough...

                            #org 0x806D05
                            = My POKEMON will be taken care of\neven if they do lose a lot.


                            http://i30.photobucket.com/albums/c304/starkat_/ROUTE1_evt_zpsad6e6c11.png

                            Oh, you want KarateKid to help you. :(
                            Nothing is wrong with the script itself. I doubt there is any problem in using 0x50 either, so it's a mystery!
                            Maybe some of the more exprienced hackers have had this problem and can help you.

                            Here are things you can try:
                            1) Check no 2 people have the same Person ID number (I know it sounds stupid, but try it)
                            2) Script is compiled in right ROM.
                            3) Check no 2 trainers use the same trainer ID?
                            4) Make a person event, and let it's script tell you whether or not the trainerflag is set for 0x50. We can go from there

                            __________________

                            ...

                              #7843    
                            Old February 6th, 2013 (3:31 AM). Edited February 6th, 2013 by karatekid552.
                            karatekid552's Avatar
                            karatekid552 karatekid552 is offline
                            What happens if I push it?....
                               
                              Join Date: Nov 2012
                              Location: Do you really want to know? Really?
                              Gender: Male
                              Nature: Bold
                              Posts: 1,766

                              Quote:
                              Originally Posted by LocksmithArmy View Post
                              ive got it saved, ive started through it, but usually stop to do some work on this hack lol

                              it seems that Special 129 is the thing that actually releases the pokemon... because immediately after it, the script is ended, there is no call for me to follow and alter... I need to find out how to redefine what these specials do...

                              so how do you decide what hex values to search for... ive decided to search for every instance of: "compare 0x4031"

                              I assembeled it, saved it, opened it in a hex editor and searched for those numbers... with no luck...

                              I wish I could just open the entire rom in pksv... im sure it would take time... but I can wait

                              I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

                              If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.

                              Quote:
                              Originally Posted by FBI agent View Post
                              Oh, you want KarateKid to help you.
                              Nothing is wrong with the script itself. I doubt there is any problem in using 0x50 either, so it's a mystery!
                              Maybe some of the more exprienced hackers have had this problem and can help you.

                              Here are things you can try:
                              1) Check no 2 people have the same Person ID number (I know it sounds stupid, but try it)
                              2) Script is compiled in right ROM.
                              3) Check no 2 trainers use the same trainer ID?
                              4) Make a person event, and let it's script tell you whether or not the trainerflag is set for 0x50. We can go from there

                              I was the one who asked for him to post everything earlier:p.

                              I actually wanted a screenshot of the settings for each person event in A-map. I don't think it is a scripting error, if I remember correctly, the problem was the script activating when you weren't in the line of sight. This to me seems like an A-map problem, because it is the settings for the person event that control when the trainer will move.

                              __________________


                              Paired with Simba

                                #7844    
                              Old February 6th, 2013 (4:01 AM).
                              QuartierGenerale QuartierGenerale is offline
                                 
                                Join Date: Oct 2012
                                Posts: 53

                                I don't known if is the correct section.

                                If in Ruby i wanna use Surf after 4th badge instead of 5th, what i've to change?

                                Thanks

                                  #7845    
                                Old February 6th, 2013 (7:20 AM).
                                SpadeEdge16's Avatar
                                SpadeEdge16 SpadeEdge16 is offline
                                   
                                  Join Date: May 2012
                                  Gender: Male
                                  Posts: 154

                                  Quote:
                                  Originally Posted by karatekid552 View Post
                                  I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

                                  If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.

                                  I was the one who asked for him to post everything earlier:p.

                                  I actually wanted a screenshot of the settings for each person event in A-map. I don't think it is a scripting error, if I remember correctly, the problem was the script activating when you weren't in the line of sight. This to me seems like an A-map problem, because it is the settings for the person event that control when the trainer will move.

                                  No offense FBI Agent, I'll gladly accept anyone's help, haha.
                                  Oh my bad, I'll have those up here later. Although I can tell you know the only things I did were the usual. Set the trainer box to 01 and then I gave them a 3 view radius.

                                    #7846    
                                  Old February 6th, 2013 (8:26 AM). Edited February 6th, 2013 by LocksmithArmy.
                                  LocksmithArmy's Avatar
                                  LocksmithArmy LocksmithArmy is offline
                                  Mew!
                                     
                                    Join Date: Feb 2013
                                    Age: 28
                                    Gender: Male
                                    Posts: 415

                                    Quote:
                                    Originally Posted by karatekid552 View Post
                                    I don't think that there will be a compare because it is specific to what it does. Why not just write it at the end of your script? No one will know that it didn't happen when the player was told it happened, they are locked in the script? Oh, and if I remember correctly, there is a bank containing pointers to all of the specials, however, most of them are ASM routines.

                                    If you are trying to make different Pokemon roam, just use JPAN's engine, he added a way to make any Pokemon you want roam.

                                    my goal was to make all 3 dogs raom... by changing what event... instead of searching for which 1 to let roam it would just release all 3...

                                    but since that seems to be above my skill set I have changed my sights...

                                    I am putting 2 events throughout the land that will also be based on your starting pokemon... and you will fight the other 2 dogs

                                    here is the first event:

                                    Spoiler:
                                    #org 0x871D206
                                    '-----------------------------------
                                    compare 0x4031 0x0
                                    if == call 0x871D308 ' Equal To
                                    compare 0x4031 0x1
                                    if == call 0x871D40A ' Equal To
                                    compare 0x4031 0x2
                                    if == call 0x871D50C ' Equal To
                                    end

                                    #org 0x871D308
                                    '-----------------------------------
                                    special INIT_STEPCOUNT
                                    compare LASTRESULT 0x2
                                    if == jump 0x81A7AE0 ' Equal To
                                    special GET_STEPCOUNT
                                    lock
                                    faceplayer
                                    checksound
                                    cry SUICUNE 0x2
                                    message 0x81A7291 ' Wroooooooaaaaaarrrr!
                                    showmsg
                                    waitcry
                                    pause 0x14
                                    playsound 0x0 0x2
                                    waitbutton
                                    battle SUICUNE 50 NONE
                                    setflag 0x807
                                    special BATTLE_PIXELLATE
                                    waitspecial
                                    clearflag 0x807
                                    special2 LASTRESULT 0xB4
                                    compare LASTRESULT 0x1
                                    if == jump 0x871CEF9 ' Equal To
                                    compare LASTRESULT 0x4
                                    if == jump 0x871D001 ' Equal To
                                    compare LASTRESULT 0x5
                                    if == jump 0x871D001 ' Equal To
                                    setflag 0x202
                                    release
                                    end

                                    #org 0x871D40A
                                    '-----------------------------------
                                    special INIT_STEPCOUNT
                                    compare LASTRESULT 0x2
                                    if == jump 0x81A7AE0 ' Equal To
                                    special GET_STEPCOUNT
                                    lock
                                    faceplayer
                                    checksound
                                    cry RAIKOU 0x2
                                    message 0x81A7291 ' Wroooooooaaaaaarrrr!
                                    showmsg
                                    waitcry
                                    pause 0x14
                                    playsound 0x0 0x2
                                    waitbutton
                                    battle RAIKOU 50 NONE
                                    setflag 0x807
                                    special BATTLE_PIXELLATE
                                    waitspecial
                                    clearflag 0x807
                                    special2 LASTRESULT 0xB4
                                    compare LASTRESULT 0x1
                                    if == jump 0x871CEF9 ' Equal To
                                    compare LASTRESULT 0x4
                                    if == jump 0x871D60E ' Equal To
                                    compare LASTRESULT 0x5
                                    if == jump 0x871D60E ' Equal To
                                    setflag 0x202
                                    release
                                    end

                                    #org 0x871D50C
                                    '-----------------------------------
                                    special INIT_STEPCOUNT
                                    compare LASTRESULT 0x2
                                    if == jump 0x81A7AE0 ' Equal To
                                    special GET_STEPCOUNT
                                    lock
                                    faceplayer
                                    checksound
                                    cry ENTEI 0x2
                                    message 0x81A7291 ' Wroooooooaaaaaarrrr!
                                    showmsg
                                    waitcry
                                    pause 0x14
                                    playsound 0x0 0x2
                                    waitbutton
                                    battle ENTEI 50 NONE
                                    setflag 0x807
                                    special BATTLE_PIXELLATE
                                    waitspecial
                                    clearflag 0x807
                                    special2 LASTRESULT 0xB4
                                    compare LASTRESULT 0x1
                                    if == jump 0x871CEF9 ' Equal To
                                    compare LASTRESULT 0x4
                                    if == jump 0x871D710 ' Equal To
                                    compare LASTRESULT 0x5
                                    if == jump 0x??????9 ' Equal To
                                    setflag 0x202
                                    release
                                    end

                                    #org 0x871D710
                                    '-----------------------------------
                                    setvar 0x8004 0xF4
                                    jump 0x81A9236

                                    #org 0x871D60E
                                    '-----------------------------------
                                    setvar 0x8004 0xF3
                                    jump 0x81A9236

                                    #org 0x81A7AE0
                                    '-----------------------------------
                                    release
                                    end

                                    #org 0x871CEF9
                                    '-----------------------------------
                                    setflag 0x202
                                    jump 0x81A922D

                                    #org 0x81A922D
                                    '-----------------------------------
                                    fadescreen FADEOUT_BLACK
                                    disappear LASTTALKED
                                    fadescreen FADEIN_BLACK
                                    release
                                    end

                                    #org 0x871D001
                                    '-----------------------------------
                                    setvar 0x8004 0xF5
                                    jump 0x81A9236

                                    #org 0x81A9236
                                    '-----------------------------------
                                    fadescreen FADEOUT_BLACK
                                    disappear LASTTALKED
                                    fadescreen FADEIN_BLACK
                                    storepokemon 0x0 0x8004
                                    msgbox 0x871D104 ' The \v\h02 ran away...
                                    callstd MSG_NOCLOSE ' Non-closing message
                                    release
                                    ' Release commands close any open messages
                                    end

                                    #org 0x81A7291
                                    = Wroooooooaaaaaarrrr!

                                    #org 0x871D104
                                    = The \v\h02 ran away!

                                    my big issue with this is Im a little lost on the level script for this... the event works fine (as far as I can test with only 1 game save)

                                    I want to have it check if flag 844 is set to make the event visable... then compare 4031 to see which sprite to show for the event... because there are all 3 dogs in the sprites (141,142,143)

                                    so for this event (ive only wrote out the one so far, but the other will be very similar, itll just have different flags and the compare 4031 will be offset)
                                    if 4031 = 1 itll show sprite 142 for person id 201
                                    if 4031 = 2 itll show sprite 143 for person id 201
                                    if 4031 = 0 itll show sprite 141 for person id 201

                                    but only after CELIO successfully connects to LANETTE (when you're allowed to trade to R/S/E.)

                                    does that make since?

                                      #7847    
                                    Old February 6th, 2013 (9:00 AM).
                                    FBI's Avatar
                                    FBI FBI is offline
                                    Free supporter
                                    • Silver Tier
                                     
                                    Join Date: Jan 2013
                                    Location: Unknown Island
                                    Gender: Male
                                    Posts: 1,770

                                    Quote:
                                    Originally Posted by LocksmithArmy View Post
                                    my goal was to make all 3 dogs raom... by changing what event... instead of searching for which 1 to let roam it would just release all 3...

                                    but since that seems to be above my skill set I have changed my sights...

                                    I am putting 2 events throughout the land that will also be based on your starting pokemon... and you will fight the other 2 dogs ;)

                                    here is the first event:

                                    Spoiler:
                                    script

                                    my big issue with this is Im a little lost on the level script for this... the event works fine (as far as I can test with only 1 game save)

                                    I want to have it check if flag 844 is set to make the event visable... then compare 4031 to see which sprite to show for the event... because there are all 3 dogs in the sprites (141,142,143)

                                    so for this event (ive only wrote out the one so far, but the other will be very similar, itll just have different flags and the compare 4031 will be offset)
                                    if 4031 = 0 itll show sprite 142 for person id 201
                                    if 4031 = 1 itll show sprite 143 for person id 201
                                    if 4031 = 2 itll show sprite 141 for person id 201

                                    but only after CELIO successfully connects to LANETTE (when you're allowed to trade to R/S/E.)

                                    does that make since?

                                    From what I gather, you are trying to make a script where you battle one of the three dogs depending on the value in 4031?

                                    Instead of trying to change the sprite of a specific overworld to one of the three dogs, it's far easier to create 3 seperate overworlds and "show" one of the sprites (depending on 4031).

                                    Something of this structure:

                                    checkflag 0x844
                                    compare LASTRESULT FALSE
                                    if == jump :end
                                    compare 0x4031 0x0
                                    if == jump @raikou_appear
                                    ...
                                    ...
                                    ...
                                    :end
                                    release
                                    end

                                    #org @raikou_appear
                                    clearflag 0x200 'all dogs can have 200 as a flag, it shouldn't matter, set this in the players room or something
                                    reappear 0x[person ID unique to raikou]
                                    ....
                                    battle script
                                    ...
                                    setvar 0x5000 0x1
                                    release
                                    end

                                    For level scripts, the way you insert them is different. There is a tutorial by Cooley for level scripts in the tutorial section (just use the search function) that goes through how very nicely. It's for XSE, but it can be applied to PKSV by ticking off the levelscript box when you go to decompile.

                                    __________________

                                    ...

                                      #7848    
                                    Old February 6th, 2013 (1:58 PM).
                                    LocksmithArmy's Avatar
                                    LocksmithArmy LocksmithArmy is offline
                                    Mew!
                                       
                                      Join Date: Feb 2013
                                      Age: 28
                                      Gender: Male
                                      Posts: 415

                                      thanks FBI agent...

                                      while I probably ended up doing exactly the opposite of what you had said... your comments struck an idea in my brain and I got her working...

                                      basically, I created 3 dogs with the same code and different sprites... and I gave each one a different ID, then somewhere else I turned all the IDs off... and turned one back on based on 4031 later in the game...

                                      and the cool part is... I did not turn off the sprited immediately... I did turn them off before you could get to them and at a mandatory spot in the game... so you cant access em... but in the beginning of the game if you pay attention you can see one of the dogs chillin off the beaten path... but by the time you get to that area, he will be gone

                                      and if you pick charmander that dog will apear later... in that spot... if you picked a different starter, another dog will apear NEAR that area... each of the 3 sprites is actually in a different spot... so each dog that appears show up in a little bit different location. they are kinda beside each other but in the beginning of the game you can only see the closest one to the road...

                                      and thanks to everyone else in this thread who helped me (or anyone else for that matter)
                                      lord knows I needed it and now my hack is complete

                                      rest assured I did not just hop on to ask help without doing a weeks research on the issue with no luck... so you guys really helped me finish my hack (it was the last thing to do because I solved every other problem before this one.)

                                      __________________

                                        #7849    
                                      Old February 6th, 2013 (2:07 PM).
                                      FBI's Avatar
                                      FBI FBI is offline
                                      Free supporter
                                      • Silver Tier
                                       
                                      Join Date: Jan 2013
                                      Location: Unknown Island
                                      Gender: Male
                                      Posts: 1,770

                                      Quote:
                                      Originally Posted by LocksmithArmy View Post
                                      thanks FBI agent...

                                      while I probably ended up doing exactly the opposite of what you had said... your comments struck an idea in my brain and I got her working...

                                      basically, I created 3 dogs with the same code and different sprites... and I gave each one a different ID, then somewhere else I turned all the IDs off... and turned one back on based on 4031 later in the game...

                                      and the cool part is... I did not turn off the sprited immediately... I did turn them off before you could get to them and at a mandatory spot in the game... so you cant access em... but in the beginning of the game if you pay attention you can see one of the dogs chillin off the beaten path... but by the time you get to that area, he will be gone ;)

                                      and if you pick charmander that dog will apear later... in that spot... if you picked a different starter, another dog will apear NEAR that area... each of the 3 sprites is actually in a different spot... so each dog that appears show up in a little bit different location. they are kinda beside each other but in the beginning of the game you can only see the closest one to the road...

                                      and thanks to everyone else in this thread who helped me (or anyone else for that matter)
                                      lord knows I needed it and now my hack is complete

                                      rest assured I did not just hop on to ask help without doing a weeks research on the issue with no luck... so you guys really helped me finish my hack (it was the last thing to do because I solved every other problem before this one.)

                                      Ironically you did exactly as I suggested, rather than the opposite :P
                                      The only difference seems to be that you put the dogs in different places, whereas I assumed the dogs would be in the same map.

                                      Well, I'm glad you're hack is going well now.

                                      __________________

                                      ...

                                        #7850    
                                      Old February 6th, 2013 (2:19 PM).
                                      kj3400's Avatar
                                      kj3400 kj3400 is offline
                                      Wants a Magneton for a Charger
                                         
                                        Join Date: Mar 2012
                                        Gender: Male
                                        Nature: Lax
                                        Posts: 53

                                        Quote:
                                        Originally Posted by QuartierGenerale View Post
                                        I don't known if is the correct section.

                                        If in Ruby i wanna use Surf after 4th badge instead of 5th, what i've to change?

                                        Thanks

                                        This is a good question. Are the various HMs tied to a particular badge? Can you change that? And can you give badges in a different order?

                                        Closed Thread
                                        Quick Reply

                                        Sponsored Links
                                        Thread Tools

                                        Posting Rules
                                        You may not post new threads
                                        You may not post replies
                                        You may not post attachments
                                        You may not edit your posts

                                        BB code is On
                                        Smilies are On
                                        [IMG] code is On
                                        HTML code is Off

                                        Forum Jump


                                        All times are GMT -8. The time now is 9:11 PM.