-
Notifications
You must be signed in to change notification settings - Fork 1
Asset Pack Format
Last updated: 2025-2-25
This has only been tested with Diamond Rush and Rayman Kart. These are likely applicable to other games but this has not been verified. All numbers specified are little-endian, if applicable.
This format stores files and only keeps track of their starting offset, meaning the size of each file has to be calculated based on the differences between offsets. Since the amount of files is one less than the amount of offsets, the last offset should always point to the end of the file. Because of the constraints of this format, files must be stored sequentially in the payload.
Field | Size | Type | Description |
---|---|---|---|
Offset Count | 2 bytes | int16 | Amount of offsets |
Offsets | 4 x {Offset Count} Bytes | int32 array | Start offsets for each file |
Payload | Variable | binary | Raw file data |
A less common variant of this format store the file count as a 32-bit integer and has a single terminator byte (usually 00
) after the header. File offsets also represent the end offset of each file rather than the start offset, so the number of files is the same as the number of offsets.
This is the most commonly used format. It stores both the sizes and offsets for each file, meaning files do not have to be stored sequentially in the payload (though this is often done anyways as it makes the most sense).
Field | Size | Type | Description |
---|---|---|---|
File Count | 1 byte | int8 | Amount of files |
Offsets + Sizes | 8 * {File Count} bytes | struct | Pairs of the offsets and sizes of each file (in that order) as 32-bit integers |
Payload | Variable | binary | Raw file data |
This is the most barebones format, featuring no header and instead having each file stored sequentially preceded by a 16-bit integer representing their size.
Text packs are stored as two binary files packed in the minimal pack format, with the first file being the string table, which stores the raw string data, and the second file being the index table, which stores the indexes of each string in the table.
The string table contains a header specifying how many bytes it takes up followed by an array of shorts representing the start index for each string. Strings are null-terminated and are encoded in ISO/IEC 8859-1, with the exception of the single quote being encoded by character 0x92.
The string table contains the number of strings in the string table followed by the starting index of every string. The first string is assumed to be at index 0, and the last index typically points to the end of the string table.
Field | Size | Type | Description |
---|---|---|---|
String Count | 2 bytes | int16 | Amount of strings |
String Indices | 2 * {String Count} bytes | int16 array | Starting indices of each string |