The Text Box

VNKit shows each line in a text box at the bottom of the screen, with the speaker’s name on a nameplate. You set up the names and nameplates with Commands in your Yarn script, or with Character Data assets, and the rest of the box’s look on your Configuration asset.

When the same character says several lines in a row, the box stays on screen and only the text changes. When a different character speaks, the box fades out and back in with their nameplate.

PLACEHOLDER — Screenshot needed
The text box showing one of Capsley’s lines, with his blue nameplate on the left.

Names and nameplates

<<character name "Display Name">> gives a character a short name to use in your Yarn script, and the name to show on their nameplate:

<<character c Capsley>>
c: Lovely day for selling yarn.
Giving Capsley the short name c.

The line shows “Capsley” on the nameplate. The short name is only for your script; the player never sees it.

These Commands change how a character’s nameplate looks:

CommandWhat it does
<<nameplate name colour>>Shows the character’s nameplate, with its background in this colour.
<<name_colour name colour>>Sets the colour of the character’s name.
<<nameplate_position name position>>Puts the nameplate on the left, centre, or right of the box.
<<hide_nameplate name>>Hides the character’s nameplate.
The nameplate Commands. Each one takes the character’s short name.

Colours can be a colour name, like white, or a hex colour without the #, like 4f63c2.

  • If nameplate doesn’t recognise a colour, the nameplate has no background colour. <<nameplate c clear>> uses this to show only the name.
  • If name_colour doesn’t recognise a colour, the name is black.
<<character c Capsley>>
<<nameplate c 4f63c2>>
<<name_colour c ffffff>>
<<nameplate_position c left>>
A blue nameplate on the left, with Capsley’s name in white.

Character Data

For bigger projects, you can set up each character in the Inspector instead.

  1. Choose AssetsCreateYarn SpinnerVNKitCharacter Data.
  2. Set the character’s Display Name, their nameplate, and the look of their text box.
  3. Select the Middle Manager on the Visual Novel Kit prefab, and add the Character Data to its Character Map, with the character’s short name as the key.

When you use the character, scale, images or nameplate Commands on a character who has Character Data, they change a copy for that playthrough. The Character Data asset itself doesn’t change.

GroupSettings
(top)Box Type: Default, Avatar or Custom. With Custom, Line Box Prefab is the text box to use.
StageImage Scale, the size of the character’s images. Image Name, used for hashtags.
BodyThe text box’s background image and tint colour, and the font and colour of the text.
NameplateShow Name, Display Name, and the nameplate’s position, image, tint colour, font and text colour.
AvatarFor the Avatar box: the avatar’s position, image and tint.
The settings on a Character Data asset.

Characters without Character Data, and lines without a speaker, use the defaults from your Configuration asset.

The look of the text box

The Dialogue Visuals group on your Configuration asset sets the default look of the text box. Default Line Box chooses the box:

BoxWhat it is
DefaultA text box with a nameplate.
AvatarThe Default box, with a picture of the speaker next to the text.
CustomYour own prefab, set in Line Box Prefab. See Customising VNKit.
The choices for Default Line Box.

For the Default and Avatar boxes, you can set:

  • Body Font, Body Font Colour, Backing Image and Backing Tint Colour, for the box and its text.
  • Shows Nameplate, Nameplate Image, Nameplate Tint Colour, Nameplate Font, Nameplate Font Colour and Nameplate Position.
  • Avatar Position and Avatar Tint Colour, for the Avatar box.

Choices

The same group sets how choices look: Option Image, Option Text Colour, and Option Highlight Visuals for when an option is selected. To use your own option prefab, turn on Use Custom Option Prefab and set Custom Option Prefab.

How lines are typed out

Typewriter, in the same group, sets how each line appears:

TypewriterWhat it does
InstantShows the whole line at once.
LetterTypes the line out a letter at a time, at Letters Per Second (60 to start with).
WordTypes the line out a word at a time, at Words Per Second (10 to start with).
CustomUses your own typewriter, set in Custom Typewriter.
The choices for Typewriter.

Yarn markup like [pause=500/] works with all of them. To handle your own markup, add your handlers to the Event Handlers list on the Main Presenter, on the Visual Novel Kit prefab.

Voiced Lines sets how lines with a voice line are typed out. See Audio.

The Main Presenter

The Main Presenter, on the Visual Novel Kit prefab, shows the lines and choices. Its settings are:

SettingWhat it doesStarts as
Auto Advance DialogueMoves on to the next line by itself after each line.Off
Auto Advance Hold DurationHow long a line stays on screen before moving on, in seconds, when Auto Advance Dialogue is on.1
Show Last LineKeeps the last line on screen while the player chooses an option.On
Fade DurationHow long the text box takes to fade in or out, in seconds.0.15
Show Unavailable OptionsShows options whose conditions are false, as options the player can’t pick.Off
The Main Presenter’s settings.

Hiding the text box

<<hide_textbox seconds>> fades the text box out. It comes back with the next line:

<<hide_textbox 0.5>>
<<move witch centre 1>>
Hiding the text box while the Witch moves.
Next step Audio Music, ambience, sound effects and voice.