Pokédex data structure (Generation III): Difference between revisions
m (→Specs) |
mNo edit summary |
||
Line 3: | Line 3: | ||
A '''Pokédex data structure''' is a 34-byte piece of data. | A '''Pokédex data structure''' is a 34-byte piece of data. | ||
Every [[Pokémon|Pokémon species]] in the [[Generation III]] games has data stored in the game that is used in [[Pokédex]] related functions and by | Every [[Pokémon|Pokémon species]] in the [[Generation III]] games has data stored in the game that is used in [[Pokédex]] related functions and by certain moves, such as {{m|Low Kick}}. | ||
{| align="center" style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em;" cellspacing="1" | {| align="center" style="border: 1px solid #88a; background: #f8f8ff; padding: 0.5em;" cellspacing="1" |
Revision as of 11:09, 3 January 2007
Specs
A Pokédex data structure is a 34-byte piece of data.
Every Pokémon species in the Generation III games has data stored in the game that is used in Pokédex related functions and by certain moves, such as Low Kick.
Pokédex Data | |
---|---|
Padding | byte |
Name | 12 bytes |
Height (10-1 m) | 2 bytes |
Weight (10-1 kg) | 2 bytes |
Description pointer start | 4 bytes |
Description pointer end | 4 bytes |
Pokémon scale | 2 bytes |
Pokémon offset | 2 bytes |
Trainer scale | 2 bytes |
Trainer offset | byte |
Padding | 2 bytes |
Notes
- Name is 12 bytes long and comes in capital letters. 0x00 fills possible empty bytes.
- Height is measured in decimetres (10-1 metres), and is then converted to other units in some games.
- Weight is measured comes in hectogrammes (10-1 kilogrammes), it is then converted to other units in some games.
- Description pointers show to the game where the description for the particular Pokémon is; remember the GBA is little endian. The MSB byte is always set to 0x08 (8), so this matches a BRANCH instruction (B) in assembly. For example, if the location is 0x123456, it will appear here as 0x08123456 (56 34 12 08).
- Pokémon offset is a signed 16-bit integer - if the raw value is greater 0x8000, then it is negative, with 0x8000 as -32,767 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 our case) and z is the appropriate scale in hex and x rounded down is the size of silhouette. The game then resized the sprite in a way similar a computer would do (without anti-aliasing of course).
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).