software · Q1332
Chapbook
Twine 2 story format with passage variables, presentation modifiers and browser-local progress.
Overview
Chapbook is a story format for Twine 2: it supplies the runtime and presentation of a published browser story rather than replacing the Twine editor. It combines linked passages with a dedicated variables section, text modifiers and inserts. Its authoring tools include a backstage view for inspecting state and revisiting test scenarios.[1][2][6]
Passage state and text
A passage can begin with a vars section separated from the displayed text. Its assignments take effect when the passage is visited, including when the passage is embedded elsewhere. An expression is evaluated when assigned rather than continuously recalculated. An underscore prefix can be a naming convention for short-lived values, but Chapbook does not automatically enforce the temporary lifetime that some other formats associate with it.[3]
Conditional structure
Conditional modifiers affect the text immediately following them and cannot directly nest. More involved conditions therefore need explicit combined expressions, helper variables or separately embedded passages. This makes source structure a material consideration when switching formats: visually similar prose can depend on quite different rules for when content appears. Chapbook's guide illustrates rewriting nested SugarCube logic rather than simply changing the selected format.[4]
Persistence and restarting
The documented default saves player state at passage navigation using local storage. Progress belongs to that browser and device, so changing browsers or removing stored browser data can interrupt continuity. A link back to the opening passage does not clear accumulated variables; a restart insert is the intended way to begin again. This is separate from a cloud account or a guaranteed portable save-file workflow.[5]
Backstage testing
Backstage exposes variables for inspection and direct value changes. Authors can capture a state snapshot at a useful point and restore it while testing a later scene, while the history view records state changes during navigation. These snapshots are browser-local development aids. They should not be confused with a reviewed player-facing save interface or proof that all narrative branches have been exercised.[6]
Media delivery
The publishing guide describes distributing assets beside the story with relative paths, or loading them from external hosts. The latter retains a network dependency. Audio distinguishes looping ambient sound from one-shot effects and supports text descriptions as an alternative when sound is unavailable. Browser autoplay policies can prevent immediate playback on reopening a story, so media behavior needs testing in the delivered environment.[7][8]
Licensing and version changes
Chapbook uses the MIT license and permits commercial stories. Version changes still matter: the 2.0 release changed extension registration and page structure, while 2.3.1 removed the Unsplash-image insert after its external API stopped working. Projects with custom JavaScript or media integrations need to examine those changes instead of assuming that a minor-looking runtime replacement preserves every extension.[1][9][10]
Substitution considerations
Chapbook can substitute for SugarCube as the runtime for a new Twine 2 choice story when its variables-first organization and presentation tools fit the design. It complements the editor rather than replacing it. Existing macros, state conventions and save behavior are migration work, not interchangeable components. No hands-on conversion or cross-browser testing was performed.[2][3][4][5][11]
Capabilities & limitations
Passage state and conditional text
supportedVariables are set at passage entry; modifiers govern subsequent text blocks.[3][4]
Runtime and presentation for choice-based Twine 2 stories · Twine 2 authoring, Modern web browsers · Version, build and integration requirements apply
2 sources · check evidence
Evaluation, naming and underscore convention
vendor · checked 2026-10-07Non-nesting modifiers and explicit SugarCube comparison
vendor · checked 2026-10-07Nested conditional modifiers
unsupportedModifiers cannot directly nest; compound conditions or embedded passages express the intended logic.[4]
Runtime and presentation for choice-based Twine 2 stories · Twine 2 authoring, Modern web browsers · Version, build and integration requirements apply
1 source · check evidence
Non-nesting modifiers and explicit SugarCube comparison
vendor · checked 2026-10-07Progress persistence
limitedAutomatic passage-boundary saves use the current browser's local storage.[5]
Runtime and presentation for choice-based Twine 2 stories · Twine 2 authoring, Modern web browsers · Version, build and integration requirements apply
1 source · check evidence
Passage autosaves, browser-local state and restart semantics
vendor · checked 2026-10-07Backstage testing
supportedAuthors can inspect and change variables and restore local state snapshots.[6]
Runtime and presentation for choice-based Twine 2 stories · Twine 2 authoring, Modern web browsers · Version, build and integration requirements apply
1 source · check evidence
Variable editing, local snapshots and history
vendor · checked 2026-10-07Can substitute for
These are products or services this entry can replace. Check the task and limitations for each comparison.
SugarCube for Runtime and presentation for choice-based Twine 2 stories
limitedCan replace SugarCube as a Twine 2 runtime for newly authored choice stories, but macros, variable conventions and saving expectations need rewriting and testing.[2][4][11]
Twine 2 authoring, Modern web browsers · Version, build and integration requirements apply
References
- Chapbook overview
Twine 2 format and MIT commercial-use statement
vendor · retrieved 2026-10-07 - Chapbook guide introduction
Runtime role, Twine version scope and design choices
vendor · retrieved 2026-10-07 - The vars section
Evaluation, naming and underscore convention
vendor · retrieved 2026-10-07 - Conditional display
Non-nesting modifiers and explicit SugarCube comparison
vendor · retrieved 2026-10-07 - Continuity between sessions
Passage autosaves, browser-local state and restart semantics
vendor · retrieved 2026-10-07 - State backstage
Variable editing, local snapshots and history
vendor · retrieved 2026-10-07 - Publishing models
Relative assets and externally hosted media workflows
vendor · retrieved 2026-10-07 - Chapbook audio
Ambient/effect distinction, text descriptions and autoplay limits
vendor · retrieved 2026-10-07 - Chapbook version history
2.0 extension/state changes and 2.3.1 removed Unsplash insert
vendor · retrieved 2026-10-07 - Chapbook MIT license
Permission and copyright-notice requirement
vendor · retrieved 2026-10-07 - SugarCube overview
Alternative Twine/Twee story format
vendor · retrieved 2026-10-07
Discussion & disputes
Ask about unclear claims or explain a concern with supporting sources. If you have a specific fix, suggest a correction.
No discussion yet.
Revision history
Open a revision to read an earlier version of this article.
| Revision | Timestamp | Edit summary |
|---|---|---|
| 1380 | 2026-10-14 08:36:10 | /* wbeditentity-create-item:0| */ sf:3da7619f-4658-4de1-8b2c-105a999d5506:v1 | Add Chapbook as a Twine runtime alternative to SugarCube, distinguishing state syntax, autosave scope and extension migration. | attribution: /proposals/3da7619f-4658-4de1-8b2c-105a999d5506 |