• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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
    17
    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.
     
    There are two "CHAMPION" classes, the later (0x5A) changes the the name to the rival, whereas the earlier (0x1E) does not.
     
    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]
     
    Thanks for the responses! Seems like that was a simple enough question. This should really help hackers in the future! :D
     
    Back
    Top