Project Structure
A typical nonkit project contains Yarn scripts, localization files, and config tables:The
Project.nonkit.json file defines your project. The directory structure is the default; you can configure different paths in the project file.Working with Yarn Scripts
Yarn files contain one or more dialogue nodes. Each node has a title, body, and ends with===:
scripts/Main.yarn
Key Concepts
Nodes
Self-contained dialogue segments identified by
title:. Use <<jump NodeName>> to transition between nodes.Line IDs
Tags like
#line:identifier link dialogue lines to localization entries for translation support.Commands
Game actions wrapped in
<<command>>. Control characters, backgrounds, audio, and game state.Options
Player choices marked with
->. Can contain nested dialogue or commands.Running Nodes
nonkit-vsc provides multiple ways to run your scripts:1
CodeLens Run Button
Click the Run button that appears above each
title: line in the editor. When connected to the game, it shows ”▶ Run”; when disconnected, it shows ”⊘ Not Connected”.2
Nodes Panel
Use the Yarn Nodes panel in the sidebar to browse all nodes across your project. Click a node to select it, then use the Run command.
3
Command Palette
Run
nonkit: Run Selected Node from the Command Palette to run the currently selected node.Running a node temporarily overwrites the game’s dialogue code. For best results, run nodes while on the guild view.
Localization
nonkit expects you to write dialogue in English as your primary language directly in.yarn files, then provide translations for other languages.
Writing Localizable Dialogue
Add#line: tags to dialogue lines that need translation:
Translation Files (CSV)
Translations are stored in CSV files in thelocalization/ directory:
localization/zh-cn.csv
| Column | Description |
|---|---|
language | Locale code (e.g., zh-cn) - determines which language this file provides |
id | Line ID matching the #line: tag in your script |
text | Translated text |
file | Source filename (for reference) |
node | Source node name (for reference) |
lineNumber | Line number (for reference) |
lock | Optional lock flag |
comment | Optional comment |
The locale is determined by the
language column in the CSV data rows. When creating a new localization file via the command palette, nonkit suggests naming the file after the locale (e.g., zh-cn.csv) as a convention, but what matters is the value in the language column of each row. Currently, the game supports English (primary) and Simplified Chinese (zh-cn).Config Tables
Config tables define game data like quests, conditions, and map events. These are JSON files that mirror the game’s internal table structure.TbMapEvent.json
Defines map events (quests and encounters):config/TbMapEvent.json
TbCondition.json
Defines unlock conditions for events:config/TbCondition.json
TbLocalizationAutoGenerated.json
Stores generated localization entries for config table strings:config/TbLocalizationAutoGenerated.json
Quest Creation Guide
Learn how to create complete quests with events, conditions, and rewards.
Hot Reloading
When you run a node, nonkit-vsc:- Compiles the Yarn script to bytecode
- Sends it to nonkit-plugin via named pipe
- The plugin merges it into the game’s dialogue system
- Dialogue plays immediately
