Skip to main content

Level 14: reference tables

Level 14 · The levels · Level data (INF)

In brief​

The details of level 14: 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 LEVEL12.MAZ, the map of level 12 (LEVEL14.MAZ is the map of level 15), the mezz graphics and the azure sound file, sets a step threshold of 80 and has one script timer. Its only monster graphics resource is frgiant. It starts with 25 monsters, all drawn with that image; their monster type is described below.1

This page covers every reachable script of the reference file: 46 cell bindings, 60 script entry points including 14 shared subroutines, and 893 instructions. The decoding finds no unknown operand layout. Of the 6,464 script bytes, 46 are never executed: the nine-byte routine at offset 2 (below) and 37 bytes after level changes. Message colors are palette colors (Print a message). Sound numbers select entries of AZURE.ADL or AZURE.SND (see the sound-effect table).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. 0 = north (decreasing row), 1 = east, 2 = south and 3 = west (Direction); side s of a block is its face turned towards direction s.
  • Script offsets count from the start of the INF script_data field (decoded payload offset 832 in the reference file). Message numbers index the level's 5 strings and text numbers TEXT.DAT; both are summarized, not quoted.
  • Pits and holes. The scripts give the four sides of a pit block one of three wall references: 38, an open pit; 37, a block under an open pit of the floor above; 39, both at once. The scripts treat 38 and 39 alike as open pits. 37 is drawn on the ceiling with the shapes that 39 draws there, while 39 adds the floor pit of 38; in every configuration below, the blocks under the open pits of the floor above hold 37 or 39, and only one other block does.
  • Level flags are bits of this level's flag word (SCRIPT_FLAG_TARGET_LEVEL); their names below are descriptive.

Stairs​

Six stair blocks share the pattern of level 12: entering in the required direction prints message 0 (up) or 2 (down) and plays sound 79; any other direction prints message 1, plays sound 29 and moves the party back one block. Items placed or flying into a stair block go to the destination. Two stairs load level 12; the other four join the three floors of this level, and move the party within the level with SCRIPT_MOVE_PARTY before setting its facing.2

StairsFloorRequired directionMessageDestinationPushed back to
[06:03]Lower2UpLevel 12, sublevel 0, [24:13], facing 2[06:02]
[03:17]Upper2DownLevel 12, sublevel 0, [30:24], facing 2[03:16]
[12:09]Lower2UpMiddle floor, [31:19], facing 2[12:08]
[31:18]Middle0DownLower floor, [12:08], facing 0[31:19]
[31:09]Middle0UpUpper floor, [03:02], facing 0[31:10]
[03:03]Upper2DownMiddle floor, [31:10], facing 2[03:02]

A party that comes down the stairs of level 12 at [24:12] and wants to reach the stairs of [30:23], or the reverse, must therefore cross the floors of this level, and the pit grids that lie on the way: the upper grid between [03:03] and [03:16], the middle grid between [31:10] and [31:18].

Falling floors​

Three grids of three columns by four rows hold the pits of the floors:3

GridBlocksBindingsA fall lands on
Upper[01:06]–[03:09]12The middle grid, same place: [01:06] → [29:12]
Middle[29:12]–[31:15]12The lower grid, same place: [29:12] → [10:03]
Lower[10:03]–[12:06]none—

The script of each block of the upper and middle grids runs on BLOCK_EVENT_PARTY_ENTER and BLOCK_EVENT_ITEM_PLACED, and acts only while the block holds 38 or 39. On entry, it deals 2d6 to every character, with SCRIPT_DAMAGE_RING_NEGATES and no saving throw, moves the party to the block below with its facing kept, and stops. An item placed there goes to the block below. A fall is thus a move within the level, not a level change.

The timer​

The level's only timed block script sends BLOCK_EVENT_TIMER to [01:00] with an interval of 1, that is 18 ticks of the game clock, about one second. Each event changes the pits of the floors to the next of three configurations, chosen from side 0 of [31:15]: 39 selects the first (offset 11), 0 the second (offset 438), any other value the third (offset 850). Each configuration writes the [31:15] value that selects the next, so they follow one another in a cycle of three seconds. The second and third events also advance the pits of the giants' hall. No sound plays.4

A configuration sets the four sides of many blocks of the three grids. Each time it opens a pit (38 or 39) under the party, it redraws the scene, deals the fall damage and moves the party to the block below; each time it opens a pit, it then moves the block's items there. Once each configuration has run, the grids hold these references; the three blocks that no configuration writes, [01:07], [10:03] and [10:06], keep the map's values:

