diff --git a/README.md b/README.md
index 6833ddd..9f5dd98 100644
--- a/README.md
+++ b/README.md
@@ -1,16 +1,20 @@
-# HAPPENING
-An interactive story telling software.
+# Happening
+
+An interactive story telling software.
+Read and write people's stories
## Install
+
This is not really out of development, but to run it, clone the repo, go into /server/ and use cargo run story.zip to run a file called story.zip that's in the /stories/ directory.
-## Technical Details
+## Technical Details
### Back-end server -- Rust
The server component of Happening will be written in Rust.
Parses the code and sends it via the API.
-File layout:
+File layout:
+
- animations/
- features/
- scenes/
@@ -33,6 +37,7 @@ The variables are stored as a hashmap, characters are objects.
Using the network interface, port 20264.
Characters are sent to the frontend and stored there when the character is created on the frontend.
+
```
{
@@ -44,9 +49,10 @@ character: String,
}
```
+
### Frontend -- Python
-Things the frontend can do:
+Things the frontend can do:
- Output text
- Display the character
@@ -58,6 +64,7 @@ Things the frontend can do:
#### Setup
This is done in the about.json file,
+
```
{
@@ -67,39 +74,25 @@ This is done in the about.json file,
}
```
+
#### Characters
-See [Character documentation](/docs/CHARACTER.md] for more info
+
+See [Character documentation](/docs/CHARACTER.md) for more info
Referencing a character using the @, @NARRATOR is reserved for the Narrator.
Customisation is done with @CHARACTER change \ into \
+Move a character with @CHARACTER to fr
-attributes:
-
-- gender
-- skin_color
-- name
-- eye_color
-- pronoun_subject
-- pronoun_object
-- pronoun_deppos
-- pronoun_indpos
-- pronoun_reflex
-- animation
-- head
-- hair
-- torso
-- arm
-- leg
-- hair_color
-- top_clothing
-- bottom_clothing
-- shoes
+> [!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.
@@ -107,6 +100,7 @@ Variables are referenced with the \$, only integers will be supported.
#### Selection
Condition based:
+
```
if (condition) {
@@ -120,7 +114,9 @@ else
}
```
+
Choice based:
+
```
choice "choice 1" {
@@ -134,45 +130,59 @@ or "choice 3" {
}
```
+
#### Positioning
+
```
@CHARACTER to position
PAN to position
```
+
#### Other
+
```
label:
GOTO label
```
+
#### Ending
+
`END` to exit out of the story
## Implemented stuff
+
### Commands
+
| Command | Implemented |
-|-----------------|-------------|
+| --------------- | ----------- |
| END | Yes |
| CHOICE/OR/OR | Yes |
| IF/ELSE IF/ELSE | No |
| GOTO | No |
| PAN | No |
+
### Character sub-commands
+
| Character Command | Implemented |
-|-------------------|-------------|
+| ----------------- | ----------- |
| SAYS | Yes |
| CHANGE | Yes |
| TO | Yes |
| ANIMATE | Yes |
+
### Other Features
-| Feature | Implemented |
-| --------- | ----------- |
-| Variables | No |
+
+| Feature | Implemented |
+| ---------- | ----------- |
+| Variables | No |
+| about.json | No |
+
## Error codes
| | | |
-|---------|---------------------------------------------|-----------------------------------------------------------------------------------------|
+| ------- | ------------------------------------------- | --------------------------------------------------------------------------------------- |
| Code ID | Meaning | Possible remedies |
| 0 | Success | N/A |
| 1 | File unexpectedly reached termination point | Make sure there is an END statement in the code. |
@@ -189,5 +199,4 @@ GOTO label
| 12 | Failed to open archive | Make sure the story file is a zip archive. |
| 13 | Unable to setup the characters hashmap. | Make sure the characters.json file exists, is valid JSON and contains valid characters. |
| 14 | Unable to read the main story file. | Make sure the story.ha file exists and is readable. |
-| 15 | | |
-
+| 15 | | |
\ No newline at end of file
diff --git a/docs/CHARACTERS.md b/docs/CHARACTERS.md
index 6669e85..25d4c15 100644
--- a/docs/CHARACTERS.md
+++ b/docs/CHARACTERS.md
@@ -1,66 +1,74 @@
# Character features
-| Feature | Examples | Notes |
-| ------- | ------- | --- |
-| Name | Timothy Sharpshooter | |
-| Gender | Male, Female, NB, Other | |
-| Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color |
-| Eye Color | LightBlue, #ADD8E6, rgb(173, 216, 230) | CSS Color |
-| Hair Color | GoldenRod, #DAA520, rgb(218, 165, 32) | CSS Color |
-| Pronoun Subject | He, She, They | See https://en.wikipedia.org/wiki/Pronoun |
-| Pronoun Object | Him, Her, Them | See https://en.wikipedia.org/wiki/Pronoun |
-| Pronoun Deppos | His, Her, Their | See https://en.wikipedia.org/wiki/Pronoun |
-| Pronoun Indpos | His, Hers, Theirs | See https://en.wikipedia.org/wiki/Pronoun |
-| Pronoun Reflex | Himself, Herself, Themselves | See https://en.wikipedia.org/wiki/Pronoun |
-| Head Shape | | |
-| Torso Shape | | |
-| Arm Shape | | |
-| Leg Shape | | |
-| Hair Style | | |
-| Clothing | See [Character Clothing](#Character Clothing) | |
+
+| Feature | Examples | Notes |
+| --------------- | --------------------------------------------- | ----------------------------------------- |
+| Name | Timothy Sharpshooter | |
+| Gender | Male, Female, NB, Other | |
+| Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color |
+| Eye Color | LightBlue, #ADD8E6, rgb(173, 216, 230) | CSS Color |
+| Hair Color | GoldenRod, #DAA520, rgb(218, 165, 32) | CSS Color |
+| Pronoun Subject | He, She, They | See https://en.wikipedia.org/wiki/Pronoun |
+| Pronoun Object | Him, Her, Them | See https://en.wikipedia.org/wiki/Pronoun |
+| Pronoun Deppos | His, Her, Their | See https://en.wikipedia.org/wiki/Pronoun |
+| Pronoun Indpos | His, Hers, Theirs | See https://en.wikipedia.org/wiki/Pronoun |
+| Pronoun Reflex | Himself, Herself, Themselves | See https://en.wikipedia.org/wiki/Pronoun |
+| Head Shape | | |
+| Torso Shape | | |
+| Arm Shape | | |
+| Leg Shape | | |
+| Hair Style | | |
+| Clothing | See [Character Clothing](#Character Clothing) | |
+
> [!NOTE]
> Pronouns can be implied and unrequired with a recognised Gender value, however, custom values can be filled in if desired.
# Character Clothing
-| Appearal | Examples | Notes |
-| --- | --- | --- |
-| Top | | Shirt, Jumper, etc... |
-| Bottom | | Trousers, tights, etc... |
-| Shoes | | |
-| Hat | | |
-| Gloves | | |
-| Neck | | Necklace, Scarf, etc... |
+
+| Appearal | Examples | Notes |
+| -------- | -------- | ------------------------ |
+| Top | | Shirt, Jumper, etc... |
+| Bottom | | Trousers, tights, etc... |
+| Shoes | | |
+| Hat | | |
+| Gloves | | |
+| Neck | | Necklace, Scarf, etc... |
# Characters.json
+
Characters are stored in the characters.json file which looks like this:
+
+```
{
- "tim": {
- "name": "Timothy Sharpshooter",
- "gender": "Male",
- "skin_color": "",
- "eye_color": "",
- "hair_color": "",
- "pronoun_subject": "He",
- "pronoun_object": "Him",
- "pronoun_deppos": "His",
- "pronoun_indpos": "His",
- "pronoun_reflex": "Himself",
- "head_shape": "",
- "hair_style": "",
- "torso_shape": "",
- "arm_shape": "",
- "leg_shape": "",
- "clothing": {
- "top": "",
- "bottom": "",
- "shoes": "",
- "hat": "",
- "gloves": "",
- "neck": ""
- }
- },
- "bob": {
- ...
- }
+ "tim": {
+ "name": "Timothy Sharpshooter",
+ "gender": "Male",
+ "skin_color": "",
+ "eye_color": "",
+ "hair_color": "",
+ "pronoun_subject": "He",
+ "pronoun_object": "Him",
+ "pronoun_deppos": "His",
+ "pronoun_indpos": "His",
+ "pronoun_reflex": "Himself",
+ "head_shape": "",
+ "hair_style": "",
+ "torso_shape": "",
+ "arm_shape": "",
+ "leg_shape": "",
+ "clothing": {
+ "top": "",
+ "bottom": "",
+ "shoes": "",
+ "hat": "",
+ "gloves": "",
+ "neck": ""
+ }
+ },
+ "bob": {
+ ...
+ }
}
+```
+
> [!NOTE]
> MUST be valid JSON or it can't be deserialised.