File Table

From Luigi's Mansion 2 Modding Wiki
Revision as of 03:17, 21 May 2024 by Schweini (talk | contribs) (Create first draft of File Table page)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

A File Table is a file that can be extracted from a .data file and contains lookup information on data contained in the Mixed Data File.

Layout

There are two types of lookup information, file entries and file data. A file table starts with a list of file entries, which is then followed by a list of file data.

File Entry

Offset Byte Size Name Description
0x0-0x3 4 Identifier Magic adress that identifies a File Entry. It's hex value is 0x02001301.
0x4-0x7 4 File Header Size
0x8-0xb 4 File Header Offset
0xc-0xd 2 File Type
0xe-0xf 2 Flags 1 Has values that can be read from its bits.

- Bit 8: Boolean that determines if the file is aligned by 16 bytes - Bits 10-12: Index to the indices that can be found in the .dict file

- Bit 15: Boolean that determines if the file has children

0xc-0xf 4 Children Count or Data Size Dependent on the Has Children flag.
0x10 4 Children Start Index or Data Offset Dependent on the Has Children flag.