Update formatting
- README.md: Remove unnecessary copyright line - docs/config_file.md: Update the example YAML file to actually be proper. - docs/config_file.md: Expand information to cover entire configuration file.
This commit is contained in:
parent
edcccc1869
commit
ee682ece5d
2 changed files with 41 additions and 27 deletions
|
@ -68,5 +68,3 @@ You can contribute to Sapling by following these instructions:
|
||||||
|
|
||||||
Sapling is licensed under the MIT license. The full text can be found in
|
Sapling is licensed under the MIT license. The full text can be found in
|
||||||
[LICENSE](LICENSE).
|
[LICENSE](LICENSE).
|
||||||
|
|
||||||
(c) 2017 Bill Niblock
|
|
||||||
|
|
|
@ -9,42 +9,58 @@ The configuration file for `sapling` is a standard YAML file. The general
|
||||||
outline looks something like this:
|
outline looks something like this:
|
||||||
|
|
||||||
---
|
---
|
||||||
trunk:
|
-
|
||||||
desc: This is a description of the dialogue tree.
|
trunk: "This is a description of the dialogue tree."
|
||||||
- branch:
|
-
|
||||||
|
branch:
|
||||||
number: 1
|
number: 1
|
||||||
text: "This is the overall text for the branch."
|
text: "This is the overall text for the branch."
|
||||||
- leaf: 1
|
leaf:
|
||||||
|
-
|
||||||
text: "This is option 1."
|
text: "This is option 1."
|
||||||
branch: 2
|
branch: 2
|
||||||
- leaf: 2
|
-
|
||||||
text: "This is option 2."
|
text: "This is option 2."
|
||||||
branch: 3
|
branch: 3
|
||||||
- branch:
|
-
|
||||||
|
branch:
|
||||||
number: 2
|
number: 2
|
||||||
text: "This is the overall text for the branch."
|
text: "This is the overall text for the branch."
|
||||||
- leaf: 1
|
leaf:
|
||||||
text: "This is option 1, on branch 2!"
|
-
|
||||||
|
text: "This is option 1."
|
||||||
|
branch: 1
|
||||||
|
-
|
||||||
|
text: "This is option 2."
|
||||||
branch: 3
|
branch: 3
|
||||||
- branch:
|
-
|
||||||
|
branch:
|
||||||
number: 3
|
number: 3
|
||||||
text: "This is the overall text for the branch."
|
text: "This is the overall text for the branch."
|
||||||
- leaf: 1
|
|
||||||
text: "This is option 3, branch 3"
|
|
||||||
branch: 0
|
|
||||||
|
|
||||||
## Outline
|
## Outline
|
||||||
|
|
||||||
Each branch has the following options:
|
#### Trunk
|
||||||
|
|
||||||
- `number`: The branch number. This is a number, but must be unique.
|
The `trunk` is a metadata list. Currently, the only information we really care
|
||||||
- `text`: The text provided by getting to this branch. The first branch is
|
about is a general description for the tree. Because of this, `trunk` is the
|
||||||
shown by default when the tree is opened.
|
key, and the description is the value.
|
||||||
- `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:
|
#### Branch
|
||||||
|
|
||||||
|
Branches are the content of a dialogue tree. Each `branch` has the following
|
||||||
|
options:
|
||||||
|
|
||||||
|
- `number`: The branch number. This is how leaves get around. It 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`: [Optional] The list of options for the branch. Details for leaves are
|
||||||
|
below. If no leaves are provided, the branch is considered a "terminal
|
||||||
|
branch", and the program will end after reaching it.
|
||||||
|
|
||||||
|
#### Leaf
|
||||||
|
|
||||||
|
Leaves are the options of a branch. Each `leaf` has the following options:
|
||||||
|
|
||||||
- `text`: The text shown as the option.
|
- `text`: The text shown as the option.
|
||||||
- `branch`: The branch this option takes the user to.
|
- `branch`: The branch this option takes the user to.
|
||||||
|
|
Loading…
Reference in a new issue