Concepts
States and Linear Progression
Read Chapter and Objective states as a deterministic state machine, including completion, skipping, failure, and restoration.
Two state machines work together
| Owner | State | Meaning |
|---|---|---|
| Chapter | NotStarted | No sequence is running in the current state |
| Chapter | Active | One eligible ordered position is current |
| Chapter | Completed | All entries are Completed or Skipped |
| Chapter | Failed | An explicit failure request was accepted |
| Objective | NotStarted | Not yet evaluated or activated |
| Objective | Active | The only position that accepts normal completion |
| Objective | Completed | Accepted with completion work |
| Objective | Skipped | Condition failed or caller requested no completion actions |
| Objective | Failed | Was active or waiting when its Chapter failed |
Boolean conditions decide participation, not order
Every entry remains in the array. Required True State and Required False State decide whether that position participates in this run. The Chapter checks them only when it reaches the position. A failed condition marks the entry Skipped and advances; it does not jump to an arbitrary named Objective.
Boolean states come from ChapterManager.GetProgressState when a Manager exists. They are lightweight named conditions, not inventory records or general save-game objects. Use them for facts such as generator_unlocked, and let the inventory or quest system remain responsible for its own structured data.
Rejection protects the sequence
- A completion request is accepted only while the Chapter is Active.
- The requested identifier must equal the current Ordered Objective ID exactly.
- The current record must be Active; Completed, Skipped, Failed, and missing rows reject the call.
- A repeated request after advancement returns false and does not replay actions or events.
- A transition in progress blocks failure, but ordinary state observation remains available.
These checks make callbacks from UI, physics, animation, or third-party assets safe to call more than once. The caller should still inspect the returned value when it needs to know whether progression changed.
Only terminal progress is restored
Completed and Skipped Objective states and Completed Chapter state are persisted incrementally. Active and Failed are transient; they are not restored after leaving Play Mode or restarting a player. Hydration applies terminal state without invoking historical start, completion, or failure events. If a Chapter has a completed record but still contains a nonterminal Objective, the Manager preserves the data, warns, and resumes from the first nonterminal position rather than inventing completion.
Read Progress State Persistence for keys, flushing, clearing, profiles, and custom stores.