The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking
Reload this Page Script Help with a 99% working script

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 August 13th, 2019 (9:42 PM).
Hillsy13's Avatar
Hillsy13 Hillsy13 is offline
 
Join Date: Aug 2016
Gender: Male
Posts: 157
Been working on this script for a while now and it's so close to working. It compiles just fine and everything works as intended except for the fact that the applymovement command labelled @mv5 won't trigger no matter what I do. I'd really appreciate some help or guidance with this one, been stuck with this issue for way too long.
Code:
#freespace 0xFF
#dynamic 0x9C0B20

#org @start
lockall
checkflag 0x94A
if 0x1 goto @done
setvar 0x8004 0x0
special2 0x8000 0x149
compare 0x8000 0x196
if 0x1 goto @go
msgbox @1 MSG_NORMAL
release
end

#org @done
msgbox @3 MSG_NORMAL
release
end

#org @go
msgbox @2 MSG_NORMAL
applymovement MOVE_PLAYER @mv1
checksound
sound 0x15
checksound
waitmovement 0x0
msgbox @4 MSG_NORMAL
fadescreen 0x1
applymovement MOVE_PLAYER @mv6
waitmovement 0x0
showsprite 0x3
clearflag 0x4B4
sound 0x0F
pause 0x20
fadescreen 0x0
cry 0x196 0x0
waitcry
msgbox @newmsg MSG_NORMAL
sound 0xD5
pause 0x40
sound 0x67
pause 0x10
fadescreen 0x1
special 0x116
hidesprite 0x01
setflag 0x94B
applymovement MOVE_CAMERA @mv2
waitmovement 0x7F
fadescreen 0x0
fadescreen 0x3
playsong 0x22B 0x0
showsprite 0x01
clearflag 0x94B
fadescreen 0x2
pause 0x55
sound 0x2B
pause 0x30
sound 0x14
setmaptile 0xB 0x7 0x384 0x0
setmaptile 0xB 0x8 0x38C 0x0
setmaptile 0xC 0x7 0x385 0x0
setmaptile 0xC 0x8 0x38D 0x0
special 0x91
pause 0x40
cry 0x19A 0x0
waitcry
applymovement 0x1 @mv3
waitmovement 0x0
fadescreen 0x1
applymovement MOVE_CAMERA @mv4
waitmovement 0x7F
fadescreen 0x0
msgbox @7 MSG_NORMAL
applymovement 0x1 @mv5
waitmovement 0x0
cry 0x19A 0x0
msgbox @5 MSG_NORMAL '"Deoxys: Ashaaa!!"
waitcry
setwildbattle 0x19A 0x50 0x0
special 0x139
playsong 0x227 0x0
waitstate
fadescreen 0x1
hidesprite 0x1
hidesprite 0x3
special 0x117
fadescreen 0x0
setflag 0x94A
setflag 0x94B
setflag 0x4B4
release
end




#org @1
= The Meteorite appears to be emitting\na strange aura.

#org @2
= The Meteorite appears to be emitting\na strange aura.

#org @3
= The Meteorite appears to have\nstabilized[.]

#org @4
= What's this?\pRayquaza's Pokéball is shaking\nuncontrollably!

#org @5
= Deoxys: Ashaaa!!

#org @newmsg
= It seems Rayquaza senses danger\nnearby....

#org @7
= Something appears to be approaching\nfrom outside the atmosphere!

#org @mv1
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @mv2
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE 'End of Movements

#org @mv3
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv4
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0xFE 'End of Movements

#org @mv5
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv6
#raw 0x40 'mov40
#raw 0x29
#raw 0xFE 'End of Movements
Reply With Quote
  #2   Link to this post, but load the entire thread.  
Old August 14th, 2019 (3:30 AM).
kalarie kalarie is offline
 
Join Date: Jun 2008
Posts: 760
Quote:
Originally Posted by Hillsy13 View Post
Been working on this script for a while now and it's so close to working. It compiles just fine and everything works as intended except for the fact that the applymovement command labelled @mv5 won't trigger no matter what I do. I'd really appreciate some help or guidance with this one, been stuck with this issue for way too long.
Code:
#freespace 0xFF
#dynamic 0x9C0B20

#org @start
lockall
checkflag 0x94A
if 0x1 goto @done
setvar 0x8004 0x0
special2 0x8000 0x149
compare 0x8000 0x196
if 0x1 goto @go
msgbox @1 MSG_NORMAL
release
end

#org @done
msgbox @3 MSG_NORMAL
release
end

