PDA

View Full Version : Champion Being Named to Rival


diegoisawesome
January 27th, 2010, 04: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.

Spherical Ice
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?

[/guess]

Darthatron
January 28th, 2010, 02:33 AM
There are two "CHAMPION" classes, the later (0x5A) changes the the name to the rival, whereas the earlier (0x1E) does not.

HackMew
January 28th, 2010, 03: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]

diegoisawesome
January 28th, 2010, 03:30 PM
Thanks for the responses! Seems like that was a simple enough question. This should really help hackers in the future! :D