The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Other Scripting problems

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 14th, 2014 (3:38 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
Okay, so I have a script and it runs pretty well for one I almost completely wrote on my own. Here's the script:

Spoiler:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done

applymovement 0x1 @move
waitmovement 0x0
applymovement 0xFF @move2
msgbox @shoes 0x6
applymovement 0x1 @move3
waitmovement 0x0
release
end

#org @done
release
end

#org @move
#raw 0x04
#raw 0x04
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x02

#org @move2
#raw 0x02

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x05
#raw 0x05
#raw 0x03
#org @shoes
= Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.


When the @move part happens, it works. But then instead of playing the message, the NPC then does their movement @move 3 (back to their chair). And then they face down, instead of facing right like I want them to. Then the game is stuck, even though I have the "release" and "end" at the end of the script. Why isn't it working?

And where do I put the Running Shoes offset in the script? I'm not sure on that. Thank you. :)
__________________


Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 14th, 2014 (3:52 PM).
machomuu's Avatar
machomuu machomuu is offline
Stuck in Hot Girl Summer
 
Join Date: Apr 2008
Location: Take a left, turn right at the next stop, bear left for a few mil
Gender: Female
Nature: Relaxed
Posts: 10,505
First off, you need to end each of your movements with 0xFE, because that's what tells the game that the movement process is over (So, for instance, in @move, you need to have 0xFE at the end of the last movement. Same for move2 and move3. Because you don't end them, the game doesn't know to continue with the script.

As for Running Shoes, IIRC you only need to set the flag (the command for which would be setflag 0x8C0) to make it so that the player can run.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 14th, 2014 (3:53 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 995
Try this:

Code:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x1 @move
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
msgbox @shoes 0x6
applymovement 0x1 @move3
waitmovement 0x0
setflag 0x82F
release
end

#org @done
release
end

#org @move
#raw 0x04
#raw 0x04
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x02
#raw 0xFE

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x05
#raw 0x05
#raw 0x03
#raw 0xFE

#org @shoes
= Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
Remember to always use #raw 0xFE after movements or they won't work correctly. I'm also assuming you have the person events (0x1's) correct in A-Map.
The Running Shoes use flag 0x82F in Fire Red, if that's the ROM you are using.
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 14th, 2014 (3:57 PM).
machomuu's Avatar
machomuu machomuu is offline
Stuck in Hot Girl Summer
 
Join Date: Apr 2008
Location: Take a left, turn right at the next stop, bear left for a few mil
Gender: Female
Nature: Relaxed
Posts: 10,505
Knowing Jabu, it'd probably be this:
Code:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x1 @move
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
msgbox @shoes 0x6
applymovement 0x1 @move3
waitmovement 0x0
setflag 0x8C0
release
end

#org @done
release
end

#org @move
#raw 0x04
#raw 0x04
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x02
#raw 0xFE

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x05
#raw 0x05
#raw 0x03
#raw 0xFE

#org @shoes
= Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
He's an Emerald guy, all around.
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 14th, 2014 (4:21 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
That worked! Thanks a lot. :)

Now, how would I make it so this message never plays again (And the scripts around it)? And is there a list of the fanfares anywhere?

Edit: That's weird. When I leave the town and go to the route, the Running Shoes are disabled. When I get to another town, they're re-enabled. The route is listed as a route in the Header, though. Has this happened to anyone else before?
__________________


Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 14th, 2014 (4:34 PM).
machomuu's Avatar
machomuu machomuu is offline
Stuck in Hot Girl Summer
 
Join Date: Apr 2008
Location: Take a left, turn right at the next stop, bear left for a few mil
Gender: Female
Nature: Relaxed
Posts: 10,505
Quote:
Originally Posted by JabuJabule View Post
That worked! Thanks a lot. :)

Now, how would I make it so this message never plays again (And the scripts around it)? And is there a list of the fanfares anywhere?

Edit: That's weird. When I leave the town and go to the route, the Running Shoes are disabled. When I get to another town, they're re-enabled. The route is listed as a route in the Header, though. Has this happened to anyone else before?
I think there's a list of fanfares in Diego's XSE tutorial. To make sure the event doesn't play again, you need to set a flag. You already have a checkflag in place for this purpose, so you just need to do this:
Code:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x1 @move
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
msgbox @shoes 0x6
applymovement 0x1 @move3
waitmovement 0x0
setflag 0x8C0
setflag 0x828
release
end

#org @done
release
end

#org @move
#raw 0x04
#raw 0x04
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x02
#raw 0xFE

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x05
#raw 0x05
#raw 0x03
#raw 0xFE

#org @shoes
= Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
What that does is add a flag. With the checkflag you have in place, after the flag is set (meaning, after the script has happened once, it will check for the flag and, seeing that it is set, will go to @done (which just releases and ends, giving the illusion that the script isn't playing at all).
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 14th, 2014 (4:48 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
Quote:
Originally Posted by machomuu View Post
I think there's a list of fanfares in Diego's XSE tutorial. To make sure the event doesn't play again, you need to set a flag. You already have a checkflag in place for this purpose, so you just need to do this:
Code:
#dynamic 0x800000

#org @start
checkflag 0x828
if 0x1 goto @done
applymovement 0x1 @move
waitmovement 0x0
applymovement 0xFF @move2
waitmovement 0x0
msgbox @shoes 0x6
applymovement 0x1 @move3
waitmovement 0x0
setflag 0x8C0
setflag 0x828
release
end

#org @done
release
end

#org @move
#raw 0x04
#raw 0x04
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x02
#raw 0xFE

#org @move2
#raw 0x02
#raw 0xFE

#org @move3
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x0A
#raw 0x05
#raw 0x05
#raw 0x03
#raw 0xFE

#org @shoes
= Good morning, honey!\pProfessor Adler told me that he wants \lto see you in his lab.\lPut on your Running Shoes\l and head to Loyoto Village.
What that does is add a flag. With the checkflag you have in place, after the flag is set (meaning, after the script has happened once, it will check for the flag and, seeing that it is set, will go to @done (which just releases and ends, giving the illusion that the script isn't playing at all).
Thank you, that fixed it! Now I just need the mom to say something random afterwards. :P
Do you have any idea about the Running Shoes issue?
__________________


Reply With Quote
  #8   Link to this post, but load the entire thread.  
Old May 14th, 2014 (5:03 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by JabuJabule View Post
Thank you, that fixed it! Now I just need the mom to say something random afterwards. :P
Do you have any idea about the Running Shoes issue?
That running shoes issue should not be happening if you did everything correctly. Maybe double check it? The game could be clearing the flag with a level script as well (although I have no idea how that would happen).

EDIT: nvm, if the flag was cleared, you'd have a different issue.

DOUBLE EDIT: Mind showing us a screenshot of the header tab in Advance Map?
Reply With Quote
  #9   Link to this post, but load the entire thread.  
Old May 14th, 2014 (5:19 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
Quote:
Originally Posted by HidoranBlaze View Post
That running shoes issue should not be happening if you did everything correctly. Maybe double check it? The game could be clearing the flag with a level script as well (although I have no idea how that would happen).

EDIT: nvm, if the flag was cleared, you'd have a different issue.

DOUBLE EDIT: Mind showing us a screenshot of the header tab in Advance Map?
__________________


Reply With Quote
  #10   Link to this post, but load the entire thread.  
Old May 14th, 2014 (5:49 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Umm ok I'm not seeing why your issue would occur. This is weird. Can you try doing this on a clean Emerald rom?
Reply With Quote
  #11   Link to this post, but load the entire thread.  
Old May 14th, 2014 (7:27 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
Quote:
Originally Posted by HidoranBlaze View Post
Umm ok I'm not seeing why your issue would occur. This is weird. Can you try doing this on a clean Emerald rom?
Not really. I already have a lot of progress on the one I'm using.
__________________


Reply With Quote
  #12   Link to this post, but load the entire thread.  
Old May 14th, 2014 (7:29 PM).
HidoranBlaze's Avatar
HidoranBlaze HidoranBlaze is offline
 
Join Date: Apr 2013
Age: 26
Gender: Male
Posts: 252
Quote:
Originally Posted by JabuJabule View Post
Not really. I already have a lot of progress on the one I'm using.
I'm not asking you to throw away your rom just yet. I'm saying you should test your running shoes script on a clean Emerald rom to see if the same problem occurs.
Reply With Quote
  #13   Link to this post, but load the entire thread.  
Old May 14th, 2014 (7:42 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
Quote:
Originally Posted by JabuJabule View Post
Based on what HackMew has written in this thread, I would try changing the 'Show name' to 'Show village/ city names'. Then again, if neither of those work, you could just follow the guide's steps to removing the limiter if you don't mind having Running Shoes enabled everywhere.
__________________
Reply With Quote
  #14   Link to this post, but load the entire thread.  
Old May 14th, 2014 (8:19 PM).
Lynker's Avatar
Lynker Lynker is offline
 
Join Date: May 2014
Location: Massachusetts
Age: 28
Gender: Male
Nature: Serious
Posts: 91
Quote:
Originally Posted by DrFuji View Post
Based on what HackMew has written in this thread, I would try changing the 'Show name' to 'Show village/ city names'. Then again, if neither of those work, you could just follow the guide's steps to removing the limiter if you don't mind having Running Shoes enabled everywhere.
How odd, that fixed the problem! But I'm going to have running enabled everywhere, so thank you for the guide. :)
__________________


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
Thread Tools

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