summaryrefslogtreecommitdiff
path: root/Add-a-new-Pokémon.md
diff options
context:
space:
mode:
Diffstat (limited to 'Add-a-new-Pokémon.md')
-rw-r--r--Add-a-new-Pokémon.md12
1 files changed, 11 insertions, 1 deletions
diff --git a/Add-a-new-Pokémon.md b/Add-a-new-Pokémon.md
index 45d63c6..df43af1 100644
--- a/Add-a-new-Pokémon.md
+++ b/Add-a-new-Pokémon.md
@@ -654,4 +654,14 @@ That's it—we're done! Munchlax works just like every other Pokémon.
## 12. Adding up to 253 Pokémon
-TODO
+We just added Pokémon #252; adding #253 is basically the same. However, instead of just replacing `MON_FE` the way we replaced `MON_FC`, I would recommend swapping `MON_FE` and `EGG`. That way `MON_FE` is $FD and `EGG` is $FE.
+
+This has multiple benefits:
+
+- Pokémon IDs will be contiguous, from #1 to #253. No #254 with a missing #253 where Egg exists.
+- Many data tables don't have an entry for `EGG` since it would be superfluous. But if there were a Pokémon #254, they would need filler entries for #253 in order to reach entry #254.
+- `EGG` does not count as a Pokémon, so if it came before a valid Pokémon ID, then `NUM_POKEMON` would have to be adjusted to compensate, and certain other checks in the code would no longer be able to assume that any ID below some number *N* is a valid one.
+
+It's easy to do; just make sure that the various tables have their entries in the right order: Bulbasaur, Ivysaur, Venusaur, …, Celebi, #252, #253, Egg.
+
+Unfortunately, you can't have more than 253 Pokémon. IDs are one byte each, so they have 256 possible values. Of those values, $00 indicates a lack of a Pokémon; $FF (−1) is an end-of-list marker; and $FD is `EGG` (though you can change this to $FE, as discussed above). If you value having a 254th Pokémon more than allowing breeding, you could replace `EGG`, but you would also have to carefully remove a lot of code that treats `EGG` specially.