Pokémon data structure (Generation IV)

From Bulbapedia, the community-driven Pokémon encyclopedia.
Revision as of 10:46, 16 September 2007 by MarkusE (talk | contribs)
Jump to navigationJump to search

Pokémon in the games Diamond and Pearl are all stored the same way in a 136-byte structure.

  • Need to figure out how checksum is computed
  • Need to figure out the encryption algorithm for bytes 08-87

The Pokemon data structure is divided into four 32-byte blocks, A through D. The personality value and checksum are stored into the save data, and the remaining 128 bytes are encrypted in a never-before-seen complex method using some combination of the PV and checksum as the encryption key. (It is no longer as simple as XOR'ing the 2 values.) The algorithm needs to be figured out.

Unencrypted bytes

Block A

  • 08-09 Species ID
  • 0A-0B Held Item
  • 0C-0D OT ID
  • 0E-0F OT Secret ID
  • 10-13 Experience points
  • 14 Friendship/Egg Steps to Hatch
  • 15 Ability
  • 16 Markings
  • 17 Country of Origin
  • 18-1D Effort values
  • 1E-23 Contest stats
  • 24-27 Ribbons

Block B

  • 28-2F Moveset
  • 30-33 Move PP
  • 34-37 Move PP Ups
  • 38-3B Individual values
  • 3C-3F Unknown
  • 40 Gender
  • 41-47 Unknown

Block C

  • 48-5D Nickname
  • 5E Unknown
  • 5F Hometown
  • 60-62 Contests
  • 63-67 Unknown

Block D

  • 68-77 OT Name
  • 78-7A Date Egg Received
  • 7B-7D Date Met
  • 7E-7F Egg Location
  • 80-81 Met At Location
  • 82 Unknown
  • 83 PokeBall
  • 84 Met At Level
  • 85-87 Unknown