<commit_before># Language Spec

This is very much in draft at the moment, until this has been implemented in the Visual Novel Engine, expect this to change at short notice

## Version history

v0.01 - <NAME> - Initial draft of the language for the engine
v0.02 - <NAME> - Changed Remove character to make a bit more sense
v0.03 - <NAME> - Refined syntax following discussions
v0.04 - <NAME> - Forking a bit more defined and some typos are fixed.

## Purpose of this document

To allow for discussion of what this language should be

## Terms

Scene - What is currently displaying on screen

Scope - What is living in memory whether or not its displayed or not

Character - An object that represents the character, this is the character metadata, sprites

## Design goals

Language should be easy for someone who is not technical to write, It should use verbose and easy to explain syntax.


## Language Features

In order to define a character, they must be surrounded by brackets like this: 

```[Character Name here]```

### Writing a line

```[Character] SAYS [Whatever]```

So an example of this is if we had a character called Alanis and Alanis said hello, we would write it like this:

```[Alanis] SAYS hello```

We would identifiy anything before Says as the character name, anything after says would be what we would want to attribute to the character

If you don't want a character or maybe if you wanted to create a system level message, you could easily write

`Says hello

The Language would infer the lack of the character in this scenario would be a system level message

### Lack of a character in scope

If Debug throw an error, if final release then show sillouette to player. 

### Adding Character to scene

```Add [Character] [Sprite] *[Animation]*```

So an example of this would if we had a character called Alanis and we wanted to add Alanis to the scene and wanted to use an already created sprite with a fade in animation, we can do that with a line like this

```Add [Alanis] Happy *Fade In*```

So for the sprite "Happy" would be defined in a folder with the character name and with an image called "Happy.png"

The Fade in would be a prebuilt animation

### Removing a character from the scene

There are two ways to remove a character from the scene

For something temporary, ie: you are hiding the character for a little while maybe you have other characters on the screen or for dramatic effect.

```Hide [Character] *[Animation]*```

So if you wanted to hide a character called Alanis

```Hide [Alanis] *Fade Out*```

If we want to bring back the character without having the readding the character 

We can just use 

```Show [Character] *[Animation]*```

So for our example of Alanis, we could write: 

```Show [Alanis] *Fade In*```

A more permanant route, if we want to completely remove the character out of the scene, we can do:

```Remove [Character]```

So if we wanted to completely remove Alanis:

```Remove [Alanis]```

### Changing Character Sprite

The engine for the time being will use tweening, the sprite must exist in the character folder with the name of the sprite.

```CHANGE SPRITE [Character] [Sprite] *[Animation]*```

So if we wanted to change Alanis's sprite to sad.png, we would use 

```CHANGE SPRITE [Alanis] Sad *Swizzle*```

### Moving Character

There are two ways of moving a character around the screen, one if we just want to move them along in one direction

```MOVE [Character] [Number of Pixels]px [Direction]]```

So it would be:

```MOVE [Alanis] 40px Left```

### Place Character

If we wanted to move the character sprite anywhere on the screen, we could just type

```PLACE [Character] ([Up, Down, Left, Right])```

So it would be:

```PLACE [Alanis] (40,50,50,20)```

###Checking if the Character exists

So if we need check if the character is on the scene or even in the background, we can use this character

```Is [Character] In scene?```

So it could be

 ```Is [Alanis] In scene?```

### Jump Scenario

Jumping scenario allows us to jump from one place to another in the story, so long as the scenario is declared somewhere in the script file.

To Declare a scenario, we can type:

```Scenario "[Scenario Name]"```

So an example of this will be:<commit_msg>Fixed #7 Inconsistancy<commit_after># Language Spec

This is very much in draft at the moment, until this has been implemented in the Visual Novel Engine, expect this to change at short notice

## Version history

v0.01 - <NAME> - Initial draft of the language for the engine
v0.02 - <NAME> - Changed Remove character to make a bit more sense
v0.03 - <NAME> - Refined syntax following discussions
v0.04 - <NAME> - Forking a bit more defined and some typos are fixed.

## Purpose of this document

To allow for discussion of what this language should be

## Terms

Scene - What is currently displaying on screen

Scope - What is living in memory whether or not its displayed or not

Character - An object that represents the character, this is the character metadata, sprites

## Design goals

Language should be easy for someone who is not technical to write, It should use verbose and easy to explain syntax.


## Language Features

In order to define a character, they must be surrounded by brackets like this: 

```[Character Name here]```

### Writing a line

```[Character] SAYS [Whatever]```

So an example of this is if we had a character called Alanis and Alanis said hello, we would write it like this:

```[Alanis] SAYS hello```

We would identifiy anything before Says as the character name, anything after says would be what we would want to attribute to the character

If you don't want a character or maybe if you wanted to create a system level message, you could easily write

`Says hello

The Language would infer the lack of the character in this scenario would be a system level message

### Lack of a character in scope

If Debug throw an error, if final release then show sillouette to player. 

### Adding Character to scene

```Add [Character] [Sprite] *[Animation]*```

So an example of this would if we had a character called Alanis and we wanted to add Alanis to the scene and wanted to use an already created sprite with a fade in animation, we can do that with a line like this

```Add [Alanis] Happy *Fade In*```

So for the sprite "Happy" would be defined in a folder with the character name and with an image called "Happy.png"

The Fade in would be a prebuilt animation

### Removing a character from the scene

There are two ways to remove a character from the scene

For something temporary, ie: you are hiding the character for a little while maybe you have other characters on the screen or for dramatic effect.

```Hide [Character] *[Animation]*```

So if you wanted to hide a character called Alanis

```Hide [Alanis] *Fade Out*```

If we want to bring back the character without having the readding the character 

We can just use 

```Show [Character] *[Animation]*```

So for our example of Alanis, we could write: 

```Show [Alanis] *Fade In*```

A more permanant route, if we want to completely remove the character out of the scene, we can do:

```Remove [Character]```

So if we wanted to completely remove Alanis:

```Remove [Alanis]```

### Changing Character Sprite

The engine for the time being will use tweening, the sprite must exist in the character folder with the name of the sprite.

```CHANGE SPRITE [Character] [Sprite] *[Animation]*```

So if we wanted to change Alanis's sprite to sad.png, we would use 

```CHANGE SPRITE [Alanis] Sad *Swizzle*```

### Moving Character

There are two ways of moving a character around the screen, one if we just want to move them along in one direction

```MOVE [Character] [Number of Pixels]px [Direction]]```

So it would be:

```MOVE [Alanis] 40px Left```

### Place Character

If we wanted to move the character sprite anywhere on the screen with scaling, we could just type

```PLACE [Character] ([x, y, Scale-Height, Scale-Width])```

So if we were to place Alanis in the top left corner of the screen at 50px height and 20px width, we would write

```PLACE [Alanis] (0,0,50,20)```

If we did not want to worry about scaling we could just write:

```PLACE [Alanis] (0,0)```

###Checking if the Character exists

So if we need check if the character is on the scene or even in the background, we can use this character

```Is [Character] In scene?```

So it could be

 ```Is [Alanis] In scene?```

### Jump Scenario

Jumping scenario allows us to jump from one place to another in the story, so long as the scenario is declared somewhere in the script file.

To Declare a scenario, we can type:

```Scenario "[Scenario Name]"```

So an example of this will be:
{'fraction_non_alphanumeric': 0.07575583400390849, 'fraction_numerical': 0.0056328313599264285, 'mean_word_length': 4.206463195691203, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4462230', 'n_tokens_mistral': 2502, 'n_tokens_neox': 2299, 'n_words': 1417}