User:Lagnic/Contestant data structure (Generation IV)
This article is intended to be moved into one of Bulbapedia's main content spaces. Be mindful that it is still part of a personal userspace. Any content changes should be brought up on the talk page for this article. |
The Pokémon contestant data structure is a 48-byte structure that determines all information about a contestant in the Generation IV Pokémon Super Contests, such as species, moves, and condition. All numbers are stored in little-endian order.
Structure
Offset | Size (bytes) |
Type | Description |
---|---|---|---|
0 | 8 | Constant | 00 00 00 00 FF FF 00 00 |
8 | 2 | Integer | Coordinator's overworld sprite index |
10 | 2 | Integer | Trainer Class (mostly) |
12 | 2 | Integer | Move 1 index |
14 | 2 | Integer | Move 2 index |
16 | 2 | Integer | Move 3 index |
18 | 2 | Integer | Move 4 index |
20 | 2 | Integer | Pokémon National Pokédex number |
22 | 2 | Integer | Index for Pokémon nickname |
24 | 2 | Integer | Index for Coordinator name |
26 | 1 | Integer | Cool condition |
27 | 1 | Integer | Beauty condition |
28 | 1 | Integer | Cute condition |
29 | 1 | Integer | Smart condition |
30 | 1 | Integer | Tough condition |
31 | 1 | Integer | Sheen |
32 | 1 | Binary | Contest participation flags |
33 | 1 | Binary | Other flags |
34 | 12 | Integer | The contestant's index repeated 12 times |
46 | 1 | ??? | Unknown |
47 | 1 | Constant | 0x64 for all contestants |
Notes
Overworld sprite
Only one of each overworld sprite will appear on stage at a time. For example, Alfredo, Collin, and Frank can all appear in Ultra Rank Cool and Tough contests, but because they share the Ace Trainer sprite only one of the three will appear in any given contest.
Trainer Class
The Trainer Class almost always lines up with the overworld sprite, but there are exceptions. For example, Frank and Bryant are listed as Veterans but use the Ace Trainer sprite, and Fantina, Johanna, Jasmine, and Casey all share the Worker class. Ultimately this field goes unused, as Coordinators are never shown to have classes in the games.
Pokémon and Coordinator names
Unlike in Generation III, Pokémon and Coordinator names are not stored in the contestant data, but are instead encoded in /msgdata/msg.narc/192 in Diamond and Pearl or /msgdata/msg.narc/205 in Platinum. A contestant's nickname index is always double their contest index, and the Coordinator name index is always the nickname index plus one.
Contest Participation
Contestant rank and categories are controlled by a 8-bit binary number. The first 5 bits control the category, in the order Tough, Smart, Cute, Beauty, Cool (reversed from the usual in-game order). The bit will be 1 if the Pokémon appears in that category and 0 otherwise. Following that there is 1-bit of padding, and then the final 2 bits control which rank the contestant will appear in:
00000-00 Contest categories - rank ------xx 00 (Normal), 01 (Great), 10 (Ultra), or 11 (Master) ----1--- Appears in Cool Contests ---1---- Appears in Beauty Contests --1----- Appears in Cute Contests -1------ Appears in Smart Contests 1------- Appears in Tough Contests
Other flags
All Pokémon in Generation IV have two versions of their sprites, one used for male Pokémon and one for female, which are identical unless the Pokémon has gender differences. This is true even for gender unknown Pokémon like Bronzor and single gender Pokémon like Chansey. In these contests, possibly due to a programming oversight, Johanna's Jumpy uses the 'male' sprite even though all Kangaskhan are female.
00-00000 ------xx 11 if contestant appears only in Practice mode, 00 for all others -----1-- Contestant is Fantina, Johanna, or Jasmine (presumably ensures that exactly one of the three will appear in every Master Rank contest in the post-game) ----1--- Contestant only appears in the post-game ---x---- 0/1 for Male/Female sprite xx------ Unknown flag(s)
Data Location
Contest data is found in /contest/data/contest_data.narc which unpacks into 14 binary files:
00 | Contestant data (96 × 48 bytes) |
01 | Contest theme data (12 × 8 bytes) |
02 | Contestant accessories (96 × 84 bytes) |
03 | Accessory scores for "The Shapely" (100 × 1 bytes) |
04 | Accessory scores for "The Sharp" (100 × 1 bytes) |
05 | Accessory scores for "The Created" (100 × 1 bytes) |
06 | Accessory scores for "The Natural" (100 × 1 bytes) |
07 | Accessory scores for "The Colorful" (100 × 1 bytes) |
08 | Accessory scores for "The Solid" (100 × 1 bytes) |
09 | Accessory scores for "The Bright" (100 × 1 bytes) |
10 | Accessory scores for "The Gaudy" (100 × 1 bytes) |
11 | Accessory scores for "The Flexible" (100 × 1 bytes) |
12 | Accessory scores for "The Festive" (100 × 1 bytes) |
13 | Accessory scores for "The Intangible" (100 × 1 bytes) |
14 | Accessory scores for "The Relaxed" (100 × 1 bytes) |
Fingerprint
00 00 00 00 FF FF 00 00 34 00 04 00 54 00 62 00 15 00 55 00 19 00 00 00 01 00 03 01 03 01 02 1E 88 C0 00 00 00 00 00 00 00 00 00 00 00 00 01 64 // Sparky 00 00 00 00 FF FF 00 00 06 00 03 00 BD 00 91 01 F8 00 AA 01 53 01 02 00 03 00 02 01 02 02 01 1E 60 50 01 01 01 01 01 01 01 01 01 01 01 01 02 64 // Whiskers 00 00 00 00 FF FF 00 00 01 00 1C 00 62 00 4C 01 61 00 1B 01 8C 01 04 00 05 00 03 02 03 01 02 14 08 C0 02 02 02 02 02 02 02 02 02 02 02 02 01 64 // Flappy 00 00 00 00 FF FF 00 00 08 00 3D 00 24 00 A2 00 9E 00 CD 00 8F 01 06 00 07 00 02 02 02 01 03 1E 90 50 03 03 03 03 03 03 03 03 03 03 03 03 02 64 // Dots 00 00 00 00 FF FF 00 00 2C 00 0F 00 0A 00 9A 00 FC 00 B9 00 AF 01 08 00 09 00 05 01 02 02 06 14 E0 D0 04 04 04 04 04 04 04 04 04 04 04 04 01 64 // Precious ...
|
This data structure article is part of Project Games, a Bulbapedia project that aims to write comprehensive articles on the Pokémon games. |