Originally Posted by AkameTheBulbasaur
[ Original Post ]
Summary Screen Wrap-Around
First of all, I would like to thank Zeturic for creating the original routine for this. My routine is different from theirs, and I have extended it a bit, which is why I am posting this here.
Anyway, this patch modifies the summary screens in both the Party Menu and in the PC so that if you are on the first Pokemon and you go upwards, you will loop around to the last Pokemon (and vice versa). Ordinarily, in this circumstance, nothing would happen.
This folder contains the patch itself, and the two routines that comprise it. There were two functions which were replaced, and both of the new functions were shorter than the originals (hence why this could be turned into a patch).
This patch will skip over Eggs when scrolling while in the Party or PC, but if you want to see the Egg's summary (to see how long it will take to hatch), you can select their summary individually.
If you have more than one Egg in the party and move up or down (if the next slot is an egg), the game freezes.
I used the Ability Capsule script by Spherical Ice to create an Ability Capsule item, and it worked great-- but I'm making this for a romhack where almost all of the Pokemon have two abilities, so making an infinite-use key item that runs this script for a Pokemon would be preferable.
What edits would I need to make to the script (or post-compiled hexadecimal) in order to change this? I would imagine it's similar to the scripts that alter TMs or make other reusable key items, but at the moment I'm not confident with ASM script or trying to find the specific hex bytes that need to be altered.
Thanks so much in advance. This thread's incredibly helpful and I appreciate all the excellent content being shared here!
I used the Ability Capsule script by Spherical Ice to create an Ability Capsule item, and it worked great-- but I'm making this for a romhack where almost all of the Pokemon have two abilities, so making an infinite-use key item that runs this script for a Pokemon would be preferable.
What edits would I need to make to the script (or post-compiled hexadecimal) in order to change this? I would imagine it's similar to the scripts that alter TMs or make other reusable key items, but at the moment I'm not confident with ASM script or trying to find the specific hex bytes that need to be altered.
Thanks so much in advance. This thread's incredibly helpful and I appreciate all the excellent content being shared here!
As it turns out, you are in luck. I did this exact same thing in my game. The way you do it is very simple.
First, you write out an NPC script which has the Item's effect. You will want to write it in such a way that it does not remove the item after the script is over. Remember where you inserted it.
Next, you can use this routine by Darthatron to allow an item to run a script when you "use" it. Replace the "08AABBCC" with the address of your NPC Script (do not add one). Also, make sure to put the address where you will insert this routine after the ".equ ROM, 0x08" part (so if you put it at 0xAABBCC you would have ".equ ROM, 0x08AABBCC").
/*
---------------------------------------------------------
This routine was made originally by Darthatron with mild
syntax edits from me.
The purpose of this routine is to allow the user to run
an NPC Script when using an Item from the bag.
First, we do some sort of setting up. We put the address
of the second half of the routine into 0x02039998. Then
we BL to 0x080A103C. This somehow allows us to eventually
run the second part of the routine.
The second part of the routine allows us to run the NPC
script itself. We give it the address, and then it runs
the script.
---------------------------------------------------------
*/
Finally, in the Item Editor, I believe there is an option to allow the item to run a routine when used. You set the address of that routine to the address of Darthatron's routine. Then you only need to set the Item to be a Key Item in the editor, and you should be done.
"The human sacrificed himself, to save the Pokemon. I pitted them against each other, but not until they set aside their differences did I see the true power they all share deep inside. I see now that the circumstances of one's birth are irrelevant; it is what you do with the gift of life that determines who you are." -Mewtwo
Thank you Akame for the pointers! That pointer script works great and should help a lot in the future when I can't run something directly from an item.
I did notice, previously in the thread, there was mention of Everstone nature-passing functionality being ported to FireRed, but I'm not sure if it was posted.
Was this ever done/is there a script for it anywhere? I know there's the CFRU standalone item pack out there that has the Everstone update in it, but it writes to an offset that's unfortunately already very full in the hack I'm shining up.