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

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(Added info on level-up type)
Line 43: Line 43:
| Base [[Happiness]] || byte || The happiness/tameness at which Pokémon of the species have when first caught.
| Base [[Happiness]] || byte || The happiness/tameness at which Pokémon of the species have when first caught.
|-
|-
| [[Experience|Level-up type]]* || byte || A number from 0 to 5 representing fhe pattern of experience which Pokémon of the species require to level up.
| [[Experience|Level-up type]]* || byte || A number from 0 to 5 representing the pattern of experience which Pokémon of the species require to level up.
|-
|-
| [[Egg groups|Egg group]] 1* || byte || Indicates an Egg Group that the species belongs to.
| [[Egg groups|Egg group]] 1* || byte || Indicates an Egg Group that the species belongs to.

Revision as of 17:24, 7 May 2010

Specs

A base stats structure is a 28-byte piece of data.

Every Pokémon species in the Generation III games has a 28-byte base stats structure stored in the game's ROM somewhere. It determines all information inherent to the species, such as base Sp. Defense, Types, Egg Groups, and EV yield.

Base Stats Data whose names are marked with an asterisk (*) have more information below the table.
Name Type Description
Base HP byte The base HP used in calculating Pokémon of the species's HP.
Base Attack byte The base Attack used in calculating a Pokémon of the species's Attack.
Base Defense byte The base Defense used in calculating a Pokémon of the species's Defense.
Base Speed byte The base Speed used in calculating a Pokémon of the species's Speed.
Base Sp. Attack byte The base Sp. Attack used in calculating a Pokémon of the species's Sp. Attack.
Base Sp. Defense byte The base Sp. Defense used in calculating a Pokémon of the species's Sp. Defense.
Type 1* byte The first type of Pokémon of the species.
Type 2* byte The second type of Pokémon of the species.
Catch rate byte The catch rate used in calculating the probability that a wild Pokémon of the species will be caught.
Base Exp. yield byte The base Experience yield used in calculating how many Exp. points Pokémon who defeat another Pokémon of the species receives.
Effort yield* word How many EVs Pokémon who defeat another Pokémon of the species receives, and in what stats.
Item 1* word An item wild Pokémon of the species may hold.
Item 2* word Another item wild Pokémon of the species may hold.
Gender byte The value that is compared against the personality value of Pokémon of the species when determining what gender they will be, i.e. represents rate of females vs. males of the species.
Steps to hatch byte The cumulative number of steps that must be taken before an Egg of the species hatches, divided by 256.
Base Happiness byte The happiness/tameness at which Pokémon of the species have when first caught.
Level-up type* byte A number from 0 to 5 representing the pattern of experience which Pokémon of the species require to level up.
Egg group 1* byte Indicates an Egg Group that the species belongs to.
Egg group 2* byte Indicates another Egg Group that the species belongs to.
Ability 1 byte Indicates a special ability that Pokémon of the species may have.
Ability 2 byte Indicates another special ability that Pokémon of the species may have.
Safari Zone Rate byte Determines rate at which Pokémon of the species flee when encountered in the Safari Zone. Only Pokémon that appear in the Safari Zone have this set.
Color* byte The Pokémon's color.
0000 word Padding.

Notes

Types

Types are enumerated like this:

00. Normal 01. Fighting 02. Flying 03. Poison 04. Ground 05. Rock
06. Bug 07. Ghost 08. Steel 09. ??? 10. Fire 11. Water
12. Grass 13. Electric 14. Psychic 15. Ice 16. Dragon 17. Dark

Type 9 (???) can be an actual type for a species as well as a type for an attack. If the Pokémon only has one type, both Types will be set to the same value.

Effort yield

Certain bits count for particular stats:

(MSB)                    (LSB)
 0000  11  11  11  11  11  11
empty SDF SAK SPD DEF ATK  HP

Items

Items in the first "slot" have a 50% probability of being on the Pokémon, while 5% in the second "slot". If it's the same item in both then it's up to 100%.

Gender

Gender is zero for always-male Pokémon, 254 for always-female Pokémon and 255 for gender-neutral. Everything inbetween is a percentage value: Pikachu, 50% chance of being female, has 127.

Level-up Type

The level-up types are enumerated like this:

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

This determines with which type of Pokémon the Pokémon can breed to get eggs. See Egg groups. These are the direct values of the groups:

01. Monster 02. Water 1 04. Bug 05. Flying 06. Ground
07. Fairy 08. Plant 09. Humanshape 10. Water 3 11. Mineral
12. Indeterminate 13. Water 2 14. Ditto 15. Dragon 16. No Egg

Colors

Colors don't really affect any part of the game mechanics, but they are used in Pokédex search function. The MSB bit determines whether or not the Pokémon's image is flipped on its Summary screen, though it's only really used for Unown. Here is the list of the values and their relating colors:

00. Red 01. Blue 02. Yellow 04. Green 05. Black
06. Brown 07. Purple 08. Gray 09. White 10. Pink

Fingerprint

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
...

Storage

The following are ROM offsets for the first entry (Bulbasaur) in each GBA game (US version?):

  • Ruby: 0x001fec34
  • Sapphire: 0x001febc4
  • Emerald: 0x002f0d70
  • FireRed: 0x002111A8
  • LeafGreen: 0x00211184
  • LeafGreen (EN-US): 0x0025477C


Data structure in the Pokémon games
General Character encoding
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encoding (Korean) • Save
Generation III Pokémon species (EvolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encoding (GameCube) • Save
Generation IV Pokémon species (EvolutionLearnsets)
PokémonSaveCharacter encoding (Wii)
Generation V–present Character encoding
Generation VIII Save
TCG GB and GB2 Character encoding