Pokémon species data structure (Generation II): Difference between revisions

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
This is really just shoehorned onto this page... Short of giving it its own page (not likely for a brief table), it may work on the character encoding page, like "related subjects"
(Researched locations of structures in Japanese games; reformatted.)
(This is really just shoehorned onto this page... Short of giving it its own page (not likely for a brief table), it may work on the character encoding page, like "related subjects")
Line 1: Line 1:
==Specs==
==Specs==
A '''base stats structure''' is a 32-byte piece of data.  
A '''base stats structure''' is a 32-byte piece of data.  


Line 58: Line 57:
==Notes==
==Notes==
===Types===
===Types===
For a single-type Pokémon, both types are set to the same value.
For a single-type Pokémon, both types are set to the same value.


Line 83: Line 81:


===Wild held items===
===Wild held items===
Sources disagree about the exact chance for each slot. [http://upokecenter.com/games/gs/attachments.php UPC] says 25% and 8%, [http://serebii.net/gs/attach.shtml Serebii] says 25% and 1.5%.
Sources disagree about the exact chance for each slot. [http://upokecenter.com/games/gs/attachments.php UPC] says 25% and 8%, [http://serebii.net/gs/attach.shtml Serebii] says 25% and 1.5%.


Line 89: Line 86:


===Gender ratio===
===Gender ratio===
The gender ratio is expressed as a 1-byte threshold for the Pokémon to be male. The possible values are:  
The gender ratio is expressed as a 1-byte threshold for the Pokémon to be male. The possible values are:  


Line 139: Line 135:


===Frontsprite dimensions===
===Frontsprite dimensions===
One [[wp:nybble|nybble]] each for width and height in 8×8 pixel tiles.  They always match and are always 5, 6, or 7 tiles.
One [[wp:nybble|nybble]] each for width and height in 8×8 pixel tiles.  They always match and are always 5, 6, or 7 tiles.


===Blank===
===Blank===
In the GB games, this is where the Pokémon's Lv.1 moves were stored. In GSC, Lv.1 moves were moved in with the rest of the moves.
In the GB games, this is where the Pokémon's Lv.1 moves were stored. In GSC, Lv.1 moves were moved in with the rest of the moves.


===Growth rate===
===Growth rate===
* 0. Medium Fast
* 0. Medium Fast
* 3. Medium Slow
* 3. Medium Slow
Line 154: Line 147:


===Egg Groups===
===Egg Groups===
The low nybble is one group, and the high nybble is another. For a Pokémon in only one group, both are set to the same value.
The low nybble is one group, and the high nybble is another. For a Pokémon in only one group, both are set to the same value.


Line 195: Line 187:


===Crystal===
===Crystal===
<pre style="overflow: auto;">
<pre style="overflow: auto">
01 2D 31 31 2D 41 41 16 03 2D 40 00 00 1F 64 14 05 55 00 00 00 00 03 17 26 1E 3D C4 86 18 45 00  // BULBASAUR
01 2D 31 31 2D 41 41 16 03 2D 40 00 00 1F 64 14 05 55 00 00 00 00 03 17 26 1E 3D C4 86 18 45 00  // BULBASAUR
02 3C 3E 3F 3C 50 50 16 03 2D 8D 00 00 1F 64 14 05 66 00 00 00 00 03 17 26 1E 3D C4 86 18 45 00  // IVYSAUR
02 3C 3E 3F 3C 50 50 16 03 2D 8D 00 00 1F 64 14 05 66 00 00 00 00 03 17 26 1E 3D C4 86 18 45 00  // IVYSAUR
Line 210: Line 202:


==Storage==
==Storage==
The following are ROM offsets for the first entry (Bulbasaur) in each GBC game:
The following are ROM offsets for the first entry (Bulbasaur) in each GBC game:


Line 227: Line 218:
| <code>0x051424</code>
| <code>0x051424</code>
| <code>0x0514BA</code>
| <code>0x0514BA</code>
|}
==Names==
The names of all the Pokémon are stored elsewhere, in a simple array of 256 names of 10 bytes each in international versions, and 5 bytes each in Japanese versions. These names are used for a variety of things, such as naming wild Pokémon and diplaying the species name in the Pokédex and on summary screens. The names are encoded with the [[Character encoding in Generation II|Generation II character encoding]], with any bytes after the name all being the string terminator <code>0x50</code>. The first name is Bulbasaur (index number 1), and the last (256th) name is that of the glitch Pokémon [[Five question marks#Hex 00|????? at index 0]].
The following are ROM offsets for the first name (Bulbasaur) in each game:
{| class="roundy" style="text-align: center; background: #C0C0FF; border: 3px solid blue; margin-bottom: 10px"
! Game || English || Japanese
|- style="background:#F8F8FF"
| '''{{color2|{{gold color}}|Pokémon Gold and Silver Versions|Gold}}'''
| <code>0x1B0B74</code>
| <code>0x053A09</code>
|- style="background:#F8F8FF"
| '''{{color2|{{silver color}}|Pokémon Gold and Silver Versions|Silver}}'''
| <code>0x1B0B74</code>
| <code>0x053A09</code>
|- style="background:#F8F8FF"
| '''{{color2|{{crystal color}}|Pokémon Crystal Version|Crystal}}'''
| <code>0x053384</code>
| <code>0x05341A</code>
|}
|}


{{data structure}}<br>
{{data structure}}<br>
{{Project Games notice|data structure}}
{{Project Games notice|data structure}}

Navigation menu