forked from blurymind/YarnClassic
-
Notifications
You must be signed in to change notification settings - Fork 4
Yarn Tutorial ‐ Basic
Faulty edited this page Feb 24, 2021
·
9 revisions
A simplistic breakdown of Yarn files is as follows:
1. [File Tags Section]
2. [Node Header]
3. [Node Header Delimiter]
4. [Node Body]
5. [Node Body Delimiter]
6. Repeat 2 - 5 for multiple nodes- File tags are file-level metadata. The only requirement is the content must be preceded by a
#character, otherwise file tags can contain any character. The file tag section is optional within the Yarn file. An example of a file tag would be#file_version: 2. - Node headers contain header tags which are used for node-level metadata. Header tags follow the
key:valuesyntax. Every node header must contain aTitle:node_nametag to denote the title of your node and these must be unique within your file. - The node header delimiter is
---. This just tells the program reading your Yarn file that the header section is done being read. - The node body is where the actual content of your node will go. This is where you will place all your dialogue and expressions.
- The node body delimiter is
===. This tells the program reading your Yarn file that the node body section is done being read and if anything follows, it's the start of a new node. - You would just repeat sections 2 - 6 if you wanted to create multiple nodes.
The following is a basic example of a Yarn file:
#file_version: 1
Title:Start
---
My dialogue goes here.
===
For a more advanced breakdown of Yarn file structure, please check the Yarn Syntax Reference.