Post by Aryan 10 on May 25, 2017 19:32:40 GMT 5.5
Changing the pre-battle, post-battle and switch-in text in Emerald (BPEE) and FireRed (BPRE)
This post focuses on changing the challenge, defeat, and switch-in text strings that appear during battle in Emerald and FireRed.
To clarify, I'm talking about these:
Green denotes Emerald offsets.
Red denotes FireRed offsets.
This is the default challenge text, found in 0x5CBB9C, and has pointers at 0x14E228 and 0x14E264.
Located at 0x3FD366 and the pointer at 0xD73C0 for FireRed.
For FireRed, it's at 0x3FD1C7 with pointers at 0xD776C and 0x3FE410.
On FireRed, it's at 0x3FD186 and the pointer located at 0x3FE374. This exact form is only present in ROMs that have not been decapitalized.
Challenge text:
Defeat text:
This post focuses on changing the challenge, defeat, and switch-in text strings that appear during battle in Emerald and FireRed.
To clarify, I'm talking about these:
Green denotes Emerald offsets.
Red denotes FireRed offsets.
This is the default challenge text, found in 0x5CBB9C, and has pointers at 0x14E228 and 0x14E264.
Located at 0x3FD366 and the pointer at 0xD73C0 for FireRed.
FD 1C 00 FD 1D FE EB E3 E9 E0 D8 00 E0 DD DF D9 00 E8 E3 00 D6 D5 E8 E8 E0 D9 AB FB FF
The default defeat text is in 0x5CBA2E, with pointers at 0x14E66C and 0x5CC744. For FireRed, it's at 0x3FD1C7 with pointers at 0xD776C and 0x3FE410.
CA E0 D5 ED D9 E6 00 D8 D9 DA D9 D5 E8 D9 D8 FE FD 1C 00 FD 1D AB FB FF
Last but not least, here's the default switch-in dialogue at 0x5CB9ED. Its pointer is at 0x5CC6A8. On FireRed, it's at 0x3FD186 and the pointer located at 0x3FE374. This exact form is only present in ROMs that have not been decapitalized.
FD 1C 00 FD 1D 00 DD E7 FE D5 D6 E3 E9 E8 00 E8 E3 00 E9 E7 D9 00 FD 01 AD FB D1 DD E0 E0 00 FD 23 00 D7 DC D5 E2 DB D9 FE CA C9 C5 1B C7 C9 C8 AC FF
Some bytes are used to load stored text, like the trainer class and trainer name. There are also others that stand for different functions. They are as follows:FD 01: Loads the name of the Pokemon the opponent is switching into/sending out
FD 1C: Loads the trainer class
FD 1D: Loads the trainer's name
FA: Continues the string after FE has been used. Similar to XSE's "\l" command
FB: Moves to a new box altogether and carries on the string. Works like "\p" (Yes, from XSE as well)
FE: The "new line" function for the string, similar to "\n" in XSE scripting
FF: Terminates the string to avoid reading further bytes (I think).
Modifying them is quite simple. Just write a custom string that you want (either in raw hex form or with a script editor) while making use of the byte functions listed above, compile or insert into free space using a hex editor, then change the respective pointers! I'll put mine up as an example because I'm awful at explaining stuff; feel free to use them. Be aware that these are optimized for EM, but they might work for FR:Challenge text:
D3 E3 E9 00 D5 E6 D9 00 D7 DC D5 E0 E0 D9 E2 DB D9 D8 00 D6 ED FE FD 1C 00 FD 1D AB FB FF
Defeat text:
D3 E3 E9 00 D8 D9 DA D9 D5 E8 D9 D8 FE FD 1C 00 FD 1D AB FB FF
Switch-in text:FD 1C 00 FD 1D 00 DD E7 FE D5 D6 E3 E9 E8 00 E8 E3 00 E7 D9 E2 D8 00 DD E2 00 FD 01 AD FA D1 DD E0 E0 00 ED E3 E9 00 E7 EB DD E8 D7 DC 00 ED E3 E9 E6 00 CA E3 DF 1B E1 E3 E2 AC FF