![]() |
FR "Delay" script commands
so I'm just wondering exactly how many frames each of these delay by?
#raw 0x18 = Delay1 #raw 0x19 = Delay2 #raw 0x1A = Delay3 #raw 0x1B = Delay4 #raw 0x1C = Delay5 I'm trying to make the player wait while an NPC carries out these commands: #raw 0x10 'Step Down (Normal) #raw 0x30 'Face Right (Delayed) #raw 0x28 'Step on the Spot Right (Faster) I seem to have gotten the result I wanted by making the player do these: #raw 0x1C 'Delay5 #raw 0x1C 'Delay5 #raw 0x1A 'Delay3 but I still want to know the frame counts for each because it seems they're all slightly different. |
You could just use waitmovement 0x0 and only put the player's movement after the NPCs if you want to make that a bit more efficient.
I think the number on each tells how many frames the player will wait for. You're waiting 13 frames, if that's the case. Don't know if you've timed it, but if it's around the length of 13 frames, that's probably right. |
Quote:
The reason I'm doing it like this is I'm editing existing scripts but had some trouble adding an increased number of commands than the original. Basically, an extension of my problem here https://www.pokecommunity.com/showthread.php?t=392797 |
If you want to add more commands to a script, you can use the #dynamic function for that. Simple replace the pointer of the script section you want to edit with @[whatevernameyouwant] and replace all reference pointers to that script with the same, and you can add as many commands as you want. When you compile, those scripts will be compiled into free space and nothing will overwrite. The original script will contain these new pointers and they'll operate in game as if they were a part of the original script.
|
Quote:
the original script looks like this in XSE Quote:
Quote:
|
You don't need to keep track of it. Most tools nowadays do automatic free space locating, so nothing is going to overwrite itself. Besides, if you're making a hack, you HAVE to use free space. There's no way around it.
Yes, that's exactly what you should do. You don't need the "'---------------" though. Also, be sure that, when you replace the pointers, you replace all references to those pointers. So if 0x716420 (example) is referenced by another part of the script, you have to change it to your @ pointer. |
Quote:
But for the free space thing, I'm using Mrdollsteak's ROM base and am worried that if there's ever an update, things will go wrong. |
My advice is to set your #dynamic to 0x710000 so it'll start adding right where the used-up free space ends in vanilla FireRed (it won't overwrite anything, don't worry). Dollsteak data starts at 0x900000 and he will most likely only add things after that offset, so it's unlikely you'll reach that far and more unlikely that any of his data will overwrite your's.
|
Ok all is well now. I actually put the @ at 0x165E26 instead of 0x8165F71. Thanks again for your help.
|
| All times are GMT -8. The time now is 9:14 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.