Pokédex data structure in Generation III
A Pokédex data structure is a 36-byte (32-byte for Pokémon Emerald) piece of data.
|Height (10-1 m)||2 bytes|
|Weight (10-1 kg)||2 bytes|
|Description pointer #1||4 bytes (See Notes)|
|Description pointer #2||4 bytes (See Notes)|
|Pokémon scale||2 bytes|
|Pokémon offset||2 bytes|
|Trainer scale||2 bytes|
|Trainer offset||2 bytes|
- Name is 12 bytes long and comes in capital letters. 0x00 fills possible empty bytes. This is the category name and not the Pokémon species name ("SEED" instead of "BULBASAUR").
- Height is measured in decimeters (10-1 meters), and is then converted to other units in specific versions of games.
- Weight is measured comes in hectograms (10-1 kilograms), and is then converted to other units in specific versions of games.
- Description pointers show the game where the description for the particular Pokémon is. The GBA is Little Endian, and that a ROM file is loaded at an offset of 0x08000000.
- Ruby, Sapphire, FireRed and LeafGreen have two pages of text while Emerald has only one-- "Description pointer #2" simply does not exist.
- Pokémon offset is a signed 16-bit integer; therefore, if the raw value is 0x8000 or greater, then it is negative, with 0x8000 as -32,768 and 0xFFFF as -1.
Size compare function
In Generation III, there is a size page on the Pokédex, which uses data from the Pokédex to create a silhouette of the Pokémon standing next to the Trainer. The size of both the Trainer and Pokémon are determined by this formula:
x = (y × 256/z) pixels
Where y is the sprite size (64 pixels in this case) and z is the appropriate scale in hex and x rounded down is the size of silhouette. The game then resizes the sprite in a way similar a computer would do (without anti-aliasing).
The offset determines where exactly the silhouette will be placed. For example if Pokémon offset = 10 then the silhouette of the Pokémon will be 10 pixels from the top and 10 pixels from the left. (For some reason, that cannot be exactly simulated outside of the game).
|This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games.|