2017-05-06 22:12:33 +00:00
<!DOCTYPE html>
< html >
< head >
< meta charset = "UTF-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
< title >
File: README
— Sapling Documentation
< / title >
< link rel = "stylesheet" href = "css/style.css" type = "text/css" charset = "utf-8" / >
< link rel = "stylesheet" href = "css/common.css" type = "text/css" charset = "utf-8" / >
< script type = "text/javascript" charset = "utf-8" >
pathId = "README";
relpath = '';
< / script >
< script type = "text/javascript" charset = "utf-8" src = "js/jquery.js" > < / script >
< script type = "text/javascript" charset = "utf-8" src = "js/app.js" > < / script >
< / head >
< body >
< div class = "nav_wrap" >
< iframe id = "nav" src = "file_list.html?1" > < / iframe >
< div id = "resizer" > < / div >
< / div >
< div id = "main" tabindex = "-1" >
< div id = "header" >
< div id = "menu" >
< a href = "_index.html" > Index< / a > »
< span class = "title" > File: README< / span >
< / div >
< div id = "search" >
< a class = "full_list_link" id = "class_list_link"
href="class_list.html">
< svg width = "24" height = "24" >
< rect x = "0" y = "4" width = "24" height = "4" rx = "1" ry = "1" > < / rect >
< rect x = "0" y = "12" width = "24" height = "4" rx = "1" ry = "1" > < / rect >
< rect x = "0" y = "20" width = "24" height = "4" rx = "1" ry = "1" > < / rect >
< / svg >
< / a >
< / div >
< div class = "clear" > < / div >
< / div >
< div id = "content" > < div id = 'filecontents' > < h1 > Sapling: A Dialogue Tree CLI Utility< / h1 >
2017-10-15 03:40:38 +00:00
< p > < a href = "https://badge.fury.io/rb/sapling-dialogue" > < img src = "https://badge.fury.io/rb/sapling-dialogue.svg" alt = "Gem
Version">< / a > < a href = "https://travis-ci.org/VagabondAzulien/sapling" > < img src = "https://travis-ci.org/VagabondAzulien/sapling.svg?branch=master" alt = "Build
Status">< / a > < / p >
2017-05-06 22:12:33 +00:00
< p > Sapling allows for easy creation and use of dialogue trees.< / p >
< p > A dialogue tree is a series of dialogues which follow sequentially, though with
branching options. Examples include " Choose Your Own Adventure" games, or the
dialogues seen in many video games.< / p >
< h2 > Structure< / h2 >
< p > A dialogue tree can be broken down into three distinct parts: the trunk,
branches, and leafs. The trunk represents the main structure of the tree. Unlike
a branch, which displays content and options, the trunk provides metadata.
Generally speaking, it is a branch, with the exception that it has no options. A
branch represents a choice taken in the dialogue. Branches flow to each other
through leafs, which are the actual choices.< / p >
< p > You can experience this yourself, by loading " Example Quest! - A Meta Dialogue
2017-10-15 03:40:38 +00:00
Tree!" . You can find the tree itself at < a href = "https://github.com/VagabondAzulien/sapling/blob/master/var/trees/example_quest.yaml" > var/trees/example_quest.yaml< / a > .
To run it, just type < code > sapling read path/to/example_quest.yaml< / code > .< / p >
2017-05-06 22:12:33 +00:00
< h2 > Building a New Tree< / h2 >
< p > To build a new tree, you have two options. You can manually edit a configuration
file, or go through the construction wizard. Either way, the end result is a
plain-text configuration file, which can be easily shared, edited, and viewed.
2017-10-15 03:40:38 +00:00
For more details on the configuration file itself, check out the < a href = "http://www.theinternetvagabond.com/sapling/file.config_file.html" > Configuration
File documentation< / a > , or the
self-documented < a href = "http://www.theinternetvagabond.com/sapling/file.config_file_example.html" > configuration file example< / a > .
Alternatively, you can checkout < a href = "https://github.com/VagabondAzulien/sapling/blob/master/var/trees/example_quest.yaml" > Example Quest< / a >
for a complete tree.< / p >
2017-05-06 22:12:33 +00:00
< h3 > Manual Edit< / h3 >
< ol >
< li > Open your preferred text editor.< / li >
2017-10-15 03:40:38 +00:00
< li > Refer to the < a href = "http://www.theinternetvagabond.com/sapling/file.config_file.html" > Configuration File documentation< / a > < / li >
2017-05-06 22:12:33 +00:00
< li > Make your changes.< / li >
< li > Save your changes.< / li >
< / ol >
< h3 > Automatic Edit -- Coming Soon(tm)!< / h3 >
< ol >
2017-10-15 03:40:38 +00:00
< li > Run the configuration editor: < code > sapling edit [TREE]< / code > < / li >
< li > If you don' t include a TREE, < code > sapling< / code > will create a new tree in the current
directory.< / li >
2017-05-06 22:12:33 +00:00
< li > If you choose to modify an existing file, < code > sapling< / code > will open the tree at the
trunk, and show you the first branch.< / li >
< li > Make your changes.< / li >
< li > Save your changes.< / li >
< / ol >
2017-10-15 03:40:38 +00:00
< p > More details on the editor can be found in the < a href = "http://www.theinternetvagabond.com/sapling/file.editor.html" > Editor
2017-05-06 22:12:33 +00:00
documentation< / a > .< / p >
< h2 > Contributing< / h2 >
< p > You can contribute to Sapling by following these instructions:< / p >
< ol >
< li > Fork this repository.< / li >
< li > In your fork, make your changes.< / li >
2017-10-15 03:40:38 +00:00
< li > Make sure your changes respect the < a href = "http://www.theinternetvagabond.com/sapling/file.CONTRIBUTING.html" > contribution
2017-05-06 22:12:33 +00:00
guidelines< / a > .< / li >
< li > Submit a pull request.< / li >
< / ol >
< h2 > License< / h2 >
< p > Sapling is licensed under the MIT license. The full text can be found in
2017-10-15 03:40:38 +00:00
< a href = "http://www.theinternetvagabond.com/sapling/file.LICENSE.html" > LICENSE< / a > .< / p >
2017-05-06 22:12:33 +00:00
< / div > < / div >
< div id = "footer" >
2017-10-15 03:40:38 +00:00
Generated on Sat Oct 14 23:40:01 2017 by
2017-05-06 22:12:33 +00:00
< a href = "http://yardoc.org" title = "Yay! A Ruby Documentation Tool" target = "_parent" > yard< / a >
2017-10-15 03:40:38 +00:00
0.9.9 (ruby-2.4.2).
2017-05-06 22:12:33 +00:00
< / div >
< / div >
< / body >
< / html >