Appearance
Tarinoi Core Functions
Version 0.0.1 – 2026-09-17
Tarinoi provides a small, fixed set of core functions for the things nearly every narrative game needs: setting a flag, counting something, remembering a piece of text, and gating a line on any of those. They live in a function collection called tarinoi and are referenced as Fn.tarinoi.*.
What sets them apart from functions you declare yourself is that Tarinoi implements them. In-app playback evaluates them for real, against a simulated game state you can inspect and save, so you can play through a dialogue and watch flags flip and counters move without a running game build. The official plugins ship reference implementations of the same functions, so what you see in playback is what the engine does.
Using them
The core set is included in every built-in project template except "Blank", and in every project imported from articy:draft. It is Tarinoi's, not yours: the collection and its declarations are marked with a shield and cannot be edited, renamed, moved or deleted one at a time. The whole set can be removed from a project that has no use for it, or brought back, from the menu (⋮) in the header of the Functions category: Delete core functions archives the collection after telling you how many documents still call it, and Recreate core functions mints a fresh copy of the current set. Recreating is refused while any function elsewhere in the project shares a core function's name, so that a call can never mean two things.
A project created before its current version adopts it the same way: delete the old collection, recreate, and let the health check point at any mismatches.
Call them the same way as any other function:
- From a card, in a
function-callproperty – fires when the card is traversed, whether the player selects it or the flow passes through it silently. See Triggering game events. - In an input pin condition – any function that returns a boolean can gate a pin, and conditions compose with
&&,||,!and parentheses. See Input pin conditions.
Arguments are typed. A varRef argument takes a variable reference (Var.group.name) and the variable must be of the right type – a flag is a boolean variable, a counter a number variable, a text a string variable. A value, a or b argument takes anything that resolves to a value of the right type: a literal, a variable reference, or a list item (Ls.group.list.key).
Unset variables – are treated as false, 0 or "".
Naming. The functions are PascalCase, following C# convention.
Flags
A flag is a boolean variable.
| Function | Effect |
|---|---|
SetFlag( flagRef ) | Set a flag. |
ClearFlag( flagRef ) | Clear a flag. |
ToggleFlag( flagRef ) | Toggle a flag: clear if set, set if unset. |
FlagIsSet( flagRef ) → boolean | Returns true if the flag is set. An unset flag is treated as clear. Use the NOT operator in conditions to negate. |
Fn.tarinoi.SetFlag( Var.chapter1.met_ferryman )
Fn.tarinoi.FlagIsSet( Var.chapter1.met_ferryman ) && !Fn.tarinoi.FlagIsSet( Var.chapter1.paid_ferryman )Counters
A counter is a number variable.
| Function | Effect |
|---|---|
SetCounter( counterRef, value ) | Set a counter to a value, which must be a number. |
IncrementCounter( counterRef, delta ) | Increment a counter by delta, which must be a number. Use negative numbers to decrement. An unset counter is treated as a 0. |
Fn.tarinoi.IncrementCounter( Var.party.morale, -1 )
Fn.tarinoi.SetCounter( Var.party.morale, Ls.tuning.morale.starting )Text
A text is a string variable.
| Function | Effect |
|---|---|
SetText( textRef, value ) | Set a text variable to a value, which must be a string. |
Fn.tarinoi.SetText( Var.player.title, "Ferry Captain" )Comparisons
The comparisons do not care where their operands come from: a counter against a literal, a list item against a counter, two counters. Both sides must be the same type.
| Function | Returns true when |
|---|---|
StringEquals( a, b ) | a and b are equal. Both must be strings. An unset text variable is treated as empty. |
NumberEquals( a, b ) | a and b are equal. Both must be numbers. |
NumberAtLeast( a, b ) | a ≥ b. Both must be numbers. |
NumberGreaterThan( a, b ) | a > b. Both must be numbers. |
NumberAtMost( a, b ) | a ≤ b. Both must be numbers. |
NumberLessThan( a, b ) | a < b. Both must be numbers. |
An unset counter is treated as a 0 in every numeric comparison. There are deliberately no NotEquals variants: negate with !, as with FlagIsSet.
Fn.tarinoi.NumberAtLeast( Var.player.strength, Ls.checks.thresholds.hard )
!Fn.tarinoi.StringEquals( Var.player.faction, Ls.factions.names.rebels )In playback
Playback maintains game states – the current values of every variable referenced in your project. You can save several under different names. The game state panel shows the values and lets you edit them directly.
When playback reaches a card, it fires the card's function calls; when it reaches a set of gated lines, it evaluates their conditions. For each condition:
- Only core functions – playback evaluates it and picks the line accordingly.
- Any function of your own – playback cannot know what it does, so you will have to decide whether it's a PASS or a FAIL. This includes conditions that mix core and custom functions..
- A function that does not exist, or a core function called with the wrong number of arguments – playback skips it and shows a warning. These are integrity errors, not design choices, and the same problems will surface in the health check.
Function calls on cards follow the same rules: core calls run, your own calls are skipped silently, broken calls warn.
Output selectors are never core: routing through a fork is always yours to implement, and playback asks you which pin to take.
For plugin authors
The core set is an ordinary set of function declarations – the plugin receives calls to them like any other function, with resolved argument values. The official Godot, Unity and Unreal Engine plugins ship a reference implementation that their codegen writes into your project, once, as a file you own: keep it, adapt it to your own variable storage, or replace it. It is stamped with the version of this document it was rendered from, so the plugin can tell you when the set has changed since.
When you implement the set yourself, honour the same defaults for unset variables (false, 0, "") so that what an author verified in playback holds in the engine. Where playback raises an error – a value of the wrong type, an undeclared variable – the reference implementations log and fall back to the type's default instead, because a running dialogue should not crash over an authoring mistake.