OBD talk:File types

From OniGalore
Revision as of 19:54, 13 November 2022 by Geyser (talk | contribs) (Filling in template sizes; not a big deal, but I got thrown off by how a .dat file only lists the padded sizes and how (because of that) we have been ignoring the fact that Mac TXMPs are 4 bytes larger than PC ones.)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Below is an overview of individual template checksums, extracted from the three engine types (Windows retail, Windows demo or Mac, and PS2). For conciseness, we may refer to the three iterations "Win", "Mac" and "PS2" (Windows demo and Mac differ only in the ADPCM algorithm used for the waveforms stored in a SNDD's .raw part, which does not affect the template structure or checksum, and is outside the scope of this analysis).

Our knowledge-so-far suggests that Windows retail was the first iteration, followed by the concommittent development of Windows demo and Mac versions. The PS2 iteration apparently came last, being closer to the "Mac" iteration but also having many novel features (color palettes, text system, but also AGQG, M3GM and TRAM). At the time of writing, we have yet to document the PS2 "novelties" and determine whether or not they constitute an improvement.

The instance files are labeled as VR31 for all three iterations of the template system, even though Windows retail doesn't use .sep files, and PS2 seems to be using additional .pal files (palettes of all the texel colors occurring in a level; not yet documented).

It must be noted that the PS2 build includes an auxiliary set of sound files, grouped by level into .dat/.raw/.sep file triplets (i.e., 15 such triplets in total). However, these auxiliary .dat/.raw/.sep files are nothing like VR31 instance files, and seem to be using a much simpler lookup system (undocumented as of now).

For most templates the checksums are identical, as well as the data itself. One template, TREX (Totoro Animation Extra) is unique to PS2 (apparently some of the TRAM data was split off to a separate, unnamed file; possibly new TRAM features were implemented in the process as well). Another template, AGQM (Gunk Quad Material) is missing from the PS2 engine, so that each engine lists exactly 114 individual template checksums, plus the global checksum. The global checksums aggregated from these 114 templates are as follows:

"Win" checksum (Windows retail)
0x0003BCDF33DC271F (doesn't include TREX template)
"Mac" checksum (also Windows demo)
0x0003BCDF23C13061 (doesn't include TREX template)
PS2 checksum
0x0003BA70A8DBAE11 (doesn't include AGQM template)

Below are all 115 known templates in alphabetic order, with their checksums and data sizes.

  • A black background indicates those instance types that do not occur in Vanilla .dat files.
  • A grey background indicates those that are present but are not used (by Win/Mac engines).
  • A green checksum background indicates files that have a different checksum in the Win iteration.
  • A yellow checksum background indicates files that have a different checksum in the PS2 iteration.
  • A red checksum background indicates files that have a different checksum in all three iterations.

The data sizes in the below table are extracted from the respective engine executables (along with the checksums) and include the 8 leading bytes (instance ID and level ID). The number in square brackets is the size of the variable array element where applicable. Note the difference with the padded size featured in an instance descriptor (which includes the actual array elements, if any, and the 32-byte padding).


Note that some obsolete instances, such as OBLS, are worthy of interest, have been documented and may be revived.

Tag Description Checksum(s) Size(s)
3CLA  RGB Color Array 00000004E6BE   0x20 [0x0C]
ABNA  [Akira] BSP Tree Node Array 000000126DA0   0x20 [0x10]
AGDB  [Akira] Gunk Quad Debug Array 000000072E17   0x20 [0x08]
AGQC  [Akira] Gunk Quad Collision Array 0000001CCB91   0x20 [0x1C]
AGQG  [Akira] Gunk Quad General Array Win: 0000001C03D2 
Mac: 0000001C03D2 
PS2: 00000027E7AD 
 0x20 [0x38]
 0x20 [0x38]
 0x20 [0x3C]
AGQM  [Akira] Gunk Quad Material Win: 000000044AA6 
Mac: 000000044AA6 
PS2: N/A          
 0x10
 0x10
 N/A
AGQR  [Akira] Gunk Quad Render Array 000000083A3B   0x20 [0x04]
AISA  AI Character Setup Array 002A224C6BE9   0x20 [0x160]
AITR  AI Script Trigger Array 0000001AEA55   0x20 [0x54]
AIWA  AI Imported Waypoint Array 000000107F03   0x20 [0x1C]
AKAA  [Akira] Adjacency Array 00000011DE77   0x20 [0x0C]
AKBA  [Akira] Side Array 0000003A2884   0x20 [0x1C]
AKBP  [Akira] BSP Node Array 0000000CF449   0x20 [0x0C]
AKDA  [Akira] Door Frame Array 0000002E5464   0x20 [0x34]
AKEV  Akira Environment 00883014DE75   0x80
AKOT  [Akira] Oct Tree 0011E7B8DA08   0x1C
AKVA  [Akira] BNV Node Array 000000DF05E0   0x20 [0x74]
BINA  Binary Data Win: 00000000DB41 
Mac: 000000015E11 
PS2: 000000015E11 
 0x10
 0x10
 0x10
CBPI  Character Body Part Impacts 000C0BF9D6C2   0xEC
CBPM  Character Body Part Material 00026BA4351F   0x54
CONS  Console 0013DA8B0BDD   0x90
CRSA  Corpse Array 000C1543D4CC   0x20 [0x44C]
DOOR  Door 00063172FD67   0x6C
DPge  Diary Page 0007BA8A686B   0x44
EDIA  Edge Index Array 00000007B6F7   0x20 [0x08]
ENVP  Env Particle Array 00000067C1C3   0x20 [0xD0]
FILM  Film 000B331B62AD   0x40 [0x18]
FXLR  FX Laser Effect 00069583F8A9   0x14
GMAN  Geometry Animation 0009A672F5A5   0x20 [0x04]
HPge  Help Page 00044B2F713B   0x10
IDXA  Index Array 00000002708F   0x20 [0x04]
IGHH  IGUI HUD Help 0008E58E58DE   0x40 [0x44]
IGPA  IGUI Page Array 0004DDBE0905   0x20 [0x04]
IGPG  IGUI Page 0011CE67887D   0x24
IGSA  IGUI String Array 0004DDBEA408   0x20 [0x04]
IGSt  IGUI String Win: 0002A2A47725 
Mac: 0002A2A47725 
PS2: 0002A2A368F7 
 0x198
 0x198
 0x1C
Impt  Impact [tree] 000000044F16   0x14
IPge  Item Page 0002938369BA   0x10
Tag Description Checksum(s) Size(s)
KeyI  Key Icons 00403F4757AD   0x30
M3GA  [Motoko] Geometry Array 0005206B20B2   0x20 [0x04]
M3GM  [Motoko] Geometry Win: 0027A078E436 
Mac: 0027A078E436 
PS2: 0016C1058961 
 0x2C
 0x2C
 0x2C
M3TA  [Motoko] Triangle Array 00000002F7C1   0x20 [0x0C]
Mtrl  Material 000000028E0D   0x14
NMSA  Network Spawn Point Array 0000000C099C   0x20 [0x10]
OBAN  Object Animation 0000004E0C24   0x80 [0x20]
OBDC  Door Class Array 0007BD9ECA0B   0x20 [0x18]
OBLS  Object LS Data 0000000B703D   0x28
OBOA  Starting Object Array 00134F8986E1   0x20 [0xF0]
OFGA  Object Furn Geom Array 001374FAC362   0x20 [0x0C]
ONCC  Oni Character Class 04A5AAC759EF   0xC98
ONCP  Oni Character Particle Array 0000002F7321   0x20 [0x58]
ONCV  Oni Character Variant 0000000299F5   0x4C
ONFA  Imported Flag Node Array 0000001B0CE7   0x20 [0x44]
ONGS  Oni Game Settings 00000226EBB6   0xF44
ONIA  Oni Character Impact Array 0000002B2F9A   0x20 [0xA4]
ONLD  Oni Game Level Descriptor 0000000412A1   0x4C
ONLV  Oni Game Level 007DB79A2EA3   0x304
ONMA  Imported Marker Node Array 000000124779   0x20 [0x58]
ONOA  Object Gunk Array 00064BE75C7C   0x20 [0x08]
ONSA  Imported Spawn Array 000000044634   0x20 [0x02]
ONSK  Oni Sky Class 0014C2261067   0xF4
ONTA  Trigger Array 000000A0FCC0   0x20 [0x1A0]
ONVL  Oni Variant List 00054434C58A   0x20 [0x04]
ONWC  Oni Weapon Class 0193A3E0EEB5   0x71C
OPge  Objective Page 00044B30BBFB   0x10
OSBD  Oni Sound Binary Data Win: 00000000DB6C 
Mac: 000000015E3C 
PS2: 000000015E3C 
 0x10
 0x10
 0x10
OTIT  Oct Tree Interior Node Array 0000000A51D2   0x20 [0x20]
OTLF  Oct Tree Leaf Node Array 0000001EAC0B   0x20 [0x24]
PLEA  Plane Equation Array 00000007BC38   0x20 [0x10]
PNTA  3D Point Array 00000037676C   0x40 [0x0C]
PSpc  Part Specification 000000082648   0x54
PSpL  Part Specification List 0000000CCC05   0x20 [0x08]
PSUI  Part Specifications UI 03CD544E96FB   0xB8
QTNA  Quad Tree Node Array 000000066ECC   0x20 [0x10]
QUDA  Quad Array 000000035E6A   0x20 [0x10]
SNDD  Sound Data Win: 000000370578 
Mac: 0000000411EB 
PS2: 0000000411EB 
 0x48
 0x18
 0x18
StNA  String Array 0005998CB520   0x20 [0x04]
SUBT  Subtitle Array 000000046C68   0x20 [0x04]
Tag Description Checksum(s) Size(s)
TMFA  Float Array 000000025324   0x20 [0x04]
TMRA  Template Reference Array 000000073521   0x20 [0x20]
TRAC  [Totoro] Animation Collection 000F26E9FB2F   0x20 [0x0C]
TRAM  Totoro Animation Sequence Win: 00107E3CC918 
Mac: 00107E3CC918 
PS2: 00000086E7B1 
 0x188
 0x188
 0x50
TRAS  Totoro Aiming Screen 0001FA21A930   0x24
TRBS  Totoro Body Set 0002A2924239   0x1C
TRCM  Totoro Quaternion Body 002392DE054E   0x68
TREX  Totoro Animation Extra Win: N/A          
Mac: N/A          
PS2: 002A2BF1612C 
 N/A
 N/A
 0x13C
TRFT  Totoro Facing Table 0000000221AF   0x20 [0x04]
TRGA  Totoro Quaternion Body Geometry Array 0005206B20F8   0x20 [0x04]
TRGE  Trigger Emitter 000871A6B93C   0x28
TRIA  Totoro Quaternion Body Index Array 0000000AC482   0x20 [0x04]
TRIG  Trigger 0021DCD0CD2C   0x74
TRMA  [Totoro] Texture Map Array 000599DE6D57   0x20 [0x04]
TRSC  [Totoro] Screen (aiming) Collection 000599786B17   0x20 [0x04]
TRTA  Totoro Quaternion Body Translation Array 0000000759E8   0x20 [0x0C]
TSFF  Font Family 000A8A6C488A   0x20 [0x04]
TSFL  Font Language 00000008DE29   0x148
TSFT  Font Win: 0016BA91DEEA 
Mac: 0016BA91DEEA 
PS2: 0016BA8D6017 
 0x420 [0x04]
 0x420 [0x04]
 0x420
TSGA  Glyph Array Win: 0000002A4E98 
Mac: 0000002A4E98 
PS2: 00000022DCA8 
 0x1408
 0x1408
 0x1408
TStr  String 0000000064A0   0x88
TURR  Turret 0049C85805BE   0x648
TXAN  Texture Map Animation 000A8B134387   0x20 [0x04]
TXCA  Texture Coordinate Array 00000009141A   0x20 [0x08]
TXMA  Texture Map Array 000599DE7F90   0x20 [0x04]
TXMB  Texture Map Big 000A8B166A52   0x20 [0x04]
TXMP  Texture Map Win: 000891187581 
Mac: 0008911EEB5F 
PS2: 00098E2E2E01 
 0xAC
 0xB0
 0xB4
TXPC  Texture Procedure Data 0000000BA77E   0x20 [0x04]
TxtC  Text Console 0001B7AC8B27   0x0C
UUEA  Error Binding Array 0000000AEEBC   0x20 [0x80]
UVDL  UV Data List 0000000A16E5   0x20 [0x40]
VCRA  3D Vector Array 000000054739   0x20 [0x0C]
WMCL  WM Cursor List 00000009D076   0x20 [0x08]
WMDD  WM Dialog Data 001C001DF3C4   0x120 [0x124]
WMM_  WM Menu 0000000C1A38   0x60 [0x44]
WMMB  WM Menu Bar 0006D20C6737   0x20 [0x04]
WPge  Weapon Page 00046F5889B5   0x10