Advertiser Content

Editing Rival Names

Started by CrocodileHAZARD 3 Weeks Ago 9:50 PM
  • 807 views
  • 5 replies
Seen 3 Weeks Ago
Posted 3 Weeks Ago
3 posts
27 Days
For anyone reading this:

I'm VERY new to Rom Hacking, as in I decided to explore it literally a day or so before this post. I have about as much skill and knowledge on the subject as a zoo monkey. So keep that in mind.

Anyway, I've only just recently been in a position to give more thought on Rom Hacking. My first, and major, goal was to be able to complete the Pokedex without trading or going through version exclusive BS. This isn't too big a hurtle, since there are already plenty of other people who make Dexhacks and I'm not overly worried about finding one. But the other, much more insignificant, change I'd like in Emerald is changing the name of the Rival.

I've spent the last couple of days searching every avenue I can think of until I eventually arrived here. So far, there's very little results. And the results I do find often don't specifically target this one point and I can't determine if I'm on the right road because to me, a lot of the tutorials on script editing and Rom Hacking are thick as tar and always feel like I'm expected to know a lot more than I do.

I recently spoke with one of the better(ish) tutorial writers and he's told me that what I'm aiming for requires me finding the part of the code where the rivals' placeholder names are (BRENDEN and MAY) and just change it from there.

But to reiterate, NO coding/editing/hacking experience. I'm not really sure of anything that goes between wanting to change the rival's names to actually having them changed.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 2 Hours Ago
Posted 12 Hours Ago
1,933 posts
10.7 Years
For anyone reading this:

I'm VERY new to Rom Hacking, as in I decided to explore it literally a day or so before this post. I have about as much skill and knowledge on the subject as a zoo monkey. So keep that in mind.

Anyway, I've only just recently been in a position to give more thought on Rom Hacking. My first, and major, goal was to be able to complete the Pokedex without trading or going through version exclusive BS. This isn't too big a hurtle, since there are already plenty of other people who make Dexhacks and I'm not overly worried about finding one. But the other, much more insignificant, change I'd like in Emerald is changing the name of the Rival.

I've spent the last couple of days searching every avenue I can think of until I eventually arrived here. So far, there's very little results. And the results I do find often don't specifically target this one point and I can't determine if I'm on the right road because to me, a lot of the tutorials on script editing and Rom Hacking are thick as tar and always feel like I'm expected to know a lot more than I do.

I recently spoke with one of the better(ish) tutorial writers and he's told me that what I'm aiming for requires me finding the part of the code where the rivals' placeholder names are (BRENDEN and MAY) and just change it from there.

But to reiterate, NO coding/editing/hacking experience. I'm not really sure of anything that goes between wanting to change the rival's names to actually having them changed.
The Lines 17 and 18 of "src\strings.c" might be just what you're looking for.

Protip: You can use the following command to look up for terms within the decomps.
git grep "INSERT_SEARCH_TERM_HERE"
Ex: git grep "SPECIES_BULBASAUR"

EDIT: Also, just so we're clear, those lines in the strings.c file will only modify the nane that is called by an NPC via {STR_VAR_1}, which I think is the equivalent to the good ol' buffers from binary hacking.
The instances inside scrips and trainer battles where the NPC is still called May will have to be edited in their respective files.
i.e data\maps\LittlerootTown_MaysHouse_1F\scripts.inc, src\data\trainers.h and such.

Avara

Author of Tales

Female
Izantine
Seen 5 Hours Ago
Posted 1 Day Ago
1,035 posts
7.5 Years
Please don't worry about feeling overwhelmed at first, everyone does when they get started! Nobody begins their ROM hacking journey knowing it all =)

Are you using decompiled Emerald as your base? If not, this next wee tip might not be any use to you: if you type "git grep" prior to whatever you're searching for, e.g. "git grep BRENDAN" in the command line it'll search the repository for you and return a list of every instance of the search term and which file it's located in.

If you're not using decompiled Emerald (i.e. using tools such as XSE and AdvanceMap) disregard that bit. The differences between binary hacking and using decomps is briefly explained in this post.
Seen 3 Weeks Ago
Posted 3 Weeks Ago
3 posts
27 Days
Also, just so we're clear, those lines in the strings.c file will only modify the name that is called by an NPC via {STR_VAR_1}, which I think is the equivalent to the good ol' buffers from binary hacking.
The instances inside scrips and trainer battles where the NPC is still called May will have to be edited in their respective files.
i.e data\maps\LittlerootTown_MaysHouse_1F\scripts.inc, src\data\trainers.h and such.
Thanks, but this angle is actually the only thing I've already got covered. I think.

