Repo organizing

- Add doc/ directory, so publishing to gh-pages is a bit easier.
- Update .gitignore to not ignore the doc/ directory.

- Move manual documentation directory into new var directory (var/docs)
- Move example dialogue tree into new var directory (var/trees)
- Update YARD to find manual documentation in new var directory
This commit is contained in:
Bill Niblock 2017-05-06 18:12:33 -04:00
parent ee682ece5d
commit 04b52c13fc
32 changed files with 4560 additions and 4 deletions

66
var/docs/config_file.md Normal file
View file

@ -0,0 +1,66 @@
<!--
# @markup markdown
# @title Configuration File
-->
# Configuration File Documentation
The configuration file for `sapling` is a standard YAML file. The general
outline looks something like this:
---
-
trunk: "This is a description of the dialogue tree."
-
branch:
number: 1
text: "This is the overall text for the branch."
leaf:
-
text: "This is option 1."
branch: 2
-
text: "This is option 2."
branch: 3
-
branch:
number: 2
text: "This is the overall text for the branch."
leaf:
-
text: "This is option 1."
branch: 1
-
text: "This is option 2."
branch: 3
-
branch:
number: 3
text: "This is the overall text for the branch."
## Outline
#### Trunk
The `trunk` is a metadata list. Currently, the only information we really care
about is a general description for the tree. Because of this, `trunk` is the
key, and the description is the value.
#### 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.
- `branch`: The branch this option takes the user to.

View file

@ -0,0 +1,42 @@
<!--
# @markup markdown
# @title Example YAML File
-->
# Example Dialogue Tree
---
# The trunk is a general introduction to the tree. It shouldn't include any
# thematic details, rather a one-liner to let the user know what they're getting
# into.
-
trunk: "This is a general introduction to the dialogue tree."
# Branches are the content of a dialogue tree. Each branch is numbered, and that
# number is used as the primary means of navigation. The text of a branch is the
# story provided to the user; the result of getting to the branch. The leaves
# (the section titled leaf) represent the options. Options are displayed in the
# order they appear. Within a leaf, the text is what the option says, and the
# branch is the branch number which this option will lead to. Leading to branch
# number 0 will immediately exit the program.
#
# You can have as many branches and leaves as you wish, though having too many
# leaves may lead to both display problems, and paralyzing indecision.
-
branch:
number: 1
text: "The first branch. Displayed first, by default."
leaf:
-
text: "The first option for this branch. It leads to branch 2"
branch: 2
-
text: "The second branch. It immediately exits the program."
branch: 0
# A terminal branch is a branch which has no leaves. This represents an ending.
# Once a user hits a terminal branch, the program will display the branch text,
# and then redirect the user to branch 0, to exit.
-
branch:
number: 2
text: "This is a terminal branch. After displaying this text,
the program will exit."

View file

@ -0,0 +1,37 @@
# @title Example YAML File
---
# The trunk is a general introduction to the tree. It shouldn't include any
# thematic details, rather a one-liner to let the user know what they're getting
# into.
- trunk: "This is a general introduction to the dialogue tree."
# Branches are the content of a dialogue tree. Each branch is numbered, and that
# number is used as the primary means of navigation. The text of a branch is the
# story provided to the user; the result of getting to the branch. The leaves
# (the section titled leaf) represent the options. Options are displayed in the
# order they appear. Within a leaf, the text is what the option says, and the
# branch is the branch number which this option will lead to. Leading to branch
# number 0 will immediately exit the program.
#
# You can have as many branches and leaves as you wish, though having too many
# leaves may lead to both display problems, and paralyzing indecision.
-
branch:
number: 1
text: "The first branch. Displayed first, by default."
leaf:
-
text: "The first option for this branch. It leads to branch 2"
branch: 2
-
text: "The second branch. It immediately exits the program."
branch: 0
# A terminal branch is a branch which has no leaves. This represents an ending.
# Once a user hits a terminal branch, the program will display the branch text,
# and then redirect the user to branch 0, to exit.
-
branch:
number: 2
text: "This is a terminal branch. After displaying this text,
the program will exit."

16
var/docs/editor.md Normal file
View file

@ -0,0 +1,16 @@
<!--
# @markup markdown
# @title Using the Editor
-->
# Sapling Editor
Sapling provides an editor for creating and modifying dialogue trees. The editor
allows for editing all parts of a tree, from the trunk to the leaves.
## Creating a new tree
Pending
## Editing an existing tree
Pending

View file

@ -0,0 +1,74 @@
---
- 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: "Go to the frigid north-lands, because there's always a
frigid north-lands."
branch: 3
-
text: "Leave this silly place, but with a reason."
branch: 5
-
text: "Leave this silly place immediately, without any reason."
branch: 0
-
branch:
number: 2
text: "Ye find ye-self at branch 2. Your options are north, south
or Dennis."
leaf:
-
text: "North, to frigidity!"
branch: 3
-
text: "South, back the way you came!"
branch: 1
-
text: "Dennis"
branch: 6
-
branch:
number: 3
text: "It's cold up here. You decide to go someplace else!"
leaf:
-
text: "Head on home."
branch: 4
-
text: "Head south (back the way you came)"
branch: 2
-
branch:
number: 4
text: "You head on home! Bye bye!"
-
branch:
number: 5
text: "You leave the dialogue tree, and all its textual glory, behind
and go find a nice GUI to settle down with."
-
branch:
number: 6
text: "Dennis appreciates your interest, but is really just trying to
hangout and play video games."
leaf:
-
text: "Join Dennis, and play video games with him."
branch: 7
-
text: "Reconsider your options."
branch: 2
-
branch:
number: 7
text: "You sit down next to Dennis, and together you conquer all sorts of
realms and wizards and stuff. Nice!"