Skip to main content

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.

The symbols of the level maps, each drawn on made-up blocks: a dark block, an open block with a thick edge, a hatched block, a closed and an open door, a blue dot on a wall face, a blue square for a niche, a red disc with a letter for a monster, green dots and a green square for items, a purple and an orange number for scripts, and a dashed arrow from a script to the block where it sends the party.
The symbols of the maps, drawn on made-up blocks.
SymbolMeaning
Dark blockA block whose four faces stop the party.
Light blockA block the party can stand in; a thick dark edge is a face that stops the party although the block is open.
Hatched blockA block whose faces all carry a wall, at least one of which the party can pass.
Brown barA door, across the direction the party crosses it; filled when the door starts closed, hollow when it starts open or partly open.
Blue dotA wall face that reacts when the player uses it: a button, a lever or a face that runs the block's script.
Blue squareA niche.
Red disc with a letterA monster placed when the level is first loaded; the letter gives its monster graphics and type, listed next to the map.
Green dotAn item on the floor, in the quarter of the block where it lies; a green square is an item in a niche.
Purple numberA block with a script; the same number marks every block that runs the same script.
Orange numberThe same, for a script that can take the party to another level: stairs, holes and other exits.
Dashed arrowThe 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.DAT entries 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.

LevelMazeMaps
Level 1LEVEL1.MAZtwo, one per sublevel record
Level 2LEVEL2.MAZone
Level 3LEVEL3.MAZtwo, one per sublevel record
Level 4LEVEL4.MAZone
Level 5LEVEL5.MAZone
Level 6LEVEL5.MAZone
Level 7LEVEL7.MAZtwo, one per sublevel record
Level 8LEVEL8.MAZtwo, one per sublevel record
Level 9LEVEL9.MAZone
Level 10LEVEL10.MAZone
Level 11LEVEL11.MAZtwo, one per sublevel record
Level 12LEVEL12.MAZone
Level 13LEVEL13.MAZone
Level 14LEVEL12.MAZone
Level 15LEVEL14.MAZone
Level 16LEVEL15.MAZtwo, 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.