Pokémon Pt Save File Structure: Difference between revisions

From ProjectPokemon Wiki
Jump to navigation Jump to search
m (Documented the offset where starter Pokémon choice is stored.)
(Added great marsh, swarm, trophy garden and honey trees offsets)
Line 138: Line 138:
*8 unsigned 16bit integers.
*8 unsigned 16bit integers.
*Each {{wplink|word_(computing)|word}} represents a character in the game's [[Pokémon NDS Character Table|character table]].
*Each {{wplink|word_(computing)|word}} represents a character in the game's [[Pokémon NDS Character Table|character table]].
===Safari Zone Pokémon - 0x7F24===
*Unsigned 32bit integer result from the [[ARNG]].
*Four daily safari zone Pokémon
*''Index<sub>n</sub>'' = ( ''ARNG'' >> ( ''n'' * 0x5 ) ) & 0x1F
*List of [[Safari Zone Pokémon#Pokémon list|Safari Zone Pokémon]]
*''Notes'': Both Safari Zone Pokémon and [[#Swarm Pokémon - 0x72D0|Swarm Pokémon]] have the same [[ARNG]] value.
===Swarm Pokémon - 0x7F28===
*Unsigned 32bit integer result from the [[ARNG]].
*One daily swarm Pokémon
*''Index'' = ''ARNG'' % 0x1C
*List of [[Swarm Pokémon#Pokémon list|Swarm Pokémon]]
*''Notes'': Both [[#Safari Zone Pokémon - 0x72D0|Safari Zone Pokémon]] and Swarm Pokémon have the same [[ARNG]] value.
===Daily Trophy Pokémon Today - 0x7F30===
*Unsigned 8bit integer
*First daily trophy garden Pokémon
*List of [[Daily Trophy Pokémon#Pokémon list|Daily Trophy Pokémon]]
===Daily Trophy Pokémon Yesterday - 0x7F32===
*Unsigned 8bit integer
*Second daily trophy garden Pokémon
*List of [[Daily Trophy Pokémon#Pokémon list|Daily Trophy Pokémon]]
*''Notes'': Yesterday's Pokémon can be caught after beating the [[Elite 4]] and receiving the [[National Pokédex upgrade]].
===Honey Trees - 0x7F38===
*21 blocks of 8byte structures
*List of [[Honey Tree#Locations|Honey Tree locations]]
{{main|Honey Tree(Technical)|Honey Trees}}


[[Category:Structures]]
[[Category:Structures]]
[[Category:Game Mechanics]]
[[Category:Game Mechanics]]
[[Category:Technical References]]
[[Category:Technical References]]

Revision as of 19:14, 22 June 2016

This page is under construction, because previously, there was pretty much NO documentation here.

I will add more as I continue my research, but since no one seems keen to volunteer the information, it is based off my own research.

Small block offsets

Trainer Name - 0x68

Trainer ID - 0x78

  • Random unsigned 16-bit integer
  • The visible identification number of a trainer
  • Determines ownership of Pokémon.

Secret ID - 0x7A

  • Random unsigned 16-bit integer
  • The hidden identification number of a trainer
  • Determines ownership of Pokémon.
  • Determines variation in the game.

Money - 0x7C

  • Unsigned 32-bit integer.
  • Limited to 0xF423F (999,999)

Trainer Gender - 0x80

  • 0 if male, 1 if female.
  • Determines ownership of Pokémon.

Country of Origin - 0x81

  • Unsigned 8-bit integer.
  • Determines whether or not Pokémon get an outsider EXP bonus.
  • Countries other than Japan are inferred from D/P/Pt, since the game has only been released in Japanese.
0x1 = 日本語 (Japan)
0x2 = English (US/UK/AU)
0x3 = Français (France/Québec)
0x4 = Italiano (Italy)
0x5 = Deutsch (Germany)
0x7 = Español (Spain/Latin Americas)
0x8 = 한국어 (South Korea)

Badges - 0x82

  • Unsigned 8-bit bitfield
  • Determines what PokéMart items are for sale, what level outsider Pokémon will obey until, and flags certain in-game events.
0x01 = Coal Badge
0x02 = Forest Badge
0x04 = Cobble Badge
0x08 = Fen Badge
0x10 = Relic Badge
0x20 = Mine Badge
0x40 = Icicle Badge
0x80 = Beacon Badge

Multiplayer Avatar - 0x83

  • Unsigned 8-bit integer.
  • Determines the sprite seen by other players in a multi-player environment such as the Union Room.
0x00 = None
0x03 = School Kid
0x05 = Bug Catcher
0x06 = Lass
0x07 = Battle Girl
0x0B = Ace Trainer Male
0x0D = Beauty
0x0E = Ace Trainer Female
0x0F = Roughneck
0x1F = Pop Idol
0x23 = Social
0x25 = Cowgirl
0x2A = Ruin Maniac
0x32 = Black Belt
0x3E = Rich Boy
0x3F = Lady
0x46 = Psychic

Please correct if these are wrong, or if there are more.

Number of Current Party Pokémon - 0x9C

  • Unsigned 8-bit integer.

Note: In my opinion this is actually a 32-bit integer, but only 8 bits of it are ever used.

Party Pokémon - 0xA0

The Pokémon in the trainer's party.

  • 6 blocks of 236 byte structures
Main article: Pokemon NDS Structure

General Items - 0x630

Main article: Other items

The items in the Trainer's general Items bag pocket.

  • 165 blocks of 4 byte structures (two bytes for item index, two bytes for quantity)

Key Items - 0x8C4

Main article: Key items

The items in the Trainer's Key Items bag pocket.

  • 50 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).

TMs & HMs - 0x98C

Main article: TMs and HMs

The items in the Trainer's TMs & HMs bag pocket.

  • 100 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).
  • TMs & HMs are auto-sorted by item index in ascending order.

Mail - 0xB1C

Main article: Mail

The items in the Trainer's Mail bag pocket.

  • 12 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).

Medicine - 0xB4C

Main article: Medicine

The items in the Trainer's Medicine bag pocket.

  • 40 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).

Berries - 0xBEC

Main article: Berries

The items in the Trainer's Berries bag pocket.

  • 64 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).
  • Berries are auto-sorted by item index in ascending order.

Balls - 0xCEC

Main article: Pokéballs

The items in the Trainer's Balls bag pocket.

  • 15 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).

Battle Items - 0xD28

Main article: Battle items

The items in the Trainer's Battle Items bag pocket.

  • 30 blocks of 4 byte structures (two bytes for item index, two bytes for quantity).

Starter Pokémon - 0xE0C

The Pokédex number of the starter chosen.

  • Unsigned 16-bit integer.

Lotto number - 0xE24

  • Unsigned 16-bit integer.

Has obtained lotto prize - 0x1141

  • 1 if obtained, 0 if not yet obtained.

Rival's Name - 0x27E8

Safari Zone Pokémon - 0x7F24

  • Unsigned 32bit integer result from the ARNG.
  • Four daily safari zone Pokémon
  • Indexn = ( ARNG >> ( n * 0x5 ) ) & 0x1F
  • List of Safari Zone Pokémon
  • Notes: Both Safari Zone Pokémon and Swarm Pokémon have the same ARNG value.

Swarm Pokémon - 0x7F28

Daily Trophy Pokémon Today - 0x7F30

Daily Trophy Pokémon Yesterday - 0x7F32

Honey Trees - 0x7F38

Main article: Honey Trees