summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIdain <luiscarlosholguinperez@outlook.com>2021-05-21 03:48:24 -0400
committerIdain <luiscarlosholguinperez@outlook.com>2021-05-21 03:48:24 -0400
commit7b1db8e792c20f66bdf5783e96e7198e22308309 (patch)
treec2f7209e281f94bf9b8b188a519949918c8fe993
parentd95d85bb13cd4f9b0887e08a094294f68b6ae330 (diff)
Slight update to the text and one of the examples
-rw-r--r--Improve-the-trainer-rematch-system.md13
1 files changed, 7 insertions, 6 deletions
diff --git a/Improve-the-trainer-rematch-system.md b/Improve-the-trainer-rematch-system.md
index 8a9c1b3..2c29ebf 100644
--- a/Improve-the-trainer-rematch-system.md
+++ b/Improve-the-trainer-rematch-system.md
@@ -1,4 +1,4 @@
-This tutorial aims to improve the rematch system by removing the fight count check that the trainer rematch system performs before selecting a 'rematchable' trainer's party and by making trainers automatically offer their phone number after first battling them. First, I think it useful to provide a brief primer on the rematch system, what exactly we will change, and why the changes may be desirable.
+This tutorial aims to improve the rematch system by removing the fight count check that the trainer rematch system performs before selecting a rematchable trainer's party and by making trainers automatically offer their phone number after first battling them. First, I think it useful to provide a brief primer on the rematch system, what exactly we will change, and why the changes may be desirable.
Before a rematch, the Pokemon Crystal rematch system performs two checks: it initially looks in memory for a count that is based on which of the rematchable trainer's parties you have last defeated, then it checks whether you have reached a certain point in the game. Upon first defeating a rematchable trainer, a count of 1 will be stored in memory, followed by a count of 2 once you defeat the first rematch party, etc. However, the first rematch party will not load unless you have also reached a certain point in the game, determined by either a location (flypoint check) or an event being cleared (event flag check).
@@ -6,7 +6,7 @@ In this tutorial, we will use Schoolboy Alan on Route 36 as an example. In order
We will resolve this by removing the fight count check entirely, thus checking only for the player's game progress in determining the rematch party that will be loaded. This will allow for rematch trainers to be much closer to the player's level even if they have not been defeated in a rematch before.
-Additionally, it is mildly annoying to have to talk to trainers after battling them for the first time in order to obtain their numbers. If you do not know which trainers offer their phone numbers, then you either have to talk to every trainer after battle or look up a guide, so it is quite convenient to have the rematch trainers load the 'phone number offer' text immediately after battle. Despite the impression perhaps left by my lengthy preamble, these changes are actually very simple to make.
+Additionally, it is mildly annoying to have to talk to trainers after battling them for the first time in order to obtain their numbers. If you do not know which trainers offer their phone numbers, then you either have to talk to every trainer after battle or look up a guide, so it is quite convenient to have the rematch trainers load the "phone number offer" text immediately after battle. Despite the impression perhaps left by my lengthy preamble, these changes are actually very simple to make.
## Contents
1. [Remove the fight count check](#1-remove-the-fight-count-check)
@@ -43,14 +43,15 @@ The code to be changed is in the map file where the trainer is located - Route 3
loadtrainer SCHOOLBOY, ALAN1
startbattle
reloadmapafterbattle
- loadmem wAlanFightCount, 1
+- loadmem wAlanFightCount, 1
clearflag ENGINE_ALAN_READY_FOR_REMATCH
end
```
The script no longer checks for the count using `readmem`, thus the corresponding functions are no longer necessary; the code will simply perform the event/flag checks in order. You will need to edit the equivalent code in each map file for every trainer that you want to have ignore the fight count check.
-This is technically all that is required, although you may want to clean up the code by removing the `loadmem wAlanFightCount` line in the edited code as well as from each `.LoadFight` just below it, since they are now useless.
+Also, we removed the `loadmem wAlanFightCount` line since we don't need to increase the counter anymore. Make sure to also delete the counter increase below each `.LoadFight` in the other map files.
+
## 2. Make trainers automatically offer their phone number after battle
We will accomplish this by removing every instance of `endifjustbattled` (simply ends the script after battle, which we don't want) in every rematch script. This forces rematch trainers to automatically offer their phone number after battle, rather than requiring the player to speak to trainers after battle to obtain it. Simply do the following:
@@ -67,11 +68,11 @@ TrainerSchoolboyAlan1:
Again, you will need remove this code from every rematch trainer script. And that's it!
-You can then remove the variables in [wram.asm](../blob/master/wram.asm), as it is the only place where those are used. Removing those variables can free up to 28 bytes. Be sure to replace them with something else, or padding with a `ds`, or you will end up shifting all variables stored after, therefore rendering your save file corrupted.
+Optionally, you can remove the counter variables in [wram.asm](../blob/master/wram.asm), as these map files were the only places where they were being used. Removing those variables can free up to 28 bytes. Be sure to replace them with something else, or padding with a `ds`, or you will end up shifting all variables stored after, therefore rendering your save file corrupted.
## 3. Tips
The events that are checked in order to determine which party to load can be easily modified by swapping a `checkflag` ______ or `checkevent` ______ with any other listed in either [flypoints.asm](../blob/master/data/maps/flypoints.asm) or [event_flags.asm](../blob/master/constants/event_flags.asm). This is especially useful if you wish to add rematch parties or simply upgrade rematch parties more frequently, progression-wise.
-Also, when modifying rematch parties, keep in mind that not all of them correspond to the map file code as neatly as they do for Schoolboy Alan, where ALAN1 is loaded for the initial fight, ALAN2 for the first rematch, ALAN3 for the second rematch, etc. For example, some will load TRAINERNAME3 for the initial fight, so you must make sure that you enter the initial party data (in trainers/parties.asm) in the field for the given trainer's third party; generally, TRAINERNAME3 will correspond to the third field for a given trainer name starting from the top of the parties file. The exact trainer that is loaded is indicated below each `.Loadfight` (directly below the code we edited). For example: `loadtrainer SCHOOLBOY, ALAN2`.
+Also, when modifying rematch parties, keep in mind that not all of them correspond to the map file code as neatly as they do for Schoolboy Alan, where `ALAN1` is loaded for the initial fight, `ALAN2` for the first rematch, `ALAN3` for the second rematch, etc. For example, some will load "`TRAINERNAME3`" for the initial fight, so you must make sure that you enter the initial party data (in trainers/parties.asm) in the field for the given trainer's third party; generally, `TRAINERNAME3` will correspond to the third field for a given trainer name starting from the top of the parties file. The exact trainer that is loaded is indicated below each `.Loadfight` (directly below the code we edited). For example: `loadtrainer SCHOOLBOY, ALAN2`.
Finally, for a list of rematchable trainers to help you find and change all of their codes, see the third header (Phone) on this page: [https://www.serebii.net/crystal/pokegear.shtml](https://www.serebii.net/crystal/pokegear.shtml) \ No newline at end of file