The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Script being skipped & game crash

Notices
For all updates, view the main page.

Binary ROM Hacking Need 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.

Ad Content
Reply
 
Thread Tools
  #1   Link to this post, but load the entire thread.  
Old May 6th, 2015 (2:06 PM). Edited May 9th, 2015 by ShadowSorcererX.
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
(Sorry if wrong section) Hello everyone, I have been having trouble with a script I made and was wondering if the people of PC could lend me a hand. I have a video on my channel below that shows the problem I am having. What's supposed to happen is:
Text/Song change/person 1 moves/player hops/person 2 moves/person 2 moves/text/text/special/special/text/person 1 moves/person 1 sprite hides/song change/text/end

What actually happens is:
text/song change/person 1 moves/player hops/person 2 doesn't move/person 2 doesn't move/text/text/game crashes

Video showing what happens:
https://www.youtube.com/watch?v=vxvQwXZJ8WE

I honestly have no idea why this happens and that's why I've come to PC. Like I said below is the compiled script in advance map. Thanks for any help in the future. (Also not sure if I should note this but I use advance map, free space finder, and extreme script editor)

Script:
'---------------
#org 0x801A69
msgbox 0x8801AD6 MSG_NORMAL '"???: What the hell, get outta here..."
playsong 0x1D3 0x0
applymovement 0x1 0x8801C99
waitmovement 0x1
applymovement MOVE_PLAYER 0x8801CA4
waitmovement 0xFF
applymovement 0x2 0x8801CA7
waitmovement 0x2
applymovement 0x2 0x8801CB3
waitmovement 0x2
msgbox 0x8801B01 MSG_NORMAL '"???: Oh no! Kid take one of these\..."
msgbox 0x8801B42 MSG_NORMAL '"Show him no mercy Poochyena!"
special 0x9C
special 0x800
msgbox 0x8801B61 MSG_NORMAL '"???: Um. Um.. Damn..."
applymovement 0x1 0x8801CBB
waitmovement 0x1
hidesprite 0x1
fadesong 0x12BB
msgbox 0x8801B79 MSG_NORMAL '"???: You showed great skill in tha..."
release
end


'---------
' Strings
'---------
#org 0x801AD6
= ???: What the hell, get outta here runt!

#org 0x801B01
= ???: Oh no! Kid take one of these\nPokémon to protect yourself!

#org 0x801B42
= Show him no mercy Poochyena!

#org 0x801B61
= ???: Um. Um.. Damn...

#org 0x801B79
= ???: You showed great skill in that\nbattle kid.\pSkyla: Also I'm professor Skyla of this\nregion, the Guar region.\pSjkyla: You can keep that Pokémon but don't\ngo up the mountain.\pSkyla: I need to investigate something\nbut it's too dangerous for you.\pCya kid, and raise that Pokémon well.


'-----------
' Movements
'-----------
#org 0x801C99
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0xFE 'End of Movements

#org 0x801CA4
#raw 0x49 'Jump in Place (Facing Right)
#raw 0xFE 'End of Movements

#org 0x801CA7
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0xFE 'End of Movements

#org 0x801CB3
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements

#org 0x801CBB
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 6th, 2015 (11:57 PM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by ShadowSorcererX View Post
(Sorry if wrong section) Hello everyone, I have been having trouble with a script I made
try changing waitmovement 0xFF, waitmovement 0x1, and waitmovement 0x2 all to waitmovement 0x0 and use a waitstate after both specials, also as far as i know, there is no such special as 0x800, and 0x9C doesn't seem to be documented as doing anything, what are you trying to do with those specials?
__________________

Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 7th, 2015 (4:29 AM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Quote:
Originally Posted by PurpleOrange View Post
try changing waitmovement 0xFF, waitmovement 0x1, and waitmovement 0x2 all to waitmovement 0x0 and use a waitstate after both specials, also as far as i know, there is no such special as 0x800, and 0x9C doesn't seem to be documented as doing anything, what are you trying to do with those specials?
Alright I took your advice and implemented it. While it didn't fully complete my problem, I'm like 90% closer, so thanks very much. The waitmovement changes didn't effect it whatsoever, but the wait states made the game stop freezing and the event actually happened! (the battle at least) Special 0x800 is actually a setflag for access to the pokemon menu (forgot to mention I'm editing ruby version) so it's not special 0x800, it's setflag 0x800. Special 0x9C does exist though, it is the special for choosing a starter pokemon in Ruby. Making a few edits with your help and a little research, everything works but two things:

1) The script that is being "skipped" still gets skipped, the npc doesn't move or show either times it's supposed to.
2) You can do the event again, and it's supposed to never happen again after you do it.

