Skip to main content

Level 10: reference tables

Level 10 · The levels · Level data (INF)

In brief​

The details of level 10: the data of the level, how to read the script details, every scripted place and encounter as the scripts run it, the cell bindings, the level flags and the monster types, with its sublevel records when it has two. Its story page tells the same places and encounters in a few sentences each.

Level data​

The level has one sublevel record. It uses the maze LEVEL10.MAZ, the mezz graphics and the azure sound file (AZURE.ADL or AZURE.SND, see the sound-effect table), has a step threshold of 0, so no step-triggered script, and defines one script timer. It is the only level whose INF file has no monster block: it defines no monster type and no monster image, no monster is present at the start and no script places one.1

This page covers every reachable script of the reference file: 12 cell bindings, 12 script entry points and 103 instructions. The decoding finds no unknown operand layout; 6 bytes in two places follow a level load and are never executed. Message colors are palette colors (Print a message).2

Reading this page​

  • Coordinates. A position [XX:YY] gives the column XX and the row YY, counting from 00; the block index used by the files and the instructions is YY × 32 + XX.
  • Directions and sides. Directions are 0 = north (decreasing row), 1 = east, 2 = south and 3 = west, and side s of a block is its face turned towards direction s (Direction).
  • Script offsets count from the start of the INF script_data field (decoded payload offset 236 in the reference file). Message numbers index the level's 5 strings; they are summarized, not quoted.
  • Levers. A lever face has the wall reference 27. Activating it changes the face to reference 28 (INF_WALL_SPECIAL_LEVER_INCREMENT), activating it again changes it back (INF_WALL_SPECIAL_LEVER_DECREMENT), and each time the block's script runs (InfWallSpecialType).
  • Teleporter blocks carry WALL_REFERENCE_TELEPORTER (44) on their four sides: the view draws sparkles in them, and the reference lets the party and small flying objects through but not monsters.

Stairs​

Two stair blocks follow the common pattern of the level 5 stairs: entering in the required direction prints a message (0 down, 2 up), plays sound 79 and loads the other level; entering in any other direction prints message 1 (the way is barred), plays sound 29 and moves the party back one block, against the required direction. Items placed or flying into a stair block go to the destination.2

StairsRequired directionDestinationPushed back to
[22:15]2Level 6, sublevel 0, [22:16], facing 2[22:14]
[18:30]3Level 11, sublevel 0, [17:30], facing 3[19:30]

The toll​

The pit at [01:13] of level 11 drops the party into a cell of 14 blocks, [01:13] to [05:19], closed by the door at [03:18]; the map gives it no other way out.3

  • Two plaques set the price: [04:13] (its west face) says that freedom has to be paid for (message 3), [01:17] (its east face) that one item is needed (message 4).
  • The north face of [02:19] is a niche, and the east face of [01:18], beside it, a lever. When the lever is activated while the door [03:18] is still closed (its side 3 holds the closed-door reference 8) and the niche holds at least one item, SCRIPT_DELETE_ITEM removes every item of [02:19], not only one, SCRIPT_OPEN_DOOR opens [03:18], and the lever is set back to reference 27. The niche count includes items of every type. Otherwise nothing happens and the lever stays pulled; activating it again moves it back and runs the same test.
  • Beyond the door, the teleporter at [05:19] plays sound 15, closes the door [03:18] behind the party with SCRIPT_CLOSE_DOOR, turns it to face 1 and moves it to [12:25] in the main hall. Items placed or flying into [05:19] go to [12:25] too.

The timed field​

The pits at [14:02]–[14:07] of level 11 drop the party into a room of 24 blocks, [12:02] to [15:07], whose only way out is the teleporter field at [15:02], an ordinary floor until a lever switches the field on.3

  1. The plate. [13:02] is a pressure plate (wall reference 35; 36 when it is pressed). It is pressed when the party enters it while no item lies on it, or when a first item is put on it while the party is elsewhere. It is released when the party leaves it with no item on it, or when its last item is taken while the party is elsewhere. Both changes play sound 12. While it is pressed, the north face of [15:08] holds the lever reference 27; when it is released, that face becomes a plain wall (reference 1). Items in flight are not counted, but a thrown item counts as soon as it lands: the game takes it out of flight before it sends the item-placed event, so landing on an empty plate presses it like a dropped item.4
  2. The lever. The lever is seen from [15:07], facing 2. Activating it plays sound 1, sets the lever back to reference 27, sets the four sides of [15:02] to WALL_REFERENCE_TELEPORTER and sets level flag 1.
  3. The timer. The level's only timed block script sends BLOCK_EVENT_TIMER to [01:00], a solid block, with an interval of 3, that is 54 ticks or about 3 seconds. Its script does nothing while flag 1 is clear. With flag 1 set, the first event sets flag 2 and the next one clears both flags and sets the four sides of [15:02] back to 0. The field therefore stays on for one to two timer periods, 3 to 6 seconds of game time, from the moment the lever is pulled.
  4. The field. While side 0 of [15:02] holds the teleporter reference, entering it plays sound 15, turns the party to face 1 and moves it to [12:25] in the main hall. Otherwise the block is an ordinary floor.

