documentation
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
# Making a Story
|
||||
|
||||
## Setting up
|
||||
|
||||
You need these three files to make a story:
|
||||
|
||||
- about.json
|
||||
|
||||
- story.ha
|
||||
|
||||
- characters.json
|
||||
|
||||
## Filling out the files
|
||||
|
||||
Inside about.json should be the following content:
|
||||
|
||||
```
|
||||
{
|
||||
"title": "My Great Story",
|
||||
"description": "please read!"
|
||||
}
|
||||
```
|
||||
|
||||
Change the title and description to whatever you would like.<br/>
|
||||
Inside story.ha should be the code for your story, see [the documentation on coding](/docs/SYNTAX.md) for help with this.<br/>
|
||||
Finally, inside characters.json should be a JSON formatted object containing all your characters. See [the documentation on characters](/docs/CHARACTERS.md) for help with this file.<br/>
|
||||
|
||||
## Making a story file
|
||||
|
||||
A story file is just a zip file of these files, so zip up story.ha, characters.json and about.json into a zip file (make sure these are in the root of the zip file).
|
||||
|
||||
## Playing your story
|
||||
|
||||
To play your story, simply run cargo run \<your zip file\>
|
||||
@@ -0,0 +1,91 @@
|
||||
# Syntax
|
||||
|
||||
## Setup
|
||||
|
||||
This is done in the about.json file,
|
||||
|
||||
```
|
||||
{
|
||||
|
||||
"title": "My Great Story",
|
||||
|
||||
"description": "please read!"
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Characters
|
||||
|
||||
See [Character documentation](/docs/CHARACTER.md) for more info
|
||||
Referencing a character using the @, @NARRATOR is reserved for the Narrator.<br/>
|
||||
Customisation is done with @CHARACTER change \<feature\> into \<feature name\><br/>
|
||||
Move a character with @CHARACTER to fr
|
||||
|
||||
> [!NOTE]
|
||||
> fr means front-right for instance.
|
||||
|
||||
## Outputs
|
||||
|
||||
```
|
||||
@CHARACTER says "this string
|
||||
is multi-line
|
||||
and ends with a"
|
||||
```
|
||||
|
||||
## Variables
|
||||
|
||||
Variables are referenced with the \$, only integers will be supported.<br/>
|
||||
|
||||
## Selection
|
||||
|
||||
Condition based:
|
||||
|
||||
```
|
||||
if (condition) {
|
||||
|
||||
}
|
||||
|
||||
elif (condition) {
|
||||
|
||||
}
|
||||
|
||||
else
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
Choice based:
|
||||
|
||||
```
|
||||
choice "choice 1" {
|
||||
|
||||
}
|
||||
|
||||
or "choice 2" {
|
||||
|
||||
}
|
||||
|
||||
or "choice 3" {
|
||||
|
||||
}
|
||||
```
|
||||
|
||||
## Positioning
|
||||
|
||||
```
|
||||
@CHARACTER to position
|
||||
|
||||
PAN to position
|
||||
```
|
||||
|
||||
## Other
|
||||
|
||||
```
|
||||
label:
|
||||
|
||||
GOTO label
|
||||
```
|
||||
|
||||
## Ending
|
||||
|
||||
`END` to exit out of the story
|
||||
Reference in New Issue
Block a user