18,700
edits
No edit summary |
(added intro) |
||
Line 1: | Line 1: | ||
All instance files begin with a 64 byte header followed by 3 "descriptor" arrays, a data table and a name table. Among other things the header contains the number of descriptors in each of the 3 arrays and the offset of the data and name tables (relative to the start of the file). | Oni's level data is broken into two kinds of files in Windows retail Oni. One type ends in ".dat" and is called an instance file. The other type ends in ".raw" and is simply called a raw file. Windows demo Oni and Mac retail/demo Oni use a third type which ends in ".sep", short for "separate". You can read about raw and separate files [[Raw|HERE]]. | ||
Note that ".dat" is a generic suffix originally used by Oni for all kinds of data, including [[persist.dat]]. The raw and separate files were created later in development and given unique suffixes to distinguish them from the main level .dat file. Therefore, the proper, specific name for the <u>level data format</u>, as opposed to the save-game format, film format, etc. is not ".dat file" or "DAT file", but "instance file". | |||
Instance files are the "main" type of data file in the sense that, when loading a level, Oni reads the instance file first, and this file serves as an index that allows it to find resources which are packed back-to-back into the raw and separate files. All instance files begin with a 64 byte header followed by 3 "descriptor" arrays, a data table and a name table. Among other things, the header contains the number of descriptors in each of the 3 arrays and the offset of the data and name tables (relative to the start of the file). | |||
{{Table}} | {{Table}} | ||
{{OBD_Table_Header}} | {{OBD_Table_Header}} | ||
{{OBDtr| 0x00 | int64 | | 1F 27 DC 33 DF BC 03 00 | 0x0003BCDF33DC271F | | {{OBDtr| 0x00 | int64 | | 1F 27 DC 33 DF BC 03 00 | 0x0003BCDF33DC271F | Windows template checksum; Windows demo and Mac retail/demo use 0x0003BCDF23C13061 instead }} | ||
{{OBDtr| 0x08 | int32 | | 31 33 52 56 | 'VR31' | .dat version; .oni files use 'VR32' instead }} | {{OBDtr| 0x08 | int32 | | 31 33 52 56 | 'VR31' | .dat version; .oni files use 'VR32' instead }} | ||
{{OBDtr| 0x0C | int64 | | 40 00 14 00 10 00 08 00 | 0x0008001000140040 | signature }} | {{OBDtr| 0x0C | int64 | | 40 00 14 00 10 00 08 00 | 0x0008001000140040 | signature }} |