first event second event third event
(offset 11) (offset 438) (offset 850)
Upper grid
row 06 38 0 0 38 38 0 0 0 38
row 07 0 38 38 0 0 0 0 38 0
row 08 0 0 0 0 38 38 38 0 0
row 09 38 38 0 0 0 0 0 0 38
Middle grid
row 12 39 38 0 39 37 38 38 0 37
row 13 0 37 39 38 0 0 0 39 38
row 14 38 0 38 0 37 37 37 38 38
row 15 39 37 0 38 38 38 38 0 39
Lower grid
row 03 37 37 0 37 0 37 37 0 0
row 04 0 37 37 37 37 0 0 37 37
row 05 37 0 37 0 0 0 0 37 37
row 06 37 0 0 37 37 37 37 0 37

Columns are, from left to right, 01–03, 29–31 and 10–12. Blocks [29:12] and [29:15] of the middle grid are open in all three configurations. Each reference 37 or 39 of the middle and lower grids lies under an open pit of the grid above, with one exception: [11:04] holds 37 in all three configurations, while [30:13] above it is open only in the third; the first and third configurations write 37 there and the second leaves it.

A party that falls from the upper grid onto a middle block holding 39 falls again: the move sends BLOCK_EVENT_PARTY_ENTER to that block, whose script deals the damage a second time and moves the party to the lower grid. When the fall comes from the timer, the second script starts inside the timer's subroutine; this is the case described under nested runs (ANOMALY-83), with no visible effect expected there.

The pits to level 11​

Twelve blocks of the giants' hall are pits that drop the party to level 11, at the same position and with its facing kept, after 2d6 of fall damage with SCRIPT_DAMAGE_RING_NEGATES: [20:03], [21:03], [24:03], [25:03], [26:03], [21:04], [22:05], [23:05], [24:05], [25:05], [26:05] and [25:06]. Their scripts act while the block holds 38 or 39, on the party's entry or an item placed; items go to the same position of level 11.5

The timer opens and closes them through a ten-step counter. The counter is the wall reference of the four sides of [00:00], a solid corner of the map that the party can neither reach nor see on this level (inferred from the reachability model). Its subroutine, at offset 2047, reads side 0 of [00:00], writes the next value to the four sides (9 is followed by 0) and runs that step:

Counter readWrittenPits openedPits closed
01[22:05], [21:03][23:05], [25:05], [21:04]
12[23:05], [26:05][24:05], [25:06]
23[24:05], [25:05], [25:03][24:03], [21:03]
34——
45—[25:05]
56[25:06], [26:03], [20:03][24:05], [25:03]
67[25:05][23:05], [20:03]
78[24:05][22:05]
89[23:05], [24:03][26:03]
90[21:04][26:05]

