• 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.

[Other] Changing Rival's Name In-Game

Emerald doesn't have a changeable rival name. The naming screen setup which in FireRed lets you rename the rival was repurposed for Walda. You'd need to add the rival name to one of the save blocks (FireRed uses save block 1) and extend the naming screen code.
 
Well, now there is a custom rival name process! For anyone else who wants to have a custom rival name, here's the code you'll need:

In src/naming_screen.c:
Spoiler:
This code allows you to create a naming screen to give a name to your rival. Right now, even though I've given text to be displayed on the naming screen (like "YOUR NAME?", which is used in the player naming screen), no text appears at all. That's just an aesthetic issue, since the rival's name is assigned just fine.

In data/specials.inc:
Spoiler:
This just allows you to access the RivalNameChange function from naming_screen.c in a script.

In src/strings.c:
Spoiler:

This is the text that SHOULD be appearing when the naming screen appears, but doesn't.

In include/global.h:
Spoiler:
The only thing that's changed here is that I added
Code:
u8 rivalName[PLAYER_NAME_LENGTH + 1];
in there. This is the variable that's used to hold the rival's name.

In src/main_menu.c:
Spoiler:
I tweaked this bit of code so that it makes sure that the rival has a name even if the player never gives them one. If the rival is female, the rival's name will be "MAY". If they're male, their name will be "BRENDAN", just like in the vanilla game.

In src/battle_message.c:
Spoiler:
The only change here is in the final brackets. When the game looks at the trainer's name to print in battle, if it sees "MAY" or "BRENDAN", it will instead print the custom rival name.

In gflib/string_util.c:
Spoiler:
This makes every instance of {RIVAL} in every piece of text (except in battles) prints the custom rival name.


The rest of the changes are just making sure all of the dialogue doesn't use the original rival's name, and instead uses the custom one.

In data/maps/EverGrandeCity_ChampionsRoom/scripts.inc,
data/maps/LavaridgeTown/scripts.inc,
data/maps/LilycoveCity/scripts.inc,
data/maps/LittlerootTown_MaysHouse_1F/scripts.inc,
data/maps/LittlerootTown_MaysHouse_2F/scripts.inc,
data/maps/LittlerootTown_ProfessorBirchsLab/scripts.inc,
data/maps/OldaleTown/scripts.inc,
data/maps/Route103/scripts.inc,
data/maps/Route104/scripts.inc,
data/maps/Route110/scripts.inc,
data/maps/Route119/scripts.inc,
data/maps/RustboroCity/scripts.inc,
data/text/match_call.inc, just replace every instance of MAY and BRENDAN in the text sections with {RIVAL}. If you're using Notepad++, (which I highly recommend), you can just search and replace every instance of MAY and BRENDAN with {RIVAL} in each file. Just make sure to make the search case-sensitive. Otherwise, you're going to ruin a ton of scripts in each file.

To actually use this code, within any script of your choice, just type
Code:
special RivalNameChange
At that point in the game, a naming screen will pop up, and you can name your rival whatever you want.
And with that, unless I missed some other change I made that I forgot, you should have a fully functioning custom rival name!
 
Last edited:
Well, now there is a custom rival name process! For anyone else who wants to have a custom rival name, here's the code you'll need:

Spoiler:

Excellent, this worked very well! Thanks a lot, it was exactly what I needed. :-)
 
Back
Top