• 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 Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
63
Posts
14
Years
  • Seen Jan 19, 2014
I've modified Professor Oak's walk (Don't go in the grass, blah blah blah), but the script is behaving... strangely.

I'm only modifying the existing script. It looks fine to me, but upon running the game, I find it doesn't work at all. So I'd load it up in PKSV again and see if I can find my error, and I find that the script ends up looking significantly different from when I compiled it.

I had added a line to the dialogue. Looked fine when I clicked compile. After loading it again, the dialogue was all messed up. So I gave up on it. Which is why I'm not going to post an example of that. HOWEVER, it's also messing with the movement. Specifically, I need him to move up once then right nine times.

Here's what it looks like when I click compile. This is after reloading it once to fix the most severe of the problems. I have another version of it that I saved, but I don't know if it's intact except for intentional changes. It's mainly being posted for reference purposes, along with a copy of the original script.
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
After compilation
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
Here are the specific lines that are getting messed up. At least that I'm aware of. With this one as messed up as it is, it's hard to make sure everything is in working order. In which case I wouldn't have attempted to fix them yet.

Should be:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

After loading again after compilation:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end


Additionally, despite me never touching the line that activates the music, the Professor Oak music has been replaced with the "turned on the PC" sound.


Saved script from earlier. May or may not have been compiled once or twice, not certain.
Code:
#org 0x81655F9
'-----------------------------------
lockall
setvar 0x4001 0x1
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_right walk_right walk_right walk_right walk_right walk_right walk_up walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end

The original script loaded from an unhacked FireRed ROM:
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_right walk_up hide end

#org 0x81656F2
M walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x81656FB
M walk_right walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x8165705
M walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165731
M walk_down walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

#org 0x8165719
M walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165744
M walk_down walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end
 
Last edited:

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
I've modified Professor Oak's walk (Don't go in the grass, blah blah blah), but the script is behaving... strangely.

I'm only modifying the existing script. It looks fine to me, but upon running the game, I find it doesn't work at all. So I'd load it up in PKSV again and see if I can find my error, and I find that the script ends up looking significantly different from when I compiled it.

I had added a line to the dialogue. Looked fine when I clicked compile. After loading it again, the dialogue was all messed up. So I gave up on it. Which is why I'm not going to post an example of that. HOWEVER, it's also messing with the movement. Specifically, I need him to move up once then right nine times.

Here's what it looks like when I click compile. This is after reloading it once to fix the most severe of the problems. I have another version of it that I saved, but I don't know if it's intact except for intentional changes. It's mainly being posted for reference purposes, along with a copy of the original script.
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
After compilation
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
Here are the specific lines that are getting messed up. At least that I'm aware of. With this one as messed up as it is, it's hard to make sure everything is in working order. In which case I wouldn't have attempted to fix them yet.

Should be:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

After loading again after compilation:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end


Additionally, despite me never touching the line that activates the music, the Professor Oak music has been replaced with the "turned on the PC" sound.


Saved script from earlier. May or may not have been compiled once or twice, not certain.
Code:
#org 0x81655F9
'-----------------------------------
lockall
setvar 0x4001 0x1
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_right walk_right walk_right walk_right walk_right walk_right walk_up walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end

The original script loaded from an unhacked FireRed ROM:
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_right walk_up hide end

#org 0x81656F2
M walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x81656FB
M walk_right walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x8165705
M walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165731
M walk_down walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

#org 0x8165719
M walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165744
M walk_down walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

I didn't actually go through all of your scripts but I think I know the problem. If you add to a script that is already compiled, it will take up more room. So, if it takes up more room, something has to be deleted. If you want this script to work perfectly, you must repoint the sections that have been expanded to free space. I didn't notice any dynamic offsets (@start and such) which would deffinately cause problems.
 

thetripplenine

tripple.
98
Posts
11
Years
I've modified Professor Oak's walk (Don't go in the grass, blah blah blah), but the script is behaving... strangely.

I'm only modifying the existing script. It looks fine to me, but upon running the game, I find it doesn't work at all. So I'd load it up in PKSV again and see if I can find my error, and I find that the script ends up looking significantly different from when I compiled it.

I had added a line to the dialogue. Looked fine when I clicked compile. After loading it again, the dialogue was all messed up. So I gave up on it. Which is why I'm not going to post an example of that. HOWEVER, it's also messing with the movement. Specifically, I need him to move up once then right nine times.

Here's what it looks like when I click compile. This is after reloading it once to fix the most severe of the problems. I have another version of it that I saved, but I don't know if it's intact except for intentional changes. It's mainly being posted for reference purposes, along with a copy of the original script.
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
After compilation
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
Here are the specific lines that are getting messed up. At least that I'm aware of. With this one as messed up as it is, it's hard to make sure everything is in working order. In which case I wouldn't have attempted to fix them yet.

Should be:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

After loading again after compilation:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end


Additionally, despite me never touching the line that activates the music, the Professor Oak music has been replaced with the "turned on the PC" sound.


Saved script from earlier. May or may not have been compiled once or twice, not certain.
Code:
#org 0x81655F9
'-----------------------------------
lockall
setvar 0x4001 0x1
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_right walk_right walk_right walk_right walk_right walk_right walk_up walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end

The original script loaded from an unhacked FireRed ROM:
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x12E 0x0
message 0x817D72C ' OAK: Hey! Wait!\nDon...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_right walk_up h...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_up walk...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_up w...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_down walk_left ...
applymovement PLAYER 0x8165731 ' walk_down walk_down ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_down walk_left ...
applymovement PLAYER 0x8165744 ' walk_down walk_down ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey! Wait!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_right walk_up hide end

#org 0x81656F2
M walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x81656FB
M walk_right walk_up walk_up walk_right walk_up walk_up walk_right walk_up walk_up end

#org 0x8165705
M walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165731
M walk_down walk_down walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

#org 0x8165719
M walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right walk_right look_up_delayed end

#org 0x8165744
M walk_down walk_down walk_left walk_left walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_down walk_right walk_right walk_right walk_right end

It doesn't look like you compiled it in xse, did u use PKSVU?
 

Blah

Free supporter
1,924
Posts
11
Years
I've modified Professor Oak's walk (Don't go in the grass, blah blah blah), but the script is behaving... strangely.

I'm only modifying the existing script. It looks fine to me, but upon running the game, I find it doesn't work at all. So I'd load it up in PKSV again and see if I can find my error, and I find that the script ends up looking significantly different from when I compiled it.

I had added a line to the dialogue. Looked fine when I clicked compile. After loading it again, the dialogue was all messed up. So I gave up on it. Which is why I'm not going to post an example of that. HOWEVER, it's also messing with the movement. Specifically, I need him to move up once then right nine times.

Here's what it looks like when I click compile.
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end
After compilation
Code:
#org 0x81655ED
'-----------------------------------
lockall
setvar 0x4001 0x0
jump 0x8165605

#org 0x8165605
'-----------------------------------
setvar 0x8004 0x0
setvar 0x8005 0x2
special FAME_CHECKER_NEW
textcolor BLUE
pause 0x1E
playsound 0x2 0x2
message 0x817D72C ' OAK: Hey!\nDon't go ...
showmsg
pause 0x55
closemsg
applymovement PLAYER 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
sound 0x15
applymovement PLAYER 0x81A75DB ' say_! end
pauseevent 0x0
pause 0x1E
reappear 0x3
compare 0x4001 0x0
if == call 0x81656B8 ' Equal To
compare 0x4001 0x1
if == call 0x81656C3 ' Equal To
pause 0x1E
msgbox 0x817D74A ' OAK: It's unsafe!\nW...
callstd MSG_NOCLOSE ' Non-closing message
closemsg
pause 0x1E
compare 0x4001 0x0
if == call 0x81656CE ' Equal To
compare 0x4001 0x1
if == call 0x81656E0 ' Equal To
setdooropened 0x10 0xD
doorchange
applymovement 0x3 0x816572E ' walk_up hide end
applymovement PLAYER 0x8165758 ' walk_left walk_up hi...
pauseevent 0x0
setdoorclosed 0x10 0xD
doorchange
setvar 0x4055 0x1
clearflag 0x2B
setvar 0x4050 0x1
setflag 0x2C
setflag 0x4001
warp 0x4 0x3 0xFF 0x6 0xC
waitspecial
releaseall
end

#org 0x81656B8
'-----------------------------------
applymovement 0x3 0x81656F2 ' walk_up walk_right w...
pauseevent 0x0
return

#org 0x81656C3
'-----------------------------------
applymovement 0x3 0x81656FB ' walk_right walk_righ...
pauseevent 0x0
return

#org 0x81656CE
'-----------------------------------
applymovement 0x3 0x8165705 ' walk_left walk_up wa...
applymovement PLAYER 0x8165731 ' walk_left walk_left ...
pauseevent 0x0
return

#org 0x81656E0
'-----------------------------------
applymovement 0x3 0x8165719 ' walk_left walk_left ...
applymovement PLAYER 0x8165744 ' walk_left walk_left ...
pauseevent 0x0
return


#org 0x817D72C
= OAK: Hey!\nDon't go out!

#org 0x817D74A
= OAK: It's unsafe!\nWild POK\eMON live in tall grass!\pYou need your own POK\eMON for\nyour protection.\pI know!\nHere, come with me!

#org 0x81A75ED
M look_down_delayed end

#org 0x81A75DB
M say_! end

#org 0x816572E
M walk_up hide end

#org 0x8165758
M walk_left walk_up hide end

#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x81656FB
M walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

#org 0x8165705
M walk_left walk_up walk_left walk_left look_up_delayed end

#org 0x8165731
M walk_left walk_left walk_up walk_left end

#org 0x8165719
M walk_left walk_left walk_left look_up_delayed end

#org 0x8165744
M walk_left walk_left walk_left end

Here are the specific lines that are getting messed up. At least that I'm aware of. With this one as messed up as it is, it's hard to make sure everything is in working order. In which case I wouldn't have attempted to fix them yet.

Should be:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end

After loading again after compilation:
#org 0x81656F2
M walk_up walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right walk_right end


Additionally, despite me never touching the line that activates the music, the Professor Oak music has been replaced with the "turned on the PC" sound.

It's overwriting existing commands and such. You need to repoint. Another solution is to change pointers of the things that you're adding (by pointers I mean the 0x87234314 (those stuff). For example if I have a script that looks like this after compiled:

Spoiler:


Take note of the pointers that I bolded. You need to change those when there is some overlap.
Say I want the player to move down twice instead of up I'd do this:

Spoiler:


Notice that I added #dyn 0x740000, and changed the #org 0xnumbers into #org @start, you should do this too just to be safe. Finally the change that you need to look at most is that I changed the pointers in the scripts. I've bolded them so you can see :)
 
Last edited:

thetripplenine

tripple.
98
Posts
11
Years
Go to advance map and set the Var number to 5240 and then the unknown to 03 00. See if that fixes the problem.

Ok well it fixed it, but the mom doesn't move, but the script works, maybe i should go back to movesprite... Also how do I change this script so it just happens once...

Spoiler:
 

karatekid552

What happens if I push it?....
1,771
Posts
11
Years
Ok well it fixed it, but the mom doesn't move, but the script works, maybe i should go back to movesprite... Also how do I change this script so it just happens once...

Spoiler:

You forgot to checkflag at the beginning and just make sure that the mom's person event number is 4.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
Ok well it fixed it, but the mom doesn't move, but the script works, maybe i should go back to movesprite... Also how do I change this script so it just happens once...

Spoiler:

You want the flag to activate the first time you go through the script (after it has been initially checked) if you only want to go through it once. If you place the setflag command in the @done section then it will never activate since you need the flag to be set in the first place to reach there.

Here's an edited version where Red = Delete and Blue = Changed from the original script.

Spoiler:


I'm not sure why the mother wouldn't be moving so long as she has the person event number 0x4. Is she a few tiles offscreen when you start?
 

thetripplenine

tripple.
98
Posts
11
Years
You want the flag to activate the first time you go through the script (after it has been initially checked) if you only want to go through it once. If you place the setflag command in the @done section then it will never activate since you need the flag to be set in the first place to reach there.

Here's an edited version where Red = Delete and Blue = Changed from the original script.

Spoiler:


I'm not sure why the mother wouldn't be moving so long as she has the person event number 0x4. Is she a few tiles offscreen when you start?

I don't know where I got 4 she has the event number 0 Lol... That's probably why it wasn't working...

Ya that's why it wasn't working but the mother moved right after the script ended and she didn't even face the player...

BTW I thought setflag was supposed to give u the running shoes... Cause I wanted her to give the running shoes at the same time xD
 
Last edited:
3
Posts
13
Years
  • Seen Jan 30, 2013
So, I'm trying to do a ROM hack for the first time in years, and I have a few questions.

One, what would be the best way to get rid of all of a particular item in the game?
Two, the main reason I came in here, how do I edit a function? And what I mean by that is, I want to edit what Pokecenters do, so I opened up one of the Pokecenter ladies in a script editor and found what I need to edit:
#org 0x81A65CE
'-----------------------------------
applymovement LASTTALKED 0x81A75E7 ' look_left_delayed en...
pauseevent 0x0
doanimation 0x19
checkanimation 0x19
applymovement LASTTALKED 0x81A75ED ' look_down_delayed en...
pauseevent 0x0
special HEAL_POKEMON
return

So, what I need to know is where HEAL_POKEMON defined? Basically, I want to make it so fainted Pokemon aren't healed at all.
 

thetripplenine

tripple.
98
Posts
11
Years
So, I'm trying to do a ROM hack for the first time in years, and I have a few questions.

One, what would be the best way to get rid of all of a particular item in the game?
Two, the main reason I came in here, how do I edit a function? And what I mean by that is, I want to edit what Pokecenters do, so I opened up one of the Pokecenter ladies in a script editor and found what I need to edit:


So, what I need to know is where HEAL_POKEMON defined? Basically, I want to make it so fainted Pokemon aren't healed at all.

I do not know what you're asking...
 
3
Posts
13
Years
  • Seen Jan 30, 2013
I do not know what you're asking...

Where is the "special" function HEAL_POKEMON defined in the script "special HEAL_POKEMON"? I want to change what that command does, so when a Pokemon has one or more HP, they get fully healed, but if they have zero HP they remain that way.
 

Satoshi Ookami

Memento Mori
14,254
Posts
15
Years
Where is the "special" function HEAL_POKEMON defined in the script "special HEAL_POKEMON"? I want to change what that command does, so when a Pokemon has one or more HP, they get fully healed, but if they have zero HP they remain that way.
As special 0x0, which is healing command, uses the default healing procedure, if you want to modify it so the fainted Pokémon won't be healed, you will have to use ASM, I believe.
 

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
Where is the "special" function HEAL_POKEMON defined in the script "special HEAL_POKEMON"? I want to change what that command does, so when a Pokemon has one or more HP, they get fully healed, but if they have zero HP they remain that way.
That "special" there is a scripting command used for executing an ASM routine. This routine is used for changing the HP of all the party pokemon to [MAX HP], change [Status] to normal and restore PP values to [MAX PP] values.

If you want to modify that routine so that pokemon with 0 HP don't get healed, you're indeed "going to have to use asm" but in other words, you just use a debugger for setting a breakpoint to the ram address of [HP]. Make it "call" another routine there where there is a check for 0 HP occasion. Set one of the "flags" accordingly if that pokemon has 0 HP to skip "transfer [MAX HP] values to [HP] values".

Not one of the easiest ASM hacks but then again, far from the complicated ones.
Study how to program, that way you can achieve doing this.
 

Blah

Free supporter
1,924
Posts
11
Years
That "special" there is a scripting command used for executing an ASM routine. This routine is used for changing the HP of all the party pokemon to [MAX HP], change [Status] to normal and restore PP values to [MAX PP] values.

If you want to modify that routine so that pokemon with 0 HP don't get healed, you're indeed "going to have to use asm" but in other words, you just use a debugger for setting a breakpoint to the ram address of [HP]. Make it "call" another routine there where there is a check for 0 HP occasion. Set one of the "flags" accordingly if that pokemon has 0 HP to skip "transfer [MAX HP] values to [HP] values".

Not one of the easiest ASM hacks but then again, far from the complicated ones.
Study how to program, that way you can achieve doing this.

Or you can make your own healing script which checks all the Pokemon's HP and only heals the ones that are not fainted. Doing that is really just 3 easier routines, inefficient, but good if you want to use the default heal special somewhere else again.
 

kj3400

Wants a Magneton for a Charger
53
Posts
12
Years
  • Seen May 11, 2014
Having trouble again....

Does the movesprite2 command calculate the coordinates from the edge of the map (the border) or the edge of the map you can walk on? And is x=0, y=0 in the bottom left corner? I wouldn't ask this if I knew what I was doing. XD
 

Blah

Free supporter
1,924
Posts
11
Years
Having trouble again....

Does the movesprite2 command calculate the coordinates from the edge of the map (the border) or the edge of the map you can walk on? And is x=0, y=0 in the bottom left corner? I wouldn't ask this if I knew what I was doing. XD
Top left is X = 0 and Y = 0. But that shouldn't matter, use A-map to find x,y coordinates.

Relevant picture:
35aopbo.png

I circled it so you see :P

EDIT:
These numbers are already in hex btw, so don't worry about converting them and stuff.
 

miksy91

Dark Energy is back in action! ;)
1,480
Posts
15
Years
Or you can make your own healing script which checks all the Pokemon's HP and only heals the ones that are not fainted. Doing that is really just 3 easier routines, inefficient, but good if you want to use the default heal special somewhere else again.
You're right. It's inefficient but whatever works.
These days, I have hard time figuring out the most simple solution for a certain thing. I just tend to go with "yeah, I'll first debug the routine and see what we've got there..." instead of first thinking of, "hey, can I actually skip doing all this...?".

Other than that, this is one of the things that one would like to do with assembly though. It's kinda stupid to tell the game to "load byte at ram address 2xxyyzz into "variable"", "compare variable to 00", "if result is 00, go to "check pkmn #2"" and so on...¨
All of it can be skipped by spending a little while how to implement the feature and do it. Saves space and makes the processor handle that situation probably > 100 times faster too. Not like it would make a difference comparing to the running speeds though.
 

kj3400

Wants a Magneton for a Charger
53
Posts
12
Years
  • Seen May 11, 2014
Top left is X = 0 and Y = 0. But that shouldn't matter, use A-map to find x,y coordinates.

<Relevant picture>

I circled it so you see :P

EDIT:
These numbers are already in hex btw, so don't worry about converting them and stuff.

Not going to lie, I didn't notice that at all :P
 

Blah

Free supporter
1,924
Posts
11
Years
Other than that, this is one of the things that one would like to do with assembly though. It's kinda stupid to tell the game to "load byte at ram address 2xxyyzz into "variable"", "compare variable to 00", "if result is 00, go to "check pkmn #2"" and so on...¨
All of it can be skipped by spending a little while how to implement the feature and do it. Saves space and makes the processor handle that situation probably > 100 times faster too. Not like it would make a difference comparing to the running speeds though.

Yeah, I doubt run speed would be effected very much (though it depends on the computer, if you're running it on some 1970 IBM computer it can slow down...maybe :D)


I have a couple questions now:

1) How does the cleartrainerflag command work? Is it just cleartrainerflag 0xTrainerID#?

2) How can I check multiples of variables? I.E Variable 1 is a multiple of 2?

3) Why can't I pass in variables like 0x5000 for paramaters but I can pass in LASTRESULT? Can I pass in all temporary variables?

Answers appreciated :)
 
Status
Not open for further replies.
Back
Top