Skip to content

Text tokens

This is the list of everything that can stand in braces in a story text. For how the pieces fit, read Texts, tokens and pacing first. The pacing marks have their own page: Pacing marks.

You know a token exists and want its exact spelling, or you are checking what a member prints. Case does not matter in subjects and members. Spaces inside a member name are ignored where the code strips them (Branch of reads as BranchOf).

A token is {subject.Member.Member|modifier}. The subject comes first, members follow after dots, and a modifier follows a bar. conspirator, target, player and current on their own print the actor’s name; accomplices on its own prints the list. opinion, attitude and this also work alone (below). scheme, world, text, formula, reasons, budget and relation always need a member.

Subject Means
conspirator, target, player The three actors. player is the actor the reader plays.
accomplices The scheme’s accomplices, a list.
current The actor of the For Each Actor turn the node runs in.
scheme The running scheme: its variables and its numbers (below).
world A world variable, or the calendar.
text A named text: {text.feast_intro}. Everything after the first dot is the key.
formula, reasons A named formula: {formula.Fear of @target}.
opinion, attitude, relation What one actor or clan holds of another (below).
budget What a pot of a budget holds for one owner (below).
this The thing a text in a game window is about. Its members depend on that thing.

@ parts name who a token is about: an actor form such as @target or @target.Spouse. Where a token needs two, the first is who holds it and the second is who it is about.

Member Prints
Name, FullName The name. In a dialogue it is a link a reader can click.
Age, AgeGroup, Gender, Patronym That property. AgeGroup prints nothing when the age is in no group.
Culture The culture’s name. Name, Description and Group may follow.
Role, Title The court role, and its title. With no court role, Title is the personal role’s title.
PersonalRole, PersonalTitle The calling and its title.
Birthday The day the actor grows a year older, written without a year.
Ambition The shown name of the first ambition the actor holds, nothing when none.
SpouseCount How many spouses, a number.
Spouses Every spouse, as a list.
Traits The actor’s traits. After it only Count, First and Last may follow.
Spouse, Father, Mother, EldestChild, Heir, PersonalHeir, AmbitionTarget Another actor. More members follow: {target.Heir.Name}.
Clan, Family, BirthFamily The clan or family. Its members follow: {target.Clan.Head.Name}, {target.Clan.Tension}.
he, him, his, hers, himself A pronoun in the actor’s gender. she, her and herself are read as well. The output copies your capitals: He gives She, HE gives SHE.
Relation, OpinionOfMe, IsMe Added for the ready-made UI and about the reader: what the actor is to the reader, the actor’s opinion of the reader, and whether the reader plays the actor. A variable of the same name wins.
HeirRelation What the actor’s heir is to the actor, such as Son or Chosen heir. Nothing when the actor is dead or that heir is not first in line. A variable of the same name wins.

Any actor variable by its name: {target.Gold}. A built-in member wins over a variable of the same name, so give a variable another name than Name, Age, Clan and the rest.

A scheme variable of the Actor type takes the same members: {scheme.Spy.Title}. A number variable with named levels adds level, levelNumber and nextLevel: {target.Clan.Renown.level}.

Alive, Dead, Male, Female, Player, AI, Married and Widowed are yes or no. They are for conditions: {if target.Male}him{else}her{end}.

Member Prints
Name, Description, Story, Motto Its name and its texts. Story and Motto print nothing when empty. Story is the same text as Description, but prints nothing when it is empty. A clan variable named Description wins over it.
Head, Voice, Leader, Founder, AmbitionTarget An actor. Leader is the head, or else the head of the first clan above that has one. Voice is who speaks for the clan.
Ambition, AmbitionClan The shown name of its first ambition, and the clan that ambition is about.
Overlord, TopOverlord A clan.
Subjects The names of the clans under it, as a list.
Founded The founding date.
MemberCount, LivingCount A number.
Disbanded, StandsAlone Yes or no.
Relations Its standing relations in words: allied with one clan, overlord of another.
Chronicle, Chronicle 3, LastChronicle The last five lines of its chronicle, the last 3 lines (1 to 100), or the newest line.
Culture The culture’s name.
AttitudeToMe The attitude this clan holds toward the reader’s clan.

A clan variable works by its name. The same goes for a family.

Name, Head, HouseHead, BranchOf, House, Branches, Culture, Description, MemberCount and LivingCount. BranchOf and House are families, and more members follow them. Branches lists the names of the branches.

A list prints its names in order: Erik, Erik and Runa, Erik, Runa and Ulf. The last joiner is the built-in text list.and; it is and unless your database changes it. An empty list prints nothing and is false in {if}. After a list only Count, First and Last may follow: {accomplices.Count}, {accomplices.First.Name}. A list is not a number: write {if accomplices.Count > 2}.

