Add some initial and basic documentation
This commit is contained in:
parent
221cb7409b
commit
2e216abdd3
4 changed files with 86 additions and 0 deletions
BIN
docs/.config_file.md.un~
Normal file
BIN
docs/.config_file.md.un~
Normal file
Binary file not shown.
BIN
docs/.config_file_example.yaml.un~
Normal file
BIN
docs/.config_file_example.yaml.un~
Normal file
Binary file not shown.
45
docs/config_file.md
Normal file
45
docs/config_file.md
Normal file
|
@ -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.
|
41
docs/config_file_example.yaml
Normal file
41
docs/config_file_example.yaml
Normal file
|
@ -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
|
Loading…
Reference in a new issue