Difference between revisions of "Assets manifest"
Imathrowback (Talk | contribs) |
Imathrowback (Talk | contribs) (→Binary Format) |
||
Line 41: | Line 41: | ||
|4 bytes | |4 bytes | ||
|integer | |integer | ||
− | | | + | |256 Block Table offset |
|- | |- | ||
|4 bytes | |4 bytes | ||
|integer | |integer | ||
− | | | + | |256 Block Table size |
|- | |- | ||
|48 bytes | |48 bytes | ||
Line 52: | Line 52: | ||
|- | |- | ||
|} | |} | ||
+ | ==== Tables ==== | ||
− | ==== 256 Block Table ==== | + | ===== 256 Block Table ===== |
This table consists of 256 bytes. It is not yet known what these are but it one possibility is some kind of RC4 substitution table. | This table consists of 256 bytes. It is not yet known what these are but it one possibility is some kind of RC4 substitution table. | ||
− | ==== Data Table Reference ==== | + | ===== Data Table Reference ===== |
{|class="wikitable" | {|class="wikitable" | ||
Line 85: | Line 86: | ||
Note that the table itself may consist of more data than the header indicates. For example if you multiply the stride by the count and it is less than the size of the table in bytes, then extra data is appended. | Note that the table itself may consist of more data than the header indicates. For example if you multiply the stride by the count and it is less than the size of the table in bytes, then extra data is appended. | ||
− | ==== Table 0 ==== | + | ===== Table 0 ===== |
Unknown. | Unknown. | ||
Line 91: | Line 92: | ||
After the normal table data, there are "count" number of null terminated strings. | After the normal table data, there are "count" number of null terminated strings. | ||
− | ==== Table 1 - Entry Table ==== | + | ===== Table 1 - Entry Table ===== |
FNV hash and asset names. No extra data | FNV hash and asset names. No extra data | ||
Line 111: | Line 112: | ||
|} | |} | ||
− | ==== Table 2 - Unknown ==== | + | ===== Table 2 - Unknown ===== |
Contains extra data. | Contains extra data. |
Revision as of 17:51, 24 April 2017
RIFT assets consist of 2 main parts, the manifest, and the asset files.
RIFT uses a FNV1 hash to hash all filenames. This hash is used in many places when referring to files.
Contents
Manifest
assets.manifest - 32 bit
assets64.manifest - 64 bit
The main identified use of the manifest is to map asset hashes with filename hashes.
However, the manifest contains much more data than that, but it is currently unknown what else it contains.
It is likely that some the other data pertains to the streaming download functionality of RIFT where assets can be streamed while playing.
Binary Format
File should be interpreted as LITTLE ENDIAN.
Header
Bytes/Offset | Content | Comment |
---|---|---|
4 bytes | TWAM | File signature |
2 bytes | 0x0200 - integer | Major version |
2 bytes | 0x0100 - integer | Minor version |
4 bytes | integer | 256 Block Table offset |
4 bytes | integer | 256 Block Table size |
48 bytes | varies | 3 Data Table Reference as per below, each 16 bytes long. The second table is the Entry Table as per below. |
Tables
256 Block Table
This table consists of 256 bytes. It is not yet known what these are but it one possibility is some kind of RC4 substitution table.
Data Table Reference
Bytes/Offset | Content | Comment |
---|---|---|
4 bytes - integer | varies | offset from start of file |
4 bytes | integer | size of the entire table in bytes |
4 bytes | integer | count of entries in the table |
4 bytes | integer | stride - size of each entry in the table |
Note that the table itself may consist of more data than the header indicates. For example if you multiply the stride by the count and it is less than the size of the table in bytes, then extra data is appended.
Table 0
Unknown.
After the normal table data, there are "count" number of null terminated strings.
Table 1 - Entry Table
FNV hash and asset names. No extra data
Bytes/Offset | Content | Comment |
---|---|---|
8 bytes | varies | ID of the entry - corresponds to the first 8 bytes of a 16byte SHA hash of the contents of the data the entry relates to. |
4 bytes | integer | The FNV1 hash of the filename |
Table 2 - Unknown
Contains extra data.
Asset files
Asset files are in the assets directory of the RIFT installation and are labelled like so:
assets.001 assets.002 assets64.001 etc
The assets with 64 indicate the file should be preferred if using the 64bit manifest.
Asset files are packed files, sometimes compressed.
Header
Bytes/Offset | Content | Comment |
---|---|---|
4 bytes | TWAD | File signature |
4 bytes | integer | version |
4 bytes | integer | size of header block |
4 bytes | integer | maximum files allowed in this file? |
4 bytes | integer | number of entries in this file |
Entry Table
Directly after the header is the entry table.
Bytes/Offset | Content | Comment |
---|---|---|
8 bytes | ID of the entry - corresponds to the first 8 bytes of a 20byte SHA hash of the contents of the data the entry relates to. | |
4 bytes | offset in bytes in the file the entry is at | |
4 bytes | size in bytes of the entry | |
4 bytes | unsure. possibly decompressed size of the entry | |
2 bytes | unsure. Possible an identifier of some sort | |
2 bytes | Entry flag. If non-zero, indicates the entry is compressed with ZLIB | |
20 bytes | SHA hash of the entry |