Difference between revisions of "Dialogue"
DeamonHunter (Talk | contribs) (Initial commit.) |
DeamonHunter (Talk | contribs) m (Copy paste error) |
||
Line 17: | Line 17: | ||
== Config Options == | == Config Options == | ||
== "code" == | == "code" == | ||
− | '''Valid options (String): <code>A unique string which | + | '''Valid options (String): <code>A unique string which dialogue what this object is.</code>''' |
'''Default Value:''' No default value is specified. Always need to provide your own. | '''Default Value:''' No default value is specified. Always need to provide your own. | ||
Line 23: | Line 23: | ||
A string containing the unique identifier of this dialogue. This is commonly only used in [[Dialogue Pools]]. | A string containing the unique identifier of this dialogue. This is commonly only used in [[Dialogue Pools]]. | ||
− | |||
== "dialogue" == | == "dialogue" == |
Revision as of 07:35, 13 June 2017
In Staxel, there are two files which are used to specify all villager dialogue in game. These files are the *.dialogue files which point to an associated .json file that was created using Yarn.
Contents
*.dialogue File
Creating a *.dialogue File
Creating this file is very simple with only two properties. The full file looks like;
{ "code" : "mods.modname.village.character.dialogue.CecileFond", "dialogue" : "staxel/village/character/dialogue/CecileFond.json" }
Both properties are self-explanatory. Make sure the dialogue property points to a file that is created by Yarn otherwise some issues can arise.
Config Options
"code"
Valid options (String): A unique string which dialogue what this object is.
Default Value: No default value is specified. Always need to provide your own.
A string containing the unique identifier of this dialogue. This is commonly only used in Dialogue Pools.
"dialogue"
Valid options (String): A string which contains the path to a Yarn .json file.
Default Value: Null or nothing specified.
A string containing the path of the item the blob will be referring to.
The Yarn *.json file
Yarn is the program which creates the dialogue files for Staxel. It utilises it's own scripting language which can make choices and also use conditional statements in order to provide the right dialogue. They also include an editor which helps visualise these files.
Look at the documentation around Yarn, particularly sections such as this. Do not Yarn is changing frequently and documentation might not line up with the implementation used in Staxel.
Additional Functions
There are additional functions that Staxel offers to integrate the dialogue into the game.
[The list will be filled out over time.]