#org @go
msgbox @2 MSG_NORMAL
applymovement MOVE_PLAYER @mv1
checksound
sound 0x15
checksound
waitmovement 0x0
msgbox @4 MSG_NORMAL
fadescreen 0x1
applymovement MOVE_PLAYER @mv6
waitmovement 0x0
showsprite 0x3
clearflag 0x4B4
sound 0x0F
pause 0x20
fadescreen 0x0
cry 0x196 0x0
waitcry
msgbox @newmsg MSG_NORMAL
sound 0xD5
pause 0x40
sound 0x67
pause 0x10
fadescreen 0x1
special 0x116
hidesprite 0x01
setflag 0x94B
applymovement MOVE_CAMERA @mv2
waitmovement 0x7F
fadescreen 0x0
fadescreen 0x3
playsong 0x22B 0x0
showsprite 0x01
clearflag 0x94B
fadescreen 0x2
pause 0x55
sound 0x2B
pause 0x30
sound 0x14
setmaptile 0xB 0x7 0x384 0x0
setmaptile 0xB 0x8 0x38C 0x0
setmaptile 0xC 0x7 0x385 0x0
setmaptile 0xC 0x8 0x38D 0x0
special 0x91
pause 0x40
cry 0x19A 0x0
waitcry
applymovement 0x1 @mv3
waitmovement 0x0
fadescreen 0x1
applymovement MOVE_CAMERA @mv4
waitmovement 0x7F
fadescreen 0x0
msgbox @7 MSG_NORMAL
applymovement 0x1 @mv5
waitmovement 0x0
cry 0x19A 0x0
msgbox @5 MSG_NORMAL '"Deoxys: Ashaaa!!"
waitcry
setwildbattle 0x19A 0x50 0x0
special 0x139
playsong 0x227 0x0
waitstate
fadescreen 0x1
hidesprite 0x1
hidesprite 0x3
special 0x117
fadescreen 0x0
setflag 0x94A
setflag 0x94B
setflag 0x4B4
release
end




#org @1
= The Meteorite appears to be emitting\na strange aura.

#org @2
= The Meteorite appears to be emitting\na strange aura.

#org @3
= The Meteorite appears to have\nstabilized[.]

#org @4
= What's this?\pRayquaza's Pokéball is shaking\nuncontrollably!

#org @5
= Deoxys: Ashaaa!!

#org @newmsg
= It seems Rayquaza senses danger\nnearby....

#org @7
= Something appears to be approaching\nfrom outside the atmosphere!

#org @mv1
#raw 0x56 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org @mv2
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0x09
#raw 0xFE 'End of Movements

#org @mv3
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv4
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0xFE 'End of Movements

#org @mv5
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0x4 'Step Down (Slow)
#raw 0xFE 'End of Movements

#org @mv6
#raw 0x40 'mov40
#raw 0x29
#raw 0xFE 'End of Movements
Are you sure the 0x1 corresponds with the person event number 0x1 (and not the number above it) in AdvanceMap? That's the only thing I can think of right now.
Reply With Quote
  #3   Link to this post, but load the entire thread.  
Old August 14th, 2019 (5:45 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯
__________________
Reply With Quote
  #4   Link to this post, but load the entire thread.  
Old August 14th, 2019 (9:40 PM).
Hillsy13's Avatar
Hillsy13 Hillsy13 is offline
 
Join Date: Aug 2016
Gender: Male
Posts: 157
Quote:
Originally Posted by DrFuji View Post
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯
Thank you so much for this. I didn't know moving the camera so far away could compromise applymovement commands by making the sprites in question too far away on the map. Regardless, with that knowledge I was able to pretty easily fix the problems with the script. Thanks a heap!
__________________
Pokémon Emerald Genesis [Beta 2.0]
Reply With Quote
  #5   Link to this post, but load the entire thread.  
Old August 15th, 2019 (4:50 AM).
Hillsy13's Avatar
Hillsy13 Hillsy13 is offline
 
Join Date: Aug 2016
Gender: Male
Posts: 157
Quote:
Originally Posted by DrFuji View Post
OW 0x1 is probably too far way to be loaded by the game when the script reaches @mv5. You're moving the camera/ that OW over some pretty huge distances so I wouldn't be surprised if that was the case. As a test, try moving the OW down by two or three tiles in A-Map and play the script. If @mv5 is triggered correctly, you've got your reason as to why its not working right now. If that doesn't work then ¯\_(ツ)_/¯
While I've got ya here, just had a bit of a random question, all good if you don't have an answer :). I'm pretty keen to expand the battle background table in Emerald, I know where it is and am pretty confident that I won't have any problems moving it to free space and fixing up the pointers. The only thing concerning me is how I'm going to get A-map to recognize the expanded slots in the table if that makes sense. So I was just wondering if you knew how that would work and if there was anything else I missed that might be necessary throughout the process.
__________________
Pokémon Emerald Genesis [Beta 2.0]
Reply With Quote
  #6   Link to this post, but load the entire thread.  
Old August 15th, 2019 (5:28 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Heiki Hecchara‌‌
 
Join Date: Sep 2009
Location: Aussie
Age: 30
Gender: Male
Nature: Jolly
Posts: 1,693
Do you mean having a specific battleground appear depending on the tile you're standing on/ map you're in, etc?
__________________
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:19 AM.