From dc66268eec1583893494ed32a99ecc8dac8d6527 Mon Sep 17 00:00:00 2001 From: Scyrous <74797764+Scyrous@users.noreply.github.com> Date: Thu, 4 Jul 2024 21:05:40 +0200 Subject: [PATCH] Minor tweaks to phrasing and formatting --- ...-Move-Relearner-Teach-Egg-Moves-With-A-Flag.md | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Make-Move-Relearner-Teach-Egg-Moves-With-A-Flag.md b/Make-Move-Relearner-Teach-Egg-Moves-With-A-Flag.md index 720ea0d..2f4017f 100644 --- a/Make-Move-Relearner-Teach-Egg-Moves-With-A-Flag.md +++ b/Make-Move-Relearner-Teach-Egg-Moves-With-A-Flag.md @@ -5,7 +5,7 @@ In this guide, we will demonstrate how to modify the Move Relearner in Pokémon ## Contents 1. [Rename unused flag](#1-rename-unused-flag) -2. [Change static functions and GetEggMoves](#2-change-static-functions-and-geteggmoves) +2. [Change static function and GetEggMoves](#2-change-static-function-and-geteggmoves) 3. [Declare GetEggMoves](#3-declare-geteggmoves) 4. [Edit move learner functionality](#4-edit-move-learner-functionality) @@ -30,9 +30,9 @@ Naturally, you can use any flag you want here. Just make sure it's unused and yo *** -## 2. Change static functions and GetEggMoves +## 2. Change static function and GetEggMoves -We want to use GetEggMoves in an upcoming step, but the function is a static one. This means it's only accessible within the file it's defined in (src/daycare.c). We'll remove the static part and also adjust `GetEggMoves`. +We want to use `GetEggMoves` in an upcoming step, but the function is a static one. This means it's only accessible within the file it's defined in (`src/daycare.c`). We'll remove the static part so that it can be used anywhere, and also adjust a line of code. Edit `src/daycare.c`: @@ -59,7 +59,7 @@ We have now made it so that `species` looks at the evolutionary family as a whol ## 3. Declare GetEggMoves -Since we've just removed the `static` part from `GetEggMoves` in the previous step, we now need to declare it in the appropriate header file. +Since we've just removed the `static` part from `GetEggMoves` in the previous step, we now need to declare this function in the appropriate header file. Edit `include/daycare.h`: @@ -75,7 +75,7 @@ Edit `include/daycare.h`: ## 4. Edit move learner functionality -To enable the use of `GetEggMoves` within `src/move_relearner.c`, we have to include it somewhere at the top of the file. +To enable the use of `GetEggMoves` within `src/move_relearner.c`, we have to include the relevant header file somewhere at the top of `src/move_relearner.c`. Edit `src/move_relearner.c`: @@ -87,7 +87,7 @@ Edit `src/move_relearner.c`: /* * Move relearner state machine ``` -We will also create an if/else statement that uses our unused flag and a modified copy of the line containing `GetMoveRelearnerMoves`. +We will also create an if/else statement that uses our renamed flag. If the flag is **set**, `GetEggMoves` is used to obtain the list of egg moves. If the flag is **cleared**, we stick to the original line that uses `GetMoveRelearnerMoves`. ```diff static void CreateLearnableMovesList(void) @@ -103,8 +103,7 @@ We will also create an if/else statement that uses our unused flag and a modifie for (i = 0; i < sMoveRelearnerStruct->numMenuChoices; i++) ``` - -If `FLAG_EGG_MOVES_TUTOR` is `true`, the move relearner will only teach egg moves. If `FLAG_EGG_MOVES_TUTOR` is `false`, he will use the regular list of level-up moves. +*** To enable this functionality in-game, simply use `setflag FLAG_EGG_MOVES_TUTOR` before the relevant `special` commands are used. Naturally, make sure to use `clearflag FLAG_EGG_MOVES_TUTOR` before the end of any move relearner scripts.