Level maps
The engine in ten minutes · The levels · The world · MAZ format · INF format
In brief
The level maps show each of the 16 levels from above, as a new game finds them: the walls and doors of the maze, the walls that react when the player uses them, the niches, the monsters already in place, the items lying on the floor, and every block that runs a script, numbered. Under each map, a list gives for every script the blocks it is attached to, what triggers it and what it can do: open a door, change walls, damage the party, create an item, teleport the party, take it to another level, and so on.
The maps are drawn from the game's own files — the level's MAZ map, its INF
data and ITEM.DAT — and not from play. They are schematic drawings: they
show where things are and what the scripts can do, not what the dungeon looks
like. A level whose INF file has two sublevel records
has two maps, one per record. This page explains how to read them; the maps
themselves are on the level pages.
Reading the maps
Positions are written [XX:YY]: column XX and row YY, counted from 00,
for block index YY × 32 + XX. Row 00 is the northern edge and column
00 the western edge. Each map shows only the rectangle of the 32 × 32 grid
that holds open blocks, with the column and row numbers on its edges.
| Symbol | Meaning |
|---|---|
| Dark block | A block whose four faces stop the party. |
| Light block | A block the party can stand in; a thick dark edge is a face that stops the party although the block is open. |
| Hatched block | A block whose faces all carry a wall, at least one of which the party can pass. |
| Brown bar | A door, across the direction the party crosses it; filled when the door starts closed, hollow when it starts open or partly open. |
| Blue dot | A wall face that reacts when the player uses it: a button, a lever or a face that runs the block's script. |
| Blue square | A niche. |
| Red disc with a letter | A monster placed when the level is first loaded; the letter gives its monster graphics and type, listed next to the map. |
| Green dot | An item on the floor, in the quarter of the block where it lies; a green square is an item in a niche. |
| Purple number | A block with a script; the same number marks every block that runs the same script. |
| Orange number | The same, for a script that can take the party to another level: stairs, holes and other exits. |
| Dashed arrow | The block where a script sends the party, when it sends it to one block more than one step away. |
How each symbol is computed:
- Walls and doors. Each face of a block holds a wall reference, which the game looks up in its wall properties: the built-in values for references 0 to 24 and the level's wall mappings for the others. A face stops the party unless its reference lets it pass. The door bar follows the door faces: the door is crossed north–south when the north face is a door face, east–west otherwise.
- Reacting walls and niches. They come from the interaction type of the face's wall mapping. Door switches and the door types are not marked: the door bar already shows the door.
- Monsters. They are the slots of the INF file's initial monster block, in their position within the block. Every sublevel record of a level shares that block; the monster graphics and types come from the record shown.
- Items. They are the
ITEM.DATentries whose level is the level shown, under their name before identification, followed by the identified name when it differs. - Scripts. The number sits on the block named by the
cell binding, even when that block is a
wall: a wall script runs on the block of the wall. The events listed are
those the binding enables, plus wall activated when one of the block's
faces reacts, timer for the target of a level timer and step count for
[00:00]; see block events. The effects list every instruction the script can reach, following each jump, call and both outcomes of each condition, except a comparison of two constants, which always takes the same outcome. Conditions apply means that at least one of the effects depends on a condition. Messages and dialogue are named, not quoted.
The maps show the files, not a playthrough. A script may never run, a door may open later, and monsters created by scripts appear only in the effects of the script that creates them.
Where the maps are
Each level's map is shown on its page, under Map, with the story of the level; the Level data section of each level's reference page gives its files and sublevel records.
| Level | Maze | Maps |
|---|---|---|
| Level 1 | LEVEL1.MAZ | two, one per sublevel record |
| Level 2 | LEVEL2.MAZ | one |
| Level 3 | LEVEL3.MAZ | two, one per sublevel record |
| Level 4 | LEVEL4.MAZ | one |
| Level 5 | LEVEL5.MAZ | one |
| Level 6 | LEVEL5.MAZ | one |
| Level 7 | LEVEL7.MAZ | two, one per sublevel record |
| Level 8 | LEVEL8.MAZ | two, one per sublevel record |
| Level 9 | LEVEL9.MAZ | one |
| Level 10 | LEVEL10.MAZ | one |
| Level 11 | LEVEL11.MAZ | two, one per sublevel record |
| Level 12 | LEVEL12.MAZ | one |
| Level 13 | LEVEL13.MAZ | one |
| Level 14 | LEVEL12.MAZ | one |
| Level 15 | LEVEL14.MAZ | one |
| Level 16 | LEVEL15.MAZ | two, one per sublevel record |
Details and edge cases
- Faces the record does not map. A few faces of levels 1, 3, 5, 7, 12 and 16 use a wall reference that the record shown does not map; for a second record, a reference the first record maps is drawn with that mapping. The others are drawn as walls. In play they take whatever an earlier level left in the wall tables, but they lie where the party cannot go or look; see faces that the level does not map.
- Shared maps. Levels 5 and 6 draw the same maze, as do levels 12 and 14, with each level's own mappings, monsters, items and scripts.
- The step-count script of a level is attached to
[00:00], usually a rock block, where its number is drawn.
Sources
The maps are generated by make_level_maps.py,
which reads the reference LEVELn.MAZ, LEVELn.INF and
ITEM.DAT of the file inventory with the
layouts of MAZ.ksy, INF.ksy
and ITEM_DAT.ksy, and decodes the scripts with
the instruction layouts of the virtual machine reference.
Locations refer to the game executable reference:
the INF loader, the
wall mappings applied to the
wall properties, the
initial monster block and the
monster slots, the
cell bindings and the
block event dispatcher.
The counts of what the map files hold come from reading the 15 MAZ
files and the map names of the 16 INF files; the name of a map reaches
map loading from the INF file.