Home
Softono
YarnSpinner-Godot

YarnSpinner-Godot

Open source MIT C#
213
Stars
23
Forks
9
Issues
1
Watchers
2 weeks
Last Commit

About YarnSpinner-Godot

YarnSpinner-Godot is a beta integration of Yarn Spinner, a dialogue tool, for the Godot Engine with C support. It enables developers to write, compile, and run branching narrative content within Godot projects. Key features include creating Yarn projects through a custom menu, managing them via a dedicated inspector, and automatic re-importing and compilation of yarn scripts on change. It provides storage for compiled programs, errors, line metadata, and string tables, along with dialogue runners, commands, functions, and example line and option view scripts. The integration supports localization by generating detailed CSV files from yarn scripts and converting them into Godot translation files. It also includes MarkupPalette resources for applying color formatting to dialogue text. YarnSpinner-Godot is currently a work-in-progress project without official support, though users can report issues on GitHub or join the Yarn Spinner Discord for discussion. Sample projects are included to demonstrate functionalit

Platforms

Web Self-hosted Windows

Languages

C#

Yarn Spinner for Godot

Note: Yarn Spinner for Godot is a work-in-progress project. We don't currently offer any official support for it. We encourage you to file issues if you have them, and to join the official Yarn Spinner Discord to discuss the project!

Yarn Spinner for Godot is a beta port of YarnSpinner-Unity integration to the Godot Engine v4 (requires C# support).

Here is a video of the various samples available as of version 0.2.0:

https://github.com/YarnSpinnerTool/YarnSpinner-Godot/assets/9920963/ec50efb5-0d1e-4353-9c08-71e27ff66038

To try these samples yourself, open this repository as a Godot project. Feel free to use the code in the samples as the basis for your own game features based on YarnSpinner-Godot.

Documentation

Full documentation is available on the Yarn Spinner docs site.

Features

  • Create a .yarnproject with the Project > Tools > YarnSpinner > Create Yarn Project menu item.
  • Manage your Yarn Project with a custom inspector which provides buttons similar to the YarnSpinner-Unity inspector
  • Yarn scripts will re-import on change, triggering a compilation of all yarn scripts in the associated project
  • Storing a compiled yarn program, a list of errors, line metadata, and string tables.
  • Dialogue runners, commands, and functions
  • Example line view and option view scripts provided.
  • Generate CSV files for localizing your dialogue. The CSV files are not in the Godot format, but they have more context fields than Godot CSVs, and YarnSpinner handles parsing and generating the CSVs, and converting them into Godot .translation files.
  • MarkupPalette custom resources which allow you to simply color parts of your dialogue

Thanks

Thanks to the YarnSpinner team for answering questions as this plugin was developed, to Taedan for providing an initial example C# import plugin, and to KXI and fmoo for giving feedback.