FF8 field scripts · gn* · maplist 783–792

Tomb of the Unknown King

The whole maze runs on one byte. var486 stores which corridor you are in and which way the camera faces, and five reused backgrounds draw all 77 positions. Every exit script is a long if var486 == N table that writes the next value and jumps to the field that draws it. Progress through the tomb lives in var491, with var485 for the two one-time scenes.

10 fields77 var486 states12 junctions × 4 facings8 bends × 24 dead-end corridors4 approaches to the centre2 battles (189, 190)
1 · Field flow

Which field loads which

Arrows are MAPJUMP3 calls and .inf gateways; labels show what the jump writes to var486. Red marks a condition that can block the way. Thumbnails are the real backgrounds rebuilt from the .mim/.map files.

2 · Story gates

What has to happen, in order

  1. Arrive outside the tomb

    gnview1 · Director

    Loading gnview1 sets var486 = 0. On the first visit two Garden students run past (“F-Float!”) and the scene sets var485 |= 0xD5 (bits 1, 4, 16, 64, 128); the students only exist while (var485 & 469) == 0. Draw point #38 (Protect) and a normal save point stand here. The gateway leads into gnroad1.

  2. Optional: map and location displayer

    every corridor and room · mapdisplay::default

    var730 & 32 (map) lets the map key open the dungeon map; var730 & 64 (location displayer) adds the “you are here” mark, picked from a table of var486 values. With the map open, a second key offers Escape from the dungeon?: ADDSEEDLEVEL(-100) (one SeeD rank) and MAPJUMP3 to gnview1. Both bits are set outside the tomb.

  3. Room 1 (west): drive off Sacred

    gnroom1 · battleline::touchOn

    The statue talks, then BATTLE(189). Afterwards var491 |= 2. That one bit removes the battle line, lowers the plinth, shows the save point (only with Siren's Move-Find, var88) and sinks the two inscribed stone slabs that block the corridors to rooms 2 and 3 (gnroad1 states 30 and 62, walkmesh triangles 79/82/85 locked).

  4. Room 2 (south): open the water channel

    gnroom2 · WaterRun::talk → party gimmick

    Pulling the lever sets var491 |= 4. The water starts flowing, and ripples show in front of the central building (gnroad5). Draw point #39 (Float).

  5. Room 3 (east): turn the gearwheel

    gnroom3 · gearwheel::talk

    Sets var491 |= 8. Draw point #40 (Cura) and a Move-Find save point. Rooms 2 and 3 can be done in either order.

  6. Centre: the bridge

    gnroad5 · Director, hasi::default

    Walkmesh triangles 37 and 39 (the bridge) are locked on every load. They unlock only if var491 & 4 and var491 & 8 are both set and you came down the north approach (var486 == 16) or are walking back out of room 4 (var84 == 791). The east, south and west approaches (32, 52, 38) only ever show the building's side or back.

  7. Room 4: Sacred and Minotaur

    gnroom4 · battleline::touchOn, ArcTop::open

    BATTLE(190), then var491 |= 16, var485 |= 2 (brothers removed for good, battle line off, walkmesh 99/112/115/131 unlocked), MENUNAME(7) to name Brothers, and GETCARD(87) Minotaur card. The arc opens and the sealed one speaks: var491 |= 32. No script reads bits 16 or 32.

  8. Leave

    gnroom4 gateway → gnroad5

    Room 4 sets var486 = 76 on load and its gateway always returns to gnroad5. From 76, walking back writes 72: the north junction (mark 7), facing north. From there the maze is walked in reverse to gnroad1 state 6 and out.

3 · Walk the maze

Every var486 state, on the in-game map

Positions come from the scripts' own mark::onN entries (the location displayer's offsets). Pick a dot, then click an exit on the field picture to move. The exit labels are drawn where each mapjump_* SETLINE projects through the field camera.

Seeing the same picture again and again is how the tomb is built. Every jump into a corridor field lands on one fixed spot at the near end of the screen (all 117 jumps into gnroad2 land at X 5, Y −600, triangle 46), so the party always walks into the picture and the camera turns to face the way it walked. All 12 crossroads are gnroad2. A corner is gnroad3 (turns right) when you reach it from one side and gnroad4 (turns left) from the other.

Dungeon map from gnroad2's background
Junction (gnroad2)Bend (gnroad3/4)Corridor (gnroad1)Approach (gnroad5)Room
Progress flags

The notes are a lost student's directions carved on the two stone slabs (room 3 corridor, state 30; room 2 corridor, state 62). Each button walks them from the slab, one exit per word.

Trail: the path you walked.

var4860
Same spot, other facings
4 · Fields

The ten backgrounds and what each one holds

Yellow lines are script triggers (SETLINE), dashed violet lines are .inf gateways, dots are script-placed models. Field ids are lines of maplist.

5 · Variables

Every variable the tomb touches

VarMeaning hereWrittenRead
6 · State table

All 77 values of var486

Facing is the camera direction (north = top of the map). Each exit cell gives the value written and the field loaded. Click a row to open it in the explorer.

var486FieldMarkKindFacesFWLWRWBW
7 · Findings

Things the scripts show that the game does not