This repository has been archived on 2024-02-25. You can view files and clone it, but cannot push or open issues or pull requests.
Go to file
2021-11-25 22:50:54 +01:00
addons/Wol feat: cleaned up, added open font + logo 2021-11-25 21:13:06 +01:00
.gitignore first commit 2021-11-20 11:10:20 +01:00
default_env.tres first commit 2021-11-20 11:10:20 +01:00
Dialogue.gd feat: cleaned up, added open font + logo 2021-11-25 21:13:06 +01:00
Dialogue.tscn feat: cleaned up, added open font + logo 2021-11-25 21:13:06 +01:00
dialogue.yarn did a bunch things to finalize 2021-11-21 23:10:48 +01:00
icon.png first commit 2021-11-20 11:10:20 +01:00
icon.png.import first commit 2021-11-20 11:10:20 +01:00
LICENSE.md Added LICENSE 2021-11-25 21:55:15 +01:00
project.godot feat: cleaned up, added open font + logo 2021-11-25 21:13:06 +01:00
README.md Added documentation for the Wol node 2021-11-25 22:50:54 +01:00

The friendly tool for writing game dialogue, in and for Godot


Wol is a tool for creating interactive dialogue for games. Its based on YarnSpinner and it's Yarn language.

Write your conversations in Yarn, a simple programming language that's designed to be easy for writers to learn, while also powerful enough to handle whatever you need.

Yarn's similar in style to Twine, so if you already know that, you'll be right at home! If you don't, that's cool - Yarn's syntax is extremely minimal, and there's not much there to learn.

Getting Started

This repo contains the source code for the Wol compiler. If you want to use it in a game engine other than Godot, you should get the appropriate package for your game engine. Check out YarnSpinner-Unity for a Unity version of this project.

Download from AssetLib

Unfortunately, this option isn't available yet. Stay tuned!

Clone this repository / download the zip

  1. Extract the repository in a folder of your choice.
  2. Import the project in Godot.
  3. Run the scene to get a taste of Wol!
  4. Move the addons folder to your Godot project.
  5. Enable the plugin in your Project Settings.
  6. Setup the Wol node using the documentation or tutorial!

Roadmap

There are few things that need to be ironed out to be 100% feature compatible with the original YarnSpinner.

  • Integration with Godot's translation/localization system.
  • Full support for format functions.
  • In-editor dialogue editor with preview.
  • Fully extend the documentation of this project.
  • Provide helpful anchors in the documentation.
  • Porting to usable signals in Godot.
  • Providing helpful errors when failing to compile.

Getting Help

There are several places to get help with Wol, and stay up to date with what's happening.

License

Wol is available under the MIT License. This means that you can use it in any commercial or noncommercial project. The only requirement is that you need to include attribution in your game's docs. A credit would be very, very nice, too, but isn't required. If you'd like to know more about what this license lets you do, tldrlegal.com have a very nice write up about the MIT license that you might find useful.

Made by Bram Dingelstad, kyperbelt & Secret Lab

Yarn Spinner was originally created by Secret Lab, an Australian game dev studio. Say hi to them for me!!

Started on Godot by kyperbelt (thank you so much for the initial work!) and completed by Bram Dingelstad. Say hi to me as well!

Help Me Make Wol & Secret Lab's Yarn Spinner!

Wol & Yarn Spinner needs your help to be as awesome as it can be! You don't have to be a coder to help out - we'd love to have your help in improving this or YarnSpinner's documentation, in spreading the word, and in finding bugs.

Documentation

Wol

Inherits from Node

Node for all interaction with Wol.

Description

Godot's Nodes as building blocks work really well. That's why this plugin gives you access to a simple node that does all the heavy lifting for you. It has several properties that you can change either in-editor or using GDScript (or any other compatible language) and signals you can use to listen to events coming from your dialogue.

Properties

Type Property Default value
String path ''
String starting_node 'Start'
bool auto_start false
bool auto_show_options false
bool auto_substitute true
Dictionary variable_storage {}

Methods

Return value Method name
void select_option ( int id )
void start ( String starting_node = 'Start' )
void pause ( )
void resume ( )

Signals

  • started ( )

    Emitted when the dialogue is started.

  • finished ( )

    Emitted when the dialogue is came to a stop, either through running out of dialogue or by using the <<stop>> command.

  • node_started ( String node )

    Emitted when a dialogue node is started. Has the node name as a parameter so you can see which node was started.

  • node_finished ( String node )

    Emitted when a dialogue node is started. Has the node name as a parameter so you can see which node was started.

  • line ( Line line )

    Emitted when a Line is emitted from the dialogue. line holds relevant information.

  • options ( Array options )

    Emitted when the dialogue runs into a set of options. Is emitted with an Array of Options.

  • command ( String command )

    Emitted when the dialogue executes a command. Use this signal to provide interactivity with you game world.

Property Descriptions

  • String path

    Default ''

    The path to your .yarn or .wol file. Must be a valid Yarn file otherwise the compiler will throw an error.

  • String starting_node

    Default 'Start'

    The node that is the starting point of the dialogue. Will automatically be the default for the start() function as well. The string should be a valid name for a Yarn node and be available in the file or an error will be thrown. You can always start from a different node by calling start('OtherStartingNode') for instance.

  • bool auto_start

    Default false

    If enabled, will automatically start the dialogue using the starting_node as the entrypoint.

  • bool auto_show_options

    Default false

    If enabled, will automatically show you options when they're available, rather than waiting for the player to resume to the line that has options.

  • bool auto_substitude

    Default false

    If enabled, will automatically substitute format functions and inline expressions for you. It's recommended to leave enabled, but if you want to manually do this for whatever reason, you can turn it off.

  • Dictionary variable_storage

    Default {}

    A Dictionary that holds all of the variables of your of your dialogue. All of the entries of this dictionary are accesible in your dialogue with a $ prefix. (e.g a_variable would be $a_variable). If you set a variable from within your dialogue, this dictionary will also be updated.

    In the future there'll be a signal added for when the variable_storage is updated.

Tutorial

The tutorial is currently under construction, stay tuned!