fixed some markdown formatting

This commit is contained in:
2026-05-16 14:19:04 +01:00
parent 6d012dbe6b
commit 94422b307c
2 changed files with 106 additions and 89 deletions
+44 -35
View File
@@ -1,16 +1,20 @@
# HAPPENING # Happening
An interactive story telling software.<br/>
An interactive story telling software.
Read and write people's stories
## Install ## 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. 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 ### Back-end server -- Rust
The server component of Happening will be written in Rust.<br/> The server component of Happening will be written in Rust.<br/>
Parses the code and sends it via the API.<br/> Parses the code and sends it via the API.<br/>
File layout:<br/> File layout:
- animations/ - animations/
- features/ - features/
- scenes/ - scenes/
@@ -33,6 +37,7 @@ The variables are stored as a hashmap, characters are objects.<br/>
Using the network interface, port 20264.<br/> Using the network interface, port 20264.<br/>
Characters are sent to the frontend and stored there when the character is created on the frontend.<br/> Characters are sent to the frontend and stored there when the character is created on the frontend.<br/>
``` ```
{ {
@@ -44,9 +49,10 @@ character: String,
} }
``` ```
### Frontend -- Python ### Frontend -- Python
Things the frontend can do:<br/> Things the frontend can do:
- Output text - Output text
- Display the character - Display the character
@@ -58,6 +64,7 @@ Things the frontend can do:<br/>
#### Setup #### Setup
This is done in the about.json file, This is done in the about.json file,
``` ```
{ {
@@ -67,39 +74,25 @@ This is done in the about.json file,
} }
``` ```
#### Characters #### 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.<br/> Referencing a character using the @, @NARRATOR is reserved for the Narrator.<br/>
Customisation is done with @CHARACTER change \<feature\> into \<feature name\><br/> Customisation is done with @CHARACTER change \<feature\> into \<feature name\><br/>
Move a character with @CHARACTER to fr
attributes:<br/> > [!NOTE]
> fr means front-right for instance.
- 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
#### Outputs #### Outputs
``` ```
@CHARACTER says "this string @CHARACTER says "this string
is multi-line is multi-line
and ends with a" and ends with a"
``` ```
#### Variables #### Variables
Variables are referenced with the \$, only integers will be supported.<br/> Variables are referenced with the \$, only integers will be supported.<br/>
@@ -107,6 +100,7 @@ Variables are referenced with the \$, only integers will be supported.<br/>
#### Selection #### Selection
Condition based: Condition based:
``` ```
if (condition) { if (condition) {
@@ -120,7 +114,9 @@ else
} }
``` ```
Choice based: Choice based:
``` ```
choice "choice 1" { choice "choice 1" {
@@ -134,45 +130,59 @@ or "choice 3" {
} }
``` ```
#### Positioning #### Positioning
``` ```
@CHARACTER to position @CHARACTER to position
PAN to position PAN to position
``` ```
#### Other #### Other
``` ```
label: label:
GOTO label GOTO label
``` ```
#### Ending #### Ending
`END` to exit out of the story `END` to exit out of the story
## Implemented stuff ## Implemented stuff
### Commands ### Commands
| Command | Implemented | | Command | Implemented |
|-----------------|-------------| | --------------- | ----------- |
| END | Yes | | END | Yes |
| CHOICE/OR/OR | Yes | | CHOICE/OR/OR | Yes |
| IF/ELSE IF/ELSE | No | | IF/ELSE IF/ELSE | No |
| GOTO | No | | GOTO | No |
| PAN | No | | PAN | No |
### Character sub-commands ### Character sub-commands
| Character Command | Implemented | | Character Command | Implemented |
|-------------------|-------------| | ----------------- | ----------- |
| SAYS | Yes | | SAYS | Yes |
| CHANGE | Yes | | CHANGE | Yes |
| TO | Yes | | TO | Yes |
| ANIMATE | Yes | | ANIMATE | Yes |
### Other Features ### Other Features
| Feature | Implemented |
| --------- | ----------- | | Feature | Implemented |
| Variables | No | | ---------- | ----------- |
| Variables | No |
| about.json | No |
## Error codes ## Error codes
| | | | | | | |
|---------|---------------------------------------------|-----------------------------------------------------------------------------------------| | ------- | ------------------------------------------- | --------------------------------------------------------------------------------------- |
| Code ID | Meaning | Possible remedies | | Code ID | Meaning | Possible remedies |
| 0 | Success | N/A | | 0 | Success | N/A |
| 1 | File unexpectedly reached termination point | Make sure there is an END statement in the code. | | 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. | | 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. | | 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. | | 14 | Unable to read the main story file. | Make sure the story.ha file exists and is readable. |
| 15 | | | | 15 | | |
+62 -54
View File
@@ -1,66 +1,74 @@
# Character features # Character features
| Feature | Examples | Notes |
| ------- | ------- | --- | | Feature | Examples | Notes |
| Name | Timothy Sharpshooter | | | --------------- | --------------------------------------------- | ----------------------------------------- |
| Gender | Male, Female, NB, Other | | | Name | Timothy Sharpshooter | |
| Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color | | Gender | Male, Female, NB, Other | |
| Eye Color | LightBlue, #ADD8E6, rgb(173, 216, 230) | CSS Color | | Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color |
| Hair Color | GoldenRod, #DAA520, rgb(218, 165, 32) | CSS Color | | Eye Color | LightBlue, #ADD8E6, rgb(173, 216, 230) | CSS Color |
| Pronoun Subject | He, She, They | See https://en.wikipedia.org/wiki/Pronoun | | Hair Color | GoldenRod, #DAA520, rgb(218, 165, 32) | CSS Color |
| Pronoun Object | Him, Her, Them | See https://en.wikipedia.org/wiki/Pronoun | | Pronoun Subject | He, She, They | See https://en.wikipedia.org/wiki/Pronoun |
| Pronoun Deppos | His, Her, Their | See https://en.wikipedia.org/wiki/Pronoun | | Pronoun Object | Him, Her, Them | See https://en.wikipedia.org/wiki/Pronoun |
| Pronoun Indpos | His, Hers, Theirs | See https://en.wikipedia.org/wiki/Pronoun | | Pronoun Deppos | His, Her, Their | See https://en.wikipedia.org/wiki/Pronoun |
| Pronoun Reflex | Himself, Herself, Themselves | See https://en.wikipedia.org/wiki/Pronoun | | Pronoun Indpos | His, Hers, Theirs | See https://en.wikipedia.org/wiki/Pronoun |
| Head Shape | | | | Pronoun Reflex | Himself, Herself, Themselves | See https://en.wikipedia.org/wiki/Pronoun |
| Torso Shape | | | | Head Shape | | |
| Arm Shape | | | | Torso Shape | | |
| Leg Shape | | | | Arm Shape | | |
| Hair Style | | | | Leg Shape | | |
| Clothing | See [Character Clothing](#Character Clothing) | | | Hair Style | | |
| Clothing | See [Character Clothing](#Character Clothing) | |
> [!NOTE] > [!NOTE]
> Pronouns can be implied and unrequired with a recognised Gender value, however, custom values can be filled in if desired. > Pronouns can be implied and unrequired with a recognised Gender value, however, custom values can be filled in if desired.
# Character Clothing # Character Clothing
| Appearal | Examples | Notes |
| --- | --- | --- | | Appearal | Examples | Notes |
| Top | | Shirt, Jumper, etc... | | -------- | -------- | ------------------------ |
| Bottom | | Trousers, tights, etc... | | Top | | Shirt, Jumper, etc... |
| Shoes | | | | Bottom | | Trousers, tights, etc... |
| Hat | | | | Shoes | | |
| Gloves | | | | Hat | | |
| Neck | | Necklace, Scarf, etc... | | Gloves | | |
| Neck | | Necklace, Scarf, etc... |
# Characters.json # Characters.json
Characters are stored in the characters.json file which looks like this: Characters are stored in the characters.json file which looks like this:
```
{ {
"tim": { "tim": {
"name": "Timothy Sharpshooter", "name": "Timothy Sharpshooter",
"gender": "Male", "gender": "Male",
"skin_color": "", "skin_color": "",
"eye_color": "", "eye_color": "",
"hair_color": "", "hair_color": "",
"pronoun_subject": "He", "pronoun_subject": "He",
"pronoun_object": "Him", "pronoun_object": "Him",
"pronoun_deppos": "His", "pronoun_deppos": "His",
"pronoun_indpos": "His", "pronoun_indpos": "His",
"pronoun_reflex": "Himself", "pronoun_reflex": "Himself",
"head_shape": "", "head_shape": "",
"hair_style": "", "hair_style": "",
"torso_shape": "", "torso_shape": "",
"arm_shape": "", "arm_shape": "",
"leg_shape": "", "leg_shape": "",
"clothing": { "clothing": {
"top": "", "top": "",
"bottom": "", "bottom": "",
"shoes": "", "shoes": "",
"hat": "", "hat": "",
"gloves": "", "gloves": "",
"neck": "" "neck": ""
} }
}, },
"bob": { "bob": {
... ...
} }
} }
```
> [!NOTE] > [!NOTE]
> MUST be valid JSON or it can't be deserialised. > MUST be valid JSON or it can't be deserialised.