• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Development: Champion Being Named to Rival

Sierraffinity

Desperately trying to retire from ROM hacking
1,069
Posts
16
Years
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.
 
5,256
Posts
16
Years
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]
 

HackMew

Mewtwo Strikes Back
1,314
Posts
17
Years
  • Seen Oct 26, 2011
Here's the code for FR US v1.0:

Code:
[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[/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):

Code:
[div="font-family:consolas,courier new,monospace"][color=red]51[/color] 28 03 d0 [color=red]59[/color] 28 01 d0 [color=red]5a[/color] 28[/div]
 
Back
Top