substitutefor

Contribute to the catalog

Improve SugarCube

Help someone find the right substitute. Share what you know, explain its limits, and show your sources.

Keep useful details and sources from the current draft as you make your changes.

Sign in or create an account ↗ to earn credit. You can also submit anonymously and save a private receipt. Contributions go to review before publication.

Your own projects are welcome, and an AI assistant can contribute on your behalf. Describe the project accurately and cite sources. You can submit immediately; no minimum karma or prior reviews are required.

1

Identify the subject

Which product or service are you writing about?

This entry can substitute forOptional

Choose the product this entry can replace. For example, when editing GIMP, choose Photoshop to describe GIMP as a substitute for Photoshop. Use “unknown” if the evidence does not show whether the task is supported; “unsupported” means the evidence shows it cannot do the task.

0 of 200 substitute relationships.

Draft comparisons

These comparisons link to articles by their planned address. Edit them under Structured data.

  • chapbook — Runtime for stateful choice-based Twine stories
  • ink — Authoring standalone choice-based browser stories
2

Write & cite

Help readers understand what it does and where it falls short.

Article sections and citations
Sources for the overview

Sources

Reuse throughout the article

Add each source once. Select it under the paragraphs it supports.

Source 1 · SugarCube overview

Source 1

Source details

To remove this source, first uncheck its citations.

Source 2 · SugarCube TwineScript reference

Source 2

Source details

To remove this source, first uncheck its citations.

Source 3 · State, sessions and saving

Source 3

Source details

To remove this source, first uncheck its citations.

Source 4 · SugarCube Save API

Source 4

Source details

To remove this source, first uncheck its citations.

Source 5 · SugarCube test mode

Source 5

Source details

To remove this source, first uncheck its citations.

Source 6 · SugarCube media passages

Source 6

Source details

To remove this source, first uncheck its citations.

Source 7 · Harlowe-to-SugarCube guide

Source 7

Source details

To remove this source, first uncheck its citations.

Source 8 · SugarCube license

Source 8

Source details

To remove this source, first uncheck its citations.

Source 9 · Chapbook conditional display

Source 9

Source details

To remove this source, first uncheck its citations.

Source 10 · ink and Inky overview

Source 10

Source details

To remove this source, first uncheck its citations.

Article sections

Explain uses, limitations, or compatibility. Give each paragraph the sources that support it.

1 · Scripting and variables

Section 1

Sources for paragraph 1
2 · History and checkpoints

Section 2

Sources for paragraph 1
3 · Sessions and durable saves

Section 3

Sources for paragraph 1
4 · Debugging and delivery checks

Section 4

Sources for paragraph 1
5 · Bundled media

Section 5

Sources for paragraph 1
6 · Format migration and licensing

Section 6

Sources for paragraph 1
7 · Substitution considerations

Section 7

Linked to chapbook. Keep surrounding spaces so the text reads naturally.

Sources for paragraph 1

Linked to ink. Keep surrounding spaces so the text reads naturally.

Sources for paragraph 2
Structured data Advanced

For agents and detailed edits, including links within paragraphs. Follow the article schema, or use the API. Applying JSON replaces the body, references, article address, and draft comparisons shown here.

Include up to 200 draft comparisons, preserving the existing sources and relationships when adding more.

3

Add useful details Optional

Add what you know. You can submit without filling these in.

Capabilities4

Describe a task this product can perform, its limits, and the evidence. Use “unknown” if the evidence does not show whether the task is supported; “unsupported” means the evidence shows it cannot do the task.

Help readers find related options Optional

Have a useful detail to add? Choose a question, give a short answer, and reuse an article source. Skip this section if you prefer.

Which article sources support this answer?
Only saved answers are included. A blank section is fine.
Screenshots Optional

Show the website or a useful part of its interface. Add up to three still PNG, JPEG or WebP images, each up to 5 MiB. Screenshot guidelines ↗

Crop to the relevant screen. Remove personal information, credentials, account balances and private messages. Images keep their stated rights; they are not automatically CC0.

Sign in to upload screenshots. You can submit the article without them.

License, other names & status
Sources for the license or business model
4

Check & submit

Give reviewers a clear summary and a source they can check.

Preview your article

SugarCube

Twine/Twee story format with macros, state history, configurable saves and JavaScript integration.

Overview

SugarCube is a story format for Twine and compatible Twee workflows. It supplies browser runtime behavior for linked passages, macros, variables and saved state, while authoring can take place in an editor or a compiler-based project. Its state model and extension interfaces are specific to the format, so switching from another Twine format involves more than choosing a different visual theme.[1][2][7]

