The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script First movement script not working AKA tearing my hair out

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 23rd, 2021 (9:13 PM).
WistyFish's Avatar
WistyFish WistyFish is offline
 
Join Date: May 2021
Location: California
Gender: Female
Posts: 11
Hi! So I just wrote my first Big Boy Script, and no matter what I've tried so far, walking over the script tile in question results in big fat nothing. It doesn't freeze, but the player sprite walks right on by with nothing happening at all. I'll try to put all pertinent info below. If you can help me figure out what I'm doing wrong, I would really appreciate it. I'm using XSE and Advancemap

Script:
Spoiler:

'---------------
#org 0xEE30E8
checkflag 0x960
if 0x1 goto 0x8EE312A
lock
applymovement 0x7 0x8EE312D
msgbox 0x8EE3130 0x6 '"???: After we catch these two, we\..."
applymovement 0x7 0x8EE3188
applymovement 0x6 0x8EE318D
waitmovement 0x0
msgbox 0x8EE3192 0x6 '"???: Oh shoot! We're out of\npokéb..."
applymovement 0x7 0x8EE320E
waitmovement 0x0
setflag 0x960
release
end

'---------------
#org 0xEE312A
release
end


'---------
' Strings
'---------
#org 0xEE3130
= ???: After we catch these two, we\ncan go back to the boss. Move in\lon that TRAPINCH!

#org 0xEE3192
= ???: Oh shoot! We're out of\npokéballs! Boss is gonna kill\lme...\pDo you think we could catch them\nwith a net or something?


'-----------
' Movements
'-----------
#org 0xEE312D
#raw 0x47 'Jump in Place (Facing Up)
#raw 0xFE 'End of Movements

#org 0xEE3188
#raw 0x5 'Step Up (Slow)
#raw 0x10 'Delay1
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0xEE318D
#raw 0x5 'Step Up (Slow)
#raw 0x5 'Step Up (Slow)
#raw 0x3 'Face Right
#raw 0xFE 'End of Movements

#org 0xEE320E
#raw 0x1 'Face Up
#raw 0xFE 'End of Movements


XSE settings:
Spoiler:

Unknown: 0300
Var Number: 4050
Var Value: 0000
Unknown: 00 00
Script Offset: $EE30E8


That's all the pertinent info I could think of. Thanks in advance!
__________________
[It hurt itself in its confusion]
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old May 24th, 2021 (4:12 AM).
Asith's Avatar
Asith Asith is offline
Uwao
 
Join Date: Nov 2020
Posts: 204
The first things to check would be whether flag 0x960 has accidentally already been set, causing you to jump to your end-and-do-nothing script; and also whether var 4050 is actually 0 - if it isn't the script would rightly not activate. Try switching the checkflag to "if 0x0 goto", and try using other var values or var numbers. If that changes nothing, we'll look into it more, but those would be the first things to look at :)
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old May 24th, 2021 (4:53 AM).
kalarie kalarie is offline
 
Join Date: Jun 2008
Posts: 760
@WistyFish

1: Have expanded the amount of available flags? Flag 0x960 is not available in vanilla Fire Red, check this for a comprehensive flag list.

2: Are you sure variable 0x4050 actually contains value 0x0 and has not been set to anything else in-game? Check this for a comprehensive variable list.

3: The first unknown value in AdvanceMap should be the current height the protagonist is on +1. The highest available height in the vanilla games is 13. You probably need to set it to 0x0003 instead of 0x0300 (if the player is on a movement permission block C).
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old May 25th, 2021 (4:55 PM).
WistyFish's Avatar
WistyFish WistyFish is offline
 
Join Date: May 2021
Location: California
Gender: Female
Posts: 11
Quote:
Originally Posted by Asith View Post
The first things to check would be whether flag 0x960 has accidentally already been set, causing you to jump to your end-and-do-nothing script; and also whether var 4050 is actually 0 - if it isn't the script would rightly not activate. Try switching the checkflag to "if 0x0 goto", and try using other var values or var numbers. If that changes nothing, we'll look into it more, but those would be the first things to look at :)
Thanks for responding! I don't think it's the flag. I had the same thought, and removed the flag check entirely and nothing changed. I will also try your suggestion though to double check. I was tired at that point lol

As far as the var number, I honestly don't understand those numbers at all, and am basing what I am doing on a comment I saw on an old thread. I clearly need to do more research into this.

I will fiddle with these and update!
__________________
[It hurt itself in its confusion]
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old May 25th, 2021 (5:08 PM).
WistyFish's Avatar
WistyFish WistyFish is offline
 
Join Date: May 2021
Location: California
Gender: Female
Posts: 11
Quote:
Originally Posted by kalarie View Post
@WistyFish

1: Have expanded the amount of available flags? Flag 0x960 is not available in vanilla Fire Red, check this for a comprehensive flag list.
Glad you mentioned this! I'm actually using Emerald, but I was able to find the flags list through your link. I misunderstood something I read, I think, and have picked a new unused flag! However, this doesn't seem to do anything with regards to my problem. I also removed the check and set flag lines as a test and nothing changed.

Quote:
Originally Posted by kalarie View Post
2: Are you sure variable 0x4050 actually contains value 0x0 and has not been set to anything else in-game? Check this for a comprehensive variable list.

3: The first unknown value in AdvanceMap should be the current height the protagonist is on +1. The highest available height in the vanilla games is 13. You probably need to set it to 0x0003 instead of 0x0300 (if the player is on a movement permission block C).
Thank you for giving me some context for what these numbers are, frankly I don't understand them yet, and was just copying someone else. I did try unknown 0003, copying the unknown of other scripts in the game, but I had no idea it was the height. Variables.... I know nothing. I will do more research on this, I expect I will find that this is my issue.
__________________
[It hurt itself in its confusion]
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old May 25th, 2021 (5:21 PM).
WistyFish's Avatar
WistyFish WistyFish is offline
 
Join Date: May 2021
Location: California
Gender: Female
Posts: 11
It was the variable! Changed it to 0x4059, and the script works exactly as I wanted it to. Well... Actually I need to tweak the movements a little but that's no issue. I also partially understand what a Variable ID is now! Progress!

I could cry. Thanks to both of you! Now I get to work on a scripted battle!.... y.. yaaay??
__________________
[It hurt itself in its confusion]
Reply With Quote
  #7   Link to this post, but load the entire thread.  
Old May 29th, 2021 (10:31 PM).
Momoro's Avatar
Momoro Momoro is offline
I'm gonna put some dirt in your eye..
 
Join Date: Aug 2019
Location: Castelia City, Unova
Gender: Male
Posts: 269
Quote:
Originally Posted by WistyFish View Post
It was the variable! Changed it to 0x4059, and the script works exactly as I wanted it to. Well... Actually I need to tweak the movements a little but that's no issue. I also partially understand what a Variable ID is now! Progress!

I could cry. Thanks to both of you! Now I get to work on a scripted battle!.... y.. yaaay??
If you need help with scripting you can PM me, I'll gladly help 🙂
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:16 AM.