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

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
(→‎Storage: the 0x08 in GBA pointers just identifies them as pointers; they're not part of the offset.)
Line 188: Line 188:
The following are ROM offsets for the first entry (Bulbasaur) in each GBA game (US version?):
The following are ROM offsets for the first entry (Bulbasaur) in each GBA game (US version?):


* Ruby: 0x081FEC34
* Ruby: 0x1FEC34
* Sapphire: 0x081FEBC4
* Sapphire: 0x1FEBC4
* Emerald: 0x082F0D70
* Emerald: 0x2F0D70
* Emerald (EN-US): 0x083203E8
* Emerald (EN-US): 0x3203E8
* FireRed: 0x082111A8
* FireRed: 0x2111A8
* FireRed (EN-US): 0x082547A0
* FireRed (EN-US): 0x2547A0
* LeafGreen: 0x08211184
* LeafGreen: 0x211184
* LeafGreen (EN-US): 0x0825477C
* LeafGreen (EN-US): 0x25477C


{{data structure}}
{{data structure}}

Revision as of 01:32, 13 July 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. If the most significant bit is set, the Pokémon is asymmetrical and is not flipped on the summary screen, e.g. Poliwag, Kingler, or Unown. Here is the list of the values and their relating colors:

00. Red 01. Blue 02. Yellow 03. Green 04. Black
05. Brown 06. Purple 07. Gray 08. White 09. 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: 0x1FEC34
  • Sapphire: 0x1FEBC4
  • Emerald: 0x2F0D70
  • Emerald (EN-US): 0x3203E8
  • FireRed: 0x2111A8
  • FireRed (EN-US): 0x2547A0
  • LeafGreen: 0x211184
  • LeafGreen (EN-US): 0x25477C


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