The map starts with reference 1 on side 0 of [00:00], so the first step run is the one for 1. Because the counter advances at two timer events out of three, it goes round once every 15 events, about 15 seconds; once it has done so, the pattern repeats with that period, and five or six of the twelve blocks are open at any time (computed by running the scripts from the map's initial walls).

Each opening tests the party's position: if the party stands on the block, the scene is redrawn and the party falls; otherwise the block's items go to level 11.

When a pit of the giants' hall opens under the party, the step loads level 11 before it would move the block's items, and the level change stops the run: the items lying in the block stay on level 14, in the open pit. They fall only when a later step opens the block again while the party is elsewhere, which needs the party back on level 14. The floors' configurations move the items in the same case, after moving the party, and the moving pits of level 12 move them before the fall. A faithful reimplementation leaves those items on level 14.6

After its calls, the timer script tests, for each of the twelve blocks, whether the party stands on it, the block is a pit and the event is BLOCK_EVENT_PARTY_ENTER (fall) or BLOCK_EVENT_ITEM_PLACED (items). In a timer run the event is BLOCK_EVENT_TIMER, so this part never acts.

The giant's verse​

[15:09] is a doorway on the way from the hall to the portal. Entering it the first time (level flag 1) turns the party to face 2, redraws the scene and opens the dialogue screen with sound 57 and the lower-left picture of SOUT4:7

  1. Text 85: a giant speaks for his people, held in these halls by Dran's curse, and hopes that the party will bring Dran's fall (prompt: message 3).
  2. Text 86, a riddle in verse, without a prompt, then a wait of 100 and a prompt.
  3. Sound 2; a copy of template 81, Talon's Tongue (ITEM_TYPE_QUEST_ITEM, value 2), is created at [15:10], the block the party faces, in its south-west quarter (position 2); SCRIPT_SPECIAL_EVENT_RELOAD_WALL_GRAPHICS (ScriptSpecialEvent) loads the level's wall graphics again and the scene is redrawn.
  4. Text 87: the giant crumbles to dust (prompt: message 3). The screen closes.

The giant of the texts appears only in the picture: the script removes no monster.

The portal​

Side 0 of [14:15], used from [14:14], is the level's portal: wall reference 69, mapped with INF_WALL_SPECIAL_SCRIPT (InfWallSpecialType), a reference that level 12 does not map. When the player activates it while holding an item of type 37, the script plays the portal animation and then tests the item's value, in this order:8

TestValueEffect
12Level 6, sublevel 0, [05:14], facing 1
21Level 3, sublevel 0, [17:23], facing 1
32Level 14, sublevel 0, [14:14], facing 0
43Stops the script
54Level 16, sublevel 0, [16:16], facing 0
65Stops the script

Any other held item does nothing, and so does any other value after the animation. The third test never succeeds: value 2 has already loaded level 6 at the first test, and a level change stops the run. That branch would send the party back to [14:14], where the portals of levels 3 and 6 also arrive, so the level's own destination is unreachable from its own portal. In the game's data the only items of type 37 that the party can obtain have values 1, 2 and 4, so every use of this portal changes level; see the portal without a level change. The item stays in hand.

The step script​

The step threshold of 80 sends BLOCK_EVENT_STEP_COUNT to [00:00] at every 81st move (step-triggered script). The script of [00:00], at offset 2248, is a single SCRIPT_END: nothing happens.2

Bindings​

PositionEnabled eventsScriptPurpose
[00:00]none (BLOCK_EVENT_STEP_COUNT)2248The step script, no effect
[01:00]none (BLOCK_EVENT_TIMER)2249The timer, floors and hall pits
[06:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3202Stairs, up to level 12
[03:17]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3841Stairs, down to level 12
[12:09]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3329Stairs, up to the middle floor
[31:18]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3457Stairs, down to the lower floor
[31:09]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3585Stairs, up to the upper floor
[03:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT3713Stairs, down to the middle floor
[01:06]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4724Falling floors, upper grid
[02:06]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4787Falling floors, upper grid
[03:06]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4850Falling floors, upper grid
[01:07]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4913Falling floors, upper grid
[02:07]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4976Falling floors, upper grid
[03:07]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5039Falling floors, upper grid
[01:08]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5102Falling floors, upper grid
[02:08]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5165Falling floors, upper grid
[03:08]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5228Falling floors, upper grid
[01:09]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5291Falling floors, upper grid
[02:09]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5354Falling floors, upper grid
[03:09]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5417Falling floors, upper grid
[29:12]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED3968Falling floors, middle grid
[30:12]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4031Falling floors, middle grid
[31:12]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4094Falling floors, middle grid
[29:13]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4157Falling floors, middle grid
[30:13]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4220Falling floors, middle grid
[31:13]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4283Falling floors, middle grid
[29:14]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4346Falling floors, middle grid
[30:14]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4409Falling floors, middle grid
[31:14]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4472Falling floors, middle grid
[29:15]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4535Falling floors, middle grid
[30:15]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4598Falling floors, middle grid
[31:15]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED4661Falling floors, middle grid
[22:05]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5576The pits to level 11
[23:05]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5641The pits to level 11
[24:05]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5706The pits to level 11
[25:05]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5771The pits to level 11
[25:06]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5836The pits to level 11
[26:05]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5901The pits to level 11
[20:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED5966The pits to level 11
[21:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED6031The pits to level 11
[21:04]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED6096The pits to level 11
[24:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED6161The pits to level 11
[25:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED6226The pits to level 11
[26:03]BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED6291The pits to level 11
[15:09]BLOCK_EVENT_PARTY_ENTER5480The giant's verse
[14:15]none (BLOCK_EVENT_WALL_DECORATION)6356The portal

Fourteen subroutines are reached only by SCRIPT_CALL, all from the timer script: the three pit configurations of the floors at offsets 11, 438 and 850, and the step counter of the giants' hall at offset 2047 with its ten steps at offsets 1332, 1432, 1527, 1664, 1665, 1671, 1808, 1861, 1909 and 1999.

Level flags​

BitSet byCleared byMeaning (descriptive)
1[15:09]—The giant's verse has been heard.

The level uses no other level flag and no global flag.

Monster types​

The level defines one monster type, 0, and one monster image, frgiant (FRGIANT.CPS, with no decoration file). After that image, this page calls these monsters giants; the game stores no name for a monster type.9

Property (INF field)Type 0
Armour class (armor_class)0
Hit chance (hit_chance)3
Level for saving throws (level)14
Hit points (hit_points_dice)5d8 + 76
Melee attacks: count and damage1, 2d10 + 9
MonsterCapabilityFlagsMONSTER_CAP_LARGE, MONSTER_CAP_ALT_FRAME_TABLE, MONSTER_CAP_ATTACKS_ALL
MonsterImmunityFlagsMONSTER_IMMUNE_COLD
Type flags (type_flags)Hold Monster can affect it
Experience (experience)7 000
Occupancy class (occupancy_class)2
Attack and step sounds (sound_1, sound_2)43, 42
Ranged attacksnone
Turn resistance, evasion (turn_resistance, damage_modifier)−1, 0

MONSTER_CAP_ATTACKS_ALL carries each melee attack on to every eligible character of the attack order. The 25 giants present at the start all stand in the giants' hall, at position 4, facing east, in MONSTER_MODE_PURSUE (MonsterMode): [13:01], [16:01], [20:01], [25:01], [28:01], [30:01], [15:03], [18:03], [28:03], [31:04], [18:05], [28:05], [16:06], [14:07], [18:07], [22:07], [23:07], [30:07], [15:08], [17:09], [18:09], [22:09], [24:09], [26:11] and [26:14]. No script places monsters.1

The unused routine at offset 2​

As on level 12, the first nine script bytes, at offset 2, form a routine that no binding, call or jump reaches: SCRIPT_DAMAGE_CHARACTERS on every character, 2d6 with SCRIPT_DAMAGE_RING_NEGATES and no saving throw, then SCRIPT_RETURN. Its bytes are those of the fall damage that the level's 90 pit instructions contain inline, and no way of starting a script reaches it (see how a run starts): it never runs.10

Sources​

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

Footnotes​

  1. The reference LEVEL14.INF and LEVEL12.MAZ, read with INF.ksy and MAZ.ksy: sublevel names, steps_until_script 80, script timer target [01:00] with interval 1, monster graphics slot frgiant, monster type 0, the 25 initial monster records and the cell bindings. Item positions come from the reference ITEM.DAT (records 422 and 423). ↩ ↩2

  2. Reachability decoding of the reference LEVEL14.INF with script_decoder.py and the layouts of the virtual machine reference; wall references from LEVEL12.MAZ and the level's wall mappings. ↩ ↩2 ↩3

  3. The decoded scripts at offsets 3968–5479 (24 bindings) and the walls of LEVEL12.MAZ. The party move dispatches the entry event of its destination, as described under moving the party. ↩

  4. The decoded script at offsets 2249–3201 and subroutines 11–437, 438–849 and 850–1331; the script timer loader and the script timers routine. The three configurations were obtained by running the scripts' wall writes and tests on the map's initial walls, and checked over 31 events. ↩

  5. The decoded subroutines at offsets 1332–2247, the twelve bindings at offsets 5576–6355, and the walls of [00:00] in LEVEL12.MAZ. ↩

  6. In each of the 15 openings of the subroutines at offsets 1332–2046, the level change precedes the item move, for example SCRIPT_LOAD_LEVEL_OR_MONSTERS at offset 1358 and the item move at offset 1365; compare the floors' subroutine at offsets 41–75 (party move at 62, item move at 68) and the LEVEL12.INF timer at offsets 733–775. The level-change handler sets the run's stop flag. ↩

  7. The decoded script at offsets 5480–5575; texts 85 to 87 of the reference TEXT.DAT, summarized; the ITEM.DAT record 81. The special event is run by the special-event handler. ↩

  8. The decoded script at offsets 6356–6465; the wall mapping of reference 69 in LEVEL14.INF; the portal animation. ↩

  9. The monster graphics slot and monster type entry of the reference LEVEL14.INF (INF.ksy), copied into the monster type properties by the type loader. ↩

  10. The bytes f3 ff 02 06 00 04 05 03 f0 at offsets 2–10 of the reference script area and the block event dispatcher, the single entry into the script loop. ↩