From 0e7b80c7404fd68e9117a12e678ae63a6c932864 Mon Sep 17 00:00:00 2001 From: Bill Niblock Date: Sat, 6 May 2017 15:12:11 -0400 Subject: [PATCH] docs/config_file_example.yaml: Self-document! - Change the example configuration file from a tree to a self-documented reference. You can still run it in sapling, but it's pretty boring. - Moved previous example configuration to "Example Quest", in the trees directory. --- docs/config_file_example.yaml | 51 ++++++++++++++++------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/docs/config_file_example.yaml b/docs/config_file_example.yaml index 4bf0d59..03a1ce2 100644 --- a/docs/config_file_example.yaml +++ b/docs/config_file_example.yaml @@ -1,41 +1,36 @@ --- -- trunk: "Example Quest: Learn what it looks like to use Sapling!" +# 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: "You stumble upon the first branch of a dialogue tree. - You find yourself at a junction..." + text: "The first branch. Displayed first, by default." leaf: - - text: "Go to the next branch." + text: "The first option for this branch. It leads to branch 2" branch: 2 - - text: "Leave this silly place." + 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: "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 + text: "This is a terminal branch. After displaying this text, + the program will exit."