Command Reference
Every VNKit Command can end with a duration in seconds, and then nowait. Leave the duration out to make the change happen instantly. See Writing Commands.
wait_for is the exception: it doesn’t take a duration. The emphasise and deemphasise Commands take a list of names, and their duration and nowait go after the names.
Backgrounds
| Command | What it does | Parameters |
|---|---|---|
<<scene image seconds>> | Removes every character from the active stage and changes its background. | image: The image, found in a Resources folder. Use a path like backgrounds/beach for images in subfolders. |
<<bg image seconds>> | Changes the background of the active stage. | image: The image, found in a Resources folder. Use a path like backgrounds/beach for images in subfolders. |
<<bg_colour colour seconds>> | Changes the background of the active stage to a solid colour. The stage keeps its current size. bg_color does the same thing. | colour: A colour name like red, or a hex colour like FFA500. |
<<bg_live seconds>> | Removes the background of the active stage so the game behind it shows through. The stage keeps its current size. | |
<<bg_render texture seconds>> | Changes the background of the active stage to a render texture. | texture: The render texture, found in a Resources folder. |
The background Commands.
Characters
See Characters.
| Command | What it does | Parameters |
|---|---|---|
<<show character pose seconds>> | Shows a character’s image. If they’re already on stage it changes their image in place, otherwise they appear in the slot set with move, or in the centre. | character: The character, which is the first part of the image name.pose: The rest of the image name, like happy. |
<<move character slot seconds>> | Moves a character to a slot. Use it before show to choose where a character appears. | character: The character to move, by name or by the slot they’re in.slot: A slot: far_left, left, centre, right, far_right, off_left, off_right, or one set in the configuration. |
<<hide character seconds>> | Hides a character. | character: The character to hide, by name or by the slot they’re in. |
<<fade_in character seconds>> | Fades a character in. | character: The character to fade in, by name or by the slot they’re in. |
<<fade_out character seconds>> | Fades a character out. | character: The character to fade out, by name or by the slot they’re in. |
<<pop character seconds>> | Makes a character pop to draw attention. Needs a duration. | character: The character to pop, by name or by the slot they’re in. |
<<shake character seconds>> | Shakes a character. Needs a duration. | character: The character to shake, by name or by the slot they’re in. |
<<flip character seconds>> | Flips a character horizontally. | character: The character to flip, by name or by the slot they’re in. |
<<flip_vertical character seconds>> | Flips a character vertically. | character: The character to flip, by name or by the slot they’re in. |
<<scale character scale seconds>> | Sets how big a character’s images are, where 1 is normal size. | character: The character’s name, as used in your Yarn scripts.scale: The size, where 1 is normal size. |
<<emphasise characters...>> | Makes the named characters stand out and dims everyone else. Use all to bring everyone up. emphasize does the same thing. | characters: One or more character names, or all. A duration and nowait can follow the names. |
<<deemphasise characters...>> | Dims the named characters and brings everyone else up. Use all to dim everyone. deemphasize does the same thing. | characters: One or more character names, or all. A duration and nowait can follow the names. |
<<images character image seconds>> | Sets which images a character’s line tags use. A #happy tag on their line shows this image name plus happy. | character: The character’s name, as used in your Yarn scripts.image: The image name for this character, like capsley. Defaults to the character’s display name. |
<<alias_sprite original alternative seconds>> | Adds an image that can be picked at random whenever the original image is used. | original: The image to add an alternative for.alternative: The image that can be used instead. |
The character Commands.
Names and the text box
See The Text Box.
| Command | What it does | Parameters |
|---|---|---|
<<character character display_name seconds>> | Sets the name shown on a character’s nameplate. | character: The character’s name, as used in your Yarn scripts.display_name: The name shown on the nameplate. |
<<nameplate character colour seconds>> | Shows a character’s nameplate in a colour. | character: The character’s name, as used in your Yarn scripts.colour: A colour name like red, a hex colour like 4f63c2, or clear. |
<<name_colour character colour seconds>> | Sets the colour of a character’s name. name_color does the same thing. | character: The character’s name, as used in your Yarn scripts.colour: A colour name like white, or a hex colour like ffffff. |
<<nameplate_position character position seconds>> | Sets where a character’s nameplate sits. | character: The character’s name, as used in your Yarn scripts.position: left, centre, or right. |
<<hide_nameplate character seconds>> | Hides a character’s nameplate. | character: The character’s name, as used in your Yarn scripts. |
<<hide_textbox seconds>> | Fades out the text box. It comes back with the next line. |
The Commands for names and the text box.
Stages and masks
| Command | What it does | Parameters |
|---|---|---|
<<new_stage stage seconds>> | Creates a stage. | stage: The stage’s name. |
<<remove_stage stage seconds>> | Removes a stage. The main stage, the top stage, and the only stage can’t be removed. | stage: The stage’s name. |
<<use_stage stage seconds>> | Makes a stage the active stage, which receives commands. | stage: The stage’s name. |
<<raise_stage stage seconds>> | Makes a stage the top stage, which is the one shown. | stage: The stage’s name. |
<<switch_stage stage seconds>> | Makes a stage both the active and the top stage. | stage: The stage’s name. |
<<fade_in_stage stage seconds>> | Fades a stage in. | stage: The stage’s name. |
<<fade_out_stage stage seconds>> | Fades a stage out. | stage: The stage’s name. |
<<start_mask stage seconds>> | Puts a stage on top and masks it, so the stages below can be revealed. | stage: The stage’s name. |
<<mask_left amount seconds>> | Moves the mask left. | amount: How far to move, as a fraction of the screen’s width, from 0 to 1. |
<<mask_right amount seconds>> | Moves the mask right. | amount: How far to move, as a fraction of the screen’s width, from 0 to 1. |
<<mask_up amount seconds>> | Moves the mask up. | amount: How far to move, as a fraction of the screen’s height, from 0 to 1. |
<<mask_down amount seconds>> | Moves the mask down. | amount: How far to move, as a fraction of the screen’s height, from 0 to 1. |
<<end_mask seconds>> | Moves the mask back over the top stage and removes it. |
The stage and mask Commands.
Audio
See Audio.
| Command | What it does | Parameters |
|---|---|---|
<<music track seconds>> | Plays music on a loop, crossfading from any music already playing. | track: The music, found in Resources/music or anywhere in Resources. |
<<stop_music seconds>> | Fades out the music. | |
<<music_volume volume seconds>> | Changes the music volume. | volume: The volume, from 0 to 1. |
<<ambience track seconds>> | Plays a looping background sound like rain, under the music. | track: The sound, found in Resources/ambience or anywhere in Resources. |
<<stop_ambience seconds>> | Fades out the ambience. | |
<<ambience_volume volume seconds>> | Changes the ambience volume. | volume: The volume, from 0 to 1. |
<<sound effect seconds>> | Plays a sound effect once. | effect: The sound, found in Resources/sounds or anywhere in Resources. |
<<stop_sound seconds>> | Fades out every sound effect that is playing. |
The audio Commands.
Waiting
See Writing Commands.
| Command | What it does | Parameters |
|---|---|---|
<<wait_for target>> | Waits until something started with nowait has finished. | target: A character or slot, a stage, background, mask, textbox, music, ambience, sound, or all. |
The waiting Command.