sapling/doc/file.config_file.html
Bill Niblock 04b52c13fc 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
2017-05-06 18:15:08 -04:00

136 lines
No EOL
3.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>
File: Configuration File
&mdash; 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 = "config_file";
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> &raquo;
<span class="title">File: Configuration File</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>Configuration File Documentation</h1>
<p>The configuration file for <code>sapling</code> is a standard YAML file. The general
outline looks something like this:</p>
<pre class="code ruby"><code class="ruby"> ---
-
trunk: &quot;This is a description of the dialogue tree.&quot;
-
branch:
number: 1
text: &quot;This is the overall text for the branch.&quot;
leaf:
-
text: &quot;This is option 1.&quot;
branch: 2
-
text: &quot;This is option 2.&quot;
branch: 3
-
branch:
number: 2
text: &quot;This is the overall text for the branch.&quot;
leaf:
-
text: &quot;This is option 1.&quot;
branch: 1
-
text: &quot;This is option 2.&quot;
branch: 3
-
branch:
number: 3
text: &quot;This is the overall text for the branch.&quot;
</code></pre>
<h2>Outline</h2>
<h4>Trunk</h4>
<p>The <code>trunk</code> is a metadata list. Currently, the only information we really care
about is a general description for the tree. Because of this, <code>trunk</code> is the
key, and the description is the value.</p>
<h4>Branch</h4>
<p>Branches are the content of a dialogue tree. Each <code>branch</code> has the following
options:</p>
<ul>
<li><code>number</code>: The branch number. This is how leaves get around. It must be unique.</li>
<li><code>text</code>: The text provided by getting to this branch. The first branch is shown
by default when the tree is opened.</li>
<li><code>leaf</code>: [Optional] The list of options for the branch. Details for leaves are
below. If no leaves are provided, the branch is considered a &quot;terminal
branch&quot;, and the program will end after reaching it.</li>
</ul>
<h4>Leaf</h4>
<p>Leaves are the options of a branch. Each <code>leaf</code> has the following options:</p>
<ul>
<li><code>text</code>: The text shown as the option.</li>
<li><code>branch</code>: The branch this option takes the user to.</li>
</ul>
</div></div>
<div id="footer">
Generated on Sat May 6 18:07:50 2017 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
0.9.9 (ruby-2.2.5).
</div>
</div>
</body>
</html>