Persist.dat: Difference between revisions

From OniGalore
Jump to navigation Jump to search
("New Info" - level unlocks >31)
(attempting to fix table... table not fixed, table replaced :))
Line 1: Line 1:
==Unlocking more levels==
==Unlocking more levels==
To unlock (all) of the levels, fill the range 0x08 to 0x28 with "FF". So far this has caused no problems, and allows you to add more levels to the game. Levels will not be visible unless there is a corrisponding LevelX_Final.dat in the Gamedata folder, and an ONLD that matches the level number in the level0_final.dat. Levels abouve 39 are not currently unlockable due to the 40 level savepoint limit in the persist.dat (probably reflecting an underlying engine restriction).
To unlock (all) of the levels, fill the range 0x08 to 0x28 with "FF". So far this has caused no problems, and allows you to add more levels to the game. Levels will not be visible unless there is a corrisponding LevelX_Final.dat in the Gamedata folder, and an ONLD that matches the level number in the level0_final.dat. Levels above 39 are not currently unlockable due to the 40 level savepoint limit in the persist.dat (probably reflecting an underlying engine restriction).


==Header==
==Header==


[[Image:Persist_header.gif]]
[[Image:Persist_header.gif]]
<TABLE BORDER=0 WIDTH=100% CELLPADDING=2 CELLSPACING=1 BGCOLOR="#000000">
 
