18,700
edits
m (→Data storage: better explanation of 8+3 names and INDEX.DIR) |
(details on scripting differences; slight reorganization of page) |
||
Line 34: | Line 34: | ||
* The text of the PS2 credits is somewhat different; see [[Quotes/Credits#PS2_outro_differences|HERE]] for details. | * The text of the PS2 credits is somewhat different; see [[Quotes/Credits#PS2_outro_differences|HERE]] for details. | ||
== | ==Directories== | ||
The root directory of the PS2 CD-ROM is roughly equivalent to the [[Oni (folder)|Oni folder]] of a Windows or Mac installation. This isn't clear at first, as the names of the files and folders are represented by numbers. Most of Oni's original file and folder names would be too long for a PS2 disc's ISO 9660 Level 1 file system, which employs [[wp:8.3 filename|8+3 naming]]. Thus, the actual names for these files are given in plain-text directory listings named INDEX.DIR alongside the renamed files. The game executable reads these .DIR files at runtime to find the desired file/folder. Here is the directory tree with de-indexed names: | The root directory of the PS2 CD-ROM is roughly equivalent to the [[Oni (folder)|Oni folder]] of a Windows or Mac installation (see subsections below for exceptions). This similarity isn't clear at first, as the names of the files and folders are represented by numbers. Most of Oni's original file and folder names would be too long for a PS2 disc's ISO 9660 Level 1 file system, which employs [[wp:8.3 filename|8+3 naming]]. Thus, the actual names for these files are given in plain-text directory listings named INDEX.DIR alongside the renamed files. The game executable reads these .DIR files at runtime to find the desired file/folder. Here is the directory tree with de-indexed names: | ||
{|border=1 cellspacing=0 style="font-size:75%" | {|border=1 cellspacing=0 style="font-size:75%" | ||
|- | |- | ||
Line 126: | Line 127: | ||
|} | |} | ||
===Raw and separate files=== | |||
Although the GameDataFolder generally matches the PC version, one notable exception is that raw and separate files are tucked away into '''raw''' and '''sep''' directories. | |||
===Palette files=== | |||
There is also a '''pal''' directory holding a set of '''level#_palette.pal''' files (one per level); in PS2 Oni, all the textures (TXMP files) use compact 8-bit storage (i.e., each pixel is an index into a palette of 256 colors), as opposed to Windows and Mac TXMPs which typically use 16- or 24-bit color. | |||
===Relic files=== | |||
*'''intro.bik''' and '''outro.bik''' are not used by the engine (they're superseded by '''INTRO2.PSS''' and '''OUTRO.PSS'''); they're just taking up 56 MB of storage space for nothing (the .PSS versions take up another 188 MB). | *'''intro.bik''' and '''outro.bik''' are not used by the engine (they're superseded by '''INTRO2.PSS''' and '''OUTRO.PSS'''); they're just taking up 56 MB of storage space for nothing (the .PSS versions take up another 188 MB). | ||
*persist.dat and PERSIST.DAT are | *The [[persist.dat|save-game]] files '''persist.dat''' and '''PERSIST.DAT''' are little-endian (i.e., created in Windows or on a PS2 dev unit) and are byte-identical to each other. Actual save data is stored in a standard PS2 format on the memory card (obviously the game cannot write to files on disc). They might be a development relic of the PS2 port since they are much smaller than a PC persist.dat (also, one is named in all-caps like the other files Rockstar added to the game directory). | ||
==Binary data format== | |||
The internal structure of '''level#_Final.dat''' and the corresponding '''.raw''' and '''.sep''' is compliant with the "VR31" iteration of instance files, although many resources were optimized for minimal storage space (textures use indexed colors, character animations has been split into a trimmed-down TRAM and an "extra" instance TREX that only exists for combat moves and such, etc.). These deviations in PS2 resource formats are covered by the [[OBD:PS2]] page. | |||
Sounds are encoded using Sony's VAG format/codec, and (unlike for other Oni versions) their waveform data isn't stored in '''level#_Final.raw''' (see [[OBD:SNDD#PS2 implementation|SNDD]]). Instead the SNDD instances in '''level#_Final.dat''' contain links to '''SOUNDS/LEVEL#/SOUND.DAT''', which in turn references waveform data stored either in '''SOUNDS/LEVEL#/SOUND.SEP''' (raw VAG data without any headers) or '''SOUNDS/LEVEL#/SOUND.RAW''' (raw VAG data with minimal headers to allow the lookup of each sound). The three '''BINK#.VAG''' files are beep-like sounds picked from Oni's game data (SNDDbeep43, SNDDbeep24 and SNDDbeep23, respectively); they have a VAG header and are valid sounds for VAG-capable apps. | |||
==Level scripts== | |||
The PS2 IGMD includes the same pre-beta folders as the [[European Mac releases]]: scripting logic intended for now-missing chapters and test levels. Some "test" subfolders are present for '''EnvWarehouse''' and '''manplant''', with backups of the scripts for levels 1 and 2. When it comes to the Windows/Mac differences in the [[Oni (folder)/GameDataFolder/IGMD/tctf_ii|tctf_ii]] folder, the scripts match the Windows versions (although the folder is named "tctf_II" with capital 'i's in the INDEX.DIR). However, the PS2 scripts have differences of their own: | |||
*Many "sleep" commands have been added or removed to adjust cutscene timing. | |||
*Two dialogue lines in compound.bsl have been renamed, and in a number of places where dialogue is played, a short sleep command and a new dialogue line appear to be added afterward (see compound.bsl, lab_cutscene.bsl and warehouse_train2.bsl); could these be original lines split into two pieces? | |||
*A BSL function called gs_nearclipplane_set was added so that it could be called from warehouse_cutscene.bsl. | |||
*"input 1" isn't called at the beginning of Chapter 1 until after Shinatama introduces the HUD at the end of the intro, rather than before. | |||
*A possible fix in manplant_level_logic.bsl that disables the trigger volume for SP2 when SP3 is loaded (can it be reached by backtracking?). | |||
*A possible fix in roof.bsl that sets an objective when SP4 is loaded. | |||
*The PS2 version of BSL implements at least two new script variables, '''psx2_ambient2''' and '''psx2_directional2''' (both of them floats). They appear to be white light intensities (i.e., shades of gray) used for the Gouraud shading of characters and other M3GM (powerups, weapons, furniture, animated objects). In Windows/Mac Oni there is no possibility to adjust ambient or directional light intensities through scripts: the main directional light has intensity 0.7, the auxiliary directional light (turned on at higher quality settings) has intensity 0.3, and the ambient intensity is either 0.65 or 0.55 (larger if one directional light, smaller if two directional lights). | |||
==Patches== | ==Patches== |