diff --git a/docs/.config_file.md.un~ b/docs/.config_file.md.un~ new file mode 100644 index 0000000..e803cc3 Binary files /dev/null and b/docs/.config_file.md.un~ differ diff --git a/docs/.config_file_example.yaml.un~ b/docs/.config_file_example.yaml.un~ new file mode 100644 index 0000000..df2881a Binary files /dev/null and b/docs/.config_file_example.yaml.un~ differ diff --git a/docs/config_file.md b/docs/config_file.md new file mode 100644 index 0000000..d0ad949 --- /dev/null +++ b/docs/config_file.md @@ -0,0 +1,45 @@ +# Configuration File Documentation + +The configuration file for `sapling` is a standard YAML file. The general +outline looks something like this: + + --- + trunk: + desc: This is a description of the dialogue tree. + - branch: + number: 1 + text: "This is the overall text for the branch." + - leaf: 1 + text: "This is option 1." + branch: 2 + - leaf: 2 + text: "This is option 2." + branch: 3 + - branch: + number: 2 + text: "This is the overall text for the branch." + - leaf: 1 + text: "This is option 1, on branch 2!" + branch: 3 + - branch: + number: 3 + text: "This is the overall text for the branch." + - leaf: 1 + text: "This is option 3, branch 3" + branch: 0 + +## Outline + +Each branch has the following options: + +- `number`: The branch number. This is a number, but must be unique. +- `text`: The text provided by getting to this branch. The first branch is + shown by default when the tree is opened. +- `leaf`: Each leaf represents an option on the branch. The value of the leaf is + the number of the option shown. For example, `leaf: 1` represents the first + listed option. + +Each leaf has the following options: + +- `text`: The text shown as the option. +- `branch`: The branch this option takes the user to. diff --git a/docs/config_file_example.yaml b/docs/config_file_example.yaml new file mode 100644 index 0000000..4bf0d59 --- /dev/null +++ b/docs/config_file_example.yaml @@ -0,0 +1,41 @@ +--- +- trunk: "Example Quest: Learn what it looks like to use Sapling!" + +- + branch: + number: 1 + text: "You stumble upon the first branch of a dialogue tree. + You find yourself at a junction..." + leaf: + - + text: "Go to the next branch." + branch: 2 + - + text: "Leave this silly place." + branch: 0 +- + branch: + number: 2 + text: "Ye find yeself at branch 2. Your options are north, south + or Dennis." + leaf: + - + text: "North" + branch: 3 + - + text: "South (back the way you came)" + branch: 1 + - + text: "Dennis" + branch: 0 +- + branch: + number: 3 + text: "It's cold up here. You decide to go someplace else!" + leaf: + - + text: "Head on home." + branch: 0 + - + text: "Head south (back the way you came)" + branch: 2