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.
The Standalone group on your Configuration asset sets how the menu looks:
| Setting | What it does |
|---|---|
| Menu Image | The image behind the main menu. |
| Menu Button Image | The image on each button. |
| Menu Button Font | The font of each button’s text. |
| Menu Button Visuals | The button’s colours when it’s highlighted, pressed, selected or disabled. |
| Use Menu Button Prefab | Uses your own button prefab, set in Menu Button Prefab, instead of the three settings above. |
Controls
| Keyboard | Controller | What it does |
|---|---|---|
Space | South 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. |
Q | West button (X on Xbox, Square on PlayStation) | Moves straight on to the next line. |
Up and Down arrows | D-pad or left stick, up and down | Selects an option. |
Escape | Start | Opens the in-game menu. |
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_positionandhide_nameplateCommands - 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.
<<jump>>, so the player doesn’t lose as much when they come back.