Dialogue

From wiki
Revision as of 08:34, 13 June 2017 by DeamonHunter (Talk | contribs) (Initial commit.)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.

*.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 species 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.]