Difference between revisions of "PAK (Tropical Freeze)"
(lolol) |
|||
Line 7: | Line 7: | ||
== Format == | == Format == | ||
− | The format begins with two [[ | + | The format begins with two [[Form Descriptor (Tropical Freeze)|form descriptors]]. Following that are three data sections: files, metadata, and strings. |
{| class="wikitable" | {| class="wikitable" | ||
Line 16: | Line 16: | ||
| 0x0 | | 0x0 | ||
| 32 | | 32 | ||
− | | ''' | + | | '''PACK [[Form Descriptor (Tropical Freeze)|Form Descriptor]]''' |
|- | |- | ||
| 0x20 | | 0x20 | ||
| 32 | | 32 | ||
− | | ''' | + | | '''TOCC [[Form Descriptor (Tropical Freeze)|Form Descriptor]]''' |
|- | |- | ||
| 0x40 | | 0x40 | ||
Line 37: | Line 37: | ||
| 0x0 | | 0x0 | ||
| 24 | | 24 | ||
− | | ''' | + | | '''ADIR [[Chunk Descriptor (Tropical Freeze)|Chunk Descriptor]]''' |
|- | |- | ||
| 0x18 | | 0x18 | ||
Line 87: | Line 87: | ||
| 0x0 | | 0x0 | ||
| 24 | | 24 | ||
− | | ''' | + | | '''META [[Chunk Descriptor (Tropical Freeze)|Chunk Descriptor]]''' |
|- | |- | ||
| 0x18 | | 0x18 | ||
Line 122: | Line 122: | ||
| 0x0 | | 0x0 | ||
| 24 | | 24 | ||
− | | ''' | + | | '''STRG [[Chunk Descriptor (Tropical Freeze)|Chunk Descriptor]]''' |
|- | |- | ||
| 0x18 | | 0x18 |
Revision as of 07:19, 9 May 2016
See PAK (File Format) for the other revisions of this format.
The .pak format in Donkey Kong Country: Tropical Freeze is the third version of the .pak format, with another layout overhaul, file IDs being extended from 64 bits to 128 bits, and the addition of an extra metadata section.
Format
The format begins with two form descriptors. Following that are three data sections: files, metadata, and strings.
Offset | Size | Description |
---|---|---|
0x0 | 32 | PACK Form Descriptor |
0x20 | 32 | TOCC Form Descriptor |
0x40 | End of pak header |
Resource Table
The resource table lists files sorted by their file ID in numerical order; they're often not listed in the same order that they actually appear in the file.
Offset | Size | Description |
---|---|---|
0x0 | 24 | ADIR Chunk Descriptor |
0x18 | 4 | Resource count |
0x1C | End of file table header |
Following this header are resource entries, which are structured as follows:
Offset | Size | Description |
---|---|---|
0x0 | 4 | File type fourCC |
0x4 | 16 | File ID |
0x14 | 8 | Offset |
0x1C | 8 | Size |
0x24 | End of file entry |
Metadata
The metadata section lists extra data for certain resource types, which are associated with them via their file ID. The structure and contents of a metadata entry varies depending on the resource type; check that type's page on the Wiki to check its structure.
If there's no resources with metadata attached to them in the entire pak, then the metadata section won't exist at all; make sure you check for that.
Offset | Size | Description |
---|---|---|
0x0 | 24 | META Chunk Descriptor |
0x18 | 4 | Metadata entry count |
Offset | Size | Description |
---|---|---|
0x0 | 16 | Resource ID |
0x10 | 4 | Metadata offset (relative to start of the metadata section) |
0x14 | End of entry |
String Table
The string table attaches names to certain resources to allow the game to access them directly. It's structured as follows:
Offset | Size | Description |
---|---|---|
0x0 | 24 | STRG Chunk Descriptor |
0x18 | 4 | String entry count |
Offset | Size | Description |
---|---|---|
0x0 | 4 | Resource type fourCC |
0x4 | 16 | Resource ID |
0x14 | N | Resource name; zero-terminated |
0x14 + N | End of string entry |
Tools
- PakTool by Parax; can extract and decompress files from Tropical Freeze paks, but doesn't support repacking or recompressing them