![]() |
Removing badge stat boosts in FireRed
Hey everyone!
I'm making a harder version (partially inspired from Crystal_'s Pokémon Pyrite) of FireRed and one of its features is the removal of stat boosts granted by badges. All I've found is a post referencing flag checks which didn't really help me, but is there a script or another way to remove these boosts? |
Quote:
For starters, Mr. Dollsteak had rewritten the turn order loader routine which includes the relevant badge check. Removing the badge check would simply require removing the BadgeCheck portion, like so: Code:
The attack and defense boosts would likely be found in the base damage calculation function, or battle command 0x5 (starting at 0x0801E59C) |
Thanks for your answer. I'm a beginner in ASM and I only know hex editing at small scale and inserting existing routines (also, battle commands?). I'm currently reading a few ASM tutorials. Still, even if I learn ASM, is there a way to find out when the function is called in-game with an emulator? (I'm using mGBA)
|
Quote:
|
After learning ASM and studying the battle function and MDS's speed routine, I've made significant progress.
I've found the badge-relevant subroutines starting at 0x3EE10 for attack/defense stats (0x3EE10 for Attack, 0x3EE44 for Defense, 0x3EE7A for Special Attack, and 0x3EEB2 for Special Defense) and two subroutines for Speed at 0x14E08 and 0x14EF0. They all have similar bodies, notably a "beq" instruction happening four lines after the loading into r0 of a badge flag (Boulder Badge: 0x820, Soul Badge: 0x824, Volcano Badge: 0x826, Thunder Badge: 0x822). That "beq" never branches if you have the badge, and always branches without it. I need to study further the register values, but it could be done with simple hex editing. As all six branches compare r0 with 0, just setting r0 to 0 (= 00 20 in hex) before the comparisons (instead of a left shift) should do the trick. The locations of the left shifts which must be replaced are 0x3EE24, 0x3EE56, 0x3EE8C, 0x3EEC4, 0x14E1A and 0x14F02. |
Well done :)
|
Quote:
|
| All times are GMT -8. The time now is 9:13 AM. |
![]()
© 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.