Actions

**Actions** are functions that dictate what assets appear at what time during visual novels. Actions are crucial to creating said visual novels.

## Types of actions

As of now, Kocho has twelve actions for the user to use. These consist of, in order:

* Add choices
* Add text
* Change BGM
* Change characters
* Add SFX
* Change scenery
* Add wait
* Go to
* Add interactive areas
* Add cutscene
* Add actions folder
* Request input

### Add choices

The "Add choices" action lets the user create up to four choices per action. Choices can:

* Prompt the player to choose between one of up to 4 options
* Have their appearance edited in the GUI tab
* Alter the value of a variable to create routes

Choice boxes have a character limit of 100.

### Add text

The "Add text" action lets the user create text boxes. Text boxes can:

* Display text on the screen through a message box
* Show who's speaking through a smaller speaker box
* Have their appearance edited in the GUI tab

There are two types of message boxes: Standard message boxes and large message boxes. Standard message boxes are a decent size, whereas large message boxes take up almost all of the screen. Both boxes have a character limit of 700, and speaker boxes have a character limit of 50.

### Change BGM

The "Change BGM" action plays music in the background (hence the term "**b**ack**g**round **m**usic" or "BGM"). Within the action, the user can:

* Select a music track to play
* Upload a track from their storage
* Preview the selected track
* Set the volume of the track from 0% to 100%

Music will loop instantly upon ending. Supported file formats include mp3, wav, ogg, flac, m4a, aac, and ac3.

### Change characters

The "Change characters" action lets the user choose what characters appear in the foreground. Within the action, the user can:

* Select multiple characters or create a new one
* Select character expressions or upload some from their storage
* Alter the scale, horizontal position, and vertical position of a sprite
* Flip the targeted sprite along the y-axis (horizontally)
* Choose from a selection of preset in and out transitions

The user can select all the characters they need per action. It is important to note, however, that characters cannot be easily layered. New characters are layered on top of old characters. Any aspect ratio is supported, however 16:9 is recommended. Supported file formats include png, jpg, jpeg, gif, bmp, wbmp, and webp.

### Add SFX

The "Add SFX" action plays a short sound for special effect, hence "SFX" (the "FX" part is a play on the word "effects"). Within the action, the user can:

* Select a sound effect or upload one from their storage
* Preview the clip
* Set the volume of the clip from 0% to 100%
* Stop any BGM from playing while the clip is playing
* Hide text boxes while the clip is playing

SFX will not loop upon ending. Supported file formats include mp3, wav, ogg, flac, m4a, aac, and ac3.

### Change scenery

The "Change scenery" action lets the user place a picture in the background. Within the action, the user can:

* Choose a background or upload one from their storage
* Select a transition

Backgrounds are recommended to be in the 16:9 aspect ratio. If an image isn't in 16:9, Kocho will expand the image to fit the whole screen, unlike with characters. Supported file formats include png, jpg, jpeg, gif, bmp, wbmp, and webp.

### Add wait

The "Add wait" action lets the user add a wait time. Wait times will pause the visual novel for a set period of time. Interval options include seconds and milliseconds.

### Go to

The "Go to" action is used to jump between any two scenes in a visual novel. Within the action, the user can:

* Select a chapter to jump to
* Select a scene within the selected chapter
* Choose whether the visual novel should keep going from there, or revert back to the original scene

"Go to" actions are not required to move to the upcoming scene or chapter.

### Add interactive areas

The "add interactive areas" action lets the user create interactive areas. Within the action, the user can:

* Create interactive areas that can be pressed
* Adjust the width, height, horizontal position, and vertical position of each area

Interactive areas are functionally identical to choices. There seems to be no limit for how many interactive areas one can use.

### Add cutscene

The "Add cutscene" action plays a video during the visual novel. Within the action, the user can select a cutscene or upload one from their storage, Cutscenes replace everything on screen with the selected video. The only supported file format so far is mp4.

### Add actions folder

The "Add actions folder" action lets the user group actions into folders for housekeeping purposes. Within the folder, the user can create or insert actions. Actions folders (or just action folders) can also be named.

### Request input

The "Request input" action allows for player interaction. Within the action, the user can insert a prompt and select a variable. The prompt itself is optional and has a character limit of 50. The value of the selected variable will be altered to whatever the player inputted. This value can be brought up in text by opening a text box and typing the name of the variable surrounded by brackets (e.g. [variableName]).

## Trivia

* You can multi-select actions by tapping their icons. You can then copy, cut, paste, or delete them.
* Every action can have conditions set. For more information regarding conditions, see Variables.