States
Behavioral definitions for the game's runtime states — the rules behind how the player moves between the city, free-explore fields, and authored quests, plus the systems that ride on top.
These pages are normative. The key words MUST, MUST NOT, REQUIRED, SHALL, SHOULD, MAY, and OPTIONAL are used as described in RFC 2119 — they define expected behavior, not current implementation status.
Each behavior page cross-references the .gd script(s) that handle it, so the spec links back to the code — via an Implemented by section on most pages, or the "where each behavior lives" module map on Field Stage Lifecycle.
Definitions
- Session Model — the foundational split between Field Context (the expedition: map, sections, position — what the telepipe binds to) and Quest State (objectives, completion, rewards). Decoupling them is what makes the telepipe a movement primitive and dissolves the quest/free-field confusion.
- Player State Machine — the player avatar's runtime states (idle / locomotion / attacking / dodging / damaged / down / cutscene), the transitions between them, and the contract a future
player.gdsplit must preserve. - Companion Locomotion — the follow-NPC's wait / walk / run animation contract: position MAY read the player's locomotion state, but the clip MUST be a pure function of the companion's own measured planar speed (so a rooted player attack never makes the companion run in place).
- Companion Combat — phase 1 of the PSO-style fighting partner: the FOLLOW / ENGAGE / ATTACK / REGROUP combat FSM, player-leashed target selection with assist priority, and attack resolution through the player's own cone + hurtbox pipeline. Offense only — taking damage and enemy aggro are phase 2.
- Start Menu — the PSO-style start-menu
Modestate machine (Items / Equip / Techs / Palette / Mags / Quest / System), its non-pausing overlay behavior, and the contract a future renderer / input / actions split must preserve. - Area Map — the centered fog-of-war grid overlay (R2 / M): visited-cell reveal, door states, city/area warp markers, and the tester reveal toggle.
- Quick Weapon Menu — the in-field weapon palette: canonical-gate row filtering, equipped-row-sorts-last ordering, the unequip-to-barehanded select path, and the barehanded (
common46) attack SFX. - Quest vs Field — the City / Field / Quest macro-states and how
SessionManagertransitions between them. - Field Stage Lifecycle — the per-cell runtime contract: load/restore, plan actions, object persistence, gates & fences, and which module owns what.
- Free-Field Generation (RE-measured) — the contract for reproducing a PSZ free field to parity from the psz-re ROM observations: the room vocabulary, the always-a-tree layout, derived rotation, gate/key balance, and weighted enemy waves.
- Telepipe — the single-slot telepipe lifecycle, the one-active rule, and round-trip return behavior.
- Story Progression — completed-mission flags, quest prerequisite gates, and how the guild counter derives REPORT / LOCKED / CLEAR.
- Difficulty Unlock — the Normal → Hard → Super-Hard story-clear gate, per-character persistence, and the counter's tier gating.
- Quest Objectives — objective schema, count tracking, and how completion gates the report action.
- Shops — the one screen skeleton, input grammar, and row contract every shop shares; how Item / Weapon / Photon / Synthesis / Tekker / Storage differ; and why the guild counter is deliberately not a shop.
- Cell Objects — per-object reference pages: a live 3D model viewer, config schema, persisted state, and interactions for every object a field cell can contain.
- Enemies — the roster, the behavior state machine, status effects, and per-model SFX.
- Boss Behavior (DRAFT) — the arena-bound boss contract: the shared phase/attack/anchor schema (normative) and per-boss draft tables read off the rig clip vocabularies, pending observation in
#/boss-room.