View Full Version : Development: Champion Being Named to Rival
January 27th, 2010, 4:15 PM
In Fire Red and Leaf Green, whoever has the trainer class of Champion automatically takes your rival's name. But how could we change that? Where is that bit of code that tells the class CHAMPION (and RIVAL, as well) to take the nickname of the rival you chose and place it over the trainer's in-game name? Could we change that? Could we omit it? I have no prior ASM knowledge, so I won't be much help, but I'm deciding to pose this question in hopes of getting it answered.
January 27th, 2010, 11:55 PM
I'm no expert, but for every Pokémon battle I've seen against the rival, his name is 'Terry', but in-game it is the player's defined name.
Maybe the key is Terry?
January 28th, 2010, 2:33 AM
There are two "CHAMPION" classes, the later (0x5A) changes the the name to the rival, whereas the earlier (0x1E) does not.
January 28th, 2010, 3:24 AM
Here's the code for FR US v1.0:
[css-div="font-family:consolas,courier new,monospace"]080d8140 7840 ldrb r0, [r0, #0x1] @ load the trainer class byte into r0
080d8142 2851 cmp r0, #0x51 @ check if the class is rival
080d8144 d003 beq $080d814e @ if equal, load rival's name
080d8146 2859 cmp r0, #0x59 @ check if the class is rival (2)
080d8148 d001 beq $080d814e @ if equal, load rival's name
080d814a 28ff cmp r0, #0x5a @ check if the class is champion
080d814c d106 bne $080d815c @ if different, load name as usual[/css-div]
So, if you want to edit which class trigger the rival's name, all you need to do is to edit the bytes in red below (offset 0xD8142):
[css-div="font-family:consolas,courier new,monospace"]51 28 03 d0 59 28 01 d0 5a 28[/css-div]
January 28th, 2010, 3:30 PM
Thanks for the responses! Seems like that was a simple enough question. This should really help hackers in the future! :D