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
XXand the rowYY, counting from00; the block index used by the files and the instructions isYY × 32 + XX. - Directions. 0 = north (decreasing row), 1 = east, 2 = south and
3 = west (
Direction); sidesof a block is its face turned towards directions. - Script offsets count from the start of the INF
script_datafield (decoded payload offset 832 in the reference file). Message numbers index the level's 5 strings and text numbersTEXT.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
| Stairs | Floor | Required direction | Message | Destination | Pushed back to |
|---|---|---|---|---|---|
| [06:03] | Lower | 2 | Up | Level 12, sublevel 0, [24:13], facing 2 | [06:02] |
| [03:17] | Upper | 2 | Down | Level 12, sublevel 0, [30:24], facing 2 | [03:16] |
| [12:09] | Lower | 2 | Up | Middle floor, [31:19], facing 2 | [12:08] |
| [31:18] | Middle | 0 | Down | Lower floor, [12:08], facing 0 | [31:19] |
| [31:09] | Middle | 0 | Up | Upper floor, [03:02], facing 0 | [31:10] |
| [03:03] | Upper | 2 | Down | Middle 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
| Grid | Blocks | Bindings | A fall lands on |
|---|---|---|---|
| Upper | [01:06]–[03:09] | 12 | The middle grid, same place: [01:06] → [29:12] |
| Middle | [29:12]–[31:15] | 12 | The 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 read | Written | Pits opened | Pits closed |
|---|---|---|---|
| 0 | 1 | [22:05], [21:03] | [23:05], [25:05], [21:04] |
| 1 | 2 | [23:05], [26:05] | [24:05], [25:06] |
| 2 | 3 | [24:05], [25:05], [25:03] | [24:03], [21:03] |
| 3 | 4 | — | — |
| 4 | 5 | — | [25:05] |
| 5 | 6 | [25:06], [26:03], [20:03] | [24:05], [25:03] |
| 6 | 7 | [25:05] | [23:05], [20:03] |
| 7 | 8 | [24:05] | [22:05] |
| 8 | 9 | [23:05], [24:03] | [26:03] |
| 9 | 0 | [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
- 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).
- Text 86, a riddle in verse, without a prompt, then a wait of 100 and a prompt.
- 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. - 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
| Test | Value | Effect |
|---|---|---|
| 1 | 2 | Level 6, sublevel 0, [05:14], facing 1 |
| 2 | 1 | Level 3, sublevel 0, [17:23], facing 1 |
| 3 | 2 | Level 14, sublevel 0, [14:14], facing 0 |
| 4 | 3 | Stops the script |
| 5 | 4 | Level 16, sublevel 0, [16:16], facing 0 |
| 6 | 5 | Stops 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
| Position | Enabled events | Script | Purpose |
|---|---|---|---|
| [00:00] | none (BLOCK_EVENT_STEP_COUNT) | 2248 | The step script, no effect |
| [01:00] | none (BLOCK_EVENT_TIMER) | 2249 | The timer, floors and hall pits |
| [06:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3202 | Stairs, up to level 12 |
| [03:17] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3841 | Stairs, down to level 12 |
| [12:09] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3329 | Stairs, up to the middle floor |
| [31:18] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3457 | Stairs, down to the lower floor |
| [31:09] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3585 | Stairs, up to the upper floor |
| [03:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED, BLOCK_EVENT_FLYING_OBJECT | 3713 | Stairs, down to the middle floor |
| [01:06] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4724 | Falling floors, upper grid |
| [02:06] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4787 | Falling floors, upper grid |
| [03:06] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4850 | Falling floors, upper grid |
| [01:07] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4913 | Falling floors, upper grid |
| [02:07] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4976 | Falling floors, upper grid |
| [03:07] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5039 | Falling floors, upper grid |
| [01:08] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5102 | Falling floors, upper grid |
| [02:08] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5165 | Falling floors, upper grid |
| [03:08] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5228 | Falling floors, upper grid |
| [01:09] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5291 | Falling floors, upper grid |
| [02:09] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5354 | Falling floors, upper grid |
| [03:09] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5417 | Falling floors, upper grid |
| [29:12] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 3968 | Falling floors, middle grid |
| [30:12] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4031 | Falling floors, middle grid |
| [31:12] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4094 | Falling floors, middle grid |
| [29:13] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4157 | Falling floors, middle grid |
| [30:13] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4220 | Falling floors, middle grid |
| [31:13] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4283 | Falling floors, middle grid |
| [29:14] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4346 | Falling floors, middle grid |
| [30:14] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4409 | Falling floors, middle grid |
| [31:14] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4472 | Falling floors, middle grid |
| [29:15] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4535 | Falling floors, middle grid |
| [30:15] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4598 | Falling floors, middle grid |
| [31:15] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 4661 | Falling floors, middle grid |
| [22:05] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5576 | The pits to level 11 |
| [23:05] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5641 | The pits to level 11 |
| [24:05] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5706 | The pits to level 11 |
| [25:05] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5771 | The pits to level 11 |
| [25:06] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5836 | The pits to level 11 |
| [26:05] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5901 | The pits to level 11 |
| [20:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 5966 | The pits to level 11 |
| [21:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 6031 | The pits to level 11 |
| [21:04] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 6096 | The pits to level 11 |
| [24:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 6161 | The pits to level 11 |
| [25:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 6226 | The pits to level 11 |
| [26:03] | BLOCK_EVENT_PARTY_ENTER, BLOCK_EVENT_ITEM_PLACED | 6291 | The pits to level 11 |
| [15:09] | BLOCK_EVENT_PARTY_ENTER | 5480 | The giant's verse |
| [14:15] | none (BLOCK_EVENT_WALL_DECORATION) | 6356 | The 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
| Bit | Set by | Cleared by | Meaning (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 damage | 1, 2d10 + 9 |
MonsterCapabilityFlags | MONSTER_CAP_LARGE, MONSTER_CAP_ALT_FRAME_TABLE, MONSTER_CAP_ATTACKS_ALL |
MonsterImmunityFlags | MONSTER_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 attacks | none |
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.