18,700
edits
m (correcting template name) |
(updating for OniX 1.0.0) |
||
Line 1: | Line 1: | ||
{{UpdatedForOniX}} | {{UpdatedForOniX|1.0.0}} | ||
{{OBD Home}} | {{OBD Home}} | ||
:''".dat" redirects here; for other files ending in ".dat", see [[Oni (folder)]].'' | :''".dat" redirects here; for other files ending in ".dat", see [[Oni (folder)]].'' | ||
Line 28: | Line 28: | ||
{{Table}} | {{Table}} | ||
{{OBD_Table_Header}} | {{OBD_Table_Header}} | ||
{{OBDtr| 0x00 | int64 | | 1F 27 DC 33 DF BC 03 00 | 0x0003BCDF33DC271F | Windows instance file total template checksum | {{OBDtr| 0x00 | int64 | | 1F 27 DC 33 DF BC 03 00 | 0x0003BCDF33DC271F | Windows instance file total template checksum<br>Windows demo and Mac retail/demo use 0x0003BCDF23C13061 instead<br>[[OniX]] blanks this checksum in favor of using the 0x3C field below }} | ||
{{OBDtr| 0x08 | int32 | | 31 33 52 56 | '13RV' | .dat version (meant to be read as "VR31") | {{OBDtr| 0x08 | int32 | | 31 33 52 56 | '13RV' | .dat version (meant to be read as "VR31")<br>OniSplit's .oni files use '23RV' ("VR32") instead<br>OniX's [[Oni (folder)|GDFX]] uses '33RV' ("VR33") to signify that the new data versioning system is in use }} | ||
{{OBDtr| 0x0C | int16 | | 40 00 | 64 | size of this header }} | {{OBDtr| 0x0C | int16 | | 40 00 | 64 | size of this header }} | ||
{{OBDtr| 0x0E | int16 | | 14 00 | 20 | size of instance descriptor }} | {{OBDtr| 0x0E | int16 | | 14 00 | 20 | size of instance descriptor }} | ||
Line 44: | Line 44: | ||
{{OBDtr| 0x34 | int32 | | 90 4F 63 00 | (garbage) | used by OniSplit for raw table size }} | {{OBDtr| 0x34 | int32 | | 90 4F 63 00 | (garbage) | used by OniSplit for raw table size }} | ||
{{OBDtr| 0x38 | int32 | | F4 55 5F 00 | (garbage) | unused }} | {{OBDtr| 0x38 | int32 | | F4 55 5F 00 | (garbage) | unused }} | ||
{{OBDtr| 0x3C | int32 | | 90 4F 63 00 | (garbage) | | {{OBDtr| 0x3C | int32 | | 90 4F 63 00 | (garbage) | three high bytes used by OniX for data versioning; contains the highest data type version found in any instance in this .dat }} | ||
|} | |} | ||
Line 64: | Line 64: | ||
The instance descriptor array tells Oni where to find the data and the name of every instance (resource) indexed by the .dat file. The descriptors start at 0x40 in the .dat file, but below is a descriptor found at 0x017B50 in the file which makes a better example. In the table below, we use offsets relative to the start of this descriptor. | The instance descriptor array tells Oni where to find the data and the name of every instance (resource) indexed by the .dat file. The descriptors start at 0x40 in the .dat file, but below is a descriptor found at 0x017B50 in the file which makes a better example. In the table below, we use offsets relative to the start of this descriptor. | ||
{ | {| class="wikitable" | ||
|- bgcolor="#E9E9E9" | |||
! width=5% | Offset | |||
! width=5% | Type | |||
! width=10% | Raw Hex | |||
! width=10% | Value | |||
! width=35% | Description (vanilla) | |||
! width=35% | Description (GDFX) | |||
|- align=center | |||
| 0x00 | |||
| tag | |||
| 54 42 55 53 | |||
| 'SUBT' | |||
|colspan="2" align=left | template tag | |||
|- align=center | |||
| 0x04 | |||
| int32 | |||
| C8 30 22 00 | |||
| 0x2230C8 | |||
|colspan="2" align=left | data offset (relative to data table) | |||
|- align=center | |||
| 0x08 | |||
| int32 | |||
| 01 CB 00 00 | |||
| 0xCB01 | |||
|colspan="2" align=left | name offset (relative to name table) | |||
|- align=center | |||
| 0x0C | |||
| int32 | |||
| C0 09 00 00 | |||
| 2496 | |||
|colspan="2" align=left | data size | |||
|- align=center | |||
| 0x10 | |||
| int32 | |||
| 00 00 00 00 | |||
| 0 | |||
| valign=top align=left | flags; possible values: | |||
:0x'''01''' 00 00 00 - unnamed | |||
:0x'''02''' 00 00 00 - empty | |||
:0x'''04''' 00 00 00 - never used; intended to mark instance as pointing to duplicate data rather than its own data | |||
:0x'''08''' 00 00 00 - instance's data is being used by duplicate instances as a source | |||
The first two of the following bits occur throughout the original .dat files. However these bits are ignored by the engine when loading data because they only have relevance during runtime, when Oni is in Tool mode: | |||
:0x00 00 '''10''' 00 - touched (unsaved data) | |||
:0x00 00 '''20''' 00 - "in batch file" | |||
:0x00 00 '''40''' 00 - delete upon next save | |||
| align=left | flags; possible values: | |||
:0x'''01''' 00 00 00 - unnamed | :0x'''01''' 00 00 00 - unnamed | ||
:0x'''02''' 00 00 00 - empty | :0x'''02''' 00 00 00 - empty | ||
:0x'''04''' 00 00 00 - never used; intended to mark instance as pointing to duplicate data rather than its own data | :0x'''04''' 00 00 00 - never used; intended to mark instance as pointing to duplicate data rather than its own data | ||
:0x'''08''' 00 00 00 - instance's data is being used by duplicate instances as a source | :0x'''08''' 00 00 00 - instance's data is being used by duplicate instances as a source | ||
The | The Tool mode bits have been moved to the upper half of the flags byte (they are cleared altogether in the GDFX data, but this is their location in memory): | ||
: | :0x'''10''' 00 00 00 - touched (unsaved data) | ||
:0x00 | :0x'''20''' 00 00 00 - "in batch file" | ||
:0x00 00 ''' | :0x'''40''' 00 00 00 - delete upon next save | ||
This frees up the three higher bytes for the data versioning timestamp: | |||
:0x00 '''00''' 00 00 - versioning timestamp – year | |||
:0x00 00 '''00''' 00 - versioning timestamp – month | |||
:0x00 00 00 '''00''' - versioning timestamp – day | |||
|} | |} | ||