INF field reference
File page · Format catalogue · Schema source
This page is generated from the Kaitai schema INF.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 INF decoded level data
- Byte order: little-endian
- Schema license:
MIT
Description
An INF file holds everything a level needs besides its wall grid: the names of its map, graphics and sound resources, its doors, its monster types, its wall mappings and decorations, its timed scripts, its initial monsters, its script program and the bindings that attach scripts and events to cells. See the format overview.
The file is stored in the CPS container (CPS.ksy) and must be decoded first; offsets in this schema are relative to the decoded payload. The payload starts with one or more linked sublevel records, each selecting a MAZ map and its resources, followed by a level-state section with the initial monster slots, the script data and the cell bindings. Monster type properties and initial slots differ from the runtime monster structure, MonsterRuntime.
Validation: the game's loader checks no offset, count or index. Every marker is a single equality test (two values for a door record), so any value other than the tested one takes the other branch. Offsets and counts are used as given, counts compared as signed, so a count with the high bit set reads nothing; indices are multiplied into their tables without a bound. The 16 original files stay within every table. The fields below give what each out-of-range value addresses.
File structure
| Field | Type | Size, repetition and constraints |
|---|---|---|
level_state_offset | u2 | — |
remaining_data | bytes to end of stream | — |
level_state_offset
Decoded-payload offset of a later section containing monster and script-related data. Its first word locates the final cell bindings. The game uses it as given, without a check.
remaining_data
Raw bytes after the first offset, preserved for unknown structures and scripts. Sublevel records can be inspected through the first_sublevel instance; this raw field prevents loss of uninterpreted content.
Derived values and positioned data:
| Field | Type | Size, repetition and constraints |
|---|---|---|
first_sublevel | sublevel(2) | at position 2 |
level_state | level_state | at position level_state_offset |
cell_bindings | bindings | at position level_state.bindings_offset |
first_sublevel
First linked sublevel record, at decoded offset 2.
level_state
Later level-state section with initial monster data and raw scripts.
cell_bindings
Final counted cell-binding array of the original files.
Type sublevel
Parameters: start_offset (u4)
| Field | Type | Size, repetition and constraints |
|---|---|---|
next_offset | u2 | — |
marker | u1 | — |
maze_name_slot | 13 bytes | only if marker == 0xec |
graphics_name_slot | 13 bytes | only if marker == 0xec |
palette_marker | u1 | only if marker == 0xec |
palette_name_slot | 13 bytes | only if marker == 0xec and palette_marker != 0xff |
sound_name_slot | 13 bytes | — |
doors | door_slot | repeated 2 times |
steps_until_script | u2 | — |
monster_graphics | monster_graphics_slot | repeated 2 times |
monster_types | monster_type_entry | repeated until _.type_index == 0xff |
decoration_section_marker | u1 | — |
num_decoration_entries | u2 | only if decoration_section_marker == 0xec |
decoration_entries | decoration_entry | repeated num_decoration_entries times; only if decoration_section_marker == 0xec |
script_timers | script_timer | repeated until _.target_raw == 0xffff |
next_offset
Offset relative to decoded payload offset 2. In the original files it points to the next sublevel record, or to the boundary immediately before the later section for the last record. The game selects record n by following this word n times from the first record, without a bound check; n is the sublevel argument of the level loader, from the level-change script instruction, the saved game or 0 for a new game. The game itself defines no termination rule.
marker
0xec marks a record with map, graphics and palette names; any other value skips them, and the sound name follows the marker directly. Every original record has 0xec.
maze_name_slot
A zero-terminated MAZ filename stored in a 13-byte slot. Remaining bytes after the first zero are preserved because padding contents are not necessarily zero.
graphics_name_slot
Zero-terminated base name of the level graphics, the VMP and associated visual resources. Stored as a raw 13-byte slot, including any bytes after the first zero.
palette_marker
0xff takes the palette from the graphics name; any other value is followed by a palette-name slot. The name gets the suffix .PAL, or .EGA in one display mode. Values in the original files: 0xff (16 records) and 1 (6).
palette_name_slot
Palette base name, present when palette_marker is not 0xff. Preserved as a 13-byte slot; trailing bytes may be nonzero.
sound_name_slot
Sound resource base name, matching the ADL and SND names of the original files. The slot is preserved raw and does not mandate a particular suffix. The game passes it to the sound-file loader, which opens name.ADL with sound driver 1 or name.SND with drivers 2 and 3 and takes its first 120 bytes as the sound-effect table; see the sound-effect table. This field and all the following ones are read whatever the record marker: the marker test skips only the map, graphics and palette names. Every original record has marker 0xec.
doors
The level's two door records. See doors.
steps_until_script
Number of party moves before the step-triggered script. The game stores this word and clears the step counter when the record is read. It dispatches BLOCK_EVENT_STEP_COUNT to block 0, the cell at column 0, row 0, when the value is nonzero and the counter is strictly greater, then clears the counter. Zero disables the check. The values in the original files are 0 or 20–100. See time and state and BlockEventMask.
monster_graphics
Optional graphics resource slots; their base names match CPS files of the original game. Not monster instances or complete type definitions.
monster_types
Variable-length monster type definitions, ending with an entry whose index is 0xff. A sublevel may have no definitions. This terminator is part of the sequence, not a monster type.
decoration_section_marker
0xec introduces a counted sequence of decoration resources and wall mappings; other values skip it.
num_decoration_entries
Number of following decoration resource and wall mapping entries. Compared as signed, so a value with the high bit set reads no entry.
decoration_entries
Ordered entries selecting decoration resources or mapping a wall index to visual and behavioral properties.
script_timers
Timed-script entries following the decoration section, ending with a 0xffff target. The game reads the target and interval as two words and advances past the terminator. There is no limit on the number of entries; the game's table of 8-byte records has room for 9 before the next data it addresses (inferred). The original sublevels have 0 to 2. Intervals count in units of 18 ticks of the game's shared counter, which advances about 18.2 times per second, so roughly in seconds (inferred). See time and state.
Derived values and positioned data:
| Field | Type | Size, repetition and constraints |
|---|---|---|
next_sublevel | sublevel(2 + next_offset) | only if 2 + next_offset < _root.level_state_offset and 2 + next_offset > start_offset; at position 2 + next_offset |
next_sublevel
Traversal to the next record when its offset advances and lies before the later section. This stop rule belongs to the schema only: for sublevel n the game follows the offset word exactly n times (n of 0 or less selects the first record), with no check, and reads whatever bytes it reaches as a record. In the original files, six levels (1, 3, 7, 8, 11, 16) have a second record, naming the same map, graphics, palette and sound as the first but other monster images and types, doors, wall mappings, decorations, step limit and timers. Their level scripts select it for part of the level; all records share the level-state section and the cell bindings. See sublevels.
Type script_timer
| Field | Type | Size, repetition and constraints |
|---|---|---|
target_raw | u2 | — |
interval | u2 | only if target_raw != 0xffff |
target_raw
Block index receiving the timed event; 0xffff ends the list and has no interval. The game passes it with the timer event mask to the block dispatcher, without a check; the dispatcher multiplies it by 10 in 16 bits, so any value addresses some word of the data segment. See BlockEventMask.
interval
Interval of the timer. The game multiplies it by 18, keeps the low 16 bits, sign-extends the result and adds it to a 32-bit counter to form the first deadline. On expiry, it repeats the signed 16-bit addition to the current counter, which advances about 18.2 times per second (see the game clock). The comparison is unsigned and strict. So the period is the signed 16-bit value of (18 × interval) mod 65536 ticks: values above 1820 give a negative period, with which the event is sent at every pass once the counter exceeds its size (and never before), and from 3641 the period is short again. The 32-bit counter would wrap after about 7.5 years. Intervals in the original files: 1-180. See long intervals.
Type decoration_entry
| Field | Type | Size, repetition and constraints |
|---|---|---|
marker | u1 | — |
graphics_name_slot | 13 bytes | only if marker == 0xec |
definitions_name_slot | 13 bytes | only if marker == 0xec |
wall_index | u1 | only if marker != 0xec |
vmp_index | u1 | only if marker != 0xec |
decoration_index | s1 | only if marker != 0xec |
special_type | u1 | only if marker != 0xec |
flags_raw | u1 | only if marker != 0xec |
marker
0xec selects two resource name slots; every other byte selects a five-byte mapping payload. The value of a non-0xec marker is not used.
graphics_name_slot
Base name of the decoration image; the game appends .CPS.
definitions_name_slot
Full file name of the decoration definitions (a DEC file, e.g. brown.dec), opened as given; stored as a raw 13-byte slot; see DEC.ksy.
wall_index
The wall reference this mapping defines, as stored in the faces of MAZ cells: the index of the game's wall tables for VMP group, decoration, special type and flags. The game sign-extends it and uses it without a check as the index of four 80-entry tables; values 80 and above, or with the high bit set, write into a neighboring table. Values in the original files: 25-74.
vmp_index
VMP wall group drawn for this wall reference: 0 draws no wall; g selects the g-th group of the level's VMP file, entries 330 + (g − 1) × 431 onward. Read sign-extended and not checked. Values in the original files: 0, 1, 2, 3 and 6.
decoration_index
DEC decoration selector: the number of the DEC record that starts the wall's decoration chain, −1 for no decoration.
special_type
Selector copied to the wall's separate special-action table. A nonzero selector chooses an indirect wall-interaction handler, subject to an event mask; it is not a bit in flags_raw. See InfWallSpecialType for the known selectors. Values from 128 up act as 0; 11 to 127 make the game jump to an address that is not a handler. Nonzero values over the 495 mappings of the original files: 2, 143 times, in all 16 files; 3, 46 times, and 4, 45 times, in 13 files each; 10, 19 times; 7, 12 times; 8, 7 times, in 5 files; 5, 5 times; 9, twice; and 255 once, for reference 59 of the second record of LEVEL1.INF.
flags_raw
Combinable wall-property bits. The game stores this byte for wall_index, then toggles bit 0x04; the other seven bits keep their values. Thus a clear 0x04 here enables the runtime monster-passage bit, while a set 0x04 clears it. 0x01 lets the party, flying objects and ranged traces through; 0x02 lets small flying items through; 0x08 marks a door face; 0x10 and 0x20 mark the open and closed states where door operations stop; 0x80 lets objects behind the wall be drawn. Bit 0x40 is never tested by the game; preserve it when editing. Afterwards only the door records change bit 0x02, and the value stays in force after the level is left, until another mapping of the same reference; the original files map references 25 to 74. Over their 495 mappings, bits 0x01, 0x02, 0x04, 0x08, 0x10 and 0x80 are set in 144, 126, 437, 6, 1 and 20 mappings, and bits 0x20 and 0x40 in none. See InfWallMappingFlags and WallRuntimeFlags.
Derived values and positioned data:
| Field | Type | Size, repetition and constraints |
|---|---|---|
initial_runtime_flags | computed: flags_raw ^ 0x04 | only if marker != 0xec |
initial_runtime_flags
Property byte immediately after this mapping is applied, before later runtime changes or subsequent mappings of the same wall index. This derived value does not occupy additional file bytes. Values over the 495 mappings of the original files: 0x00, 326 times; 0x03, 83; 0x07, 43; 0x80, 20; 0x05, 14; 0x08, 5, for references 51 and 52 with special type 5; 0x01, 3; and 0x1d once, for reference 72 of the second record of LEVEL16.INF.
Type level_state
| Field | Type | Size, repetition and constraints |
|---|---|---|
bindings_offset | u2 | — |
monster_state_marker | u1 | — |
monster_timers | monster_timer | repeated until _.timer_index == 0xff; only if monster_state_marker == 0xec |
monster_instances | monster_instance | repeated 30 times; only if monster_state_marker == 0xec |
script_data | bindings_offset - _io.pos bytes | — |
bindings_offset
Decoded-payload offset of the final cell bindings, not relative to this section. It also bounds the preceding monster and script data in the original files.
monster_state_marker
0xec introduces the monster timers and initial monster records; any other value means the level has none, and the script data starts right after this byte. Without the block, the loader clears the 30 monster slots unless the level is restored from its record. Values in the original files: 0xec in 15 files, 0xff in LEVEL10.
monster_timers
Monster update intervals, terminated by an index of 0xff. The game stores each entry's interval in the timed-callback entries of monster update groups 2 × timer_index and 2 × timer_index + 1. Intervals are counted in ticks of the shared counter, about 55 ms each (see the game clock). The final entry is a terminator, not a timer. See monster update cadence.
monster_instances
Always 30 fourteen-byte records; when the level is restored from its record, the loader skips their 420 bytes without reading them. Records are checked only for slot_index 0xff.
script_data
The level's script data, copied to the runtime script buffer. Its first little-endian word is the offset, from the start of the region, of the message strings; the script code fills the bytes from offset 2 to that offset, and zero-terminated strings fill the rest. Nothing else is stored there: the buffer is read only by the interpreter, its jump and call handlers and the message lookups. In the 16 original files the strings end exactly at the cell bindings. The length is bindings_offset minus the current position, copied without a check into an area of 7,508 bytes (0x1d54) that the game's wall-layout (VMP) data follows; a longer region overwrites the start of that data, which is loaded just before. The longest original region, LEVEL7.INF, has 7,477. Kept as raw bytes; see the script virtual machine for the instructions.
Type monster_timer
| Field | Type | Size, repetition and constraints |
|---|---|---|
timer_index | u1 | — |
interval | u1 | only if timer_index != 0xff |
timer_index
Monster timer selector, matching the unit field of the monster instances: index v sets the interval of update groups 2v and 2v + 1, entries 2 + 2v and 3 + 2v of the game's 16-entry timed-callback table. Read sign-extended; 0xff terminates the list. Without a check, v = 2 to 6 sets the interval of character-timer, door, wall-animation, food or idle-animation entries, and larger values write past the table. Only 0 and 1 occur in the 16 original files.
interval
Update interval in shared-counter ticks, replacing the default of 20. The game sign-extends this byte to 32 bits. The loader then restarts groups 0-3: even groups at counter + interval, odd groups at counter + interval / 2 (logical 32-bit shift). A byte of 128 or more is a negative interval: the even group runs at every pass and the odd group's first deadline lies about 2^31 ticks ahead. The original files use 15, 25 and 35. Raw byte kept.
Type monster_instance
| Field | Type | Size, repetition and constraints |
|---|---|---|
slot_index | u1 | — |
unit | u1 | — |
block | u2 | — |
position | u1 | — |
direction | s1 | — |
type_index | u1 | — |
graphics_index | u1 | — |
mode | u1 | — |
parameter | u1 | — |
random_item | u2 | — |
fixed_item | u2 | — |
slot_index
Runtime slot selector; 0xff marks an unused record. The remaining 13 bytes are still present in unused records. Read as signed and multiplied into the 30-slot table without a check; a repeated index reinitializes the same slot.
unit
Update unit. Initialization stores 2 × unit, plus 1 for an odd slot index, as the slot's update group; the monster timer entry with the same index sets that unit's update interval. Only 0 and 1 occur in the 16 original files. See MonsterRuntime and monster update cadence.
block
Initial block of the monster: column = block mod 32 and row = block div 32 in the 1024-block level; see cell_binding.cell_index. Row 0 is the northern edge and column 0 the western edge (see /eob2/enums/DIRECTION). Block 0 leaves the slot cleared and the monster unplaced; other values are placed without a range check.
position
Copied to the slot's position byte (MonsterRuntime offset 0x04): 0-3 the north-west, north-east, south-west and south-east quarters of the block, numbered as item floor positions, and 4 the centre. See MonsterRuntime and sharing a block.
direction
Initial direction, copied to MonsterRuntime offset 0x05: 0-3 clockwise from north (see /eob2/enums/DIRECTION). No value is checked or reduced: −1 is stored as 255, since the placement keeps the direction it was just given. The original files use 0-3 only. Another value is used as it is, as an index into the game's direction tables, until the monster's first turn brings it back to 0-3: the block it steps to, the wall it faces, its position and attack choices and its drawing frame come from bytes outside the four entries.
type_index
Type selector, used without a check to select a 46-byte runtime property area, the types of the sublevel loaded at the time; see sublevels.
graphics_index
Selects the monster's shape bank: 0 the shapes loaded by a monster graphics record with destination_index 0, any other value those of destination_index 1. Values in the original files: 0 and 1.
mode
Initial behavior mode, a MonsterMode value, transferred to MonsterRuntime. No value is rejected by the schema.
parameter
Initial state_counter of the slot: the number of updates left in MONSTER_MODE_DELAYED or MONSTER_MODE_PARALYZED; see MonsterMode. 0 in every placed record of the 16 original files, so their two delayed monsters never leave that mode by the counter.
random_item
When the monster dies, a nonzero value is the number of an item copied into its block one time in ten (1d10 = 1). See when a monster dies.
fixed_item
When the monster dies, a nonzero value is the number of an item copied into its block every time. The copies go to the monster's position, or to a random quarter when it stands at the centre.
Type door_slot
| Field | Type | Size, repetition and constraints |
|---|---|---|
marker | u1 | — |
body | door_record | only if marker == 0xec or marker == 0xea |
marker
0xec or 0xea introduces a door record; any other value is read alone and leaves no record (0xff in the original files). With 0xea, the game sets WALL_RUNTIME_SMALL_PROJECTILE_PASSAGE on the closed and partly open references of the record's door graphic g, 10g + 3 to 10g + 11 except 10g + 7; with 0xec it clears that bit on them. 0xea occurs for door graphic 1 of level 2 and door graphic 0 of both level 7 sublevels.
Type door_record
Shapes are cut from the named image; rectangles are in 8-pixel columns (x, width) and pixels (y, height).
| Field | Type | Size, repetition and constraints |
|---|---|---|
image_name_slot | 13 bytes | — |
door_graphic | u1 | — |
kind | u1 | values: door_kind |
no_switch | u1 | — |
door_shapes | door_rectangle | repeated 3 times |
switch_shapes | door_switch | repeated 2 times |
image_name_slot
Zero-terminated name of the CPS image holding the door graphic (DOOR1 or DOOR2 in the original files), preserved raw.
door_graphic
Which of the level's two door graphics, 0 or 1, the record fills (signed). The game's wall table maps references 3–12 and 51 to graphic 0, 13–22 and 52 to graphic 1, so no door uses another graphic; another value stores its kind, switch flag, shapes and switch positions past the two-entry tables, overwriting other game variables, and toggles a property bit of wall references 10g + 3 to 10g + 11 (except 10g + 7).
kind
How the door graphic is drawn while opening, kept by the game as a word. See DoorKind.
no_switch
Nonzero hides the door switch; kept by the game as a word. 0 in every original record.
door_shapes
The door shape for one, two and three steps ahead.
switch_shapes
The switch shape for one and two steps ahead; there is none for three steps ahead.
Type door_rectangle
| Field | Type | Size, repetition and constraints |
|---|---|---|
column | u2 | — |
row | u2 | — |
width | u2 | — |
height | u2 | — |
column
Left edge in the image, in 8-pixel columns.
row
Top edge in the image, in pixels.
width
Width in 8-pixel columns.
height
Height in pixels.
Type door_switch
| Field | Type | Size, repetition and constraints |
|---|---|---|
shape | door_rectangle | — |
x | u1 | — |
x_high | u1 | — |
y | u1 | — |
y_high | u1 | — |
x
Horizontal position of the switch, added to the door block's centre spot offset. Only this low byte is kept.
x_high
Skipped by the game; 0 in the original files.
y
Top row of the switch in the view. Only this low byte is kept.
y_high
Skipped by the game; 0 in the original files.
Type monster_graphics_slot
| Field | Type | Size, repetition and constraints |
|---|---|---|
marker | u1 | — |
source_index | u1 | only if marker == 0xec |
destination_index | u1 | only if marker == 0xec |
resource_name_slot | 13 bytes | only if marker == 0xec |
decoration_flag | u1 | only if marker == 0xec |
marker
0xec introduces a 16-byte graphics record; any other value is read alone. 0xff occurs in the unpopulated slots of the original files.
source_index
Selects one of three loaders through a table of the game. Each cuts six shapes from the image with its own rectangle table, so the value selects the layout of the image. The table has three entries; larger values call through the bytes that follow it. Values in the original files: 0, 1, 2; each image always comes with the same one, see the layouts.
destination_index
The shapes go to slots starting at 18 × this value; a monster's graphics_index picks bank 0 or bank 18. Values in the original files: 0 and 1.
resource_name_slot
Graphics base name, stored as a raw 13-byte slot. Bytes following the first zero may be nonzero and are preserved.
decoration_flag
Nonzero also loads the DCR decoration file of the same name, when it exists; see monster images. Values in the original files: 0 and 1; 1 in exactly the ten records whose image has a DCR file, nine images in all, CLERIC1 being loaded by two records.
Type monster_type_entry
| Field | Type | Size, repetition and constraints |
|---|---|---|
type_index | u1 | — |
properties | monster_properties | only if type_index != 0xff |
type_index
Type selector; 0xff terminates this sequence. Read as signed and used without a check as the index of the game's 46-byte type entries, which have room for 10 types before the next data the game addresses (inferred). Indices in the original files: 0-7.
properties
Properties shared by every monster of the type, copied to its runtime entry.
Type monster_properties
| Field | Type | Size, repetition and constraints |
|---|---|---|
armor_class | s1 | — |
hit_chance | s1 | — |
level | s1 | — |
hit_points_dice | dice | — |
attacks_per_round | u1 | — |
damage_dice | dice | repeated 3 times |
immunity_flags | u2 | — |
capability_flags | u2 | — |
type_flags | u2 | — |
experience | u2 | — |
occupancy_class | u1 | — |
sound_1 | s1 | — |
sound_2 | s1 | — |
remote_attack_count | u1 | — |
remote_marker | u1 | — |
remote_weapon_change_mode | u1 | only if remote_marker != 0xff |
remote_weapon_count | s1 | only if remote_marker != 0xff |
remote_weapons | 2 bytes | repeated remote_weapon_count times; only if remote_marker != 0xff |
turn_resistance | s1 | — |
damage_modifier | u1 | — |
decoration_indices | 3 bytes | — |
armor_class
Armour class used by a character's hit roll; see a character's hit roll.
hit_chance
Hit chance of the monster's hit roll; see a monster's hit roll.
level
Level used for the monster's saving throws, against damage and spell effects; see damage to a monster.
hit_points_dice
The game rolls these dice and stores the result as both the maximum and the current hit points of a new monster.
attacks_per_round
The game sign-extends this byte and loops this many times; each pass is a hit roll and, on a hit, a roll of the damage dice of the same index. The loop is what a monster does to one character in one update; the game has no round structure, and the field name is descriptive. Values above 3 read the bytes after the third triplet, the immunity and capability words, as further dice. See melee attacks and attack timing.
damage_dice
Triplet i is rolled for attack i when its hit roll succeeds, and the sum damages the character. The hit roll of attack i uses the character in party slot i; see the anomaly. Any byte values are accepted.
immunity_flags
Immunity flags, stored at offset 0x10 of the type's runtime entry. The spell-effect routine tests mask 0x0002 before paralysis, 0x0008 before effect 3, 0x0004 before effect 6 and 0x0010 in its evasion test; see MonsterImmunityFlags. The character hit roll tests 0x0200 and 0x1000 against the weapon's value, and the monster damage calculation tests 0x0100, 0x2000 and the pairs of a combat table (0x10, 0x20, 0x40, 0x80, 0x400, 0x800). See MonsterImmunityFlags. Bits 0x0001, 0x4000 and 0x8000 have no known test.
capability_flags
Capability bits, named in MonsterCapabilityFlags: 0x0001 MONSTER_CAP_LARGE, weapons roll their second damage profile; 0x0002 MONSTER_CAP_ALT_FRAME_TABLE, alternate frames; 0x0004 MONSTER_CAP_WALL_SPECIAL_TYPE_1, type 1 replaces a closed switch door with wall reference 72 and selects the level 16 death branch; 0x0008 MONSTER_CAP_POST_MOVE_ACTION, second melee try after moving; 0x0010 MONSTER_CAP_POISONS, 0x0020 MONSTER_CAP_PARALYZES and 0x8000 MONSTER_CAP_PETRIFIES, tested after a positive melee total, afflict poison (saving-throw category 0, poison timer of 546 ticks), paralysis (category 2, 5 × 546 ticks) and petrification (category 2) with the strings "poisoned", "paralyzed" and "PETRIFIED"; 0x0080 MONSTER_CAP_ITEM_LOSS, after a positive melee total, 3 times in 4, the character loses an item; 0x0100 MONSTER_CAP_HIDDEN; 0x0200 MONSTER_CAP_SIDESTEP_SOMETIMES, the side step toward a diagonal destination only when 1d4 < 4; 0x0800 MONSTER_CAP_ATTACKS_ANY_SIDE, the pursuit tests the orthogonal neighbor toward the party; 0x1000 MONSTER_CAP_OPENS_DOORS, opens closed switch doors; 0x2000 MONSTER_CAP_DIES_ON_HIT; 0x4000 MONSTER_CAP_ATTACKS_ALL, a melee attack goes on to the next characters of the attack order. No code tests bits 0x0040 and 0x0400. In the 63 types of all sublevels of the 16 original files, 0x4000 is set on LEVEL14.INF type 0 (word 0x4003) and LEVEL16.INF sublevel 1 type 1 (word 0x5206), and 0x0400 only on LEVEL3.INF type 0 (word 0x0ca3). See monster behavior and who a monster attacks.
type_flags
Monster-type flags, sign-extended by the game to 32 bits in the runtime type entry. 0x0001 lets Hold Person affect the type and 0x0002 Hold Monster (spell effects 0 and 1); 0x0004 lets Turn undead affect it. No other bit is tested. Words in the original files: 0, 1, 2, 3 and 4.
experience
Experience shared by the party when it kills a monster of the type; the loader stores it sign-extended. Values in the original files: 35-14,000.
occupancy_class
Selector used when checking whether monsters can occupy the same block, copied to offset 0x1e of the runtime type area. Values 0, 1 and 2 occur in the 63 types of the original files (25, 10 and 28 types). Rules: all occupants of a block must have the entering monster's value; 2 never enters an occupied block; 1 pairs on the diagonal positions 0 and 3; 0 takes the first free position in an order set by its facing. See sharing a block. The view also reads it: class 1 moves the drawing spot. Its interpretation as monster size is inferred.
sound_1
Sound played with each melee attack of the close-range action, through the environmental sound routine, which plays only positive values: 0 or a negative value plays nothing. Values in the original files: 37-49 and, once, -1.
sound_2
Step sound, played at the monster's new block after a move; 0 or a negative value plays nothing. Values in the original files: 36-48 and, twice, -1. See obstacles.
remote_attack_count
Copied to the monster slot's ranged_attacks_left; 0 gives no ranged attack, each ranged attack decreases it, and 255 never decreases. See ranged attacks.
remote_marker
0xff skips the next three fields; the loader then leaves the type's runtime bytes 0x22–0x28 unchanged. Other values are not stored.
remote_weapon_change_mode
1 uses the weapons in turn, 2 picks one at random (1d count − 1); any other value uses an uninitialized index, see the anomaly. Values in the original files: 1 and 2.
remote_weapon_count
Count of two-byte entries. The game sign-extends the count before comparison: a count of 0 or with the high bit set reads none. The first bytes are stored from runtime offset 0x24 without a check: counts 6 to 10 reach offsets 0x29-0x2d, which the next fields then overwrite, and larger counts write into the next type's entry. Counts in the original files: 0–4.
remote_weapons
Only the first byte of each entry is stored, at runtime type offset 0x24 + i. It is read as signed by the ranged action: −n throws a copy of item n, 0–19 launches the magic flying object of that type, 20 is the mind blast, higher values do nothing. The game does not read the second byte; its meaning is unknown. Both bytes retained. See ranged attacks.
turn_resistance
Resistance to turning, stored at runtime type offset 0x29: the row of the turn-undead table used for a type with type flag 0x0004, read as signed; the original table has rows 0 to 9, and other types (−1 in every original file) are never looked up. The cleric's level selects the column. See turn undead.
damage_modifier
Evasion chance in percent, stored at offset 0x2a of the type's runtime entry; the damage calculation cancels damage carrying MONSTER_DAMAGE_MAGIC when 1d100 is below it, read as signed. See damage to a monster.
decoration_indices
Three selectors of extra decoration shapes drawn over the monster. 0 draws nothing; a value d draws an entry of the monster decoration table numbered from 6 × (d − 1), offset by the monster's drawn view: entry f of group d of the DCR file of the monster's graphics slot, for frame f. See monster images and MonsterDecorationRuntime.
Type dice
| Field | Type | Size, repetition and constraints |
|---|---|---|
rolls | u1 | — |
sides | u1 | — |
bonus_raw | u1 | — |
rolls
Number of dice rolled.
sides
Number of sides per die: each die gives 1 to this value.
bonus_raw
Additive parameter; the dice roll sign-extends it. The raw byte is kept.
Type bindings
| Field | Type | Size, repetition and constraints |
|---|---|---|
count | u2 | — |
entries | cell_binding | repeated count times |
trailing_unknown | bytes to end of stream | — |
count
Number of six-byte cell-binding entries. Compared as signed, so a value with the high bit set reads none.
entries
Indexed block state and script-buffer references; what the loader does with out-of-range values is given under each field.
trailing_unknown
Bytes after the counted bindings, not read by the game; none in the 16 decoded original files.
Type cell_binding
| Field | Type | Size, repetition and constraints |
|---|---|---|
cell_index | u2 | — |
flags | u2 | — |
reference | u2 | — |
cell_index
Index into the runtime level block array. In the 1024-block level, column = index mod 32 and row = index div 32, counting from zero, the split the game also uses for distances. Row 0 is the northern edge and column 0 the western edge (see /eob2/enums/DIRECTION). Multiplied by 10 in 16 bits without a check, so an index of 1024 or more writes into the data that follows the block table, and so on round the data segment. A repeated index adds its flags to the earlier ones and replaces the reference. Indices in the original files: 0-1022, none repeated.
flags
Block-state bits, ORed into the runtime block's word at offset 4. The game uses that word to gate events: bit 0x0008 << n enables event mask 0x0001 << n. The original bindings use bits 0x0008-0x0080 and 0x0800-0x4000, which enable the party, item, flying-object, item-use, monster and spell events. See LevelBlockStateFlags for the bits and scripts and events for the events. No bit is masked out. Bits 0x0001-0x0007 are ORed into the block's monster count; bits 0x0100-0x0400 match the events the dispatcher always accepts and change nothing; 0x8000 enables an event mask that no event uses alone, so it changes nothing.
reference
Script-buffer offset, stored at runtime block offset 8; the block event dispatcher treats zero as disabling dispatch and otherwise adds the word to the runtime script-buffer base without a check. This loader is the only writer of the block's script offset, and the dispatcher its only reader. Every value in the original files lies in the code part of the script data.
Enumerations
Enumeration door_kind
| Value | Name | Meaning |
|---|---|---|
0 | rising | One panel that rises as the door opens (DOOR_KIND_RISING). |
1 | rising_over_fixed | A fixed shape with door graphic 1's shape rising over it (DOOR_KIND_RISING_OVER_FIXED). |
2 | parting | Two halves; the top one rises, the bottom one sinks half as fast (DOOR_KIND_PARTING). |