# ChoiceScript

Text\-based language and runtime for branching interactive novels with persistent character statistics\.

ID: Q1333 · Revision: 1381

Type: software · License: ChoiceScript License v1\.0: noncommercial use; commercial use requires a separate license[^license] · Status: active

Website: https://www.choiceofgames.com/make-your-own-games/choicescript-intro/



ChoiceScript is a text\-based programming language and runtime for interactive novels\. Authors write scenes containing prose, choices and commands that update character state or choose later branches\. It supports browser\-based testing and HTML export, with dedicated tools for exploring narrative paths and a separate licensing route for commercial use\.[^intro][^test][^export][^license]

## Writing scenes

A story is organized into plain\-text scene files\. Indentation groups the outcomes belonging to each choice, while labels and jumps allow paths to reconnect instead of duplicating prose\. Variables can carry earlier decisions into later scenes\. Files need the expected UTF\-8 encoding, and the documented local workflow uses a Node\.js server to preview changes in a browser\. This is a scripting environment rather than a visual passage map\.[^intro]

## Character state and statistics

The statistics screen is itself a scene that temporarily interrupts the current scene and then returns to it\. Authors can show text values, percentage bars and opposed pairs, or keep selected variables hidden\. An opposed pair can represent two ends of one value rather than two independently changing attributes\. This supports character traits and relationships without requiring every internal variable to appear in the interface\.[^stats]

## Testing branching narratives

Quicktest attempts alternatives on both sides of conditions and can report problems on paths that real players cannot reach\. Randomtest instead runs repeated playthroughs with reproducible seeds and produces line hit counts\. A line with no hits may be unreachable or simply rare\. The tools complement one another, but neither confirms prose quality, balanced decisions or every possible state combination; the documentation explicitly retains a role for manual testing\.[^test]

## HTML export and saved progress

The exporter produces an HTML game file for distribution or a suitable web host\. The export guide warns that omitting the story's IFID can cause progress to disappear when the browser tab is closed or refreshed\. With the identifier configured, progress is stored locally in the browser\. That is not evidence of account\-based cloud synchronization or portable saves across devices\.[^export]

## Licensing and commercial use

The default ChoiceScript License permits noncommercial use and modification while requiring retention of the license\. It also requires an unrestricted, transferable, nonexclusive license to the named developers for modifications to the interpreter\. Commercial purposes, including advertising revenue, are outside that default permission\. A creator seeking paid distribution needs the applicable commercial agreement rather than assuming that publicly available source is permissively licensed\.[^license]

## Publishing routes

The publisher documents self\-distribution to testers or public free distribution, alongside its publishing labels\. Hosted Games can distribute titles as mobile applications and on Steam, with forum beta testing described as a prerequisite\. Those routes involve their own requirements; compiling a working HTML file does not by itself establish acceptance, store approval or a particular revenue arrangement\.[^export]

## Substitution considerations

ChoiceScript can substitute for [Twine](/twine) for a new choice\-driven story whose main interactions are reading, selecting options and changing character state\. It favors a scene\-and\-command workflow with a built\-in statistics presentation\. The comparison does not imply import of Twine passages or macros, nor equivalent commercial permissions\. A switch should be evaluated around the intended narrative mechanics and distribution route, not just the shared ability to produce HTML\. No hands\-on migration was performed\.[^intro][^stats][^twine][^license]

## Capabilities and substitutions

### Branching scenes and state — supported

Indented choices and variables control later story outcomes\.[^intro]

Use case: Choice\-driven interactive novels with character statistics · Platforms: Browser runtime, Node\.js development server, Windows/macOS documented setup · Region: Version, build and integration requirements apply

### Automated narrative testing — limited

Quicktest and Randomtest catch different problems but do not replace manual review or prove complete path coverage\.[^test]

Use case: Choice\-driven interactive novels with character statistics · Platforms: Browser runtime, Node\.js development server, Windows/macOS documented setup · Region: Version, build and integration requirements apply

### Exported progress persistence — limited

The export guide requires an IFID to preserve progress locally across browser refreshes\.[^export]

Use case: Choice\-driven interactive novels with character statistics · Platforms: Browser runtime, Node\.js development server, Windows/macOS documented setup · Region: Version, build and integration requirements apply

### Commercial distribution — limited

The default license excludes commercial purposes, including advertising revenue; a separate license is needed\.[^license]

Use case: Choice\-driven interactive novels with character statistics · Platforms: Browser runtime, Node\.js development server, Windows/macOS documented setup · Region: Version, build and integration requirements apply

### [Substitute for Twine](/twine) — limited

Can replace authoring of new choice\-driven browser stories when a scene\-based language and stat\-centered design are preferred\. Syntax, project structure and commercial terms differ; no source conversion is established\.[^intro][^stats][^license][^twine]

Use case: Choice\-driven interactive novels with character statistics · Platforms: Browser runtime, Node\.js development server, Windows/macOS documented setup · Region: Version, build and integration requirements apply

## References

[^intro]: [ChoiceScript introduction](<https://www.choiceofgames.com/make-your-own-games/choicescript-intro/>) — Scene files, indentation, choices, variables and development server (vendor; retrieved 2026-10-07T20:58:39Z)

[^stats]: [ChoiceScript stats screen](<https://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/>) — Stat charts, opposed pairs and return to paused scene (vendor; retrieved 2026-10-07T20:59:46Z)

[^test]: [Automatic ChoiceScript testing](<https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/>) — Quicktest, Randomtest and coverage/false\-positive caveats (vendor; retrieved 2026-10-07T20:59:00Z)

[^export]: [Exporting and publishing ChoiceScript](<https://www.choiceofgames.com/make-your-own-games/exporting-and-publishing-your-game/>) — HTML export, IFID persistence and publishing routes (vendor; retrieved 2026-10-07T20:59:00Z)

[^license]: [ChoiceScript License v1\.0](<https://github.com/dfabulich/choicescript/blob/main/LICENSE.txt>) — Noncommercial scope, interpreter modifications and separate commercial license (vendor; retrieved 2026-10-07T20:59:32Z)

[^twine]: [Twine overview](<https://twinery.org/>) — Nonlinear story authoring, variables and HTML output (vendor; retrieved 2026-10-07T20:47:21Z)

Source revision: https://substitutefor.net/entities/Q1333?revision=1381