Below is another video showing the problem and my current script. I hovered my mouse twice where the npc should be, in case you're wondering why I did that. I sped the battle up as well, as it was superfluous to show it off. And I also showcased the event happening twice when it should only happen once and never again. Thanks for the help, closer than ever.

Video showcasing the problem:
https://www.youtube.com/watch?v=GNkPysNPcUc

Script:
'---------------
#org 0x801CC6
msgbox 0x8801AD6 MSG_NORMAL '"???: What the hell, get outta here..."
playsong 0x1D3 0x0
applymovement 0x1 0x8801C99
waitmovement 0x0
applymovement MOVE_PLAYER 0x8801CA4
waitmovement 0x0
applymovement 0x2 0x8801CA7
waitmovement 0x0
applymovement 0x2 0x8801CB3
waitmovement 0x0
msgbox 0x8801B01 MSG_NORMAL '"???: Oh no! Kid take one of these\..."
msgbox 0x8801B42 MSG_NORMAL '"???: Show no mercy Poochyena!"
setflag 0x800
special 0x9C
waitstate
msgbox 0x8801B61 MSG_NORMAL '"???: Um. Um.. Damn..."
applymovement 0x1 0x8801CBB
waitmovement 0x0
hidesprite 0x1
setvar 0x8000 0x1
fadesong 0x1BB
faceplayer
msgbox 0x8801B79 MSG_NORMAL '"???: You showed great skill in tha..."
release
end


'---------
' Strings
'---------
#org 0x801AD6
= ???: What the hell, get outta here runt!

#org 0x801B01
= ???: Oh no! Kid take one of these\nPokémon to protect yourself!

#org 0x801B42
= ???: Show no mercy Poochyena!

#org 0x801B61
= ???: Um. Um.. Damn...

#org 0x801B79
= ???: You showed great skill in that\nbattle kid.\pSkyla: Also I'm professor Skyla of this\nregion, the Guar region.\pSkyla: You can keep that Pokémon but\ndon't go up the mountain.\pSkyla: I need to investigate something\nbut it's too dangerous for kids.\pSkyla: Cya, around kid.


'-----------
' Movements
'-----------
#org 0x801C99
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0xFE 'End of Movements

#org 0x801CA4
#raw 0x49 'Jump in Place (Facing Right)
#raw 0xFE 'End of Movements

#org 0x801CA7
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0xFE 'End of Movements

#org 0x801CB3
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements

#org 0x801CBB
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 7th, 2015 (6:15 AM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by ShadowSorcererX View Post
1) The script that is being "skipped" still gets skipped, the npc doesn't move or show either times it's supposed to.
2) You can do the event again, and it's supposed to never happen again after you do it.
1. The npc is hidden, is there a number in the person id box in advance-map?
2. the var needs to be put in the var number box when you click on the green tile in advnace-map, not sure if 0x8000 is a good variable to use
__________________

Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 7th, 2015 (7:19 AM).
NewDenverCity's Avatar
NewDenverCity NewDenverCity is offline
 
Join Date: Apr 2014
Location: Antarctica
Gender: Male
Nature: Calm
Posts: 326
You generally want to use vars 4011 through 40FF(general rule of thumb, may not be correct for Ruby), and vars that are that high might not work at all.


If the script is repeating, the variable 0x8000 might not be working like I said or you have something weird going on in A-Map/map editor of your choice. You should set it so that it'll only happen if the chosen variable matches the one set in A-Map.
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 7th, 2015 (12:51 PM). Edited May 7th, 2015 by ShadowSorcererX.
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Thanks to you guys I have gotten the script to only act once. I was a dummy and the number I had in A-map wasn't the one I had in the script... So everything works except for the one trainer not moving. She is supposed to move north then east, but like I said, the game acts like shes not supposed to move and continues anyways. Here is my script and a few things I want to note.

