Trainer 781
Guest
- 0
- Posts
Pokemon Overworld Form(e) Change Project
The Battle Engine Upgrade code only handles the form(e) changes that happen in Battle.
So, here is a separate project made by me in C and python which contains the code for different types of form(e) changes that not happen in the Battle but the Overworld.
So why there is an another form(e) change resource thread when one already exists?
1. Some of the routines here are specially coded to be used in conjunction with the Battle Engine Upgrade. The existing form(e) change routines in PC might not work without modifying them.
2. It also provides the complex Rotom form change special move handling with mechanism to automatically generate scripts that are hardwired to the Rotom form handling routines.
3. C is better than ASM.
What is Implemented?
Spoiler:
-Arceus/Silvally Formes (Handling for form(e) changes in box left)
-Giratina Formes (Handling for form(e) changes in box left)
-Genesect Formes (Handling for form(e) changes in box left)
-Rotom Forms
-Deoxys Formes
-Shaymin Formes
-Genie Formes
-Kyurem Formes
-Hoopa Formes
What is Left?
Spoiler:
-Keldeo Forme Change (reversion)
-Handling for Hold Item formes changes in the PC
-2 more Shaymin revert scenarios (Low priority)
Source Code:-
Spoiler:
Installation instructions:-
Spoiler:
- Download devkitpro. Follow the instructions.
(Note: you can only install devkitARM)
- Download the latest version of python(3.5).
After downloading and before proceeding to install make sure that the 'add to path' checkbox is ticked, otherwise you'll have to add the python path in the environment variables manually.
- Download the master folder from this github page
(click 'Clone or Download', then 'Download Zip')
- Get your ROM, rename it BPEE0.gba and place it the main(master) folder.
- To decide the offsets where you want to insert the code:
* in the 'insert.py' file in the folder 'scripts' change default=0xF00000 to the location you want to insert the Upgrade data (let it be X)
* in the 'linker.ld' file change 'ORIGIN = 0x08F00000' to X+0x8000000 (for e.g if default=0x1A10000 then ORIGIN = 0x9a10000)
- Run the cmd.exe in the main folder.
You can do this by typing 'cmd' and hitting enter in the url address or selecting 'run command prompt from here' from right clciking on empty space while holding the shift key
- In command prompt window, type 'python scripts//build.py', press Enter and then 'python scripts//insert.py' (here we output a text file containing a list of all the offsets), press Enter.
A new gba file will appear named as test.gba and an offsets.ini file.
That is your resultant file.
Setting up different form(e)s:-
Spoiler:
Giratina:
Spoiler:
1. In config.h, update the index of POKE_GIRATINA and POKE_GIRATINA_O
2. Set the hold item effect of the item to be used as Griseous Orb to 0x49 (73)
2. Set the hold item effect of the item to be used as Griseous Orb to 0x49 (73)
Arceus/Silvally:
Spoiler:
1. In config.h, update the index of POKE_ARCEUS and POKE_ARCEUS_FIGHTING.
You don't need to update the rest of formes if all the formes are placed in consecutive slots and are
in the same order defined in the enum. Otherwise, set them the same way as done for ARCUES_FIGHTING
(add an =value to the corresponding entry). Same goes for Silvally
2. Set the ability of all the formes as MULTITYPE. RKS System in case of Silvally
3. For the plates, set the hold item effect as 0x90 (145). Item effect quality as the type boost factor.
And the extra field as the type index to represent the plate type. The hold item effect for Memories are 0x91 (146).
You don't need to update the rest of formes if all the formes are placed in consecutive slots and are
in the same order defined in the enum. Otherwise, set them the same way as done for ARCUES_FIGHTING
(add an =value to the corresponding entry). Same goes for Silvally
2. Set the ability of all the formes as MULTITYPE. RKS System in case of Silvally
3. For the plates, set the hold item effect as 0x90 (145). Item effect quality as the type boost factor.
And the extra field as the type index to represent the plate type. The hold item effect for Memories are 0x91 (146).
Genesect:
Spoiler:
1. In config.h, update the index of POKE_GENESECT and its formes in the similar way as done for Arcues.
2. For the drives, the hold item effect is 0x8C (140). The extra field will decide the Genesect form. 1 for Douse, 2 for Burn, 3 for Chill and 4 for Shock.
2. For the drives, the hold item effect is 0x8C (140). The extra field will decide the Genesect form. 1 for Douse, 2 for Burn, 3 for Chill and 4 for Shock.
Rotom:
Spoiler:
1. In config.h, update the index of POKE_ROTOM and its formes in the same way as done for Arcues.
2. Prepare a custom mulitichoice box for Rotom formes exactly same as ORAS. You will need to expand multichoice boxes to add a custom one.
3. Then update the multichoice index in the 'config.s' file.
4. Open the offsets.ini file and note the offset of rotom_main script and attach it as a signpost script.
2. Prepare a custom mulitichoice box for Rotom formes exactly same as ORAS. You will need to expand multichoice boxes to add a custom one.
3. Then update the multichoice index in the 'config.s' file.
4. Open the offsets.ini file and note the offset of rotom_main script and attach it as a signpost script.
Deoxys:
Spoiler:
1. In config.h, update the index of deoxys formes.
2. Open the offsets.ini file and note the offset of deoxys_main script and attach it as a signpost script
2. Open the offsets.ini file and note the offset of deoxys_main script and attach it as a signpost script
Shaymin, Genie Forms, Hoopa, Kyurem:
Spoiler:
1. In config.h, update the index of all the respective forms.
2. Open the offsets.ini file and note the offsets of item_forme_change_handler_gracidea,
item_forme_change_handler_reveal_glass, item_forme_change_handler_dna_splicers & item_forme_change_handler_prison_bottle
for Shaymin, Genies, Kyurem & Hoopa respectively
3. Open an item editor, select the item to be used as Gracidea and set the Field Usage Pointer to the offset corresponding to item_forme_change_handler_gracidea[B}+1[/B].
4. Select type of the item to '2. use of select'.
5. Repeat steps 3-4 for Reveal Glass, DNA Splicers and Prison Bottle Respectively.
6. Importantly for kyurem fusion, install a saveblock hack, then in src/config.h, set the value of SAVE_FUSEE to a RAM area consisting of 80 free bytes of saveblock space.
(saveblock hack comes bundled with the Dynamic Pokemon Expansion for EM:- https://www.pokecommunity.com/threads/380296
for FR use PGE for Pokemon Expansion or JPAN's saveblock hack). If you don't want to use kyurem formes set SAVE_FUSEE to 0x0.
Note: Shaymin and Hoopa revert when being withdrawn from PC. The Genie formes are interchangable with the item itself.
Keldeo:
Spoiler:
1. Just modify the keldeo form(e) indices in config.h
2. Open 'offsets.ini' file to get the offset of keldeo_main and assign it to a NPC.
BUGS/Oddities:-
Spoiler:
The pokemon icon sprites don't update immediately after giving or taking the item for form(e) change. They only update after changing the screens.
Major Changes:-
Spoiler:
Port to Fire Red
Scripts for Rotom and Deoxys now build with the source. Simplifies the insertion process more.
Credits:-
Spoiler:
The_Learner - Helping me to bring the project to near closure and doing the entire port to FR. Huge Thanks!
Dizzy - My partner in the Battle Engine Upgrade, the Run Script from Item routine (which i translated to C) and telling some important offsets.
Spherical Ice - Sharing his Rotom Script used in Gaia to get an idea of the workflow for Rotom.
Sagiri - Identifying ORAS messages for Rotom and Deoxys Scripts.
Tetrable - Keldeo Form(e) change.
Last edited: