The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Script Edit BOY/GIRL multichoice in Oak's Intro. (https://www.pokecommunity.com/showthread.php?t=410086)

hjk321 June 24th, 2018 11:23 PM

Edit BOY/GIRL multichoice in Oak's Intro.
 
I'm not trying to change functionality at all, just the text itself of boy/girl. Is there any way to do this? The Complete Multi-Choice Box Editor doesn't include this one, and I can understand why since it's not part of the "actual" game. I'm chill with using a hex editor but I don't know the offsets for this box. Any suggestions?

shanem7 June 25th, 2018 1:02 PM

Using a .tbl table/file specific for Fire Red (Google it, there should be one over at Datacrystal), search for the text string in question using a hex editor, then repoint the pointer (little endian+$08) if your new text is longer than the old one. Simple as that.

DrFuji June 25th, 2018 2:19 PM

Boy is at 0x415D93 and girl is at 0x415D97. If you need to repoint them, their pointers are at 0x12FF98 and 0x12FF9C respectively.

hjk321 June 25th, 2018 6:29 PM

Quote:

Originally Posted by shanem7 (Post 9893915)
Using a .tbl table/file specific for Fire Red (Google it, there should be one over at Datacrystal), search for the text string in question using a hex editor, then repoint the pointer (little endian+$08) if your new text is longer than the old one. Simple as that.


Neither AdvanceText nor HxD can find it.

shanem7 June 25th, 2018 8:09 PM

Quote:

Originally Posted by hjk321 (Post 9894035)
Neither AdvanceText nor HxD can find it.

I use Hex Editor Neo; it has more functions than freeware. Any decent hex editor should have a find function (or control+F). If you follow my method, you wouldn't need AdvanceText. What do you mean by "it"? As in, did you use the table file and can't find the string?

The .tbl file defines the tiles used for text within the game's engine.

It seems that DrFuji already gave you the answer, though.

hjk321 June 25th, 2018 8:27 PM

Quote:

Originally Posted by DrFuji (Post 9893946)
Boy is at 0x415D93 and girl is at 0x415D97. If you need to repoint them, their pointers are at 0x12FF98 and 0x12FF9C respectively.

In what encoding? I had assumed it was ASCII, but 0x415D93 is something like ¼ÉÓ and there is no FF to end a string.

DrFuji June 25th, 2018 9:44 PM

Quote:

Originally Posted by hjk321 (Post 9894060)
In what encoding? I had assumed it was ASCII, but 0x415D93 is something like ¼ÉÓ and there is no FF to end a string.

Third-gen ROMs don't use ASCII, they have their own custom table to print text. You can find a list of characters and their hexadecimal codes in diegoisawesome's XSE tutorial.

Boy and girl should should have FF terminators after them. Here's a screenshot of a FR ROM with both boy and girl highlighted, FFs included.

https://s22.postimg.cc/vu7np0dfl/Boy_Girl.png

hjk321 June 25th, 2018 10:19 PM

Quote:

Originally Posted by DrFuji (Post 9893946)
If you need to repoint them, their pointers are at 0x12FF98 and 0x12FF9C respectively.

Thanks for your help! I was able to pull it off.

Now all of this is just out of curiosity, I don't need an answer if you don't feel like it. Is there a reason why the pointers appear to be written backwards? I'm assuming 08 is the separator byte, but what happens if your offset contains a 08. And what do I do if my offset to point to has more than 3-bytes (like a double-extended rom or something)?

STikER June 26th, 2018 6:41 AM

Quote:

Originally Posted by hjk321 (Post 9894133)
Now all of this is just out of curiosity, I don't need an answer if you don't feel like it. Is there a reason why the pointers appear to be written backwards? I'm assuming 08 is the separator byte, but what happens if your offset contains a 08. And what do I do if my offset to point to has more than 3-bytes (like a double-extended rom or something)?

No, 08 is not a separator byte. Though I'm not a good explainer, so I will just quote another person from here:
Quote:

Originally Posted by Cy-Chan (Post 4312615)
Now, what about that 08? Well, the memory bank for the GBA is made up of several sections. For example, 02 is RAM, 03 is DMA; check the memory viewer in VBA for more detail. So, when referring to ROM information (the bit we hack), the full address will start with 08. In an extended ROM, any addresses past 08FFFFFF simply loop back to 0, but use 09 as the indentifier instead.



All times are GMT -8. The time now is 9:14 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.