LiminaliaLiminalia
Technical docs: Writing scenarios: Writing inside text

Writing inside text

Open in Claude (new tab)
On this page

Inside dialogue and narration, you insert syntax with { … }. The only special characters in text are { } \; & % [ ] # : and the rest all appear as plain characters.

Overview

KindHow to write itMeaning
Ruby and emphasis dots{r 漢字|かんじ}Ruby (a small reading printed above the characters). The base text can be any number of characters
{dot 大事}Emphasis dots (small dots by each character, used for emphasis in Japanese)
Text decoration{b bold} {i italic}Bold, italic
{c #cc3333 colored}Text color
{size 32 big text}Text size (px)
{mark #ffff66 marked}Background color, like a highlighter
{fx wave wavy text} {fx wave strength=2 speed=0.5 text}Text motion (table below; you can also set the size and speed of the motion)
Progress{click}Wait for a click in the middle of a line ([l] in .ks)
{noclick}At the end of the line, move on to the next line without waiting for a click (only at the end of a line; see below)
{br}Line break within the same page ([r] in .ks)
{speed 600ms ...}Change the text speed for the enclosed part only (time per character)
Embedding{= game.name}Embed a value
{img icons/heart.png} {img icons/heart.png 32}An image in the text
{@chara Yuika smile}Run a command when the text reaches that point
Variations{seq first time|second time} {cycle morning|night} {once Nice to meet you|} {shuffle red|blue}Each time the same place is passed, shows one of the parts separated by | (see below)
Escapes\{ \} \\{ } \ themselves (inside variations, a literal | is written \|)
  • Text decoration (b i c size mark fx) and emphasis dots can be nested ({b {c #cc3333 bold red}}).
  • {img} images are looked up in the image folder. The height is in px; if omitted, it’s the text size. The image is shown as one character and appears in the backlog too. It’s included in the exported assets.

Motions of {fx}:

NameMotion
shakeTrembles
waveWaves
popBounces in
fadeSlowly fades in
glowGlows

After the name, you can write multipliers for the size of the motion (strength=) and its speed (speed=) (1 is standard; in this order, and either can be omitted).

Yui "{fx shake strength=3 speed=2 Scary}..."
{fx wave strength=0.5 speed=0.5 Gently swaying}
  • strength multiplies the width of shaking and waves, the spread of the glow, and the size and blur when appearing; speed multiplies the speed of the motion. Write positive numbers; anything else is an error (bad-fx).
  • An inner {fx} doesn’t inherit the outer strength and speed.
  • lim backport can’t write {fx} back (it removes the motion and reports it).

Variations ({seq …} {cycle …} {once …} {shuffle …})

When the same line is passed many times (an investigation screen, a choice the player comes back to, and so on), the text shown changes each time. They’re the same as Ink’s sequences ({A|B} {&A|B} {!A|B} {~A|B}).

# desk
{once There's an old letter on the desk.|}{seq You read the letter.|You read it again.|You know it by heart now.}
Yui "{shuffle Right|Yeah|...Mm}"
@jump #menu
How to write itHow it’s shown
{seq a|b|c}Shown in order each time it’s passed, and the last one, c, keeps being shown
{cycle a|b}Shown in order each time it’s passed, going back to the first after the last
{once a|b}Shown in order, each one only once, each time it’s passed. After all of them have been shown, nothing is shown (you can write an empty part too, as in {once Nice to meet you|})
{shuffle a|b|c}Chosen at random each time it’s passed. The same one isn’t shown twice in a row
  • The separator is a half-width |. Write a literal | as \|. Each part can contain ruby, {= expression} and text decoration ({seq {r 星\|ほし}が{= n}つ\|…}).
  • How many times it has been passed is kept in the save (per playthrough, like visits). Saving in the middle of a page and loading shows the same text.
  • The counts are kept separately by file, by line (its original text) and by which variation it is within that line. Lines with the same text in the same file share their counts.
  • Random choices follow the project’s random seed (lim coverage --seeds). Variations can be written in choice text too.
  • Translations translate the whole line (write the same number of variations in the translated text too). Character counts and search count the text with all the parts joined by /.
  • TyranoScript has no equivalent, so lim backport writes back only the first part and reports it as something it can’t write back. lim import-ink turns Ink’s sequences into this syntax (sequences inside conditional branches don’t become variations; they become expressions).

Ruby

Ruby is a small reading printed alongside the text, mostly used to give the kana reading of kanji, so the examples are in Japanese.

{r 漢字|かんじ}を読む
{r 東京特許許可局|とうきょうとっきょきょかきょく}
{b {r 漢字|かんじ}}
  • The base text and the reading are plain characters without decoration, and {…} can’t be written inside them. To decorate ruby, enclose it from outside (the third example).
  • Neither the base text nor the reading can be empty (empty-ruby).
  • {r 漢字}, missing the | that separates the reading, and {r 漢字|かんじ}, separated with a full-width |, are errors (bad-ruby; the full-width | is read as ruby, and the suggested fix is the line with a half-width one).
  • Ruby written in other formats (|漢字《かんじ》, 漢字《かんじ》) doesn’t become ruby and is shown as is, so it’s warned about, with a suggested fix that rewrites it as {r 漢字|かんじ} (aozora-ruby).
  • \ makes the next character a plain character. To put special characters in the base text or the reading, write them as follows.
CharacterIn the base textIn the reading
|\|Write it as is (the reading lasts until })
{ }\{ \}\{ \}
\\\\\
  • Change the ruby size with ui.text.rubySize in liminalia.json (a multiple of the base text size; default 0.45). The position of ruby in vertical writing is calculated from this value, so don’t override the font-size of ruby directly in the project’s CSS.
  • In vertical writing, ruby goes to the right of the characters.

Emphasis dots

Emphasis dots (boten) are small marks placed by each character to emphasize a word in Japanese, so the examples are in Japanese.

それは{dot 大事}なことだ
{b {dot 強調}}
  • The shape is set by ui.text.emphasis in liminalia.json. The value is a CSS text-emphasis-style, and the default is filled sesame (sesame dots). Others include filled dot and open circle.
  • They can be nested with text decoration.

Inline commands

{@…} runs a command when the text reaches that point. Use it, for example, to change an expression right after a click wait.

Yui "And?{click}{@chara Yuika angry} ...Are you even listening?"
  • The syntax and the syntax check are the same as for command lines (@… lines).
  • Use it only to insert an effect while staying on the same page. Effects that can come before or after the page are written as @ lines.

Inline commands run in order as the characters reach their position. They behave as follows depending on how the player advances.

How the player advancesCharactersInline commands
Reading normallyAppear one at a timeRun where they’re written. Commands that wait pause for their duration
Clicking while characters are appearingEverything up to the next {click} (or the end of the page if there is none) appears at once, without stopping at ruby or decoration boundariesRun with the same timing as when reading normally ({@wait 1s} waits, and the characters after it appear at once). Clicking again while waiting skips the wait and the effect to the end (chapter 5)
SkipAppear at onceAll run, but every duration is 0 (@wait, fades, shaking and motion end at once)

Moving on without waiting for a click ({noclick})

Write {noclick} at the end of a line to move on to the next line as soon as that line has been shown, without waiting for a click (like {nw} in Ren’Py). The text stays in the message window and is cleared by the next text line.

Yui "Which way?"{noclick}
@choice
- Take the north road -> #north
- Take the south road -> #south
@end

Ren "Wait—"{noclick}
@quake time=500ms
Ren "...Did it just shake?"
  • The first example shows the choices while keeping the question on screen. The second inserts an effect while keeping the line on screen, then moves on to the next line.
  • It can only be written at the end of a line. In the middle of a line, inside decoration, or in choice text, it’s an error (noclick-not-last, noclick-in-option).
  • The text that stays is shown again even when you load a save made while the choices are on screen. @clear, @window hide, @nvl and @vertical clear it.
  • Auto and skip move on without waiting. A voice that’s playing isn’t stopped when moving on; whether it stops is decided by the setting in the Settings screen when the next page is shown.
  • You don’t need to write it in translations (whether to wait is decided by the original).
  • When importing from TyranoScript, it’s added to a text line that doesn’t end with [p] and is followed by [glink] [link] [button] [clickable] [s].

Sound during skip and auto

  • While skipping, voices (@voice, @voice-auto) aren’t played, and a voice that’s playing stops. Sound effects (@se) play, and BGM changes happen without fading.
  • In auto mode, once the page is fully shown (and its voice, if any, has finished), it waits for the auto wait time plus a time based on the number of characters on the page, then advances.