• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script✓] Pewter Guidepost Man Issue

80
Posts
8
Years
I'm trying to edit the paths the boy in Pewter that shows you to the Gym walks. I got the first part of the script done fine but this part is giving me some hell #org 0x165F71. When I enter the commands and compile, the commands change. I'm trying to put in these:
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0x30
#raw 0x28

but it ends up as these:
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x25 'Step on the Spot Down (Faster)
 
Last edited:
232
Posts
12
Years
  • Seen Sep 10, 2019
I'm trying to edit the paths the boy in Pewter that shows you to the Gym walks. I got the first part of the script done fine but this part is giving me some hell #org 0x165F71. When I enter the commands and compile, the commands change. I'm trying to put in these:
#raw 0x10
#raw 0x12
#raw 0x10
#raw 0x30
#raw 0x28

but it ends up as these:
#raw 0x10 'Step Down (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x25 'Step on the Spot Down (Faster)

It's because you're overwriting the bytes and your entry is longer than what that offset holds. raw bytes are actually the bytes shown when you open the ROM with a hex editor and go to the offset. these movement byte entries always end with 0xFE. You'll have to use another offset or do a search in the hex editor, the bytes you want to use and if you can find it, just repoint the offset to the found location.
 
80
Posts
8
Years
It's because you're overwriting the bytes and your entry is longer than what that offset holds. raw bytes are actually the bytes shown when you open the ROM with a hex editor and go to the offset. these movement byte entries always end with 0xFE. You'll have to use another offset or do a search in the hex editor, the bytes you want to use and if you can find it, just repoint the offset to the found location.

I think in this particular case, it would be easier to make the initial script short, then use the Delay command during the next part. How would I go about doing the suggestions you gave in case this comes up again later?
Also I'm not sure how me adding three bytes to an originally 2 command script raises the total from an expected 5 to 6?
 
232
Posts
12
Years
  • Seen Sep 10, 2019
I think in this particular case, it would be easier to make the initial script short, then use the Delay command during the next part. How would I go about doing the suggestions you gave in case this comes up again later?
Also I'm not sure how me adding three bytes to an originally 2 command script raises the total from an expected 5 to 6?
the easiest laziest way to do this would be to search for free space and use that free space's offset. For example, you've found free space at 0x800000, then you would replace the 0x165F71 with 0x800000 within the script itself, while adding in your custom movements to that offset. You must end your movement with 0xFE.

It's actually originally three commands (10, 25, FE). and you were overwriting those three(it doesn't go beyond 0xfe i guess) (in your case, only the first three of your custom movements overwrote those bytes. It became 6 (7 including 0xFE) because you got rid of the 0xFE when you overwrote, so the next set of commands were bridged to yours.

basically: your entry can't be longer than the original, otherwise you need to use a different offset.
 
80
Posts
8
Years
the easiest laziest way to do this would be to search for free space and use that free space's offset. For example, you've found free space at 0x800000, then you would replace the 0x165F71 with 0x800000 within the script itself, while adding in your custom movements to that offset. You must end your movement with 0xFE.

It's actually originally three commands (10, 25, FE). and you were overwriting those three(it doesn't go beyond 0xfe i guess) (in your case, only the first three of your custom movements overwrote those bytes. It became 6 (7 including 0xFE) because you got rid of the 0xFE when you overwrote, so the next set of commands were bridged to yours.

basically: your entry can't be longer than the original, otherwise you need to use a different offset.

Forgot to mention that I never overwrote 0xFE. I'm gonna go ahead and do the free space thing, but I still wanna know where the third 0x10 came from where there's supposed to be 0x30. like, I'd think it'd be
#raw 0x10
#raw 0x12
#raw 0x10
[S-HIGHLIGHT]#raw 0x30[/S-HIGHLIGHT]
#raw 0x10
#raw 0x25
 
Back
Top