From a512b891d03e1891118e1adc53e737e61320efbc Mon Sep 17 00:00:00 2001 From: Tianmaru Date: Sun, 28 Jul 2019 18:16:28 +0200 Subject: =?UTF-8?q?Created=20Change=20Starter=20Pok=C3=A9mon=20(markdown)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Change-Starter-Pok\303\251mon.md" | 42 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 "Change-Starter-Pok\303\251mon.md" diff --git "a/Change-Starter-Pok\303\251mon.md" "b/Change-Starter-Pok\303\251mon.md" new file mode 100644 index 0000000..082de5d --- /dev/null +++ "b/Change-Starter-Pok\303\251mon.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! -- cgit v1.2.3