Assets manifest

From The Ghar Station Wiki
Revision as of 19:33, 15 April 2017 by Imathrowback (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.


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 Major version
2 bytes 0x0100 Minor version
24 bytes varies Unknown
4 bytes varies Offset into the hash table
4 bytes varies Unknown
4 bytes varies Count of items in the table

Entry Table

Consists of a number of entries.

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 varies The FNV1 hash of the filename


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 varies version
4 bytes varies size of header block
4 bytes varies maximum files allowed in this file?
4 bytes varies 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