Script that is supposedly being skipped:
applymovement 0x2 0x8801CA7
waitmovement 0x0
applymovement 0x2 0x8801CB3
waitmovement 0x0

Aqua grunt (works) event info:
Person event no 1
picture no 117
unknown 00 00
pos x/y 001A 001B
person id 1206

Winnoa (doesn't work) event info:
Person event no 2
picture no 130
unknown 00 00
pos x/y 0009 0025
person id 1205

Script:

'---------------
#org 0x801CC6
msgbox 0x8801AD6 MSG_NORMAL '"???: What the hell, get outta here..."
playsong 0x1D3 0x0
applymovement 0x1 0x8801C99
waitmovement 0x0
applymovement MOVE_PLAYER 0x8801CA4
waitmovement 0x0
applymovement 0x2 0x8801CA7
waitmovement 0x0
applymovement 0x2 0x8801CB3
waitmovement 0x0
msgbox 0x8801B01 MSG_NORMAL '"???: Oh no! Kid take one of these\..."
msgbox 0x8801B42 MSG_NORMAL '"???: Show no mercy Poochyena!"
setflag 0x800
special 0x9C
waitstate
msgbox 0x8801B61 MSG_NORMAL '"???: Um. Um.. Damn..."
applymovement 0x1 0x8801CBB
waitmovement 0x0
hidesprite 0x1
setvar 0x4051 0x1
fadesong 0x1BB
faceplayer
msgbox 0x8801B79 MSG_NORMAL '"???: You showed great skill in tha..."
release
end


'---------
' Strings
'---------
#org 0x801AD6
= ???: What the hell, get outta here runt!

#org 0x801B01
= ???: Oh no! Kid take one of these\nPokémon to protect yourself!

#org 0x801B42
= ???: Show no mercy Poochyena!

#org 0x801B61
= ???: Um. Um.. Damn...

#org 0x801B79
= ???: You showed great skill in that\nbattle kid.\pSkyla: Also I'm professor Skyla of this\nregion, the Guar region.\pSkyla: You can keep that Pokémon but\ndon't go up the mountain.\pSkyla: I need to investigate something\nbut it's too dangerous for kids.\pSkyla: Cya, around kid.


'-----------
' Movements
'-----------
#org 0x801C99
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0x17 'Slide Left
#raw 0xFE 'End of Movements

#org 0x801CA4
#raw 0x49 'Jump in Place (Facing Right)
#raw 0xFE 'End of Movements

#org 0x801CA7
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0x16 'Slide Up
#raw 0xFE 'End of Movements

#org 0x801CB3
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements

#org 0x801CBB
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0x18 'Slide Right
#raw 0xFE 'End of Movements
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 7th, 2015 (1:40 PM).
PurpleOrange's Avatar
PurpleOrange PurpleOrange is offline
still don't know what I'm doing
 
Join Date: Sep 2013
Location: Littleroot Town (UK)
Age: 25
Gender: Male
Posts: 367
Quote:
Originally Posted by ShadowSorcererX View Post
Aqua grunt (works) event info:
Person event no 1
picture no 117
unknown 00 00
pos x/y 001A 001B
person id 1206

Winnoa (doesn't work) event info:
Person event no 2
picture no 130
unknown 00 00
pos x/y 0009 0025
person id 1205
your problem is the person id, flag 0x1205 needs to be cleared, followed by a showsprite 0x2, and then when winona leaves, setflag 0x1205, and then hidesprite 0x2, also flags 0x1205 and 0x1206 aren't safe flags to use (As far as i know), so i suggest that you change them to safe flags
__________________

Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old May 7th, 2015 (1:52 PM).
ShadowSorcererX's Avatar
ShadowSorcererX ShadowSorcererX is offline
 
Join Date: May 2015
Location: The Sky of course
Gender: Male
Nature: Calm
Posts: 60
Quote:
Originally Posted by PurpleOrange View Post
your problem is the person id, flag 0x1205 needs to be cleared, followed by a showsprite 0x2, and then when winona leaves, setflag 0x1205, and then hidesprite 0x2, also flags 0x1205 and 0x1206 aren't safe flags to use (As far as i know), so i suggest that you change them to safe flags
I love you.
The showsprite 0x2 made Wiona show up!!!! Thanks so much man, you don't know how much this means to me! Problem solved thanks to you and the others guy. :]
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

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:10 AM.