Save file format
This page describes the save format used by Arx Fatalis and Arx Libertatis.
See Common file format types for a description of the type names used here.
Save files are stored in a generic container that maps names (arbitrary strings) to chunks of data. This page only describes the format of the files inside that container.
These structures are filled and parsed in
src/scene/ChangeLevel.cpp and described in
src/scene/SaveFormat.h in Arx Libertatis.
Savegame info (pld)
The savegame info file called "pld" consist of a single structure:
|f32||Savegame data version|
|1024 B||(padding - always 0)|
Savegame data version specifies the version number of this savegame info structure. Currently this value is always
The version is followed by the user-supplied name for the savegame. The special name
"ARX_QUICK_ARX" is used for quicksaves. Arx Fatalis and older Arx Libertatis versions also used
"ARX_QUICK_ARX1" for the second quicksave.
The current level specifies the number of the level in which the player resided when the savegame was last updated. This number can be padded to 3 digits with leading zeros and prepended with
"lvl" to get the level file (
The current time is the in-game time when the savegame was last updated. This is the total number of in-game milliseconds since the game start. Game-type may be paused or slowed down/sped up by spells.
Player state (player)
Global script state (globals)
Level state (lvl<number>)
To get the filename for the state of a level pad the level number to 3 digits with leading zeros and prepended that with
|f32||Level status version|
|s32||Interactive object count|
|s32||Light status count|
|s32||Ambiance data size|
|gmods||Saved graphics modes|
|gmods||Current graphics modes|
|gmods||Desired graphics modes|
|8192 B||(padding - always 0)|
Level status version specifies the version number of this level status file. Currently this value is always
Game time is the in-game time in milliseconds when this level was last saved.
gmods type contains:
|136 B||(padding - always 0)|
Flags is a bitwise combination of:
|1<<0||Use depth color|
|1<<1||Use clip distance|
Depth color is used as the fog / background color for the level.
Clip distance is used to adjust the camera far plane.
Current graphics modes are the active modes and
desired graphics modes are modes that the game is fading to.
The header is followed by
interactive object count object index entries,
path count path status entries,
ambiance data size bytes of ambiance data and
light status count light status entries.
Object Index Entries
Path Status Entries
Light Status Entries
Entity state (<class>_<instance>)