Gen 3 and Beyond: Editing C to Hack Pokemon
I'm not gonna lie, I get super nervous writing these articles out of fear of divine punishment from Nintendo-sama, but besides focusing on my new server repair role and learning how to survive 5 o'clock traffic (as well as reconnecting with some old friends), I haven't been doing much since I've moved except playing with more Pokemon source code on the pret Github (https://github.com/pret) and have slowly been working my way through the code of the first 4 generations of games whenever I'm bored. As I mentioned in my previous article, the first 2 generations of games are written in Assembly due to the Gameboy's lack of memory, but with the introduction of the Gameboy Advance, this was no longer an issue and the codebases for generations 3 and 4 are written in C/C++ (I believe that this is the case going forward with the series, although I've only analyzed the source code from games from gens 1-4 at this point.) I had a blast with Gen 1 and 2, especially moving my broken teams to the Stadium games via the Expansion Pak option with Mupen64, but Gen 3 introduces one of the most influencial game mechanics in the series, which is, of course, Abilities. It's a mechanic that makes or breaks a lot of Pokemon, and the ability to edit these values at will makes for some really fun Mons. Prime example is Slaking, statistically it's an absolute behemoth but it's ability, Truant, is just garbage and unfortunately makes Slaking itself pretty trash. BUT Azumarill, who's stats define mediocrity, has an ability called Huge Power which doubles it's attack stat, which has given it some viably in the past. I think you know what's coming next, Huge Power Slakings that can use Volt Tackle and Superpower, along with Earthquake and a STAB Double-Edge and holding Leftovers with a high catch rate running wild on the first route in the game, along with Speed Boost Salamences that know Outrage and Drill Peck, Ghost/Dark Gengars with Wonder Guard, Levitating Metagrosses, and Huge Power Tyranitars with 100 base speed. You know, typical Route 1 stuff. Unfortunately there's a safeguard that makes hacked Deoxys not listen to you, and unlike previous generations I'm unable to successfully evolve it from a Pidgey or something by changing the evolution values so the only viable solution at that point is to make sure that your character gets access to an Aurora Ticket, but you can still edit Deoxys' level-up moveset to be whatever you want for the encounter, just make sure it can only learn the 4 moves that you want through it's entire level-up process. There's still a lot that I haven't figured out, like changing shiny encounter rates, but this is also the first C codebase that I've actively dug through and messed with so it's a process in itself. As for creating the ROMs themselves, every repo has an INSTALL.md folder that will walk you through the steps, although for GBA games