Standalone Mode

In standalone mode, VNKit runs the whole game: a main menu, the story, an in-game menu, and saving and loading. Turn it on with Standalone Mode on your Configuration asset, and use the Standalone scene. See Adding VNKit to Your Project to set it up. The VNKit Template is already in standalone mode.

The main menu

The main menu has three buttons:

  • Play Game starts a new game, from the node set in Dialogue Reference on your Configuration asset.
  • Load Game lists the saved games, each labelled with when it was last saved. Choose a save to carry on from it, or delete it with the button next to it.
  • Quit Game quits.

When the story ends, the main menu comes back.

PLACEHOLDER — Screenshot needed
The VNKit Template’s main menu, with the Play Game, Load Game and Quit Game buttons.

The Standalone group on your Configuration asset sets how the menu looks:

SettingWhat it does
Menu ImageThe image behind the main menu.
Menu Button ImageThe image on each button.
Menu Button FontThe font of each button’s text.
Menu Button VisualsThe button’s colours when it’s highlighted, pressed, selected or disabled.
Use Menu Button PrefabUses your own button prefab, set in Menu Button Prefab, instead of the three settings above.
The main menu settings.

Controls

KeyboardControllerWhat it does
SpaceSouth button (A on Xbox, Cross on PlayStation)Finishes typing the current line. If the line has finished, moves on to the next line. When there’s a choice, picks the selected option.
QWest button (X on Xbox, Square on PlayStation)Moves straight on to the next line.
Up and Down arrowsD-pad or left stick, up and downSelects an option.
EscapeStartOpens the in-game menu.
The controls in standalone mode.

The player can also click the options and the menu buttons with the mouse, and move between the menu buttons with the controller.

The controls come from the Input Action asset set in Standalone Controls on your Configuration asset. Its Dialogue action map has these actions: Hurry Up Line, Skip Line, Bring Up Menu, Next Option, Previous Option and Select Option. To change the controls, change these actions’ bindings. The VNKit Template’s controls are in Assets/Settings/Standalone VN Input.inputactions.

If you use your own Input Action asset, keep the action map and action names the same. VNKit warns you in the Console if any are missing.

The in-game menu

Escape opens the in-game menu, which has two buttons:

  • Resume closes the menu.
  • Quit Game saves the game, ends the story, and goes back to the main menu.

Saving and loading

VNKit takes a snapshot of the game each time the story enters a node. The game is saved to disk when the player chooses Quit Game from the in-game menu, using the snapshot from the start of the current node.

Each new game gets its own save. When the player loads a save and plays on, quitting saves over that same save.

A save holds:

  • the story’s variables
  • the node the story was in
  • each stage’s background, and the characters on it
  • character setup from the character, scale, images, nameplate, name_colour, nameplate_position and hide_nameplate Commands
  • images added with alias_sprite
  • the music and ambience that are playing, and their volumes
  • whether a mask is on screen, and where it is

Loading a save starts the story again from the start of the saved node.

Saves are files called 0.vns, 1.vns, and so on, in a saves folder inside Unity’s persistent data path.

Each node is a save point. If a scene is long, split it into several nodes with <<jump>>, so the player doesn’t lose as much when they come back.
Next step Command Reference Every VNKit Command.