Pokémon data structure (Generation I)

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
050Diglett.png This article is incomplete.
Please feel free to edit this article to add missing information and complete it.

The Pokémon data structure in the Generation I games stores most information about the current state of a player's caught Pokémon. It has a length of 44 bytes for Pokémon in the player's party and 33 bytes for Pokémon in boxes on Bill's PC. The information lost when depositing a Pokémon in Bill's PC is its level and its HP, Attack, Defense, Special and Speed; this allows the box trick to work by recalculating the lost information upon withdrawing the Pokémon again.

The structure

Offset Contents Size
0x00 Index number of species Byte
0x01 Remaining HP Word
0x03 Level? Byte
0x04 Status ailments Byte
0x05 Type 1 Byte
0x06 Type 2 Byte
0x07 Catch rate/Held item Byte
0x08 Index number of first move Byte
0x09 Index number of second move Byte
0x0A Index number of third move Byte
0x0B Index number of fourth move Byte
0x0C Original trainer ID number Word
0x0E Experience 3 bytes
0x11 HP stat experience Word
0x13 Attack stat experience Word
0x15 Defense stat experience Word
0x17 Speed stat experience Word
0x19 Special stat experience Word
0x1B Individual values Word
0x1D PP of first move Byte
0x1E PP of second move Byte
0x1F PP of third move Byte
0x20 PP of fourth move Byte
0x21 Level Byte
0x22 Maximum HP Word
0x24 Attack Word
0x26 Defense Word
0x28 Speed Word
0x2A Special Word

Notably missing from this structure are the Pokémon's nickname and the original trainer's name, which are stored elsewhere. In Pokemon Blue (US), this structure appears to

Pokémon stored in Bill's PC use a form of this structure that stops after the PP data for the fourth move, at 0x20.

The Pokémon box data consists only of the currently open Pokémon box, which explains the need for the player to save the game before switching the open box. In Pokémon Yellow for the US, this data starts at 0xDA95 in volatile RAM and continues for 660 bytes (33 bytes each for 20 Pokémon).

Explanation of fields

Species

The index number for the Pokémon's species.

Remaining HP

The number of HP left on the Pokémon. This value may not be greater than the Maximum HP field's value.

Level

Though it appears to be the level of the Pokémon, it seems effectively redundant: it exists as a Pokémon's level when said Pokémon is stored in a PC box, yet is overwritten as part of the recalculation that takes place when the Pokémon is withdrawn. If the Pokémon is deposited back into a box, this value is set to the Pokémon's level again. This value's purpose is currently unknown.

Status ailments

The status ailments of the Pokémon, as a bit field.

Bit Value Status ailment
3 0x04 Asleep
4 0x08 Poisoned
5 0x10 Burned
6 0x20 Frozen
7 0x40 Paralyzed

Since being badly poisoned is a temporary condition in battles, it is not stored here. Confusion is also not stored here. 0x00 means that the Pokémon is not affected by any major status ailment.

Type

The elemental type of the Pokémon. If the Pokémon has only one type, both values are the same. It seems redundant, as there is no way a Pokémon can change type in Generation I besides evolving, and through the use of Conversion.

If a Pokémon has only one type, the byte for the second type will match that of the first one.

# Hex Type
00 0x00 Normal
01 0x01 Fighting
02 0x02 Flying
03 0x03 Poison
04 0x04 Ground
05 0x05 Rock
07 0x07 Bug
08 0x08 Ghost
20 0x14 Fire
21 0x15 Water
22 0x16 Grass
23 0x17 Electric
24 0x18 Psychic
25 0x19 Ice
26 0x1A Dragon

Catch rate/Held item

The catch rate for the species. This does not change when the Pokémon evolves, even if its evolution has a different catch rate.

When trading with , this field is co-opted for storing the Pokémon's held item.

Original trainer ID number

The ID number of the Trainer who caught the Pokémon.

Experience

The number of EXP. Points accumulated by the Pokémon. The level of the Pokémon should correspond with this value according to the growth formula for the Pokémon species.

Stat experience

Main article: Effort values

The stat experience accumulated by the Pokémon in each of the 5 permanent stats after battling or receiving vitamins.

PP

Main article: Power points

The PP for each move the Pokémon knows. The lowest 6 bits of each of these values is the current amount of PP for the move, and the highest 2 bits are the number of PP Ups applied to the move.

This explains the behavior of Hyper Beam and other such multi-turn moves when they glitch: the game subtracts 1 from the entire byte, and 0x00 rolls over to 0xFF, which applies 3 PP Ups to the move and makes its current PP 63. However, if one or more PP Ups are already applied to the move, the byte does not roll over in this way, so one PP Up is removed from the move. For example, if the move has 2 PP Ups applied, the byte is 0x80, which becomes 0x7F, which specifies 63 PP and one PP Up.

Maximum HP

The HP that the Pokémon has when at full health.

Attack, Defense, Speed, Special

The values of the Pokémon's Attack, Defense, Speed and Special stats, as they were last calculated from the base stats of the species, the Pokémon's individual values and its stat experience. This occurs at level-up and when the Pokémon is withdrawn from Bill's PC.

Storage

The following are ROM offsets for the beginning of the party structure while playing:

  • Red (en): Unknown
  • Blue (en): 0xAF2C
  • Yellow (en): Unknown

6-Pokemon Party Structure

Offset Contents Size
0x00 Number of Pokemon in party 1 Byte
0x01 List Party Pokemon Index values 7 Bytes
0x08 1st Pokemon structure 44 Bytes
0x34 2nd Pokemon structure 44 Bytes
0x60 3rd Pokemon structure 44 Bytes
0x8C 4th Pokemon structure 44 Bytes
0xB8 5th Pokemon structure 44 Bytes
0xE4 6th Pokemon structure 44 Bytes

NOTE: This structure only applies when the party is FULL.

The list of party index values ends with FF, which is followed by 00s through the rest of the section. The set of Pokemon structures themselves, on the other hand, are followed by a set of values whose significance are not yet clear.



Data structure in the Pokémon games
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encoding (Korean) • Save
Generation III Pokémon species (Pokémon evolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encodingSave
Generation IV Pokémon species (Pokémon evolutionLearnsets)
PokémonSaveCharacter encoding
Generation V-present Character encoding
TCG GB and GB2 Character encoding
Project Games logo.png This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.