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)
-   -   Other Badge data (https://www.pokecommunity.com/showthread.php?t=359527)

PokemonValor December 8th, 2015 5:50 AM

Badge data
 
Hey, can anyone tell me how to find where/how to edit the badge data in fire red?
I have a feeling this would be ASM stuff which I know nothing about, but i would like to know how to change the names of the badges, which HMs they allow, obedience levels, and their images, and maybe their order on the trainer card. Thanks!

Uncommon December 8th, 2015 11:33 AM

Quote:

Originally Posted by PokemonValor (Post 9026167)
Hey, can anyone tell me how to find where/how to edit the badge data in fire red?
I have a feeling this would be ASM stuff which I know nothing about, but i would like to know how to change the names of the badges, which HMs they allow, obedience levels, and their images, and maybe their order on the trainer card. Thanks!

I’ve been interested in finding this out for a while as well. I have compiled some research on HMs being allowed by badges in this post. Also, if you're interested in using a slightly different system, my type-check patch (in my signature) allows you to set the badge requirement for each HM to any flag you want.

I believe the badge names are simply text - badges don’t have a static name in the game, just what NPC’s call them (correct me if I'm wrong here).

This post has a routine to make them appear on the Trainer Card in a different order.

Badge images themselves are at 0x3CD5E8, 16 color palette at 0x3CD2C0.

If anyone has any more information, please share! I’m particularly interested in ways to load other size images or separate palettes.

PokemonValor December 8th, 2015 3:42 PM

Well that's a lot of good information, thanks!
Yeah, I wasn't sure about their names either, I thought they were static somewhere but I must be wrong. I'll check out all your posts and everything

Blah December 9th, 2015 7:02 PM

Quote:

Originally Posted by Uncommon (Post 9026453)
I’ve been interested in finding this out for a while as well.

If anyone has any more information, please share! I’m particularly interested in ways to load other size images or separate palettes.

I did this, I don't think I posted it in my usual places because I didn't think anyone really cared. It'd require a very small of the calculating code or re-ordering a table. I recommend reworking the code, since if you were going to have more badge-triggered HMs, there is a limiter. Anyways, what I'm talking about is here:


Code:

ROM:0812461C
        CMP    R4, #6
        BHI    loc_8124658        @ continue execution
        MOVS    R1, #0x820      @btw game code is not 1:1 here. It'd use lsl and add
        ADDS    R0, R4, R1
        BL      flag_check


So at this point, R4 contains an index in the table at 0x845A788. Here is the table according to knizz's IDB:
Code:

ROM:0845A788                borg <hm_prepare_flash+1, 0xD>
ROM:0845A788                borg <hm_prepare_cut+1, 7>
ROM:0845A788                borg <hm_prepare_fly+1, 0xD>
ROM:0845A788                borg <hm_prepare_strength+1, 0xD>
ROM:0845A788                borg <hm_prepare_surf+1, 8>
ROM:0845A788                borg <hm_prepare_rocksmash+1, 0xD>
ROM:0845A788                borg <hm_prepare_waterfall+1, 0xD>
ROM:0845A788                borg <hm_prepare_teleport+1, 0xD>
ROM:0845A788                borg <hm_prepare_dig+1, 0xD>
ROM:0845A788                borg <hm_prepare_dive_probably+1, 0x10>
ROM:0845A788                borg <hm_prepare_dive_probably+1, 0x10>
ROM:0845A788                borg <hm_prepare_sweet_scent+1, 0xD>


Note that the two entries:
ROM:0845A788 borg <hm_prepare_dive_probably+1, 0x10>
ROM:0845A788 borg <hm_prepare_dive_probably+1, 0x10>

are inaccurate. That's actually milk drink and softboiled. Fire Red doesn't have dive readily implemented, afaik. So going back to that small piece of code, it's clearly checking if the table entry it's looking at is inbetween flash's entry (entry 0) and waterfall's entry (entry 6) inclusive. If it is, then it'd check flag (0x820 + entry) to see if you had the "badge" to use the HM via the menu.

Either rework this part, or edit the table & change "CMP R4, #6" to another number. More documentation about the BRM menu and such are available in an ASM resource thread post I made about field moves. Hope this helps.

Uncommon December 9th, 2015 7:15 PM

Quote:

Originally Posted by FBI (Post 9028130)
I did this... Hope this helps.

Awesome!! Thanks for sharing, FBI, this is extremely useful. I’m linking your post on field moves in case anyone else wants to check it out.


All times are GMT -8. The time now is 2:24 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.