Pokémon Red and Blue: Difference between revisions

Jump to navigation Jump to search
Content added Content deleted
m (Text replacement - "(\bld(?:|i|l|d|h) (?:.+, ?)?)\((.+)\)" to "$1[$2]")
(→‎Glitch Pokémon: Added information about the source of out-of-bounds Pokédex numbers.)
Line 21: Line 21:
In Generation I games, there are 151 valid Pokémon species, while the species ID of a Pokémon is a byte that can take any of its 256 values. Therefore, there are 105 possible species of [[glitch Pokémon]]. Furthermore, the values of the internal IDs of valid Pokémon species are not contiguous, and instead ranges from 1 (Rhydon) to 190 (Victreebel), skipping over 39 invalid values in this range. In various data lists indexed by internal IDs, those 39 invalid IDs share the same placeholder data, including the name "[[MissingNo.]]" (meaning "missing number"; this was translated from the Japanese string "けつばん" which means the same). Three of those IDs actually have a valid front sprite, that of a Kabutops fossil (ID 182), an Aerodactyl fossil (ID 183) or Pokémon Tower ghost (ID 184), and they behave a little differently from other IDs. Otherwise, MissingNo. with different IDs behave largely the same. Therefore, all IDs of MissingNo. are commonly regarded as the same species.
In Generation I games, there are 151 valid Pokémon species, while the species ID of a Pokémon is a byte that can take any of its 256 values. Therefore, there are 105 possible species of [[glitch Pokémon]]. Furthermore, the values of the internal IDs of valid Pokémon species are not contiguous, and instead ranges from 1 (Rhydon) to 190 (Victreebel), skipping over 39 invalid values in this range. In various data lists indexed by internal IDs, those 39 invalid IDs share the same placeholder data, including the name "[[MissingNo.]]" (meaning "missing number"; this was translated from the Japanese string "けつばん" which means the same). Three of those IDs actually have a valid front sprite, that of a Kabutops fossil (ID 182), an Aerodactyl fossil (ID 183) or Pokémon Tower ghost (ID 184), and they behave a little differently from other IDs. Otherwise, MissingNo. with different IDs behave largely the same. Therefore, all IDs of MissingNo. are commonly regarded as the same species.


The other 66 invalid IDs are out of the range for any data lists indexed by internal IDs, so they take data from unrelated memory regions, and are generally more different from each other. However, for each of those glitch Pokémon species, one value that is particularly important is the ''Pokédex number''. Valid Pokémon have Pokédex numbers ranging from 1 to 151, and MissingNo. has Pokédex number 0, but glitch Pokémon other than MissingNo. can have Pokédex numbers in either or neither of those ranges. Pokémon species sharing the same Pokédex number will also share certain traits, and are known as a [[glitch Pokémon family]].
The other 66 invalid IDs are out of the range for any data lists indexed by internal IDs, so they take data from unrelated memory regions, and are generally more different from each other. However, for each of those glitch Pokémon species, one value that is particularly important is the ''Pokédex number''. Valid Pokémon have Pokédex numbers ranging from 1 to 151, and MissingNo. has Pokédex number 0, but glitch Pokémon other than MissingNo. can have Pokédex numbers in either or neither of those ranges. Pokémon species sharing the same Pokédex number will also share certain traits, and are known as a [[glitch Pokémon family]]. The Pokédex numbers for valid Pokémon and MissingNo. are stored in a contiguous table, and in R/B, that table is followed by some functions related to trading<ref>[https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/main.asm#L212-L213 The relevant section of ROM layout], and [https://github.com/pret/pokered/blob/1dcaede8b5e41dbec9bf3f2b18c77d1b7d2de708/engine/movie/trade.asm the piece of assembly code following the <code>PokedexOrder</code> table]</ref>, from which glitch Pokémon other than MissingNo. get their Pokédex numbers.


=== Obtaining ===
=== Obtaining ===