Pulling the lever again while the field is on does not extend it: flag 2 is left as it was. Since the party cannot stand on the plate and at the lever at once, the lever is reached with an item left on the plate. From [15:07] to [15:02] the party has five blocks to cross.

Items dropped or thrown into the active field are not moved. The item branch of the [15:02] script moves the items of [15:19], a solid block, to [12:25], while its party branch serves [15:02] itself; every other teleporter and stair script of the level moves the items of its own block. [15:19] holds no item, so the instruction normally moves nothing, and an item placed in the field stays at [15:02]. A faithful reimplementation moves the items of [15:19], not those of [15:02].5

The treasure room​

The teleporter at [17:24], in the main hall, moves the party, with sound 15, to [01:24], turned to face 1, in a room of 18 blocks, [01:24] to [06:30], which holds a scroll and a shield at [03:27]; ITEM.DAT gives the shield the names Polished Shield and, identified, Medusa Shield. Items placed or flying into [17:24] go to [01:24]. The teleporter at [05:30] brings the party back to [12:22] in the main hall, facing 1, with sound 15, and sends items placed or flying into it to the same place. The map gives the room no other way out.3

Before anything else, the [17:24] script turns the party to face 3 (west) when the held item has the value −1, as rotten rations do. On entry the script turns the party to face 1 afterwards, so the test has an effect only when an item is placed or thrown into [17:24] while the player holds such an item: the party then turns to face west. The twin teleporter at [05:30] and the other teleporters of the level have no such test. With nothing held, the test reads item entry 0, whose value is 0, and fails. A faithful reimplementation keeps the turn.6

Bindings​

PositionEnabled eventsScriptPurpose
[22:15]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT2Stairs, down to level 6
[18:30]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT129Stairs, up to level 11
[04:13]none (BLOCK_EVENT_WALL_DECORATION)337The toll, plaque
[01:17]none (BLOCK_EVENT_WALL_DECORATION)343The toll, plaque
[01:18]none (BLOCK_EVENT_WALL_DECORATION)349The toll, lever
[05:19]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT389The toll, teleporter
[13:02]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_PARTY_LEAVE, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_ITEM_REMOVED447The timed field, plate
[15:08]none (BLOCK_EVENT_WALL_DECORATION)424The timed field, lever
[01:00]none (BLOCK_EVENT_TIMER)566The timed field, timer
[15:02]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT604The timed field, field
[17:24]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT256The treasure room, way in
[05:30]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT303The treasure room, way out

No script is reached only through SCRIPT_CALL.

Level flags​

BitSet byCleared byMeaning (descriptive)
1The lever at [15:08]The timer, when the field closesThe field at [15:02] is on.
2The timerThe timer, when the field closesThe timer has fired once since the field was switched on.

Monster types​

The level defines none. Its INF file has no monster block, so a fresh load leaves the 30 monster slots empty and the monster update groups keep the intervals they had on the previous level (monster update cadence).1

Sources​

Locations refer to the game executable reference; the reference files are identified in the file inventory.

Footnotes​

  1. The reference LEVEL10.INF and LEVEL10.MAZ, read with INF.ksy and MAZ.ksy: sublevel names, steps_until_script 0, script timer target [01:00] with interval 3, empty monster type list, monster_state_marker 0xff, wall mappings and cell bindings. The loading of a level without a monster block is described by the schema and by the type loader and script timer loader; the two items are the reference ITEM.DAT records 382 and 383. ↩ ↩2

  2. Reachability decoding of the reference LEVEL10.INF with script_decoder.py and the layouts of the virtual machine reference; wall references from LEVEL10.MAZ and the level's wall mappings. The levers follow the wall-click dispatchers and the record runner; the timer, the script timers routine and the script timers; party moves, move the party. ↩ ↩2

  3. Connected blocks of LEVEL10.MAZ under the movement rule of moving the party (a step tests the destination's side turned toward the party), with every door taken as open. ↩ ↩2 ↩3

  4. End a flight and SCRIPT_EXPR_BLOCK_ITEM_TYPE_COUNT of the condition tokens. ↩

  5. The decoded script at offsets 604–648 of the reference LEVEL10.INF; the item move at offset 640 names block 623, [15:19]. Compare the [05:19] script at offsets 389–423, whose item move at offset 415 names block 613, its own block. The item branch of the move handler takes the source block as given. ↩

  6. The decoded script at offsets 256–302 of the reference LEVEL10.INF (the test at 256, SCRIPT_SET_DIRECTION 3 at 266) and the twin script at 303–336; the expression evaluator and the held-item selector (item properties in conditions); value −1 of record 370 and value 0 of record 0 of the reference ITEM.DAT. ↩