Most of the world in Pascal's Wager is not scripted by hand in Lua. It is a set of interactable objects (doors, gates, crates, lifts, kickable ladders and covers, bridges, invisible walls) whose rows in the data say only one thing: when the object is active and which quest flag it completes. This article collects those rules, plus the hazards, Heggies, respawn and save rules that complete the picture. Detailed sub-articles: Traps and tricks, Heggie offerings, Death and respawn and Drops and loot.
The quest-flag system#
Every object table has three string columns holding quest ids separated by ;:
| Column | Meaning | Rule |
|---|---|---|
ShowQuestId | The object is available only after these quests | All listed quests must be complete |
HideQuestId | The object is switched off after these quests | Any one listed quest being complete hides it |
CompleteQuestId | Quest set when you use the object | Each listed id is completed in turn |
A flag is just a quest id; "quests" in this sense include many things the player never sees as quests, such as "this door was opened" or "this boss is dead". Completing a flag triggers a refresh of scene items, invisible walls and scene effects, so one door opening can reveal an item and move a wall at the same time.
Practical consequences:
- An object with no row in its table is usually always usable (doors, bridges and virtual walls explicitly work that way). Stair kicks and cover kicks need a row to show their prompt.
- Show lists are strict (every flag), hide lists are loose (any flag). A hide flag therefore beats a show flag.
- All prompts need the hero to be able to take an "event" action (not mid-attack, for example). Doors and bridges are additionally disabled during boss fights.
Interactable objects at a glance#
| Object | Prompt | Rows | What the data holds |
|---|---|---|---|
| Door | "Door" | 99 | Type (model/sound), Switchable, flags |
| Door hint | "Check" | 76 | Dialog from each side of a door you cannot use |
| Gate | "Open" | 28 | Type, flags |
| Gate hint | "Check" | 18 | Dialogs for a locked gate |
| Bridge | - | 2 | Flags (story 3 and its Arcade copy) |
| Lift (elevator) | "Lift" | 40 | Type, FloorMax, start floor |
| Stair (ladder, climb) | "Climb" | 271 | Wood or metal (sound only), flags |
| Stair kick | "Kick" | 23 | Flags |
| Cover kick | "Kick" | 2 | Flags (story 2 and 9) |
| Virtual wall | "Enter" | 8 | Flags (stories 6, 9, Arcade 2) |
| Quest wall | - | 188 | Invisible collider switched by flags |
| Crate | open | 159 | Quest flag set when opened |
| Heggie | talk | 40 | See Heggie offerings |
| Altar | "Altar" | - | Save and respawn point |
| Cage | "Spin" | - | Switch 1 works once; later use only shows a dialog (cage quest) |
| Maze bonfire | "Choose Party" | - | Pick the two team heroes |
Doors and gates#
A door opens when you press the prompt next to its switch. Door type is cosmetic: 1 Wood (31 doors), 2 Trick (22), 3 Metal (32), 4 Sluice (5), 5 Brick (2), 6 Coffin (1), 7 Narrow (1), 8 Round (2), 9 Rotate (1), 10 Gear (2). Only Switchable doors (one in the data) toggle open and shut each time you use them; all others open once. The game may play a camera animation at the switch first; the door opens when it ends.
A hint object adds a "Check" prompt in front of doors and gates you cannot use. It can show a different message from the front and the back, and it may complete a quest flag too, so inspecting a locked door can be what unlocks the later opening. Gate types are Wood (1), Metal (2), Stone (3) and Trick (4).
Lifts#
Lifts (40 rows) have FloorMax of 2 or 3 and a start floor. The lift types are Wood (25), Round Wood (3), Small Wood (4) and Stone (8). A lift can carry a scene item: the StoryItem table has per-journey elevator columns for pickups that ride the platform. Some lift switches are "auto" and fire as soon as you step on them (no prompt).
Stairs, kicks and covers#
Climbing prompts (271 stairs): the type (1 wood, 2 metal) only selects the footstep sound, and other columns set reverb and area type. Kicks are the one-shot objects: kick a ladder down or a cover open, then the completion flag is set and the object stays changed. Both are gated by their own Show and Hide flags, and the hero must stand at the object's marked position. That a kicked object stays changed is inferred from its completion flag.
Walls#
There are two kinds. Quest walls (188 rows) are invisible colliders that exist only while their Show flags are complete and no Hide flag is. They are how the game holds you back before a boss door, during a cutscene or until a chapter event (for example "black curtain wall" and "boss wall" in the comments). Some are rebound walls: when you walk into one you are pushed away for one second and a dialog line explains why, and a wall that leads to the Dark Mist maze start shows a confirmation question instead of pushing you back. Rebound walls are detected with a short ray in front of the hero (0.2 length plus the hero radius). The black-fog rebound walls exist only in chapters 1 to 5 (3, 4, 4, 3 and 3 walls), plus the Lost Valley and maze stages. By type, the data counts a wall as a quest wall (type 1) or a boss-arena wall (type 2), and the rebound walls are type 1.
Virtual walls are the opposite: a wall you can pass through by pressing "Enter". Eight rows exist. One comment in the data names the NPC Irina going through a wall (translated, inferred).
Crates#
Ordinary crates (159 rows) open once and set their quest flag; their contents are, as far as the data shows, placed by the scene-item table, not by the crate table (inferred from the completion flags). Maze crates are different: they come in three tiers (Common, Elite and Nightmare), may be locked, and a locked crate spawns guard monsters before it can be looted. See Maze rewards and Drops and loot.
Scene pickups and the journey#
Items lying in the world are rows in StoryItem (1212 rows). Each row has four sets of columns (ItemId_1 to ItemId_4, Num_1 to Num_4, plus the flags), one per journey; MS_StoryItem.SetLoop switches them and the journey value is capped at 4. In 170 rows the amount changes between journeys (for example 2, 2, 3, 3) and in 58 rows the item changes (for example a throwable replaced by a better one). Hidden flags control when each version shows. See New Game Plus.
Hazards and the journey#
Traps (8) and tricks (60) pick their damage column by the same journey value; the story, Arcade and maze rules are in Traps and tricks#Which journey is used, and the full tables are in Traps and tricks.
Slow mud and poison mud ground force the hero to walk and cut dodge speed to 40 % of normal; the Slow status (10076) does the same on dry ground. Details are in Traps and tricks#How a trap works.
Heggies#
Forty Heggie encounters (five in each of chapters 1 to 7 and the DLC) follow a hidden happiness meter. Rules, answers and rewards are in Heggie offerings.
Death, partner and saves#
- Losing a hero swaps the partner in; only a full wipe costs 25-35 % of your Bone Fragments.
- The Ancient Silver Key revives the partner at 25 % HP.
- Altars set the respawn point; autosave every 60 s only sets the load position.
- Respawn brings back all ordinary monsters and refills potions.
The full rules, numbers and edge cases are in Death and respawn.
Hidden mechanics#
- Flags decide everything. If a door, wall or pickup is missing, check its Show and Hide flags first: a single stray Hide flag removes it permanently.
- Hide beats show, and Show needs every flag.
- Locked-door hints can unlock things because they may complete a flag.
- Maze depth silently scales hazards at levels 8, 15 and 22 (Traps and tricks#Which journey is used).
- Journey-based scene pickups: the amount of a pickup differs between journeys in 170 of 1212 rows (usually more in later journeys, though a few rows give fewer) and 58 pickups change identity.
- Virtual walls have almost no data (eight rows); most of their behavior lives in the scene.
- Mud, the Slow status (10076) and some story rules force walking with a 0.4 dodge-speed factor (Traps and tricks#How a trap works).
Trivia#
- The data labels the prompt for the cage puzzle "Spin" and the one for the maze bonfire "Choose Party".
- Stair kicks and cover kicks share the same "Kick" prompt text.
Sources#
controller/controllermodebase.lua429-493 (CheckShowQuestComplete, CheckHideQuestComplete, CompleteQuest).controller/controllerstorymode.lua3830-3850 (CheckSceneWall), 4128-4360 (CheckRouteWall, ColliderWithRouteWall, RouteWallDistance 0.2, ForceMoveColliderWallTime 1), 6396-6470 (bridge), 6456-6612 (doors, door hints), 6612-6730 (gates), 6912-7095 (stair and cover kick), 7183-7230 (elevators), 7255-7345 (crates, virtual walls), 7770-7840 (bonfire), 8797-8810 (CompleteQuest refresh).logic/scene/door.lua9-20 (DoorType),gate.lua9-14,elevator.lua5-11 and 23-29,logic/player/animalbase.lua12675-12700 (mud rules);controller/controllermain.lua4864-4885 (maze tier switch).- Region-page sources:
structdata/ms_storyitem.lua21-35 (journey columns),structdata/fs_savestory.lua1955-1980 (journey clamp),logic/battle/battledata.lua45 (GameLoopMax),controller/controllerstorymode.lua8552-8562 (altar quests) and 9315-9318 (achievement action), 4140-4200 and 4315-4345 (rebounding walls);structdata/ms_siteinfo.lua12-35 andstructdata/fs_savestory.lua3300-3380 (stop visibility, see Maps). - Tables: StoryDoor (99), StoryDoorHint (76), StoryGate (28), StoryGateHint (18), StoryBridge (2), StoryElevator (40), StoryStair (271), StoryStairKick (23), StoryCoverKick (2), StoryVirtualWall (8), StoryWall (188), StoryCrate (159), StoryFrog (40), StoryItem (1212), StoryMazeCrate (90), TrapData (8), TrickData (60). GameText UI_COMMON_ACTION_* for the prompt names.