diff options
author | Tianmaru <tianmaru@gmail.com> | 2019-07-28 18:16:28 +0200 |
---|---|---|
committer | Tianmaru <tianmaru@gmail.com> | 2019-07-28 18:16:28 +0200 |
commit | a512b891d03e1891118e1adc53e737e61320efbc (patch) | |
tree | db09e947646989f92990c5c5cc46a031edd7e08a | |
parent | 989b9dd71b314480f17ed9823e0c81c167100b01 (diff) |
Created Change Starter Pokémon (markdown)
-rw-r--r-- | Change-Starter-Pokémon.md | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/Change-Starter-Pokémon.md b/Change-Starter-Pokémon.md new file mode 100644 index 0000000..082de5d --- /dev/null +++ b/Change-Starter-Pokémon.md @@ -0,0 +1,42 @@ +A very popular modification of the Pokémon games is the change of the starter Pokémon due to personal preferences or to create a special challenge (Magikarp only, etc.). In this tutorial, we will learn how to change the starter Pokémon in the pokeemerald dissasembly. +### Change the Species +Open `src/starter_choose.c`. You will find the following lines: +```c +static const u16 sStarterMon[STARTER_MON_COUNT] = +{ + SPECIES_TREECKO, + SPECIES_TORCHIC, + SPECIES_MUDKIP, +}; +``` +Let us edit the species of the starter Pokémons, so you can beat Pokémon Emerald with the starters of the second generation. In most cases, the constant identifier of the species is obtained by putting `SPECIES_` in front of the name of the Pokémon. But if you are not sure, for example if the name contains special characters, you can look it up in `src/data/text/species_names.h`. +```c +static const u16 sStarterMon[STARTER_MON_COUNT] = +{ + SPECIES_CHIKORITA, + SPECIES_CYNDAQUIL, + SPECIES_TOTODILE, +}; +``` +That is basically it! +### Change the Level +Additionally, let's change the level of the starter Pokémon to 3 to increase the challenge a bit. Open `src/battle_setup.c` and look at: +```c +static void CB2_GiveStarter(void) +{ + u16 starterMon; + + *GetVarPointer(VAR_STARTER_MON) = gSpecialVar_Result; + starterMon = GetStarterPokemon(gSpecialVar_Result); + ScriptGiveMon(starterMon, 5, 0, 0, 0, 0); + ResetTasks(); + PlayBattleBGM(); + SetMainCallback2(CB2_StartFirstBattle); + BattleTransition_Start(B_TRANSITION_BLUR); +} +``` +Interesting for us is the line `ScriptGiveMon(starterMon, 5, 0, 0, 0, 0);`. +```c +u8 ScriptGiveMon(u16 species, u8 level, u16 item, u32 unused1, u32 unused2, u8 unused3) +``` +So let's change the 5 to a 3. Save all files, make the ROM and have fun with your level 3 Cyndaquil! |