Token Prints
{scheme.Spy} A variable of this scheme, here one called Spy. It is empty outside a running scheme.
{scheme.SuccessChance}, {scheme.DiscoveryRisk} The odds in percent, worked out for the scheme’s conspirator and target. Nothing when the scheme has no such formula. They win over a scheme variable of the same name.
{scheme.Progress}, {scheme.NextObjective} The progress number and the next objective. They come after a scheme variable of the same name, as do Log, LastLog and Report.
{scheme.Log}, {scheme.LastLog}, {scheme.Report} The log, its last line, and the report. They print only for a running scheme and only what the reader may see.
{world.Day} Days passed since the game began, from 0.
{world.Year}, {world.DayOfYear}, {world.Month}, {world.DayOfMonth} Numbers, counted from 1. Without a calendar, {world.Month} is 1 and {world.DayOfMonth} is the day of the year.
{world.Date} Today’s date in the calendar’s format. Without a calendar it reads Day 41 of Year 3.
{world.MonthName}, {world.Weekday}, {world.Season} The names you gave in the calendar. Nothing without a calendar, a week or a season.

A calendar value wins over a world variable of the same name. Any other {world.Name} is a world variable. See Days, calendar and game speed.

Form Prints
{opinion}, {opinion @target}, {opinion @target @conspirator} A number: the conspirator’s opinion of the target, of the actor you name, or the first actor’s opinion of the second.
{opinion.Reasons @target @conspirator} The parts of that opinion in words.
{formula.Name}, {formula.Name @a}, {formula.Name @a @b} A formula’s value. Without @ it is read for the conspirator, and for the target when the formula is about two.
{reasons.Name @a @b} A formula’s breakdown, one line per line that did something.
{attitude @a @b} The name of the attitude a’s clan holds toward b’s clan. Nothing when none.
{budget.Plan.Pot @a} What a pot of a budget holds for a. With only the budget named, all its pots together.
{relation.Kind.days @a @b}, {relation.Kind.daysLeft @a @b} Days since a relation of that kind between the two clans began, and days it has left. Nothing when it has no end.

Each prints nothing outside a running game. In a multiplayer game, a value a player may not see prints nothing for that player.

A modifier follows a bar.

Modifier Does
upper, lower Changes the case.
capital Makes the first letter a capital. capitalize is read the same.
plain Prints a name without its link.
short Prints a date in the calendar’s short form. It works on world.Date and Birthday.
commas Joins a list with commas only.
N0, F2, 0.0, #,##0 A number format. The letters C, E, F, G, N, P and R with up to two digits work, and custom formats that hold a 0 or # and otherwise only . , % ‰ ' e E + - ;.
Block Written as
Condition {if condition}…{else if condition}…{else}…{end}. {elseif} is read as {else if}. {endif}, {end if} and {/if} close it too.
Plural {plural value}{one}…{other}…{end}. Branches: {zero}, {one}, {two}, {few}, {many}, {other}.
Brace {{ prints { and }} prints }.

Blocks nest up to 32 deep. Write {other} in every plural block. A value that is missing, not a number, or a list reads as {other}. A plural value takes no format after a bar.

An {if} condition, and the Available When of a dialogue choice, use the same words. In Available When the braces and the word if may be left out.

  • Compare with =, ==, !=, <>, >, >=, < and <=. Numbers compare as numbers, text without regard to case, actors by name or ID.
  • A value alone is true when it is set and is not false or 0.
  • Join with and, or, not and brackets.
  • A word that holds and, or, not or has needs quotes. Text in quotes is literal.
  • true and false are constants. ! is refused; write not.
  • A condition is at most 1000 characters, and brackets and not nest at most 32 deep.
  • An {if} whose condition cannot be read never runs its branch. An unreadable Available When counts as met.
Form Asks
X has policy Name An actor’s clan or family, a clan or a family holds the policy.
X has tradition Name The culture of the actor, clan or family holds the tradition.
X has trait Name The actor has the trait.
X has tie Kind with Y A tie of that kind. with Y left out means with anyone.
X has memory Kind about Y A memory of that kind. about Y left out means about anyone.
X has ambition Name about Y An ambition. Name and about Y may both be left out.
X has attitude Name toward Y The attitude between clans. The name may be left out.
X has relation Kind with Y A relation between clans. The kind may be left out.

A token that has no value prints nothing. A token over 400 characters is plain text. A {text.key} inside a text is formatted at most 4 levels deep. A game can register named modifiers with TextGrammar.SetModifier. A token that names nothing, such as a typo, stays as written, and the Studio offers Did you mean. A { followed by a letter, with no } on its line, is reported: write {{ for a brace. {current} is known only while its node runs. See Problems, notes and validation.

Texts, tokens and pacing explains the same material by example. Variables says who owns a value. Who? and condition lists covers the condition editor. To translate a story, see Translate your story by prompt.