OBD:Instance file format: Difference between revisions

m
moved instance desc. flags field detail to section below table in order to simplify table and also to free up space for…; commented out this OniX info for now
m (wording tweaks, mostly in the introduction)
m (moved instance desc. flags field detail to section below table in order to simplify table and also to free up space for…; commented out this OniX info for now)
Line 72: Line 72:
! width=10% | Raw Hex
! width=10% | Raw Hex
! width=10% | Value
! width=10% | Value
! width=35% | Description (vanilla)
! width=35% | Description (retail)
! width=35% | Description (GDFX)
! width=35% | Description (...)
|- align=center
|- align=center
| 0x00
| 0x00
Line 103: Line 103:
| 00 00 00 00
| 00 00 00 00
| 0
| 0
| align=left | flags; possible values:
| align=left | flags
| align=left | alt. flags
|}
 
This descriptor tells us that a resource of '''type''' SUBT (a subtitle file for Oni; there are only two of these, one containing all speech subtitles, and one for help messages) has '''data''' that can be found 0x2230C8 bytes into the data table, which we learned from the file header starts at 0x03BCA0. Its '''name''' can be found 0xCB01 bytes into the name table that starts, according to the file header, at 0x28F240. The '''data's size''' is 0x09C0, or 2,496 bytes. Before we proceed, let's expand upon the '''flags''' field.
 
;Flags - data usage
: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 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:
 
;Flags - Tool mode<!-- (retail)-->
The first two of the following bits occur throughout the original .dat files. However all of these bits are ignored by the engine when loading data because they only have relevance at runtime when Oni is in Tool mode:
:0x00 00 '''10''' 00 - touched (unsaved data)
:0x00 00 '''10''' 00 - touched (unsaved data)
:0x00 00 '''20''' 00 - "in batch file"
:0x00 00 '''20''' 00 - "in batch file"
:0x00 00 '''40''' 00 - delete upon next save
:0x00 00 '''40''' 00 - delete upon next save
| align=left | flags; possible values:
 
:0x'''01''' 00 00 00 - unnamed
<!--;Flags - Tool mode (OniX)
:0x'''02''' 00 00 00 - empty
These bits have been moved to the upper half of the flags byte (on disk they are cleared altogether in the GDFX data, but this is their location in memory):
: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 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)
:0x'''10''' 00 00 00 - touched (unsaved data)
:0x'''20''' 00 00 00 - "in batch file"
:0x'''20''' 00 00 00 - "in batch file"
Line 124: Line 129:
:0x00 '''00''' 00 00 - versioning timestamp – day
:0x00 '''00''' 00 00 - versioning timestamp – day
:0x00 00 '''00''' 00 - versioning timestamp – month
:0x00 00 '''00''' 00 - versioning timestamp – month
:0x00 00 00 '''00''' - versioning timestamp – year
:0x00 00 00 '''00''' - versioning timestamp – year-->
|}
The flags "unnamed" and "empty" require special explanation.
 
This descriptor tells us that a resource of '''type''' SUBT (a subtitle file for Oni; there are only two of these, one containing all speech subtitles, and one for help messages) has '''data''' that can be found 0x2230C8 bytes into the data table, which we learned from the file header starts at 0x03BCA0. Its '''name''' can be found 0xCB01 bytes into the name table that starts, according to the file header, at 0x28F240. The '''data's size''' is 0x09C0, or 2,496, bytes.  The '''flags''' "unnamed" and "empty" require special explanation.


===Unnamed and empty resources===
===Unnamed and empty resources===