Yarn Spinner is a free, MIT open-source screenplay-style NPC dialogue engine by Secret Lab for Windows, macOS, Linux, Web, and CLI. Powering Night in the Woods, Dredge, and Cult of the Lamb, it pairs clean .yarn scripts and a VS Code node graph with automatic CSV/XLIFF localization and Unity, Godot, and Unreal runtimes.
Technical Overview
Architecture and Production Workflow
Developed by Secret Lab (v2.4), Yarn Spinner is engineered around how narrative designers, gameplay programmers, translators, and voice actors actually collaborate during production. Writers author plain-text .yarn scripts using an intuitive screenplay syntax (Character: Dialogue line), branching -> shortcut options, <<if $visited_dock>> state checks, and custom engine commands like <<camera_shake 0.4>> or <<give_item "Lantern">>. Simultaneously, Yarn Spinner's official VS Code Extension renders an interactive side-by-side visual node graph so writers can organize scene topology spatially while keeping every change as clean, Git-mergeable plain text.
Where Yarn Spinner shines brightest in shipping pipelines is localization and voice-over (VO) management:
- Stable Line IDs: The
yscCLI compiler automatically injects persistent#line:0a4f9ctags onto every spoken line without manual bookkeeping. - Turnkey String & Audio Tables: Exports translator-ready
.csvand.xliffspreadsheets plus voice-recording scripts; at runtime, localized translations and matching0a4f9c.oggaudio clips bind automatically by line ID even if writers reorder scenes. - Compiled Bytecode Runtimes: Compiles
.yarnscripts into fast Protobuf.yarncbytecode executed by official Unity, Godot 4 (.NET C#), Unreal Engine, and JavaScript (yarn-bound) runtimes.
Pricing, Licensing, and Commercial Rights
The entire Yarn Spinner compiler, language runtime, VS Code visual editor, web playground, and GitHub integrations for Unity, Godot, and Unreal are 100% free under the MIT License (0% royalties, zero line caps). Secret Lab offers optional paid convenience packages and add-ons on the Unity Asset Store and itch.io to fund open-source maintenance, while building directly from GitHub/OpenUPM remains completely free for commercial releases.
Strengths and Tradeoffs in Studio Pipelines
| Pipeline Dimension | Yarn Spinner Advantage | Limitation / When to Swap |
|---|---|---|
| Localization & Voice Acting | Automatic #line: tagging, CSV/XLIFF extraction, and VO clip mapping save weeks of pre-launch localization engineering | Deep literary weaves with dense mid-sentence conditional prose variations are cleaner in Inkle's ink |
| Hybrid Authoring | Combines Git-friendly plain-text screenplay files with a live visual node map inside VS Code | Official YarnSpinner-Godot package requires the C# (.NET) edition of Godot 4 |
| Proven Indie Pedigree | Shipped on PC and all major consoles in Dredge, Cult of the Lamb, A Short Hike, and Night in the Woods | Lacks built-in typed item/faction RPG entity spreadsheets (use articy:draft X if you want an all-in-one CRPG database) |
AI Transparency & Steam Disclosure
Standard SoftwareProcedural math, physics, or manual authoring software.
Steamworks guidance: Standard software workflow; Steam AI disclosure does not apply.