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
+40 -31
View File
@@ -1,7 +1,10 @@
# 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
@@ -10,7 +13,8 @@ This is not really out of development, but to run it, clone the repo, go into /s
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. |
@@ -190,4 +200,3 @@ GOTO label
| 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 | | |
+10 -2
View File
@@ -1,6 +1,7 @@
# Character features # Character features
| Feature | Examples | Notes | | Feature | Examples | Notes |
| ------- | ------- | --- | | --------------- | --------------------------------------------- | ----------------------------------------- |
| Name | Timothy Sharpshooter | | | Name | Timothy Sharpshooter | |
| Gender | Male, Female, NB, Other | | | Gender | Male, Female, NB, Other | |
| Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color | | Skin Color | Khaki, #F0E68C, rgb(240, 230, 140) | CSS Color |
@@ -17,12 +18,14 @@
| Leg Shape | | | | Leg Shape | | |
| Hair Style | | | | Hair Style | | |
| Clothing | See [Character Clothing](#Character Clothing) | | | 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... | | Top | | Shirt, Jumper, etc... |
| Bottom | | Trousers, tights, etc... | | Bottom | | Trousers, tights, etc... |
| Shoes | | | | Shoes | | |
@@ -31,7 +34,10 @@
| Neck | | Necklace, Scarf, etc... | | 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",
@@ -62,5 +68,7 @@ Characters are stored in the characters.json file which looks like this:
... ...
} }
} }
```
> [!NOTE] > [!NOTE]
> MUST be valid JSON or it can't be deserialised. > MUST be valid JSON or it can't be deserialised.