1 dialogue runtime state and choice authority
forgejo-actions edited this page 2026-07-11 12:38:13 +00:00

Dialogue Runtime State And Choice Authority

Dialogue runtime turns authored conversation graphs into available events, gated choices, state writes, and authoritative server decisions. It is where story content becomes per-player runtime state instead of only catalog text.

Purpose

Use this page when a dialogue choice is missing, a choice appears locally but is rejected by the server, or a dialogue event should set gameplay state, spend inventory, or unlock follow-up content.

Event Resolution

Dialogue events are resolved from catalog ids, NPC context, actor state, and current gameplay conditions. The runtime should name the event, sequence, branch, and node that produced a choice so debugging can trace authoring back to the source record.

Sequences, Branches, And Choice Gates

Choices are gated by condition expressions, dialogue state, quest state, inventory or currency requirements, and branch availability. The preview path can explain why a choice is hidden, but the server remains the final authority for online gameplay.

Dialogue State Profiles

Persistent dialogue state records which branches, flags, and memory facts the actor has already touched. State profiles should be stable across login and transfer so a player does not repeat one-shot dialogue after reconnect.

Local Preview Versus Server Authority

Local preview is useful for authoring and route checks. Server authority validates the submitted choice intent against the current authoritative catalogs and actor state. A valid preview can still be rejected online if the state changed between preview and submission.

Effects And Costs

Dialogue choices can apply semantic effects, including state writes, unlocks, event ids, inventory costs, and reward-style grants. Economy-backed effects must route through player economy authority, not through a client-side dialogue state mutation.

Debugging

Use dialogue debug traces, validation output, and gameplay action audit rows. Common failures are missing event ids, stale branch ids, unmet conditions, missing inventory, unknown NPC context, or a choice request built from an old snapshot.