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.
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.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:
| Command | What 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. |
Colours can be a colour name, like white, or a hex colour without the #, like 4f63c2.
- If
nameplatedoesn’t recognise a colour, the nameplate has no background colour.<<nameplate c clear>>uses this to show only the name. - If
name_colourdoesn’t recognise a colour, the name is black.
<<character c Capsley>>
<<nameplate c 4f63c2>>
<<name_colour c ffffff>>
<<nameplate_position c left>>Character Data
For bigger projects, you can set up each character in the Inspector instead.
- Choose .
- Set the character’s Display Name, their nameplate, and the look of their text box.
- 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.
| Group | Settings |
|---|---|
| (top) | Box Type: Default, Avatar or Custom. With Custom, Line Box Prefab is the text box to use. |
| Stage | Image Scale, the size of the character’s images. Image Name, used for hashtags. |
| Body | The text box’s background image and tint colour, and the font and colour of the text. |
| Nameplate | Show Name, Display Name, and the nameplate’s position, image, tint colour, font and text colour. |
| Avatar | For the Avatar box: the avatar’s position, image and tint. |
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:
| Box | What it is |
|---|---|
| Default | A text box with a nameplate. |
| Avatar | The Default box, with a picture of the speaker next to the text. |
| Custom | Your own prefab, set in Line Box Prefab. See Customising VNKit. |
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:
| Typewriter | What it does |
|---|---|
| Instant | Shows the whole line at once. |
| Letter | Types the line out a letter at a time, at Letters Per Second (60 to start with). |
| Word | Types the line out a word at a time, at Words Per Second (10 to start with). |
| Custom | Uses your own typewriter, set in Custom 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:
| Setting | What it does | Starts as |
|---|---|---|
| Auto Advance Dialogue | Moves on to the next line by itself after each line. | Off |
| Auto Advance Hold Duration | How long a line stays on screen before moving on, in seconds, when Auto Advance Dialogue is on. | 1 |
| Show Last Line | Keeps the last line on screen while the player chooses an option. | On |
| Fade Duration | How long the text box takes to fade in or out, in seconds. | 0.15 |
| Show Unavailable Options | Shows options whose conditions are false, as options the player can’t pick. | Off |
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>>