Pokémon species data structure (Generation III): Difference between revisions
m (→Specs) |
m (Text replacement - "}}<br>↵{{Project Games notice" to "}} {{Project Games notice") |
||
(49 intermediate revisions by 34 users not shown) | |||
Line 1: | Line 1: | ||
The '''Pokémon species data structure''' is a 28-byte structure that determines all information inherent to a Pokémon species, such as base [[stats]], [[type]]s, [[Egg Group]]s, and [[Effort values|EV yield]]. Every [[Pokémon species]] in the [[Generation III]] {{pkmn|games}} has a data structure stored in the game's ROM. | |||
==Notes== | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; float: right; margin: 0 0 0.5em 0.5em;" cellpadding="2" | |||
{| | |||
|- | |- | ||
! | ! colspan="3" style="text-align: center; background: #{{hoenn color}};" | Base Stats | ||
|- | |- | ||
| | ! || type || offset | ||
|- | |- | ||
| Base HP || byte || | | Base [[Stats|HP]] || byte || 0 | ||
|- | |- | ||
| Base Attack || byte || | | Base [[Stats|Attack]] || byte || 1 | ||
|- | |- | ||
| Base Defense || byte || | | Base [[Stats|Defense]] || byte || 2 | ||
|- | |- | ||
| Base Speed || byte || | | Base [[Stats|Speed]] || byte || 3 | ||
|- | |- | ||
| Base Sp. Attack || byte || | | Base [[Stats|Sp. Attack]] || byte || 4 | ||
|- | |- | ||
| Base Sp. Defense || byte || | | Base [[Stats|Sp. Defense]] || byte || 5 | ||
|- | |- | ||
| [[ | | [[Type|Type 1]] || byte || 6 | ||
|- | |- | ||
| Type 2 || byte || 7 | |||
|- | |- | ||
| [[Catch rate]] || byte || | | [[Catch rate]] || byte || 8 | ||
|- | |- | ||
| [[Experience| Base Exp. yield]] || byte || | | [[Experience| Base Exp. yield]] || byte || 9 | ||
|- | |- | ||
| [[Effort values|Effort yield]] | | [[Effort values|Effort yield]] || word || 10 | ||
|- | |- | ||
| [[ | | [[List of items by index number in Generation III|Item]] 1 || word || 12 | ||
|- | |- | ||
| Item 2 || word || 14 | |||
|- | |- | ||
| [[ | | [[Personality value#Gender|Gender]] || byte || 16 | ||
|- | |- | ||
| | | [[Egg cycles]] || byte || 17 | ||
|- | |- | ||
| Base [[ | | Base [[friendship]] || byte || 18 | ||
|- | |- | ||
| [[Experience|Level-up type]] || byte || | | [[Experience|Level-up type]] || byte || 19 | ||
|- | |- | ||
| [[Egg | | [[Egg Group]] 1 || byte || 20 | ||
|- | |- | ||
| | | Egg Group 2 || byte || 21 | ||
|- | |- | ||
| [[ | | [[Ability]] 1 || byte || 22 | ||
|- | |- | ||
| Ability 2 || byte || 23 | |||
|- | |- | ||
| Safari Zone | | Safari Zone rate || byte || 24 | ||
|- | |- | ||
| Color | | [[List of Pokémon by color|Color]] and Flip || byte || 25 | ||
|- | |- | ||
| | | Padding{{tt|*|0's}} || word || 26. | ||
|} | |} | ||
Missing from this structure are moves known at Level 1, and TM and HM flags, which are stored elsewhere. | |||
===Types=== | ===Types=== | ||
The [[type]]s are associated with the following values: | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 0 || style="{{roundy|20px}} background:#{{Normal color}}; border: 1px solid #{{Normal color dark}}" | {{tcolor|Normal|FFF}} | |||
|- | |||
| 1 || style="{{roundy|20px}} background:#{{Fighting color}}; border: 1px solid #{{Fighting color dark}}" | {{tcolor|Fighting|FFF}} | |||
|- | |||
| 2 || style="{{roundy|20px}} background:#{{Flying color}}; border: 1px solid #{{Flying color dark}}" | {{tcolor|Flying|FFF}} | |||
|- | |||
| 3 || style="{{roundy|20px}} background:#{{Poison color}}; border: 1px solid #{{Poison color dark}}" | {{tcolor|Poison|FFF}} | |||
|- | |||
| 4 || style="{{roundy|20px}} background:#{{Ground color}}; border: 1px solid #{{Ground color dark}}" | {{tcolor|Ground|FFF}} | |||
|- | |||
| 5 || style="{{roundy|20px}} background:#{{Rock color}}; border: 1px solid #{{Rock color dark}}" | {{tcolor|Rock|FFF}} | |||
|} | |||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 6 || style="{{roundy|20px}} background:#{{Bug color}}; border: 1px solid #{{Bug color dark}}" | {{tcolor|Bug|FFF}} | |||
|- | |||
| 7 || style="{{roundy|20px}} background:#{{Ghost color}}; border: 1px solid #{{Ghost color dark}}" | {{tcolor|Ghost|FFF}} | |||
|- | |||
| 8 || style="{{roundy|20px}} background:#{{Steel color}}; border: 1px solid #{{Steel color dark}}" | {{tcolor|Steel|FFF}} | |||
|- | |||
| 9 || style="{{roundy|20px}} background:#{{Unknown color}}; border: 1px solid #{{Unknown color dark}}" | {{tcolor|???|FFF}} | |||
|- | |||
| 10 || style="{{roundy|20px}} background:#{{Fire color}}; border: 1px solid #{{Fire color dark}}" | {{tcolor|Fire|FFF}} | |||
|- | |||
| 11 || style="{{roundy|20px}} background:#{{Water color}}; border: 1px solid #{{Water color dark}}" | {{tcolor|Water|FFF}} | |||
|} | |||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 12 || style="{{roundy|20px}} background:#{{Grass color}}; border: 1px solid #{{Grass color dark}}" | {{tcolor|Grass|FFF}} | |||
|- | |||
| 13 || style="{{roundy|20px}} background:#{{Electric color}}; border: 1px solid #{{Electric color dark}}" | {{tcolor|Electric|FFF}} | |||
|- | |||
| 14 || style="{{roundy|20px}} background:#{{Psychic color}}; border: 1px solid #{{Psychic color dark}}" | {{tcolor|Psychic|FFF}} | |||
|- | |||
| 15 || style="{{roundy|20px}} background:#{{Ice color}}; border: 1px solid #{{Ice color dark}}" | {{tcolor|Ice|FFF}} | |||
|- | |||
| 16 || style="{{roundy|20px}} background:#{{Dragon color}}; border: 1px solid #{{Dragon color dark}}" | {{tcolor|Dragon|FFF}} | |||
|- | |||
| 17 || style="{{roundy|20px}} background:#{{Dark color}}; border: 1px solid #{{Dark color dark}}" | {{tcolor|Dark|FFF}} | |||
|} | |||
|} | |||
If the Pokémon only has one type, both '''Type 1''' and '''Type 2''' will be set to the same value. | |||
{| | ===Effort yield=== | ||
Each [[stats|stat]] is assigned two bits to determine how many [[Effort values|EVs]] the Pokémon will give in that stat. The last 4 bits in the byte are empty (0). | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
! Bits || Stat | |||
|- | |- | ||
| | | 0-1 || HP | ||
| | |||
| | |||
|- | |- | ||
| | | 2-3 || Attack | ||
| | |||
| | |||
|- | |- | ||
| | | 4-5 || Defense | ||
| | |- | ||
| | | 6-7 || Speed | ||
| | |- | ||
| | | 8-9 || Special Attack | ||
| | |- | ||
| 10-11 || Special Defense | |||
|} | |} | ||
===Items=== | |||
If an [[List of items by index number in Generation III|item]] is assigned to '''Item 1''', the Pokémon will have a 50% chance of [[held item|having that item]] when encountered in the wild. An item assigned to '''Item 2''' will have a 5% chance of being held. If both '''Item 1''' and '''Item 2''' are the same, then the Pokémon will always be holding that item when it is encountered. | |||
===Gender=== | |||
{{main|Personality value#Gender|Personality value → Gender}} | |||
This value determines the chance that a Pokémon will be male or female. If the species is not all male, all female, or gender unknown, then this value is compared to the lowest byte of a Pokémon's personality value to determine its [[gender]]. | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
! Value || Gender | |||
|- | |||
| 0 || Always male {{male}} | |||
|- | |||
| 1-253 || Mixed {{male}} / {{female}} | |||
|- | |||
| 254 || Always female {{female}} | |||
|- | |||
| 255 || Gender unknown | |||
|} | |||
=== | ===Level-up Type=== | ||
The following values correspond to the different [[experience|growth rates]] a Pokémon can have: | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
! Value || Growth || Lv100 Exp | |||
|- | |||
| 0 || Medium Fast || style="text-align:right" | 1,000,000 | |||
|- | |||
| 1 || Erratic || style="text-align:right" | 600,000 | |||
|- | |||
| 2 || Fluctuating || style="text-align:right" | 1,640,000 | |||
|- | |||
| 3 || Medium Slow || style="text-align:right" | 1,059,860 | |||
|- | |||
| 4 || Fast || style="text-align:right" | 800,000 | |||
|- | |||
| 5 || Slow || style="text-align:right" | 1,250,000 | |||
|} | |||
===Egg Groups=== | |||
The following values correspond to the different [[Egg Group]]s a Pokémon can belong to: | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
| | |||
{| style="text-align:center" | |||
{| style="border: 1px solid #88a; padding: 0.5em;" | ! Value || Type | ||
| | |- | ||
| | | 1 || {{egg|Monster}} | ||
| | |- | ||
| | | 2 || {{egg|Water 1}} | ||
| | |- | ||
| 3 || {{egg|Bug}} | |||
|- | |||
| 4 || {{egg|Flying}} | |||
|- | |- | ||
| | | 5 || {{egg|Field}} | ||
| | |||
| | |||
| | |||
|} | |} | ||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 6 || {{egg|Fairy}} | |||
|- | |||
| 7 || {{egg|Grass}} | |||
|- | |||
| 8 || {{egg|Human-Like}} | |||
|- | |||
| 9 || {{egg|Water 3}} | |||
|- | |||
| 10 || {{egg|Mineral}} | |||
|} | |||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 11 || {{egg|Amorphous}} | |||
|- | |||
| 12 || {{egg|Water 2}} | |||
|- | |||
| 13 || {{egg|Ditto}} | |||
|- | |||
| 14 || {{egg|Dragon}} | |||
|- | |||
| 15 || {{egg|No Eggs Discovered}} | |||
|} | |||
|} | |||
For Pokémon only in a single Egg Group, both entries are the same value. | |||
=== | ===Safari Zone rate=== | ||
This determines | This value determines the rate at which the Pokémon will [[escape|flee]] when encountered in the [[Safari Zone]]. Only Pokémon that appear in the Safari Zone have this value set. | ||
===Color and Flip=== | |||
Color is used in the [[Pokédex]]'s search function in {{3v2|Ruby|Sapphire|Emerald}}. The following values correspond to the different possible colors: | |||
{| style="border: 1px solid #88a; padding: 0.5em;" | {| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | ||
| | | | ||
| | {| style="text-align:center" | ||
| | ! Value || Type | ||
| | |||
|- | |- | ||
| | | 0 || Red | ||
| | |||
| | |||
|- | |- | ||
| | | 1 || Blue | ||
| | |- | ||
| | | 2 || Yellow | ||
| | |- | ||
| | | 3 || Green | ||
|- | |||
| 4 || Black | |||
|} | |||
| | |||
{| style="text-align:center" | |||
! Value || Type | |||
|- | |||
| 5 || Brown | |||
|- | |||
| 6 || Purple | |||
|- | |||
| 7 || Gray | |||
|- | |||
| 8 || White | |||
|- | |||
| 9 || Pink | |||
|} | |||
|} | |} | ||
"Flip" refers to whether the Pokémon's image is flipped when seen in the summary screen as opposed to when seen in the [[Pokédex]] or [[Pokémon Storage System|PC]]. This is determined by bit 7 (the most significant bit) of this field. For some Pokémon, such as {{p|Poliwag}}, {{p|Kingler}}, and {{p|Unown}}, this bit is set and the image is not flipped (i.e., the image is oriented the same in both places). | |||
==Storage== | ==Storage== | ||
{{incomplete|section|Are the Ruby and Sapphire addresses only for US games? For non-US games?}} | |||
The following are the RAM offsets for the first data entry ({{p|Bulbasaur}}) in each GBA game. Since a game is loaded into RAM at 0x08000000, this means that the offset in a ROM dump will only use the last six hexadecimal digits. | |||
{| style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em; border-collapse: collapse; margin: 0 0 0.5em 0.5em" cellpadding=2 | |||
! Game || Address | |||
|- | |||
| '''{{color2|{{ruby color}}|Pokémon Ruby and Sapphire Versions|Ruby}}''' || 0x081FEC34 | |||
|- | |||
| '''{{color2|{{sapphire color}}|Pokémon Ruby and Sapphire Versions|Sapphire}}''' || 0x081FEBC4 | |||
|- | |||
| '''{{color2|{{emerald color}}|Pokémon Emerald Version|Emerald}}''' || 0x082F0D70 | |||
|- | |||
| '''{{color2|{{emerald color}}|Pokémon Emerald Version|Emerald}}'''<sup>EN-US</sup> || 0x083203E8 | |||
|- | |||
| '''{{color2|{{firered color}}|Pokémon FireRed and LeafGreen Versions|FireRed}}''' || 0x082111A8 | |||
|- | |||
| '''{{color2|{{firered color}}|Pokémon FireRed and LeafGreen Versions|FireRed}}'''<sup>EN-US</sup> || 0x082547A0 | |||
|- | |||
| '''{{color2|{{leafgreen color}}|Pokémon FireRed and LeafGreen Versions|LeafGreen}}''' || 0x08211184 | |||
|- | |||
| '''{{color2|{{leafgreen color}}|Pokémon FireRed and LeafGreen Versions|LeafGreen}}'''<sup>EN-US</sup> || 0x0825477C | |||
|} | |||
===Fingerprint=== | |||
Below is a sample of the data for the first Pokémon species data structures. | |||
<pre> | |||
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ?????????? (used for unknown/glitch Pokémon) | |||
2D 31 31 2D 41 41 0C 03 2D 40 00 01 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // BULBASAUR | |||
3C 3E 3F 3C 50 50 0C 03 2D 8D 00 05 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // IVYSAUR | |||
50 52 53 50 64 64 0C 03 2D D0 00 06 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // VENUSAUR | |||
27 34 2B 41 3C 32 0A 0A 2D 41 40 00 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARMANDER | |||
3A 40 3A 50 50 41 0A 0A 2D 8E 40 01 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARMELEON | |||
4E 54 4E 64 6D 55 0A 02 2D D1 00 03 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARIZARD | |||
2C 30 41 2B 32 40 0B 0B 2D 42 10 00 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // SQUIRTLE | |||
3B 3F 50 3A 41 50 0B 0B 2D 8F 10 04 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // WARTORTLE | |||
4F 53 64 4E 55 69 0B 0B 2D D2 00 0C 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // BLASTOISE | |||
... | |||
</pre> | |||
{{data structure}} | |||
{{Project Games notice|data structure}} |
Latest revision as of 17:32, 16 September 2024
The Pokémon species data structure is a 28-byte structure that determines all information inherent to a Pokémon species, such as base stats, types, Egg Groups, and EV yield. Every Pokémon species in the Generation III games has a data structure stored in the game's ROM.
Notes
Base Stats | ||
---|---|---|
type | offset | |
Base HP | byte | 0 |
Base Attack | byte | 1 |
Base Defense | byte | 2 |
Base Speed | byte | 3 |
Base Sp. Attack | byte | 4 |
Base Sp. Defense | byte | 5 |
Type 1 | byte | 6 |
Type 2 | byte | 7 |
Catch rate | byte | 8 |
Base Exp. yield | byte | 9 |
Effort yield | word | 10 |
Item 1 | word | 12 |
Item 2 | word | 14 |
Gender | byte | 16 |
Egg cycles | byte | 17 |
Base friendship | byte | 18 |
Level-up type | byte | 19 |
Egg Group 1 | byte | 20 |
Egg Group 2 | byte | 21 |
Ability 1 | byte | 22 |
Ability 2 | byte | 23 |
Safari Zone rate | byte | 24 |
Color and Flip | byte | 25 |
Padding* | word | 26. |
Missing from this structure are moves known at Level 1, and TM and HM flags, which are stored elsewhere.
Types
The types are associated with the following values:
|
|
|
If the Pokémon only has one type, both Type 1 and Type 2 will be set to the same value.
Effort yield
Each stat is assigned two bits to determine how many EVs the Pokémon will give in that stat. The last 4 bits in the byte are empty (0).
Bits | Stat |
---|---|
0-1 | HP |
2-3 | Attack |
4-5 | Defense |
6-7 | Speed |
8-9 | Special Attack |
10-11 | Special Defense |
Items
If an item is assigned to Item 1, the Pokémon will have a 50% chance of having that item when encountered in the wild. An item assigned to Item 2 will have a 5% chance of being held. If both Item 1 and Item 2 are the same, then the Pokémon will always be holding that item when it is encountered.
Gender
- Main article: Personality value → Gender
This value determines the chance that a Pokémon will be male or female. If the species is not all male, all female, or gender unknown, then this value is compared to the lowest byte of a Pokémon's personality value to determine its gender.
Value | Gender |
---|---|
0 | Always male ♂ |
1-253 | Mixed ♂ / ♀ |
254 | Always female ♀ |
255 | Gender unknown |
Level-up Type
The following values correspond to the different growth rates a Pokémon can have:
Value | Growth | Lv100 Exp |
---|---|---|
0 | Medium Fast | 1,000,000 |
1 | Erratic | 600,000 |
2 | Fluctuating | 1,640,000 |
3 | Medium Slow | 1,059,860 |
4 | Fast | 800,000 |
5 | Slow | 1,250,000 |
Egg Groups
The following values correspond to the different Egg Groups a Pokémon can belong to:
|
|
|
For Pokémon only in a single Egg Group, both entries are the same value.
Safari Zone rate
This value determines the rate at which the Pokémon will flee when encountered in the Safari Zone. Only Pokémon that appear in the Safari Zone have this value set.
Color and Flip
Color is used in the Pokédex's search function in Ruby, Sapphire, and Emerald. The following values correspond to the different possible colors:
|
|
"Flip" refers to whether the Pokémon's image is flipped when seen in the summary screen as opposed to when seen in the Pokédex or PC. This is determined by bit 7 (the most significant bit) of this field. For some Pokémon, such as Poliwag, Kingler, and Unown, this bit is set and the image is not flipped (i.e., the image is oriented the same in both places).
Storage
This section is incomplete. Please feel free to edit this section to add missing information and complete it. Reason: Are the Ruby and Sapphire addresses only for US games? For non-US games? |
The following are the RAM offsets for the first data entry (Bulbasaur) in each GBA game. Since a game is loaded into RAM at 0x08000000, this means that the offset in a ROM dump will only use the last six hexadecimal digits.
Game | Address |
---|---|
Ruby | 0x081FEC34 |
Sapphire | 0x081FEBC4 |
Emerald | 0x082F0D70 |
EmeraldEN-US | 0x083203E8 |
FireRed | 0x082111A8 |
FireRedEN-US | 0x082547A0 |
LeafGreen | 0x08211184 |
LeafGreenEN-US | 0x0825477C |
Fingerprint
Below is a sample of the data for the first Pokémon species data structures.
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 // ?????????? (used for unknown/glitch Pokémon) 2D 31 31 2D 41 41 0C 03 2D 40 00 01 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // BULBASAUR 3C 3E 3F 3C 50 50 0C 03 2D 8D 00 05 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // IVYSAUR 50 52 53 50 64 64 0C 03 2D D0 00 06 00 00 00 00 1F 14 46 03 01 07 41 00 00 03 00 00 // VENUSAUR 27 34 2B 41 3C 32 0A 0A 2D 41 40 00 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARMANDER 3A 40 3A 50 50 41 0A 0A 2D 8E 40 01 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARMELEON 4E 54 4E 64 6D 55 0A 02 2D D1 00 03 00 00 00 00 1F 14 46 03 01 0E 42 00 00 00 00 00 // CHARIZARD 2C 30 41 2B 32 40 0B 0B 2D 42 10 00 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // SQUIRTLE 3B 3F 50 3A 41 50 0B 0B 2D 8F 10 04 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // WARTORTLE 4F 53 64 4E 55 69 0B 0B 2D D2 00 0C 00 00 00 00 1F 14 46 03 01 02 43 00 00 01 00 00 // BLASTOISE ...
|
This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games. |