Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

State and progression

Primary variables

The persistent script state is an array of 100 signed 16-bit words. New game initialization clears all words before assigning starting values. Scene programs may use unnamed words as temporaries; a compatible engine MUST save all 100, not only the named fields.

The following indexes have cross-scene meanings:

IndexMeaning
0Difficulty: 0 Easy, 1 Normal, 2 Difficult.
11Current map X.
12Current map Y.
13Current connected kind or zero-mask room class.
14Room entrance code or contextual neighboring kind.
15Low kind of the cell two rows ahead during an upward hall view.
16Current map level letter as a character value.
17Current cell parameter A.
18Current cell parameter B.
21Faith, from 0 through 10000.
23–25Adjacent oriented-room parameter B at right, left, and above.
37–52Sixteen exploration bitmap rows, one word per map Y.
53Unibot turn/rotation value.
54Current Unibot node.
55Heading: 0 north, 1 east, 2 south, 3 west.
56–62Completion of pylons 1 through 7.
63Next Unibot node.
64Active pylon number; 100 means none.
65Tower state: 0, 1, 2, or 9.

Faith is stored in hundredths of a displayed percentage point. New play starts at 10000. F3 displays it as a percentage, and ordinary rendering clamps values to the 0–10000 range. A negative value after input processing is clamped to zero and requests OVER.

Flag bank

Variables 3 through 10 also form a 128-bit boolean bank. Flag n resides in:

word = 3 + (n >> 4)
mask = 1 << (n & 15)

Flags 00 through 2F include transient movement and action context and are rebuilt by current-cell processing. Higher flags carry durable abilities and progress. The map-derived ranges are:

Flag rangeCurrent-cell context
0005Current down/right/left connections and immediate side rooms.
060AConnections and side rooms one row forward.
0B0FConnections and side rooms two rows forward.
1013Current cell is a room, or direct rooms one to three rows forward.
161EThe corresponding adjacent/forward room has nonzero parameter B.
1F21Immediate right, left, or upper room is Trap class.

The world-model chapter gives the exact individual mapping and scan gates. Flags 14, 15, and 22 through 2F are cleared by this operation but not set from map geometry.

Other important identifiers are:

FlagMeaning
14Study selection matched the expected record.
15Study browser was left without that match.
30Sword power.
31Shield power.
32No Trap power.
33Candle power.
34Flight power.
36Persistent status-control artwork is visible.
37Automatic Combat enabled.
38Ordinary combat active; option is locked.
39Select the exterior seven-building overview in the F2 map.
3A40Victims JELO, FEAR, CULT, LAW, RICH, DENY, NAGE rescued.
4248Corresponding crew members aboard the Unibot.
52Suppress the ordinary F2 map during the Unibot sequence.
54One-time Annoy Cyber event completed.

The status bar exposes the five powers as F4 through F8 icons. They are boolean capabilities, not consumable counters, unless a scene explicitly clears them.

Ordinary progression

Each level is an explorable grid containing halls, Cybers, side rooms, Scripture stations, and an exit. The player acquires verses, studies them to answer lies and unlock interactions, rescues the level’s victim, and reaches the exit. Scene programs set the seven rescue flags at the successful conversation points. The engine MUST preserve the live map, variables, flags, text-record states, and scene name across save/restore.

At the gantry, each rescue flag 3A40 is mirrored to crew flag 4248. The craft requires all seven crew flags; with fewer, it reports the missing count and does not depart. Departure clears Sword, Shield, No Trap, Candle, and Flight, initializes Unibot node and heading state, and enters the final road network.

Unibot graph

The final network is a 16-node graph embedded in CP2.BIN. Direction slots are north, east, south, west; 100 is blocked. All open edges are reciprocal.

NodeTypeMap coordinateTransitionNESW
0road/start(270,170)01100100100
1road(270,165)014402
2road(265,165)0913100
3pylon 1(265,170)8002100100100
4road(275,165)0651001
5pylon 2(280,165)4801001001004
6road(275,160)01574100
7pylon 3(280,160)4801001001006
8pylon 4(275,150)16010010015100
9road(265,160)012100210
10pylon 5(260,160)-1601009100100
11pylon 6(260,155)-16010012100100
12road(265,155)010013911
13pylon 7(270,155)48010010010012
14Tower(270,160)1601001001100
15road(275,155)081006100

The player can turn right (.r), turn left (.l), or move forward (.u). Turns wrap heading modulo four. Forward follows the adjacency entry for the current heading and is unavailable when it is 100.

On scene entry, endpoint nodes normalize to adjacent roads: 3→2, 5→4, 7→6, 8→15, 10→9, 11→12, 13→12, and 14→1. The engine MUST honor the script’s table reads and this normalization rather than substituting Euclidean movement.

CP2.BIN is 1E55 bytes. Its commands occupy 0000..1D54; the trailer is four consecutive signed-word tables:

OffsetWordsMeaning
1D556416 nodes × north, east, south, west destinations.
1DD516Node type: 0 road, 1 pylon, 2 Tower.
1DF516Opaque transition values.
1E1532Sixteen lower-right map (x,y) coordinate pairs.

The first eligible road event loads ANNOY, clears the player’s acquired verse states, and sets flag 54. Later road visits skip it.

Pylons and ending

Pylon endpoints map to variables 56 through 62 and study selectors 11 through 17. A completed pylon is skipped. Correct study sets its variable to one, destroys it, and recovers the associated crew member. A wrong answer enters OVER.

The Tower at node 14 requires all seven variables to be nonzero; arriving early also enters OVER. With the gate satisfied, FACE and CP3 implement:

StateBehaviorResult
0Tower threatens; crew recalls Captain Bible.set 1 and return to FACE
1Tower presents hopelessness; study selector 20.correct: 2; wrong: 9
2Captain rejects control.KABLAM, then WIN
9Captain surrenders.OVER

There is no additional engine-defined victory condition. Scene programs and these persistent values are the progression authority.