mirror of https://github.com/pret/pokeemerald.git
Minor tweaks to phrasing and formatting
parent
c5ec9775a0
commit
dc66268eec
|
@ -5,7 +5,7 @@ In this guide, we will demonstrate how to modify the Move Relearner in Pokémon
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
1. [Rename unused flag](#1-rename-unused-flag)
|
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)
|
3. [Declare GetEggMoves](#3-declare-geteggmoves)
|
||||||
4. [Edit move learner functionality](#4-edit-move-learner-functionality)
|
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`:
|
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
|
## 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`:
|
Edit `include/daycare.h`:
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ Edit `include/daycare.h`:
|
||||||
|
|
||||||
## 4. Edit move learner functionality
|
## 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`:
|
Edit `src/move_relearner.c`:
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ Edit `src/move_relearner.c`:
|
||||||
/*
|
/*
|
||||||
* Move relearner state machine
|
* 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
|
```diff
|
||||||
static void CreateLearnableMovesList(void)
|
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++)
|
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.
|
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.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue