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

From Bulbapedia, the community-driven Pokémon encyclopedia.
Jump to navigationJump to search
Line 58: Line 58:
==Font==
==Font==
Determines which character set is used for the nickname (?).
Determines which character set is used for the nickname (?).
This is used to determine what colour should be used to write nicknames in a Pokemon status. They may appear in either blue (boy) or pink (girl).
==OT name==
==OT name==
The name of the original trainer of the Pokémon.
The name of the original trainer of the Pokémon.

Revision as of 14:50, 25 February 2005

Format

Pokémon in the games Ruby, Sapphire, FireRed, LeafGreen, and Emerald are all stored the same way in a 100-byte structure.

Pokémon
Personality dword
OT ID dword
Nickname 10 bytes
Font word
OT name 7 bytes
Mark byte
Checksum word
(Padding) word
Data 48 bytes
Status ailment byte
(Padding) 3 bytes
Level byte
(Padding) byte
Current HP word
Total HP word
Attack word
Defense word
Speed word
Sp. Attack word
Sp. Defense word

Notes

Personality value

The personality value controls many things, including gender, unown letter, Spinda's dots, nature, and others.

OT ID

The Original Trainer's ID Number. Part of the XOR encryption key for the data section, also used in shiny determination and the lottery.

Nickname

The Pokémon's nickname, limited to 10 characters.

Font

Determines which character set is used for the nickname (?). This is used to determine what colour should be used to write nicknames in a Pokemon status. They may appear in either blue (boy) or pink (girl).

OT name

The name of the original trainer of the Pokémon.

Mark

The marks you see in the storage box. bit 0: Circle bit 1: Square bit 2: Triangle bit 3: Heart

Checksum

The checksum is of the 48-byte data section in the structure. It is computed by simply adding all the unencrypted values one word at a time. If this value does not match the real checksum, the Pokémon is interpreted as a Bad Egg.

Padding

Any entry marked (Padding) is not used and usually set to either 0 or -1 of the respective data type.

Status ailment

The Pokémon's status ailments are stored as follows:

0-2: Sleep bits. Indicates turns of sleep, so 111b = 7 turns, 101b = 5 turns, etc.
3: Poison
4: Burned
5: Frozen
6: Paralysis
7: Bad poison

Location

A trainer's team starts at the following addresses in the GBA's RAM (for US games?):

  • Ruby: 0x03004360
  • Sapphire: 0x03004360
  • Emerald: 0x02024190
  • FireRed: 0x02024284
  • LeafGreen: 0x020241e4

Since there are 6 Pokémon per team, so the whole team continues for 600 bytes afterward.