SAV field reference
File page · Format catalogue · Schema source
This page is generated from the Kaitai schema SAV.ksy each time the site is built. The schema is the authoritative description; statements are established unless marked inferred or unknown, and the evidence is listed on the file page (see the reading guide).
- Schema: Eye of the Beholder II DOS saved games
- Byte order: little-endian
- Schema license:
MIT
Description
A saved game, EOBDATA<n>.SAV (or FINAL.SAV), is a snapshot of the game state written as seven consecutive chunks with no header: the slot description, the six characters, a block of party and world variables, every item, one record per dungeon level, three option settings and six conjured-weapon item types. Each chunk is a copy of a memory area of the game, so most of its fields are described by the runtime structure pages linked below. See the format overview and saving and restoring.
Writer and reader: the game writes the chunks in this order with these lengths; when loading, it reads the whole file and compares each chunk's length with a table of expected lengths before restoring anything. The file name is built from EOBDATA%d.SAV with the slot number, or is FINAL.SAV for slot -1.
The original EOBDATA0.SAV, 46,891 bytes, is exactly the sum of the seven lengths. Its level records chunk is byte-identical to the original LEVELS.TMP, and its level-4 record decodes to the cells of LEVEL4.MAZ. Only one saved game exists among the original files, so fields are not generalized from its values.
Checks: the reader checks only that each chunk is complete; a short chunk rejects the whole file and nothing is restored. No restored value is tested or corrected, and bytes after the seventh chunk are never read. See /eob2/saves/SAVED_GAMES#when-saving-or-loading-fails.
FINAL.SAV: written once, when a monster of a type with capability bit 0x04, other than type 0, dies on level 16, sublevel 1 (the final opponent's second form, inferred), just before the ending; the game never reads it. See /eob2/saves/SAVED_GAMES#the-end-of-the-game.
Scope: EOB II DOS only. Bytes after the seventh chunk, absent from the original file, are kept as raw data.
File structure
| Field | Type | Size, repetition and constraints |
|---|---|---|
description | strz | size 20; encoding ASCII |
characters | character | repeated 6 times |
world | world_state | size 92 |
items | item_dat::item | repeated 600 times |
level_records | level_record | size 2130; repeated 17 times |
tunes | u1 | — |
sounds | u1 | — |
bar_graphs | u1 | — |
conjured_item_types | itemtype_dat::item_type | repeated 6 times |
trailing_unknown | bytes to end of stream | — |
description
The slot description typed in the save menu, zero-terminated; the game keeps the six descriptions in a table, 20 bytes per slot. The reader skips it; the load menu reads it from each EOBDATA file to list the slots. In FINAL.SAV (slot −1) the same formula reads the 20 bytes before the table, game variables that end with the save-slot mask, not a description (bug ANOMALY-72, see /eob2/saves/SAVED_GAMES#anomaly-final-save-description). Descriptions typed in the save menu contain only the characters from space to ~, with lower-case letters turned into capitals and no leading space; bytes after the terminator are kept from the previous contents. How the game shows other byte values found in a file is unknown. File offset 0x0000.
characters
The six party slots, 0x159 bytes each, from file offset 0x0014. See CharacterRuntime for the fields; the type below separates only what the saved form changes.
world
The 92-byte block of party and world variables, from file offset 0x082a.
items
The whole item table, 600 records of 14 bytes, from file offset 0x0886. The records have the layout of ITEM.DAT items; see ItemRuntime.
level_records
One 0x852-byte record per level, record n − 1 for level n, from file offset 0x2956: the same image as LEVELS.TMP (see LEVELS_TMP.ksy). Only records whose bit is set in world.level_record_bits are used; the others can hold leftover data, as 16 of the 17 records of EOBDATA0.SAV do.
tunes
The "Tunes" option (low byte of the game's option word). File offset 0xb6c8. 1 in EOBDATA0.SAV.
sounds
The "Sounds" option (low byte of the game's option word). File offset 0xb6c9. 1 in EOBDATA0.SAV.
bar_graphs
The "Bar Graphs" option. File offset 0xb6ca. 1 in EOBDATA0.SAV.
conjured_item_types
Item types 51 to 56 of the item-type table, from file offset 0xb6cb. The game reserves them at run time for conjured weapons; a type whose defense adjustment byte is -30 (0xe2) is free, as all six are in EOBDATA0.SAV.
trailing_unknown
Data after file offset 0xb72b, unknown, kept verbatim. Empty in EOBDATA0.SAV; the reader does not read past this point.
Type character
One character record (0x159 bytes) as written by the save writer. The layout is that of CharacterRuntime; only the fields that the saved form treats specially are separated.
| Field | Type | Size, repetition and constraints |
|---|---|---|
fields_000 | 36 bytes | — |
portrait | s1 | — |
fields_025 | 16 bytes | — |
face_image_pointer | u4 | — |
fields_039 | 218 bytes | — |
timers_remaining | u4 | repeated 10 times |
fields_13b | 30 bytes | — |
fields_000
See CharacterRuntime, offsets 0x00–0x23.
portrait
Portrait number at +0x24. The reader redraws the portrait from CHARGENA.CPS when it is 0 or more, and from OUTPORTS.CPS, image −(portrait + 1), when it is negative.
fields_025
See CharacterRuntime, offsets 0x25–0x34 (food at 0x25).
face_image_pointer
A run-time far pointer to the portrait image (+0x35), written as it was in memory. The reader ignores it and keeps the pointer already in memory.
fields_039
See CharacterRuntime, offsets 0x39–0x112: spell slots, known spells, inventory.
timers_remaining
The ten character timers (+0x113), saved as the number of counter ticks left, 1 for a timer that was already due, and 0 for an unused one. The reader adds the current counter to each nonzero value.
fields_13b
See CharacterRuntime, offsets 0x13b–0x158: timer events and other state.
Type world_state
The block of variables starting at the current level. Field names are descriptive.
| Field | Type | Size, repetition and constraints |
|---|---|---|
level | u2 | — |
sublevel | u2 | — |
party_block | u2 | — |
party_direction | u2 | — |
held_item | u2 | — |
level_record_bits | u4 | — |
party_spell_effects | u4 | — |
unknown_6de0 | u1 | — |
rest_refused | u1 | — |
level_flags | u4 | repeated 17 times |
global_flags | u4 | — |
level
Current level. 4 in EOBDATA0.SAV.
sublevel
Current sublevel of the INF file. 0 in EOBDATA0.SAV.
party_block
Block index of the party, column = index mod 32, row = index div 32. 171, cell [11:05], in EOBDATA0.SAV.
party_direction
Party direction, 0 north, 1 east, 2 south, 3 west (see /eob2/enums/DIRECTION). 2 (south) in EOBDATA0.SAV.
held_item
Item held with the mouse, 0 for none.
level_record_bits
Bit n − 1 set when level n has a record. Only bit 3 (level 4) in EOBDATA0.SAV.
party_spell_effects
Lasting spell effects of the whole party, a SpellEffectFlags mask. 0 in EOBDATA0.SAV.
unknown_6de0
Saved and restored with this block but never read or written otherwise; its role, if any, is unknown. 0 in EOBDATA0.SAV.
rest_refused
Rest refusal flag; nonzero forbids resting.
level_flags
Script flags of each level, four bytes per level.
global_flags
Global script flags.
Type level_record
The record of one level (0x852 bytes), packed when the party leaves the level and unpacked when it returns. It keeps what changes during play; the rest of each block is rebuilt from the level files when the level loads. See saving and restoring.
| Field | Type | Size, repetition and constraints |
|---|---|---|
walls_packed | 1200 bytes | — |
monster_slots | 30 bytes | repeated 30 times |
temporary_walls | temporary_wall | repeated 5 times |
walls_packed
The four wall references of the 1,024 blocks, 4,096 bytes in block order, packed with the type-4 (LCW) method of CPS.ksy into at most 0x4b0 bytes; the game decodes it with the same routine as type-4 containers. The walls are stored as they are, not as a difference from the map: the level-4 record of EOBDATA0.SAV decodes to the cells of LEVEL4.MAZ. Bytes after the end of the packed stream are unknown and not used.
monster_slots
The 30 monster slots of the level, copied verbatim; see MonsterRuntime. Record offset 0x4b0.
temporary_walls
The five temporary-wall slots. Record offset 0x834.
Type temporary_wall
| Field | Type | Size, repetition and constraints |
|---|---|---|
block | u2 | — |
ticks_remaining | u4 | — |
block
Block index of the temporary wall; 0 for a free slot.
ticks_remaining
Counter ticks left before the wall disappears, or 1 when it was already due when the record was made (free slots included).