Open-Source narrative & NPC AI for Game Dev

3 open-source narrative & NPC AI tools you can inspect, compile, and extend with zero vendor lock-in. Top community picks right now: ink (by Inkle), Yarn Spinner and Twine.

Narrative & NPC AI · Open Source

GameDevDB indexes 3 verified narrative & NPC AI listings matching Open Source (FOSS), led by ink (by Inkle), Yarn Spinner and Twine. Publishes full source code under MIT, Apache-2.0, BSD, zlib, MPL-2.0, or GPL licenses with zero royalties and full auditability. Use permissive MIT/Apache/zlib licenses for linked runtime SDKs; standalone GPL authoring suites export 100% proprietary game assets.

3 tools
ink (by Inkle) icon

MIT narrative scripting language behind 80 Days & Inkle RPGs

Free (MIT)
Yarn Spinner icon

MIT screenplay-style NPC dialogue engine for Unity & Godot

Free (MIT)
Twine icon

GPL visual hypertext story mapper & interactive fiction tool

Free (GPL-3.0)

Open Source Pipeline Selection

Evaluating Narrative & NPC AI (Open Source)

When shipping commercially with open-source tools, verify whether each component is a standalone asset editor (where GPL/MPL outputs are 100% yours) or an embedded runtime SDK (where MIT, Apache-2.0, BSD, or zlib keeps your game binary proprietary and console-NDA compliant).

Choosing Between Deterministic Branching Dialogue and Conversational NPC SDKs

Narrative architecture splits cleanly into two paradigms: deterministic authored branching scripts (where writers control every word, pacing beat, and quest boolean) and runtime conversational NPC brains (where players speak or type open-ended questions resolved by guardrailed language models).

  • Markup-First Branching Engines: ink (used on 80 Days, Citizen Sleeper, and Heaven's Vault) and Yarn Spinner (Night in the Woods, DREDGE) store dialogue in clean, Git-diffable plain-text files with conditional variables, knots/stitches, and automatic string-table extraction for localization agencies.
  • Visual Node Databases for Massive CRPGs: When managing 100,000+ words, faction reputation matrices, and bark conditions across multiple writers, articy:draft X provides a structured visual database with official Unreal and Unity importers, while Twine excels at rapid browser playable story prototypes.
  • Runtime Conversational NPCs: Inworld AI, Convai, and Charisma.ai combine character lore memory, emotional state sliders, safety rails, speech-to-text, and low-latency TTS streaming via Unity, Unreal, and C++ SDKs.
Narrative ArchitectureTop ToolsGit & Localization FitPricing & Steam Note
Plain-Text Markup Scriptingink, Yarn SpinnerClean Git diffs + CSV string IDsFree (MIT Open Source)
Visual Story Graph & CRPG DBTwine, articy:draft XHTML export / JSON & Engine pluginsFree GPL / Free <=700 objs
Runtime Conversational NPCsInworld AI, Convai, Charisma.aiCloud/Hybrid REST & Engine SDKsUsage API / Subscription (Live AI Disclosure)

How we picked: every tool here belongs to narrative & NPC AI on GameDevDB and publishes its source code under an open-source license. Sort by Hot, Top, or New to compare options. How we rank tools

Open-Source narrative & NPC AI for Game Dev: FAQ

Does creating models in GPL-licensed Blender or Krita force my game to be open source?
No. The GNU General Public License covers the editor application code itself, not the creative files (.blend, .glb, .fbx, .png, .kra) you produce with it. Every mesh, texture, animation, and map exported from Blender, Krita, Tiled, or TrenchBroom can be sold in closed-source commercial games.
What license obligation do MIT and zlib game engines like Godot and raylib require?
MIT, Apache-2.0, BSD, and zlib licenses only require including the project's copyright and permission notice inside your game's About/Credits menu or bundled `LICENSE.txt` file. You owe zero royalties and never have to release your game's source code.
Should I pick ink or Yarn Spinner for a branching indie RPG?
Pick `ink` for prose-heavy detective games, CRPGs, and visual novels with deep weaving state logic and dynamic text stitching. Pick Yarn Spinner for snappy, screenplay-style NPC conversations, voice-line tags, and straightforward Unity or Godot triggers.
How does Valve classify runtime LLM NPCs under Steam's AI policy?
Games calling cloud or on-device language models at runtime (such as Inworld AI or Convai) fall under Steam's Live-Generated AI category, requiring developers to document prompt guardrails and provide an in-game player reporting mechanism.