Binary ROM HackingNeed a helping hand or just want to talk about binary ROM hacks? Get comments and answers to any ROM Hacking-related problems, questions or thoughts you have here.
So I'm writing a script where if the player steps on a green S tile with a script, then a person event rushes up to them, says some stuff, then battles them, and leaves. I wanted the person event to be hidden until the script is activated (to make it seem like they were coming from afar) and I also want the person to be hidden after the script is done. This is what is have and it doesn't work. The script just freezes.
Spoiler:
'---------------
#org 0x800000
checkflag 0x8C3
if 0x1 goto 0x8800041
msgbox 0x8800047 MSG_KEEPOPEN '"Hey, À! Wait up!"
applymovement MOVE_PLAYER 0x8800043
waitmovement 0x0
applymovement 0x3 0x880005A
waitmovement 0x0
msgbox 0x8800066 MSG_NORMAL '"I'm glad I caught up to you!\nSo y..."
trainerbattle 0x1 0x142 0x0 0x8800135 0x8800153 0x8800175
end
'---------------
#org 0x800041
end
'---------------
#org 0x800175
msgbox 0x8800186 MSG_NORMAL '"Well, you are still amazing as\nev..."
applymovement 0x3 0x880022D
end
#org 0x800066
= I'm glad I caught up to you!\nSo you're this far ahead already?!\pWell, the reason I was behind was\nbecause I wanted to tell Mom bye.\p...You should have done it too.\pHey, is that your Pokémon?\nLet's battle!
#org 0x800135
= You're going down, brother!
#org 0x800153
= Of course, you just had to win.
#org 0x800186
= Well, you are still amazing as\never...\pI'm planning to go to Jikan Town\nnow, but I got to take care of\lsome things back at Yuki Town.\pAlright, well catch you later!
'-----------
' Movements
'-----------
#org 0x800043
#raw 0x4 'Face Down (Faster)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements
#org 0x80005A
#raw 0x61 'Show
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x53 'Jump in Place (Facing Up)
#raw 0x66 'Happy (^_^)
#raw 0xFE 'End of Movements
#org 0x80022D
#raw 0x0 'Face Down
#raw 0x17 'Jump2 Right
#raw 0x16 'Jump2 Left
#raw 0x4 'Face Down (Faster)
#raw 0x64 'Cross (X)
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
I also included the pictures of it in advance map, in case there was something wrong there.
So I'm writing a script where if the player steps on a green S tile with a script, then a person event rushes up to them, says some stuff, then battles them, and leaves. I wanted the person event to be hidden until the script is activated (to make it seem like they were coming from afar) and I also want the person to be hidden after the script is done. This is what is have and it doesn't work. The script just freezes.
Spoiler:
'---------------
#org 0x800000
checkflag 0x8C3
if 0x1 goto 0x8800041
msgbox 0x8800047 MSG_KEEPOPEN '"Hey, À! Wait up!"
applymovement MOVE_PLAYER 0x8800043
waitmovement 0x0
applymovement 0x3 0x880005A
waitmovement 0x0
msgbox 0x8800066 MSG_NORMAL '"I'm glad I caught up to you!\nSo y..."
trainerbattle 0x1 0x142 0x0 0x8800135 0x8800153 0x8800175
end
'---------------
#org 0x800041
end
'---------------
#org 0x800175
msgbox 0x8800186 MSG_NORMAL '"Well, you are still amazing as\nev..."
applymovement 0x3 0x880022D
end
#org 0x800066
= I'm glad I caught up to you!\nSo you're this far ahead already?!\pWell, the reason I was behind was\nbecause I wanted to tell Mom bye.\p...You should have done it too.\pHey, is that your Pokémon?\nLet's battle!
#org 0x800135
= You're going down, brother!
#org 0x800153
= Of course, you just had to win.
#org 0x800186
= Well, you are still amazing as\never...\pI'm planning to go to Jikan Town\nnow, but I got to take care of\lsome things back at Yuki Town.\pAlright, well catch you later!
'-----------
' Movements
'-----------
#org 0x800043
#raw 0x4 'Face Down (Faster)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements
#org 0x80005A
#raw 0x61 'Show
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x53 'Jump in Place (Facing Up)
#raw 0x66 'Happy (^_^)
#raw 0xFE 'End of Movements
#org 0x80022D
#raw 0x0 'Face Down
#raw 0x17 'Jump2 Right
#raw 0x16 'Jump2 Left
#raw 0x4 'Face Down (Faster)
#raw 0x64 'Cross (X)
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
I also included the pictures of it in advance map, in case there was something wrong there.
I'm not sure about Emerald flags, but 8c3 may not be a safe flag
Even if it is, has it been set before on some script? If so, the script will go to a string that only has end, and not release, so that may be it
Also, if you wanted for the script to only happen once, at the end you should put setflag 0x8c3
That way next time the hero steps on the script tile, the script wouldnt occur (or just use setvar 0x4050 0x1)
Now for the sprite staying beggining and finishing the script hidden
Well, in the person ID box on A-Map, you put the number of a flag that's alreadt set
You could use:
A. a flag you set before on the game
B. a flag set by the game engine (I have a list for fire red, but not for emerald, sorry)
That way the sprite doesn't show up
If you wanted to make it appear you'd use the command "showsprite" and to re-disappear "hidesprite"
Let me know if my comment helped you on any way :)
I'm not sure about Emerald flags, but 8c3 may not be a safe flag
Even if it is, has it been set before on some script? If so, the script will go to a string that only has end, and not release, so that may be it
Also, if you wanted for the script to only happen once, at the end you should put setflag 0x8c3
That way next time the hero steps on the script tile, the script wouldnt occur (or just use setvar 0x4050 0x1)
Now for the sprite staying beggining and finishing the script hidden
Well, in the person ID box on A-Map, you put the number of a flag that's alreadt set
You could use:
A. a flag you set before on the game
B. a flag set by the game engine (I have a list for fire red, but not for emerald, sorry)
That way the sprite doesn't show up
If you wanted to make it appear you'd use the command "showsprite" and to re-disappear "hidesprite"
Let me know if my comment helped you on any way :)
lol thanks and btw this is firered XD sorry for not mentioning it so that list would help a lot
Note: These were found by karatekid552, I just put this list together
So all I have to do is add the release command if the flag is set, then change the people id of the sprite to one of the flags in the list and the rest should work?
BTW is the sprites in a-map properly placed? Like is the fields on the right hand pane properly filled out with the "unknown"s and "var number or value" and all that?
So all I have to do is add the release command if the flag is set, then change the people id of the sprite to one of the flags in the list and the rest should work?
BTW is the sprites in a-map properly placed? Like is the fields on the right hand pane properly filled out with the "unknown"s and "var number or value" and all that?
Ok, first of all, in A-Map, no need to put 3 on the unnown slot for the woman and no need to put 300 in the unknow script tile box
As for the script:´
#org @2
= I'm glad I caught up to you!\nSo you're this far ahead already?!\pWell, the reason I was behind was\nbecause I wanted to tell Mom bye.\p...You should have done it too.\pHey, is that your Pokémon?\nLet's battle!
#org @before
= You're going down, brother!
#org @defeat
= Of course, you just had to win.
#org @3
= Well, you are still amazing as\never...\pI'm planning to go to Jikan Town\nnow, but I got to take care of\lsome things back at Yuki Town.\pAlright, well catch you later!
#org @move1
#raw 0x4 'Face Down (Faster)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements
#org @move2
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x53 'Jump in Place (Facing Up)
#raw 0x66 'Happy ()
#raw 0xFE 'End of Movements
#org @move3
#raw 0x0 'Face Down
#raw 0x17 'Jump2 Right
#raw 0x16 'Jump2 Left
#raw 0x4 'Face Down (Faster)
#raw 0x64 'Cross (X)
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
Also, don't forget to put the Person Id one of those flags in the list I gave you
#org @2
= I'm glad I caught up to you!\nSo you're this far ahead already?!\pWell, the reason I was behind was\nbecause I wanted to tell Mom bye.\p...You should have done it too.\pHey, is that your Pokémon?\nLet's battle!
#org @before
= You're going down, brother!
#org @defeat
= Of course, you just had to win.
#org @3
= Well, you are still amazing as\never...\pI'm planning to go to Jikan Town\nnow, but I got to take care of\lsome things back at Yuki Town.\pAlright, well catch you later!
#org @move1
#raw 0x4 'Face Down (Faster)
#raw 0x65 'Double Exclamation Mark (!!)
#raw 0xFE 'End of Movements
#org @move2
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x1E 'Step Up (Fast)
#raw 0x53 'Jump in Place (Facing Up)
#raw 0x66 'Happy ()
#raw 0xFE 'End of Movements
#org @move3
#raw 0x0 'Face Down
#raw 0x17 'Jump2 Right
#raw 0x16 'Jump2 Left
#raw 0x4 'Face Down (Faster)
#raw 0x64 'Cross (X)
#raw 0x52 'Jump in Place (Facing Down)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0xC 'Step Down (Slow)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements
Also, don't forget to put the Person Id one of those flags in the list I gave you