- 202
- Posts
- 15
- Years
- Seen Jan 6, 2017
This has been causing me trouble for days now and it's really holding up my hack.
I'm making a complete remake of the RBY games. I've taken and modified a script from Fire Red, but it's not working as it should.
I've managed to get the script exactly the same, including the level script offset. The script works fine when it's triggered, but if you enter the area when the script isn't ready to be triggered yet, I get the unlimited glitch script.
Also if you do get the script to trigger, the unlimited glitch also happens as soon as the script is finished.
Here are the level scripts:
Script 0: On entering map/not on menu close [03]
'---------------
#org 0x8006C3
setflag 0x2CF
compare 0x4055 0x1
if 0x1 call 0x88006F2
compare 0x4055 0x7
if 0x1 call 0x8800702
compare 0x4055 0x8
if 0x1 call 0x880070F
checkflag 0x247
if 0x1 call 0x8800716
end
'---------------
#org 0x8006F2
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
playsong2 0x12E
return
'---------------
#org 0x800702
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
return
'---------------
#org 0x80070F
setvar 0x4055 0x9
return
'---------------
#org 0x800716
setflag 0x24F
return
Script 1: Validates values, loads handler to 0x03000F28 [04]
Flag 2055 Value 0001
Script 3: Validates values, loads handler to 0x03000EB0 (playback) [02]
Flag 2055 Value 0001
And finally the map level script decompiled
I've also attached an IPS patch if anyone would be willing to physically look at it, and see why my script isn't working. The setvar that triggers the script to run is in a floor script on the exit of Pallet Town.
Thanks if anyone can help, would really appreciate it!
I'm making a complete remake of the RBY games. I've taken and modified a script from Fire Red, but it's not working as it should.
I've managed to get the script exactly the same, including the level script offset. The script works fine when it's triggered, but if you enter the area when the script isn't ready to be triggered yet, I get the unlimited glitch script.
Also if you do get the script to trigger, the unlimited glitch also happens as soon as the script is finished.
Here are the level scripts:
Script 0: On entering map/not on menu close [03]
Spoiler:
'---------------
#org 0x8006C3
setflag 0x2CF
compare 0x4055 0x1
if 0x1 call 0x88006F2
compare 0x4055 0x7
if 0x1 call 0x8800702
compare 0x4055 0x8
if 0x1 call 0x880070F
checkflag 0x247
if 0x1 call 0x8800716
end
'---------------
#org 0x8006F2
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
playsong2 0x12E
return
'---------------
#org 0x800702
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
return
'---------------
#org 0x80070F
setvar 0x4055 0x9
return
'---------------
#org 0x800716
setflag 0x24F
return
Script 1: Validates values, loads handler to 0x03000F28 [04]
Flag 2055 Value 0001
Spoiler:
'---------------
#org 0x80071A
spriteface 0xFF 0x2
end
#org 0x80071A
spriteface 0xFF 0x2
end
Script 3: Validates values, loads handler to 0x03000EB0 (playback) [02]
Flag 2055 Value 0001
Spoiler:
'---------------
#org 0x80071F
lockall
textcolor 0x0
applymovement 0x1 0x8800B58
waitmovement 0x0
hidesprite 0x1
movesprite2 0x1 0x6 0x3
spritebehave 0x1 0x8
clearflag 0x2B
applymovement MOVE_PLAYER 0x8800B60
waitmovement 0x0
applymovement 0x3 0x8800B6A
waitmovement 0x0
clearflag 0x4001
playsong2 0x0
fadedefault
msgbox 0x88007B9 MSG_KEEPOPEN '"[rival]: Gramps!\nI'm fed up with ..."
closeonkeypress
pause 0x3C
msgbox 0x88007E0 MSG_KEEPOPEN '"Oak: [rival]? Why are you here?\nI..."
closeonkeypress
pause 0x1E
sound 0x15
applymovement MOVE_PLAYER 0x8800B6D
applymovement 0x3 0x8800B6D
waitmovement 0x0
pause 0x1E
msgbox 0x8800912 MSG_KEEPOPEN '"[player]: My own Pokémon?!\p[rival..."
closeonkeypress
pause 0x1E
applymovement 0x3 0x8800B70
waitmovement 0x0
msgbox 0x8800AFB MSG_KEEPOPEN '"[rival]: Hey! Gramps! No fair!\nWh..."
closeonkeypress
pause 0x1E
msgbox 0x8800B26 MSG_KEEPOPEN '"Oak: Be patient, [rival].\nI'll gi..."
setvar 0x4055 0x2
releaseall
end
'---------
' Strings
'---------
#org 0x8007B9
= [rival]: Gramps!\nI'm fed up with waiting!
#org 0x8007E0
= Oak: [rival]? Why are you here?\nI told you to come round later.\pGary: When you told me you had a\nspecial surprise for me, I\lcouldn't just wait around all day!\pOak: Haha, of course, I should\nhave known.\p[player]: So why are we here?\pOak: Right! Well...\nToday I am going to give each of\lyou...\pYour very own Pokémon!
#org 0x800912
= [player]: My own Pokémon?!\p[rival]: A Pokémon!\nGramps! Are you serious?!\pOak: That's right!\p[player], your mother and I have\nbeen talking and we decided that\lyou are both ready to own your\lfirst ever Pokémon.\pWhen I was young, I was a serious\nPokémon Trainer.\pBut now, in my old age, I spend\nmost of my time researching\lPokémon rather than training them!\p[player], see that Pokéball on the\ntable over there?\lIt holds a Pokémon inside.\pI want you to have it.\nGo on, take it!\p[player]: Of course. Thank you\nProfessor!
#org 0x800AFB
= [rival]: Hey! Gramps! No fair!\nWhat about me?
#org 0x800B26
= Oak: Be patient, [rival].\nI'll give you yours later.
'-----------
' Movements
'-----------
#org 0x800B58
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B60
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B6A
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x800B6D
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x800B70
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0xFE 'End of Movements
#org 0x80071F
lockall
textcolor 0x0
applymovement 0x1 0x8800B58
waitmovement 0x0
hidesprite 0x1
movesprite2 0x1 0x6 0x3
spritebehave 0x1 0x8
clearflag 0x2B
applymovement MOVE_PLAYER 0x8800B60
waitmovement 0x0
applymovement 0x3 0x8800B6A
waitmovement 0x0
clearflag 0x4001
playsong2 0x0
fadedefault
msgbox 0x88007B9 MSG_KEEPOPEN '"[rival]: Gramps!\nI'm fed up with ..."
closeonkeypress
pause 0x3C
msgbox 0x88007E0 MSG_KEEPOPEN '"Oak: [rival]? Why are you here?\nI..."
closeonkeypress
pause 0x1E
sound 0x15
applymovement MOVE_PLAYER 0x8800B6D
applymovement 0x3 0x8800B6D
waitmovement 0x0
pause 0x1E
msgbox 0x8800912 MSG_KEEPOPEN '"[player]: My own Pokémon?!\p[rival..."
closeonkeypress
pause 0x1E
applymovement 0x3 0x8800B70
waitmovement 0x0
msgbox 0x8800AFB MSG_KEEPOPEN '"[rival]: Hey! Gramps! No fair!\nWh..."
closeonkeypress
pause 0x1E
msgbox 0x8800B26 MSG_KEEPOPEN '"Oak: Be patient, [rival].\nI'll gi..."
setvar 0x4055 0x2
releaseall
end
'---------
' Strings
'---------
#org 0x8007B9
= [rival]: Gramps!\nI'm fed up with waiting!
#org 0x8007E0
= Oak: [rival]? Why are you here?\nI told you to come round later.\pGary: When you told me you had a\nspecial surprise for me, I\lcouldn't just wait around all day!\pOak: Haha, of course, I should\nhave known.\p[player]: So why are we here?\pOak: Right! Well...\nToday I am going to give each of\lyou...\pYour very own Pokémon!
#org 0x800912
= [player]: My own Pokémon?!\p[rival]: A Pokémon!\nGramps! Are you serious?!\pOak: That's right!\p[player], your mother and I have\nbeen talking and we decided that\lyou are both ready to own your\lfirst ever Pokémon.\pWhen I was young, I was a serious\nPokémon Trainer.\pBut now, in my old age, I spend\nmost of my time researching\lPokémon rather than training them!\p[player], see that Pokéball on the\ntable over there?\lIt holds a Pokémon inside.\pI want you to have it.\nGo on, take it!\p[player]: Of course. Thank you\nProfessor!
#org 0x800AFB
= [rival]: Hey! Gramps! No fair!\nWhat about me?
#org 0x800B26
= Oak: Be patient, [rival].\nI'll give you yours later.
'-----------
' Movements
'-----------
#org 0x800B58
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B60
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B6A
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x800B6D
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x800B70
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0xFE 'End of Movements
And finally the map level script decompiled
Spoiler:
'---------------
#org 0x71E668
#raw 0x3
#raw pointer 0x88006C3
#raw 0x4
#raw pointer 0x871E650
#raw 0x2
#raw pointer 0x871CC04
#raw 0x0
'---------------
#org 0x71E650
#raw word 0x4055
#raw word 0x1
#raw pointer 0x880071A
#raw word 0x0
'---------------
#org 0x71CC04
#raw word 0x4055
#raw word 0x1
#raw pointer 0x880071F
#raw word 0x4055
'---------------
#org 0x8006C3
setflag 0x2CF
compare 0x4055 0x1
if 0x1 call 0x88006F2
compare 0x4055 0x7
if 0x1 call 0x8800702
compare 0x4055 0x8
if 0x1 call 0x880070F
checkflag 0x247
if 0x1 call 0x8800716
end
'---------------
#org 0x80071A
spriteface 0xFF 0x2
end
'---------------
#org 0x80071F
lockall
textcolor 0x0
applymovement 0x1 0x8800B58
waitmovement 0x0
hidesprite 0x1
movesprite2 0x1 0x6 0x3
spritebehave 0x1 0x8
clearflag 0x2B
applymovement MOVE_PLAYER 0x8800B60
waitmovement 0x0
applymovement 0x3 0x8800B6A
waitmovement 0x0
clearflag 0x4001
playsong2 0x0
fadedefault
msgbox 0x88007B9 MSG_KEEPOPEN '"[rival]: Gramps!\nI'm fed up with ..."
closeonkeypress
pause 0x3C
msgbox 0x88007E0 MSG_KEEPOPEN '"Oak: [rival]? Why are you here?\nI..."
closeonkeypress
pause 0x1E
sound 0x15
applymovement MOVE_PLAYER 0x8800B6D
applymovement 0x3 0x8800B6D
waitmovement 0x0
pause 0x1E
msgbox 0x8800912 MSG_KEEPOPEN '"[player]: My own Pokémon?!\p[rival..."
closeonkeypress
pause 0x1E
applymovement 0x3 0x8800B70
waitmovement 0x0
msgbox 0x8800AFB MSG_KEEPOPEN '"[rival]: Hey! Gramps! No fair!\nWh..."
closeonkeypress
pause 0x1E
msgbox 0x8800B26 MSG_KEEPOPEN '"Oak: Be patient, [rival].\nI'll gi..."
setvar 0x4055 0x2
releaseall
end
'---------------
#org 0x8006F2
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
playsong2 0x12E
return
'---------------
#org 0x800702
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
return
'---------------
#org 0x80070F
setvar 0x4055 0x9
return
'---------------
#org 0x800716
setflag 0x24F
return
'---------
' Strings
'---------
#org 0x8007B9
= [rival]: Gramps!\nI'm fed up with waiting!
#org 0x8007E0
= Oak: [rival]? Why are you here?\nI told you to come round later.\pGary: When you told me you had a\nspecial surprise for me, I\lcouldn't just wait around all day!\pOak: Haha, of course, I should\nhave known.\p[player]: So why are we here?\pOak: Right! Well...\nToday I am going to give each of\lyou...\pYour very own Pokémon!
#org 0x800912
= [player]: My own Pokémon?!\p[rival]: A Pokémon!\nGramps! Are you serious?!\pOak: That's right!\p[player], your mother and I have\nbeen talking and we decided that\lyou are both ready to own your\lfirst ever Pokémon.\pWhen I was young, I was a serious\nPokémon Trainer.\pBut now, in my old age, I spend\nmost of my time researching\lPokémon rather than training them!\p[player], see that Pokéball on the\ntable over there?\lIt holds a Pokémon inside.\pI want you to have it.\nGo on, take it!\p[player]: Of course. Thank you\nProfessor!
#org 0x800AFB
= [rival]: Hey! Gramps! No fair!\nWhat about me?
#org 0x800B26
= Oak: Be patient, [rival].\nI'll give you yours later.
'-----------
' Movements
'-----------
#org 0x800B58
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B60
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B6A
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x800B6D
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x800B70
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0xFE 'End of Movements
#org 0x71E668
#raw 0x3
#raw pointer 0x88006C3
#raw 0x4
#raw pointer 0x871E650
#raw 0x2
#raw pointer 0x871CC04
#raw 0x0
'---------------
#org 0x71E650
#raw word 0x4055
#raw word 0x1
#raw pointer 0x880071A
#raw word 0x0
'---------------
#org 0x71CC04
#raw word 0x4055
#raw word 0x1
#raw pointer 0x880071F
#raw word 0x4055
'---------------
#org 0x8006C3
setflag 0x2CF
compare 0x4055 0x1
if 0x1 call 0x88006F2
compare 0x4055 0x7
if 0x1 call 0x8800702
compare 0x4055 0x8
if 0x1 call 0x880070F
checkflag 0x247
if 0x1 call 0x8800716
end
'---------------
#org 0x80071A
spriteface 0xFF 0x2
end
'---------------
#org 0x80071F
lockall
textcolor 0x0
applymovement 0x1 0x8800B58
waitmovement 0x0
hidesprite 0x1
movesprite2 0x1 0x6 0x3
spritebehave 0x1 0x8
clearflag 0x2B
applymovement MOVE_PLAYER 0x8800B60
waitmovement 0x0
applymovement 0x3 0x8800B6A
waitmovement 0x0
clearflag 0x4001
playsong2 0x0
fadedefault
msgbox 0x88007B9 MSG_KEEPOPEN '"[rival]: Gramps!\nI'm fed up with ..."
closeonkeypress
pause 0x3C
msgbox 0x88007E0 MSG_KEEPOPEN '"Oak: [rival]? Why are you here?\nI..."
closeonkeypress
pause 0x1E
sound 0x15
applymovement MOVE_PLAYER 0x8800B6D
applymovement 0x3 0x8800B6D
waitmovement 0x0
pause 0x1E
msgbox 0x8800912 MSG_KEEPOPEN '"[player]: My own Pokémon?!\p[rival..."
closeonkeypress
pause 0x1E
applymovement 0x3 0x8800B70
waitmovement 0x0
msgbox 0x8800AFB MSG_KEEPOPEN '"[rival]: Hey! Gramps! No fair!\nWh..."
closeonkeypress
pause 0x1E
msgbox 0x8800B26 MSG_KEEPOPEN '"Oak: Be patient, [rival].\nI'll gi..."
setvar 0x4055 0x2
releaseall
end
'---------------
#org 0x8006F2
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
playsong2 0x12E
return
'---------------
#org 0x800702
movesprite2 0x1 0x6 0xB
spritebehave 0x1 0x7
return
'---------------
#org 0x80070F
setvar 0x4055 0x9
return
'---------------
#org 0x800716
setflag 0x24F
return
'---------
' Strings
'---------
#org 0x8007B9
= [rival]: Gramps!\nI'm fed up with waiting!
#org 0x8007E0
= Oak: [rival]? Why are you here?\nI told you to come round later.\pGary: When you told me you had a\nspecial surprise for me, I\lcouldn't just wait around all day!\pOak: Haha, of course, I should\nhave known.\p[player]: So why are we here?\pOak: Right! Well...\nToday I am going to give each of\lyou...\pYour very own Pokémon!
#org 0x800912
= [player]: My own Pokémon?!\p[rival]: A Pokémon!\nGramps! Are you serious?!\pOak: That's right!\p[player], your mother and I have\nbeen talking and we decided that\lyou are both ready to own your\lfirst ever Pokémon.\pWhen I was young, I was a serious\nPokémon Trainer.\pBut now, in my old age, I spend\nmost of my time researching\lPokémon rather than training them!\p[player], see that Pokéball on the\ntable over there?\lIt holds a Pokémon inside.\pI want you to have it.\nGo on, take it!\p[player]: Of course. Thank you\nProfessor!
#org 0x800AFB
= [rival]: Hey! Gramps! No fair!\nWhat about me?
#org 0x800B26
= Oak: Be patient, [rival].\nI'll give you yours later.
'-----------
' Movements
'-----------
#org 0x800B58
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B60
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements
#org 0x800B6A
#raw 0x2E 'Face Up (Delayed)
#raw 0xFE 'End of Movements
#org 0x800B6D
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements
#org 0x800B70
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0x26 'Step on the Spot Up (Faster)
#raw 0xFE 'End of Movements
I've also attached an IPS patch if anyone would be willing to physically look at it, and see why my script isn't working. The setvar that triggers the script to run is in a floor script on the exit of Pallet Town.
Thanks if anyone can help, would really appreciate it!