PAK (Tropical Freeze)

See MREA (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 RFRM headers. Following that are three data sections: files, metadata, and strings.

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.

Following this header are resource entries, which are structured as follows:

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.

String Table
The string table attaches names to certain resources to allow the game to access them directly. It's structured as follows:

Tools

 * PakTool by Parax; supports extracting and decompressing every Retro Studios pak format, and can repack the Prime 1 pak format. Important note: the current version of PakTool won't unpack metadata in Tropical Freeze paks. This will be fixed in a future update.