Jump to content

Oni (folder)/persist.dat: Difference between revisions

improved phrasing for diary page fields, added a table for the item bits
m (there was nothing wrong with the native page title)
(improved phrasing for diary page fields, added a table for the item bits)
Line 1: Line 1:
The persist.dat file is the save-game and preference file for Oni. It can be edited most easily with GUI tools such as [[OSGE]] for Windows and [http://mods.oni2.net/node/155 OniLib] for Mac, though [[OBD]]-style hex-based documentation of this file is given below.
{{UpdatedForOniX|1.0.0}}
persist.dat, found next to the game application, is the save-game and preference file for Oni. It can be edited most easily with GUI tools such as [[OSGE]] for Windows and [http://mods.oni2.net/node/155 OniLib] for Mac, though [[OBD]]-style hex-based documentation of this file is given below.


The persist.dat file has nothing to do with Oni's [[Dat|.dat level files]] despite the ".dat" extension (it looks like Bungie West simply used .dat for every kind of file Oni read and wrote – saved_film####.dat, lvl_#_###_corpse.dat, etc. – until they later added .raw and then .sep as unique suffixes when they needed to break out some resource data from levelX_Final.dat).
The persist.dat file has nothing to do with Oni's [[Dat|.dat level files]] despite the ".dat" extension (it looks like Bungie West simply used .dat for every kind of file Oni read and wrote – saved_film####.dat, lvl_#_###_corpse.dat, etc. – until they later added .raw and then .sep as unique suffixes when they needed to break out some resource data from levelX_Final.dat).
Line 6: Line 7:
As players of Oni are well aware, the game does not allow arbitrary saving ("save anywhere"), but relies on the use of fixed save points activated by reaching certain places in each level, at which point the level scripting uses the [[BSL]] function <tt>save_game</tt> to mark your progress. This means that by deciding on a maximum number of levels and save points, Bungie West could store the total state of the player's progress in a fixed-size file – 206,496 bytes, to be exact.
As players of Oni are well aware, the game does not allow arbitrary saving ("save anywhere"), but relies on the use of fixed save points activated by reaching certain places in each level, at which point the level scripting uses the [[BSL]] function <tt>save_game</tt> to mark your progress. This means that by deciding on a maximum number of levels and save points, Bungie West could store the total state of the player's progress in a fixed-size file – 206,496 bytes, to be exact.


As you will see below, many aspects of the game world are ''not'' saved in persist.dat; essentially, anything not pertaining to Konoko herself, such as the position of AIs and the presence of power-ups on the ground. What <u>is</u> stored is Konoko's position, health and inventory. Everything else is essentially hardcoded by the level scripting and will always be put in the same place when that save point is loaded.
As you will see below, many aspects of the game world are ''not'' saved in persist.dat; essentially, anything not pertaining to Konoko herself, such as the position of AIs and the presence of power-ups on the ground. What <u>is</u> stored is Konoko's position, health and inventory. Everything else is determined by the level scripting and the game data, and will always be in the same place when that save point is loaded.


==Game preferences==
==Game preferences==
Line 43: Line 44:
{{OBDtr| 0x24 | int32 |FF0000| 00 00 00 00 |      | level unlock flags for levels 224-255 }}
{{OBDtr| 0x24 | int32 |FF0000| 00 00 00 00 |      | level unlock flags for levels 224-255 }}
{{OBDtr| 0x28 | int32 |FFFF00| 01 00 00 00 |  1  | killed Griffin (0 <nowiki>=</nowiki> no, 1 <nowiki>=</nowiki> yes) }}
{{OBDtr| 0x28 | int32 |FFFF00| 01 00 00 00 |  1  | killed Griffin (0 <nowiki>=</nowiki> no, 1 <nowiki>=</nowiki> yes) }}
{{OBDtr| 0x2C |      |00FF00| FE 1B 00 00 | 7166 | unlocked weapons; one bit for each weapon; the number of corresponding bit is given by the skill index value in the primary firing mode block of each [[ONWC]] }}
{{OBDtr| 0x2C |      |00FF00| FE 1B 00 00 | 7166 | unlocked diary weapon pages, one bit for each weapon; these bits match the skill index values in the primary firing mode block of each [[ONWC]] (see 0x13E in ONWC for the weapon table) }}
{{OBDtr| 0x30 |      |00FFFF| 1F 00 00 00 |  31  | unlocked items; one bit for each item type (hypo, ammo etc.) }}
{{OBDtr| 0x30 |      |00FFFF| 1F 00 00 00 |  31  | unlocked diary item pages; one bit for each item type:
:0x'''01''' 00 00 00 - ballistic ammo
:0x'''02''' 00 00 00 - energy ammo
:0x'''04''' 00 00 00 - hypo
:0x'''08''' 00 00 00 - force shield
:0x'''10''' 00 00 00 - phase cloak
:0x'''20''' 00 00 00 - LSI (unused because LSIs are level-specific and the diary page for an LSI can only be read while it's in your inventory) }}
{{OBDtr| 0x34 |      |FF00FF| 13 00 00 00 |  19  | last read diary page (level) }}
{{OBDtr| 0x34 |      |FF00FF| 13 00 00 00 |  19  | last read diary page (level) }}
{{OBDtr| 0x38 |      |FFC8C8| 01 00 00 00 |  1  | last read diary page (page) }}
{{OBDtr| 0x38 |      |FFC8C8| 01 00 00 00 |  1  | last read diary page (page) }}