{"schemaVersion":"1.0","record":{"label":"ChoiceScript","description":"Text-based language and runtime for branching interactive novels with persistent character statistics.","aliases":[],"kind":"software","website":"https://www.choiceofgames.com/make-your-own-games/choicescript-intro/","overview":"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.","license":"ChoiceScript License v1.0: noncommercial use; commercial use requires a separate license","lifecycle":"active","example":false,"features":[{"name":"Branching scenes and state","status":"supported","detail":"Indented choices and variables control later story outcomes.","useCase":"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","evidence":[{"url":"https://www.choiceofgames.com/make-your-own-games/choicescript-intro/","locator":"Scene files, indentation, choices, variables and development server","retrievedAt":"2026-10-07T20:58:39Z","kind":"vendor"}]},{"name":"Automated narrative testing","status":"limited","detail":"Quicktest and Randomtest catch different problems but do not replace manual review or prove complete path coverage.","useCase":"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","evidence":[{"url":"https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/","locator":"Quicktest, Randomtest and coverage/false-positive caveats","retrievedAt":"2026-10-07T20:59:00Z","kind":"vendor"}]},{"name":"Exported progress persistence","status":"limited","detail":"The export guide requires an IFID to preserve progress locally across browser refreshes.","useCase":"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","evidence":[{"url":"https://www.choiceofgames.com/make-your-own-games/exporting-and-publishing-your-game/","locator":"HTML export, IFID persistence and publishing routes","retrievedAt":"2026-10-07T20:59:00Z","kind":"vendor"}]},{"name":"Commercial distribution","status":"limited","detail":"The default license excludes commercial purposes, including advertising revenue; a separate license is needed.","useCase":"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","evidence":[{"url":"https://github.com/dfabulich/choicescript/blob/main/LICENSE.txt","locator":"Noncommercial scope, interpreter modifications and separate commercial license","retrievedAt":"2026-10-07T20:59:32Z","kind":"vendor"}]}],"alternatives":[],"slug":"choicescript","draftAlternatives":[{"targetSlug":"twine","status":"limited","detail":"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.","useCase":"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","evidence":[{"url":"https://www.choiceofgames.com/make-your-own-games/choicescript-intro/","locator":"Scene files, indentation, choices, variables and development server","retrievedAt":"2026-10-07T20:58:39Z","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/","locator":"Stat charts, opposed pairs and return to paused scene","retrievedAt":"2026-10-07T20:59:46Z","kind":"vendor"},{"url":"https://twinery.org/","locator":"Nonlinear story authoring, variables and HTML output","retrievedAt":"2026-10-07T20:47:21Z","kind":"vendor"},{"url":"https://github.com/dfabulich/choicescript/blob/main/LICENSE.txt","locator":"Noncommercial scope, interpreter modifications and separate commercial license","retrievedAt":"2026-10-07T20:59:32Z","kind":"vendor"}]}],"evidence":[{"url":"https://www.choiceofgames.com/make-your-own-games/choicescript-intro/","locator":"Scene files, indentation, choices, variables and development server","retrievedAt":"2026-10-07T20:58:39Z","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/","locator":"Stat charts, opposed pairs and return to paused scene","retrievedAt":"2026-10-07T20:59:46Z","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/","locator":"Quicktest, Randomtest and coverage/false-positive caveats","retrievedAt":"2026-10-07T20:59:00Z","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/exporting-and-publishing-your-game/","locator":"HTML export, IFID persistence and publishing routes","retrievedAt":"2026-10-07T20:59:00Z","kind":"vendor"},{"url":"https://github.com/dfabulich/choicescript/blob/main/LICENSE.txt","locator":"Noncommercial scope, interpreter modifications and separate commercial license","retrievedAt":"2026-10-07T20:59:32Z","kind":"vendor"},{"url":"https://twinery.org/","locator":"Nonlinear story authoring, variables and HTML output","retrievedAt":"2026-10-07T20:47:21Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://www.choiceofgames.com/make-your-own-games/choicescript-intro/","locator":"Scene files, indentation, choices, variables and development server","retrievedAt":"2026-10-07T20:58:39Z","id":"intro","title":"ChoiceScript introduction","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/customizing-the-choicescript-stats-screen/","locator":"Stat charts, opposed pairs and return to paused scene","retrievedAt":"2026-10-07T20:59:46Z","id":"stats","title":"ChoiceScript stats screen","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/testing-choicescript-games-automatically/","locator":"Quicktest, Randomtest and coverage/false-positive caveats","retrievedAt":"2026-10-07T20:59:00Z","id":"test","title":"Automatic ChoiceScript testing","kind":"vendor"},{"url":"https://www.choiceofgames.com/make-your-own-games/exporting-and-publishing-your-game/","locator":"HTML export, IFID persistence and publishing routes","retrievedAt":"2026-10-07T20:59:00Z","id":"export","title":"Exporting and publishing ChoiceScript","kind":"vendor"},{"url":"https://github.com/dfabulich/choicescript/blob/main/LICENSE.txt","locator":"Noncommercial scope, interpreter modifications and separate commercial license","retrievedAt":"2026-10-07T20:59:32Z","id":"license","title":"ChoiceScript License v1.0","kind":"vendor"},{"url":"https://twinery.org/","locator":"Nonlinear story authoring, variables and HTML output","retrievedAt":"2026-10-07T20:47:21Z","id":"twine","title":"Twine overview","kind":"vendor"}],"overviewCitations":["intro","test","export","license"],"licenseCitations":["license"],"sections":[{"id":"writing","heading":"Writing scenes","paragraphs":[{"id":"writing-detail","content":[{"text":"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."}],"citations":["intro"]}]},{"id":"state","heading":"Character state and statistics","paragraphs":[{"id":"state-detail","content":[{"text":"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."}],"citations":["stats"]}]},{"id":"testing","heading":"Testing branching narratives","paragraphs":[{"id":"testing-detail","content":[{"text":"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."}],"citations":["test"]}]},{"id":"exporting","heading":"HTML export and saved progress","paragraphs":[{"id":"exporting-detail","content":[{"text":"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."}],"citations":["export"]}]},{"id":"business","heading":"Licensing and commercial use","paragraphs":[{"id":"business-detail","content":[{"text":"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."}],"citations":["license"]}]},{"id":"publishing","heading":"Publishing routes","paragraphs":[{"id":"publishing-detail","content":[{"text":"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."}],"citations":["export"]}]},{"id":"comparison","heading":"Substitution considerations","paragraphs":[{"id":"comparison-detail","content":[{"text":"ChoiceScript can substitute for "},{"text":"Twine","targetSlug":"twine"},{"text":" 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."}],"citations":["intro","stats","twine","license"]}]}]},"id":"Q1333","revision":1381,"updatedAt":"2026-10-14T08:37:35Z","sourceUrl":"https://substitutefor.net/entities/Q1333?revision=1381"}}