{"schemaVersion":"1.0","record":{"label":"Chapbook","description":"Twine 2 story format with passage variables, presentation modifiers and browser-local progress.","aliases":[],"kind":"software","website":"https://klembot.github.io/chapbook/","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.","license":"MIT; commercial stories allowed; included assets retain separate rights","lifecycle":"active","example":false,"features":[{"name":"Passage state and conditional text","status":"supported","detail":"Variables are set at passage entry; modifiers govern subsequent text blocks.","useCase":"Runtime and presentation for choice-based Twine 2 stories","platforms":["Twine 2 authoring","Modern web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://klembot.github.io/chapbook/guide/en/state/the-vars-section.html","locator":"Evaluation, naming and underscore convention","retrievedAt":"2026-10-07T21:02:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/conditional-display.html","locator":"Non-nesting modifiers and explicit SugarCube comparison","retrievedAt":"2026-10-07T21:01:45Z","kind":"vendor"}]},{"name":"Nested conditional modifiers","status":"unsupported","detail":"Modifiers cannot directly nest; compound conditions or embedded passages express the intended logic.","useCase":"Runtime and presentation for choice-based Twine 2 stories","platforms":["Twine 2 authoring","Modern web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://klembot.github.io/chapbook/guide/en/state/conditional-display.html","locator":"Non-nesting modifiers and explicit SugarCube comparison","retrievedAt":"2026-10-07T21:01:45Z","kind":"vendor"}]},{"name":"Progress persistence","status":"limited","detail":"Automatic passage-boundary saves use the current browser's local storage.","useCase":"Runtime and presentation for choice-based Twine 2 stories","platforms":["Twine 2 authoring","Modern web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://klembot.github.io/chapbook/guide/en/state/continuity.html","locator":"Passage autosaves, browser-local state and restart semantics","retrievedAt":"2026-10-07T21:02:33Z","kind":"vendor"}]},{"name":"Backstage testing","status":"supported","detail":"Authors can inspect and change variables and restore local state snapshots.","useCase":"Runtime and presentation for choice-based Twine 2 stories","platforms":["Twine 2 authoring","Modern web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://klembot.github.io/chapbook/guide/en/state/backstage.html","locator":"Variable editing, local snapshots and history","retrievedAt":"2026-10-07T21:02:53Z","kind":"vendor"}]}],"alternatives":[],"slug":"chapbook","draftAlternatives":[{"targetSlug":"sugarcube","status":"limited","detail":"Can replace SugarCube as a Twine 2 runtime for newly authored choice stories, but macros, variable conventions and saving expectations need rewriting and testing.","useCase":"Runtime and presentation for choice-based Twine 2 stories","platforms":["Twine 2 authoring","Modern web browsers"],"region":"Version, build and integration requirements apply","evidence":[{"url":"https://klembot.github.io/chapbook/guide/en/","locator":"Runtime role, Twine version scope and design choices","retrievedAt":"2026-10-07T21:01:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/conditional-display.html","locator":"Non-nesting modifiers and explicit SugarCube comparison","retrievedAt":"2026-10-07T21:01:45Z","kind":"vendor"},{"url":"https://www.motoslave.net/sugarcube/2/","locator":"Alternative Twine/Twee story format","retrievedAt":"2026-10-07T21:01:27Z","kind":"vendor"}]}],"evidence":[{"url":"https://klembot.github.io/chapbook/","locator":"Twine 2 format and MIT commercial-use statement","retrievedAt":"2026-10-07T21:01:27Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/","locator":"Runtime role, Twine version scope and design choices","retrievedAt":"2026-10-07T21:01:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/the-vars-section.html","locator":"Evaluation, naming and underscore convention","retrievedAt":"2026-10-07T21:02:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/conditional-display.html","locator":"Non-nesting modifiers and explicit SugarCube comparison","retrievedAt":"2026-10-07T21:01:45Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/continuity.html","locator":"Passage autosaves, browser-local state and restart semantics","retrievedAt":"2026-10-07T21:02:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/backstage.html","locator":"Variable editing, local snapshots and history","retrievedAt":"2026-10-07T21:02:53Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/multimedia/publishing-models.html","locator":"Relative assets and externally hosted media workflows","retrievedAt":"2026-10-07T21:02:33Z","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/multimedia/audio.html","locator":"Ambient/effect distinction, text descriptions and autoplay limits","retrievedAt":"2026-10-07T21:02:53Z","kind":"vendor"},{"url":"https://github.com/klembot/chapbook/blob/develop/guide/en/references/version-history.md","locator":"2.0 extension/state changes and 2.3.1 removed Unsplash insert","retrievedAt":"2026-10-07T21:03:59Z","kind":"vendor"},{"url":"https://github.com/klembot/chapbook/blob/develop/LICENSE","locator":"Permission and copyright-notice requirement","retrievedAt":"2026-10-07T21:02:53Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://klembot.github.io/chapbook/","locator":"Twine 2 format and MIT commercial-use statement","retrievedAt":"2026-10-07T21:01:27Z","id":"home","title":"Chapbook overview","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/","locator":"Runtime role, Twine version scope and design choices","retrievedAt":"2026-10-07T21:01:33Z","id":"intro","title":"Chapbook guide introduction","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/the-vars-section.html","locator":"Evaluation, naming and underscore convention","retrievedAt":"2026-10-07T21:02:33Z","id":"vars","title":"The vars section","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/conditional-display.html","locator":"Non-nesting modifiers and explicit SugarCube comparison","retrievedAt":"2026-10-07T21:01:45Z","id":"conditions","title":"Conditional display","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/continuity.html","locator":"Passage autosaves, browser-local state and restart semantics","retrievedAt":"2026-10-07T21:02:33Z","id":"saves","title":"Continuity between sessions","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/state/backstage.html","locator":"Variable editing, local snapshots and history","retrievedAt":"2026-10-07T21:02:53Z","id":"backstage","title":"State backstage","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/multimedia/publishing-models.html","locator":"Relative assets and externally hosted media workflows","retrievedAt":"2026-10-07T21:02:33Z","id":"media","title":"Publishing models","kind":"vendor"},{"url":"https://klembot.github.io/chapbook/guide/en/multimedia/audio.html","locator":"Ambient/effect distinction, text descriptions and autoplay limits","retrievedAt":"2026-10-07T21:02:53Z","id":"audio","title":"Chapbook audio","kind":"vendor"},{"url":"https://github.com/klembot/chapbook/blob/develop/guide/en/references/version-history.md","locator":"2.0 extension/state changes and 2.3.1 removed Unsplash insert","retrievedAt":"2026-10-07T21:03:59Z","id":"history","title":"Chapbook version history","kind":"vendor"},{"url":"https://github.com/klembot/chapbook/blob/develop/LICENSE","locator":"Permission and copyright-notice requirement","retrievedAt":"2026-10-07T21:02:53Z","id":"license","title":"Chapbook MIT license","kind":"vendor"},{"url":"https://www.motoslave.net/sugarcube/2/","locator":"Alternative Twine/Twee story format","retrievedAt":"2026-10-07T21:01:27Z","id":"sugar","title":"SugarCube overview","kind":"vendor"}],"overviewCitations":["home","intro","backstage"],"licenseCitations":["license","home"],"sections":[{"id":"state","heading":"Passage state and text","paragraphs":[{"id":"state-detail","content":[{"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."}],"citations":["vars"]}]},{"id":"conditions","heading":"Conditional structure","paragraphs":[{"id":"conditions-detail","content":[{"text":"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."}],"citations":["conditions"]}]},{"id":"saving","heading":"Persistence and restarting","paragraphs":[{"id":"saving-detail","content":[{"text":"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."}],"citations":["saves"]}]},{"id":"testing","heading":"Backstage testing","paragraphs":[{"id":"testing-detail","content":[{"text":"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."}],"citations":["backstage"]}]},{"id":"media","heading":"Media delivery","paragraphs":[{"id":"media-detail","content":[{"text":"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."}],"citations":["media","audio"]}]},{"id":"versions","heading":"Licensing and version changes","paragraphs":[{"id":"versions-detail","content":[{"text":"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."}],"citations":["license","home","history"]}]},{"id":"comparison","heading":"Substitution considerations","paragraphs":[{"id":"comparison-detail","content":[{"text":"Chapbook can substitute for "},{"text":"SugarCube","targetSlug":"sugarcube"},{"text":" 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."}],"citations":["intro","conditions","vars","saves","sugar"]}]}]},"id":"Q1332","revision":1380,"updatedAt":"2026-10-14T08:36:10Z","sourceUrl":"https://substitutefor.net/entities/Q1332?revision=1380"}}