One of the first significant links to the edits I wanted to make led me to the "Hopeless Trainer Editor", and is actually the program that led me to this site. The program is an easy interface that allows people to edit Trainer battles. I've had no problems using it to change the Rival's names in a battle. BUT, it hasn't changed the Rival's name outside of those battles, and has been the next thing on my agenda. But I feel like I probably jumped in the deep end of the coding pool wearing weighted clothes for all the good present tutorials do for me.

Please don't worry about feeling overwhelmed at first, everyone does when they get started! Nobody begins their ROM hacking journey knowing it all =)

Are you using decompiled Emerald as your base? If not, this next wee tip might not be any use to you: if you type "git grep" prior to whatever you're searching for, e.g. "git grep BRENDAN" in the command line it'll search the repository for you and return a list of every instance of the search term and which file it's located in.

If you're not using decompiled Emerald (i.e. using tools such as XSE and AdvanceMap) disregard that bit. The differences between binary hacking and using decomps is briefly explained in this post.
I was lost starting at "decompiled". Wasn't (completely) joking when I said I wasn't much better than a zoo monkey at this xD

During my brief experimentation based on the tutorials I've come across, I've downloaded Advance Text (not sure it's running right, had to go through a few hoops to get it running in the first place), Free Space Finder, Pokemon Game Editor, Pokemon Script Viewer, Hopeless Trainer Editor, HxD, and XSE. Not sure what version I've got running on any of them, and I'm not even sure I've got them running right since what I'm getting hasn't been matching up with the screenshots on whatever tutorials have them.

Lunos

Random Uruguayan User

Male
Montevideo (Uruguay)
Seen 2 Hours Ago
Posted 12 Hours Ago
1,933 posts
10.7 Years
Thanks, but this angle is actually the only thing I've already got covered. I think.

One of the first significant links to the edits I wanted to make led me to the "Hopeless Trainer Editor", and is actually the program that led me to this site. The program is an easy interface that allows people to edit Trainer battles. I've had no problems using it to change the Rival's names in a battle. BUT, it hasn't changed the Rival's name outside of those battles, and has been the next thing on my agenda. But I feel like I probably jumped in the deep end of the coding pool wearing weighted clothes for all the good present tutorials do for me.



I was lost starting at "decompiled". Wasn't (completely) joking when I said I wasn't much better than a zoo monkey at this xD

During my brief experimentation based on the tutorials I've come across, I've downloaded Advance Text (not sure it's running right, had to go through a few hoops to get it running in the first place), Free Space Finder, Pokemon Game Editor, Pokemon Script Viewer, Hopeless Trainer Editor, HxD, and XSE. Not sure what version I've got running on any of them, and I'm not even sure I've got them running right since what I'm getting hasn't been matching up with the screenshots on whatever tutorials have them.
Binary Hacking and using the Disassembly and Decompilation Projects like Pokeruby or Pokeemerald are 2 different things. Tools and modifications explicitly made for Binary Hacking will not work in Pokeemerald (well, all in all, some things like ASM Routines and C Injections would probably work with a lot of tweaking.) as they modify the ROM directly.
With the decomps, you're constantly compiling a new ROM that contains whatever modification you made to the source code of the game. That means whatever changes you made to the ROM directly are going to be overwritten.

You seem to be a little bit lost right now, so I'd suggest you to check the post Avara linked earlier, and then decide what path you want to follow, binary Hacking or the Decomps.
If you decide to go with Binary Hacking, then this thread should probably be moved to the ROM Hacking Help Section.
Seen 3 Weeks Ago
Posted 3 Weeks Ago
3 posts
27 Days
I appreciate your patience so far, and I'm sorry for any dumb questions.

Wasn't able to check the post at first. Kept redirecting me to an error(?) page? I don't know, I just wasn't able to see the actual post until just now.

If I'm understanding this right (and I don't have 100% confidence while asking this), then using a Rom hack like dearman4's Pokemon Emerald Final and esperance's Hopeless Trainer Editor would be considered binary hacking? Those two are thus far the only things to have noticeably (and intentionally) affected my ROM of Pokemon Emerald from straight up vanilla, assuming that I haven't unintentionally messed something up with one or more of the other programs. If I went with Avara's recommendation using decomp, then the previous changes I made are undone?

I might be mistaken, but I'm getting the impression that both routes simultaneously aren't possible, or at least not supposed to be done? If that's the case, then I'd either have to forgo the quick and easy changes I've made and start from scratch, or continue trying to find an already existing program to make the kind of change I'm looking for?
Advertiser Content