Pokémon data structure (Generation I)

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, HP, Attack, Defense, Speed and Special; this allows the box trick to work by recalculating the lost information upon withdrawing the Pokémon again.

The structure

Offset Contents Size
0x00Index number of the Species1 byte
0x01Current HP2 bytes
0x03Level1 byte
0x04Status condition1 byte
0x05Type 11 byte
0x06Type 21 byte
0x07Catch rate/Held item1 byte
0x08Index number of move 11 byte
0x09Index number of move 21 byte
0x0AIndex number of move 31 byte
0x0BIndex number of move 41 byte
0x0COriginal Trainer ID number2 bytes
0x0EExperience points3 bytes
0x11HP EV data2 bytes
0x13Attack EV data2 bytes
0x15Defense EV data2 bytes
0x17Speed EV data2 bytes
0x19Special EV data2 bytes
0x1BIV data2 bytes
0x1DMove 1's PP values1 byte
0x1EMove 2's PP values1 byte
0x1FMove 3's PP values1 byte
0x20Move 4's PP values1 byte
0x21Level1 byte
0x22Maximum HP2 bytes
0x24Attack2 bytes
0x26Defense2 bytes
0x28Speed2 bytes
0x2ASpecial2 bytes

Notably missing from this structure are the Pokémon's nickname and the original Trainer's name, which are stored elsewhere.

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 conditions

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

Bit Value Status condition
30x04Asleep
40x08Poisoned
50x10Burned
60x20Frozen
70x40Paralyzed

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

Type

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

# Hex Type
000x00Normal
010x01Fighting
020x02Flying
030x03Poison
040x04Ground
050x05Rock
070x07Bug
080x08Ghost
200x14Fire
210x15Water
220x16Grass
230x17Electric
240x18Psychic
250x19Ice
260x1ADragon

Catch rate/Held item

The catch rate for the species. This is set when the Pokémon is obtained in a Generation I game and does not change when the Pokémon evolves, even if its evolution has a different catch rate.

When trading with Gold, Silver, and Crystal, this field is co-opted for storing the Pokémon's held item. Items are preserved when traded from Generation II to Generation I and back, but some catch rates from Generation I do not have corresponding items in Generation II. In these cases, the value in this field is translated to a different value the first time it is traded to Generation II.

In Pokémon Yellow, two Pokémon have their held item set to a value other than their catch rate. The starter Pikachu's held item value is specially set to 163 (as opposed to Pikachu's catch rate of 190) when it is obtained, which causes it to hold a Light Ball when traded over. A wild Kadabra's held item value is set to 96 upon capture (as opposed to 100), which gives it a TwistedSpoon when traded over.

Gift Pokémon from Pokémon Stadium also have their held item set to a value other than their catch rate. The Pokémon obtained for clearing the Gym Leader Castle have their held item set to the Normal Box or Gorgeous Box, depending on whether it was cleared as Round 1 or Round 2. The Amnesia Psyduck has its held item set to the Gorgeous Box.

The following catch rates correspond with bad items in Generation II (usually Teru-sama), and are converted into other items upon trading, as follows:

Old # Old Hex Old Item New # New Hex New Item
0250x19Teru-sama1460x92Leftovers
0450x2DTeru-sama0830x53Bitter Berry
0500x32Teru-sama1740xAEGold Berry
0900x5ATeru-sama1730xADBerry
1000x64Teru-sama1730xADBerry
1200x78Teru-sama1730xADBerry
1270x7FCard Key1730xADBerry
1900xBETeru-sama1730xADBerry
2550xFFCancel1730xADBerry

For example, a wild Snorlax caught in Generation I has a catch rate of 25. However, this is a Teru-sama in Generation II, so the value is automatically converted into 146, Leftovers.

A value of 0x00 in this field represents no held item.

Original Trainer ID number

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

Experience

The number of Experience 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: PP

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, and 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 RAM offsets for the beginning of the party structure while walking around:

  • Red (en): 0xD163
  • Blue (en): 0xAF2C
  • Yellow (en): 0x2F2C

During battle, on the other hand, the party structure is moved to the following offsets:

  • Green (jp): 0xD123
  • Red (en): Unknown
  • Blue (en): 0xD163
  • Yellow (en): Unknown


6-Pokémon Party Structure

Offset Contents Size
0x00Number of Pokémon in party1 Byte
0x01List Party Pokémon Index values7 Bytes
0x081st Pokémon structure44 Bytes
0x342nd Pokémon structure44 Bytes
0x603rd Pokémon structure44 Bytes
0x8C4th Pokémon structure44 Bytes
0xB85th Pokémon structure44 Bytes
0xE46th Pokémon structure44 Bytes
0X110x 0x000B's to terminatex Words


The list of party index values ends with FF, which is followed by 00s through the rest of the section; however, if the party contains only 1 Pokémon, the FF may or may not be there. Finally, the terminating 0x000B's vary in number, and other information appears to follow, but its significance is not yet clear.

Also of note is that the storage of the current Pokémon's information during battle. The internal index of the current is stored at 0xCF91, and the full Pokémon data structure begins at 0xCF98.



Data structure in the Pokémon games
Generation I Pokémon speciesPokémonPoké MartCharacter encodingSave
Generation II Pokémon speciesPokémonTrainerCharacter encodingSave
Generation III Pokémon species (Pokémon evolutionPokédexType chart)
Pokémon (substructures) • MoveContestContest moveItem
Trainer TowerBattle FrontierCharacter encodingSave
Generation IV PokémonSave
TCG GB and GB2 Character encoding


This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.
This article is issued from Bulbagarden. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.