Text, Skip and Auto-play
These settings and preferences decide how the story’s text reaches the player: letter by letter or all at once, how fast, and whether the game moves on by itself. The settings go in js/options.js (see Game Settings); the speeds are player preferences the player changes on the settings screen.
Typing animation
By default each line of dialog appears letter by letter. Four settings control it:
| Setting | Default | Starter game | What it controls |
|---|---|---|---|
TypeAnimation |
true |
same | The typing animation for the whole game. With false, every line appears at once, whatever the three settings below say, and the settings screen hides the Text Speed slider. |
NarratorTypeAnimation |
true |
same | Lines without a character (the narrator). |
CenteredTypeAnimation |
true |
same | Lines of the special centered character. |
NVLTypeAnimation |
true |
same | Lines shown in NVL mode, the text box that fills the screen. |
The last three only turn the animation off for one kind of line while it stays on for the rest. This game types out its characters’ lines and shows the narrator’s lines at once:
monogatari.settings({
'TypeAnimation': true,
'NarratorTypeAnimation': false,
});To show a blinking cursor after the last typed letter, set 'TypingCursor': true; the Type Writer page has the CSS variables that style it.
How fast the letters appear is the TextSpeed preference, the pause in milliseconds between two letters. Players change it with the Text Speed slider, whose right end is the fastest. See Text speed.
A click while a line types
The first click (or Space, or →) on a line that’s still typing finishes the line; the next one moves on. InstantText decides how the line finishes:
InstantText |
What the first click does |
|---|---|
true (the starter game) |
Shows the rest of the line at once, with its text effects. Markers that act while the line types ({pause}, {speed} and your own) and weren’t reached don’t run. |
false (the engine’s default) |
Types the rest of the line at top speed, about one letter each time the screen redraws, skipping the pauses written in it and running its other markers. |
Skipping
Skipping moves through the story by itself, one line every few milliseconds, for players who have read it before. The Skip setting turns it on and sets the speed:
monogatari.settings({
'Skip': 100,
});Skip |
Effect |
|---|---|
0 (the default) |
Skipping is off, and the quick menu has no Skip button. |
A number above 0 |
The quick menu has a Skip button, and the game moves to the next line every that many milliseconds while skipping. |
The quick menu’s buttons are decided when the game starts, so set Skip in js/options.js. The player starts skipping with the Skip button or the S key, and stops it with a second press. While skipping, each line that’s still typing is finished first (as InstantText says) and the game moves on at the next step. Skipping waits at a choice and goes on once the player picks an option. Opening a menu, such as the save screen, turns it off.
NOTE
Before 2.9.0, the Skip button and the S key didn’t start skipping.
Your own code can start and stop skipping with monogatari.skip(true) and monogatari.skip(false). monogatari.skip(true) does nothing while Skip is 0.
Auto-play
Auto-play moves on by itself at a reading pace. The player turns it on and off with the quick menu’s Auto button, whose label becomes Stop while it runs.
The AutoPlaySpeed preference is the number of seconds between two steps, 5 by default. At each step, a line that’s still typing is finished, and a line that has finished gives way to the next one, so a long line can take two steps. Auto-play waits at choices, inputs and anything else that needs the player, and carries on once the player has answered. Opening a menu turns it off.
The speed is read when auto-play is turned on: a change on the settings screen applies the next time the player turns it on. The Autoplay Speed slider goes from 0 to 60 seconds. See Auto-play speed.
Related pages
- Player Preferences: the text and auto-play speeds.
- Dialogs: writing lines, the narrator, the
centeredcharacter and NVL mode. - Quick Menu: the Skip, Auto and Back buttons.