Skip to content

Interpolation

Sometimes you might want to put some dynamic value inside your markup. Interpolation will help you with doing so.

To use it just open double curly braces inside your text: {{ <content> }}

Content

Inside of interpolation you can use both variables and literal values.

::: @companion_name is "Freja" Suddenly, {{ @companion_name }} jumped on top of your shoulders and started hissing.

Suddenly, Freja jumped on top of your shoulders and started hissing.


You can use interpolation operators to calculate more complex values. You can chain them almost indefinitely as long as the final result is a single value.

::: @perception is 16, @item is "ornate key", @luck is 5 [#block-if ({{ @perception + @luck }} >= 20)] You run your hand along the dusty bookshelf, and a section unexpectedly swings open! Inside, you discover a hidden compartment containing an {{ @item }}. [/block-if]

You run your hand along the dusty bookshelf, and a section unexpectedly swings open! Inside, you discover a hidden compartment containing an ornate key.

See also