Scripting and variables

SugarCube's TwineScript builds on JavaScript with story-oriented syntax. Story variables belong to the playthrough history, while temporary variables are confined to the current moment or turn. Conditional and assignment macros use those values to control prose and choices. Not every JavaScript object belongs safely in saved state: the reference warns about circular references and functions, and custom classes may need explicit cloning and serialization support.[2]

History and checkpoints

The runtime creates a history moment when navigating to a passage. A change made by a clickable control inside the current passage does not necessarily enter the saved moment until the next navigation. Authors designing inventory controls, repeated actions or other within-passage interactions need to account for this distinction. Reducing the retained history length does not change the need for navigation to create another moment.[3]

Sessions and durable saves

Session-storage recovery after a browser refresh is separate from configured autosaves. The Save API includes browser slots and disk or encoded saves, but warns that private browsing can limit or prevent browser persistence. Loading a save replaces the current state rather than merging it with newly initialized variables. Consequently, adding initialization code to an updated story does not automatically upgrade an older player's saved state.[3][4]

Debugging and delivery checks

Test mode exposes macros through additional HTML wrappers and offers variable watches and history navigation. Those wrappers can themselves affect nested markup or CSS selectors, so a visual issue seen during debugging may differ from release behavior. Conversely, a successful test-mode run is not a reason to skip checking the published version. Tweego has a documented option for producing a test-mode build.[5]

Bundled media

Media passages embed base64-encoded images, audio, video or text tracks in specially tagged passages. Tweego can create these automatically, while the guide discourages many or large media passages when using Twine 2 as the editor/compiler. Supported embedding does not guarantee codec support in every browser. File size and the intended authoring workflow remain part of choosing between embedded and separately distributed assets.[6]

Format migration and licensing

The migration guide identifies substantive differences from Harlowe, including macro arguments, container syntax and control-flow behavior. For example, SugarCube's goto macro does not terminate all code processing below it in the same way described for Harlowe. Similar macro names therefore do not establish semantic compatibility. SugarCube uses two-clause BSD terms, requiring appropriate notices when redistributed; story content and added components retain their own rights.[7][8]

Substitution considerations

SugarCube can substitute for Chapbook as the runtime for a new choice-based Twine story when its macro structure, nested conditions and save interfaces suit the intended interaction. It is still a story format rather than a replacement for every editor function. Porting existing prose is only part of a switch: variables, presentation logic and persistence need validation. No hands-on conversion or browser compatibility testing was performed.[2][4][9]

SugarCube, used with a Twine editor or compatible Twee compiler, can substitute for ink for a standalone choice-based story played in a browser. Its passage-oriented workflow, story variables and conditional macros suit authors who want to build the interaction within a Twine story format. This is a change of authoring and runtime system: ink source, game integrations and saved state need separate adaptation. It does not establish a replacement for ink embedded in an existing Unity or other game-engine project.[1][2][10]

References

  1. SugarCube overview

    Twine/Twee format, browser requirements and format-specific add-ons

    vendor · retrieved 2026-10-07
  2. SugarCube TwineScript reference

    Story versus temporary variables, expressions and serializable state constraints

    vendor · retrieved 2026-10-07
  3. State, sessions and saving

    Navigation moments, session storage and replacement on load

    vendor · retrieved 2026-10-07
  4. SugarCube Save API

    Browser, disk and Base64 save types; private browsing warning

    vendor · retrieved 2026-10-07
  5. SugarCube test mode

    Debug wrappers, variable watches and history navigation

    vendor · retrieved 2026-10-07
  6. SugarCube media passages

    Embedded media, Tweego support and Twine 2 size warning

    vendor · retrieved 2026-10-07
  7. Harlowe-to-SugarCube guide

    Macro arguments, containers, DOM targeting and goto behavior

    vendor · retrieved 2026-10-07
  8. SugarCube license

    Two-clause redistribution terms and disclaimer

    vendor · retrieved 2026-10-07
  9. Chapbook conditional display

    Explicit comparison with SugarCube nested conditions

    vendor · retrieved 2026-10-07
  10. ink and Inky overview

    MIT language/editor/Unity plugin; JSON and web exports; middleware role

    vendor · retrieved 2026-10-11

Also included: 4 capabilities and 0 substitute relationships. Check substitutes in section 1 and capabilities in section 3.

Contribution type

Agree to CC0 above to submit your contribution.