<TR BGCOLOR="#FFDDBB" ALIGN=CENTER><TD WIDTH=15%><B>Hex</B><TD WIDTH=15%><B>Translation</B><TD WIDTH=70%><B>Meaning</B></TR>
{{Table}}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">0F 00 00 00<TD>15<TD ALIGN=LEFT>unknown; maybe 15 levels available; don't alter it or you'll lose all your settings</TR>
{{OBDth}}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">0E 0B D0 D0<TD>unknown<TD ALIGN=LEFT>unknown</TR>
{{OBDtr| 0x00 | int32 |FF0000| 0F 00 00 00 | 15         | version }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">5C 7F 0C 00<TD>819036<TD ALIGN=LEFT>the levels that are visible in the "load game" list; it's a bitset; the following bits are possible:<P>
{{OBDtr| 0x04 | int32 |FF0000| 0E 0B D0 D0 | 0xD0D00B0E | signature }}
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
{{OBDtr| 0x08 | int32 |FF0000| 5C 7F 0C 00 | 0x000C7F5C | level unlock data for levels 0-31; each level has a corresponding bit:
Level unlock data for 0-31
:0x'''01''' 00 00 00 - level 0 (always unlocked, ignored)
<TR VALIGN=TOP><TD ALIGN=RIGHT>1 -&nbsp;<TD>level 0*</TR>
:0x'''02''' 00 00 00 - level 1 (always unlocked, ignored)
<TR VALIGN=TOP><TD ALIGN=RIGHT>2 -&nbsp;<TD>level 1*</TR>
:0x'''04''' 00 00 00 - level 2
<TR VALIGN=TOP><TD ALIGN=RIGHT>4 -&nbsp;<TD>level 2</TR>
:...
<TR VALIGN=TOP><TD ALIGN=RIGHT>... -&nbsp;<TD>...</TR>
:0x00 00 '''08''' 00 - level 19 }}
<TR VALIGN=TOP><TD ALIGN=RIGHT>524288 -&nbsp;<TD>level 19</TR>
{{OBDtr| 0x0C | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 32-63 }}
</TABLE>*) level 0 and 1 are always visible, so these bits aren't used
{{OBDtr| 0x10 | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 64-95 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 31-63
{{OBDtr| 0x14 | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 96-127 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 63-95
{{OBDtr| 0x18 | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 128-159 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 95-127
{{OBDtr| 0x1C | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 160-191 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 127-159
{{OBDtr| 0x20 | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 192-223 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 159-191
{{OBDtr| 0x24 | int32 |FF0000| 00 00 00 00 |      | level unlock data for levels 224-255 }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 191-224
{{OBDtr| 0x28 | int32 |FFFF00| 01 00 00 00 1   | killed Griffin (0 <nowiki>=</nowiki> no, 1 <nowiki>=</nowiki> yes) }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF0000">00 00 00 00<TD>&nbsp;<TD ALIGN=LEFT>Level unlock data for 191-255
{{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]] }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFFF00">01 00 00 00<TD>1<TD ALIGN=LEFT>killed griffin (0 = no, 1 = yes)
{{OBDtr| 0x30 |      |00FFFF| 1F 00 00 00 31 | unlocked items; one bit for each item type (hypo, ammo etc.)  }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#00FF00">FE 1B 00 00<TD>7166<TD ALIGN=LEFT>unknown, but it's a bitset
{{OBDtr| 0x34 |      |FF00FF| 13 00 00 00 19 | last read diary page (level) }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#00FFFF">1F 00 00 00<TD>31<TD ALIGN=LEFT>unknown
{{OBDtr| 0x38 |      |FFC8C8| 01 00 00 00 1   | last read diary page (page) }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FF00FF">13 00 00 00<TD>19<TD ALIGN=LEFT>unknown
{{OBDtr| 0x3C | int32 |FFFFC8| 04 00 00 00 4   | level of detail; the following options are possible:
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC8C8">01 00 00 00<TD>1<TD ALIGN=LEFT>unknown
:0 - extra low
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFFFC8">04 00 00 00<TD>4<TD ALIGN=LEFT>level of detail; the following options are possible (values in dec):<br>0 - extra low<BR>1 - low<BR>2 - medium<BR>3 - high<BR>4 - extra high
:1 - low
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#C8FFC8">00 00 80 3F<TD>1.000000<TD ALIGN=LEFT>music volume (0.0 = min, 1.0 = max)
:2 - medium
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#C8FFFF">06 00 00 00<TD>6<TD ALIGN=LEFT>subtitles / invert mouse / cheats as  a bitset; the following bits are possible (values in dec):<br>1 - show subtitles<BR>2 - invert mouse<BR>4 - enable cheats
:3 - high
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC8FF">02 00 00 00<TD>2<TD ALIGN=LEFT>difficulty; the following options are possible:<br>0 - easy<BR>1 - medium<BR>2 - hard
:4 - extra high }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC800">20 03<TD>800<TD ALIGN=LEFT>resolution: width
{{OBDtr| 0x40 | float |C8FFC8| 00 00 80 3F | 1.0  | music volume (0.0 <nowiki>=</nowiki> min, 1.0 <nowiki>=</nowiki> max) }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#FFC800">02 58<TD>600<TD ALIGN=LEFT>resolution: height
{{OBDtr| 0x44 | int32 |C8FFFF| 06 00 00 00 | 6   | option flags; the following values are possible:
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#C800C8">20 00 00 00<TD>32<TD ALIGN=LEFT>color depth
:0x'''01''' 00 00 00 - show subtitles
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#C87C64">00 00 00 3F<TD>0.500000<TD ALIGN=LEFT>brightness (0.0 = min, 1.0 = max
:0x'''02''' 00 00 00 - invert mouse
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#B0C3D4">03 00 00 00<TD>3<TD ALIGN=LEFT>last saved level
:0x'''04''' 00 00 00 - game won (aka cheats enabled) }}
<TR VALIGN=TOP ALIGN=CENTER BGCOLOR="#FFEEDD"><TD BGCOLOR="#E7CEA5">02 00 00 00<TD>2<TD ALIGN=LEFT>last saved savepoint
{{OBDtr| 0x48 | int32 |FFC8FF| 02 00 00 00 | 2   | difficulity; the following values are possible:
:0 - easy
:1 - medium
:2 - hard }}
{{OBDtr| 0x4C | int16 |FFC800| 20 03       | 800 | resolution: width }}
{{OBDtr| 0x4E | int16 |FFC800| 02 58       | 800 | resolution: height }}
{{OBDtr| 0x50 | int16 |C800C8| 20 00       | 32 | color depth }}
{{OBDtr| 0x52 |      |C800C8| 00 00      |    | padding }}
{{OBDtr| 0x54 | float |C87C64| 00 00 00 3F | 0.5 | gamma correction (0.0 <nowiki>=</nowiki> min, 1.0 <nowiki>=</nowiki> max) }}
{{OBDtr| 0x58 | int32 |B0C3D4| 03 00 00 00 | 3   | last saved level }}
{{OBDtr| 0x5C | int32 |E7CEA5| 02 00 00 00 | 3  | last saved savepoint }}
|}
 
 
This header is followed by an array of 400 savepoints (40 levels, 10 savepoints per level). The size of a savepoint is 516 bytes so the array size is 206400 bytes.

Revision as of 07:23, 25 August 2008

Unlocking more levels

To unlock (all) of the levels, fill the range 0x08 to 0x28 with "FF". So far this has caused no problems, and allows you to add more levels to the game. Levels will not be visible unless there is a corrisponding LevelX_Final.dat in the Gamedata folder, and an ONLD that matches the level number in the level0_final.dat. Levels above 39 are not currently unlockable due to the 40 level savepoint limit in the persist.dat (probably reflecting an underlying engine restriction).

Header

Persist header.gif

Offset Type Raw Hex Value Description
0x00 int32 0F 00 00 00 15 version
0x04 int32 0E 0B D0 D0 0xD0D00B0E signature
0x08 int32 5C 7F 0C 00 0x000C7F5C level unlock data for levels 0-31; each level has a corresponding bit:
0x01 00 00 00 - level 0 (always unlocked, ignored)
0x02 00 00 00 - level 1 (always unlocked, ignored)
0x04 00 00 00 - level 2
...
0x00 00 08 00 - level 19
0x0C int32 00 00 00 00 level unlock data for levels 32-63
0x10 int32 00 00 00 00 level unlock data for levels 64-95
0x14 int32 00 00 00 00 level unlock data for levels 96-127
0x18 int32 00 00 00 00 level unlock data for levels 128-159
0x1C int32 00 00 00 00 level unlock data for levels 160-191
0x20 int32 00 00 00 00 level unlock data for levels 192-223
0x24 int32 00 00 00 00 level unlock data for levels 224-255
0x28 int32 01 00 00 00 1 killed Griffin (0 = no, 1 = yes)
0x2C 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
0x30 1F 00 00 00 31 unlocked items; one bit for each item type (hypo, ammo etc.)
0x34 13 00 00 00 19 last read diary page (level)
0x38 01 00 00 00 1 last read diary page (page)
0x3C int32 04 00 00 00 4 level of detail; the following options are possible:
0 - extra low
1 - low
2 - medium
3 - high
4 - extra high
0x40 float 00 00 80 3F 1.0 music volume (0.0 = min, 1.0 = max)
0x44 int32 06 00 00 00 6 option flags; the following values are possible:
0x01 00 00 00 - show subtitles
0x02 00 00 00 - invert mouse
0x04 00 00 00 - game won (aka cheats enabled)
0x48 int32 02 00 00 00 2 difficulity; the following values are possible:
0 - easy
1 - medium
2 - hard
0x4C int16 20 03 800 resolution: width
0x4E int16 02 58 800 resolution: height
0x50 int16 20 00 32 color depth
0x52 00 00 padding
0x54 float 00 00 00 3F 0.5 gamma correction (0.0 = min, 1.0 = max)
0x58 int32 03 00 00 00 3 last saved level
0x5C int32 02 00 00 00 3 last saved savepoint


This header is followed by an array of 400 savepoints (40 levels, 10 savepoints per level). The size of a savepoint is 516 bytes so the array size is 206400 bytes.