Skip to content

Templates

A template is the simplest kind of auto-calculated field. You write a sentence with the field values you want filled in, and the system substitutes them at display time.

A few examples:

  • {first_name} {last_name}“Catelyn Stark”
  • Level {level} {class}“Level 7 Wizard”
  • {title} {first_name} {last_name} of {homeland}“Lord Eddard Stark of Winterfell”
  • {quantity}× {item_name} ({price} GP)“3× Healing Potion (50 GP)”

Templates are the right tool when you’re stitching values into a string and want the result to read naturally. For maths or conditional logic, reach for a Formula instead.

The template is just a string with placeholders in curly braces. Anywhere you write {field_id}, the system swaps in the value of that field on this entity.

{first_name} {last_name}

You can mix placeholders with literal text:

Level {level} {class} from {homeland}

You can use a placeholder more than once:

{name}'s blade, named after {name}'s mother

You can even use placeholders for nested values when a field has structure:

{address.city}, {address.country}

(The address field needs to have those nested keys for this to work — most fields don’t, so this is an unusual case.)

  1. Add the field that’ll hold the result. Always text — even if the values inside are numbers, the output is text.
  2. Open Management → Entity Types, pick the type, switch to Behaviours, click Add Behaviour.
  3. Choose Auto-calculate, target the field you just made.
  4. Pick Template as the calculation kind.
  5. Type the template string into the box, or use the field-insertion picker on the right to insert {field_id} at the cursor.
  6. Watch the live preview underneath — it shows what the template will look like with sample data.
  7. Save.

Any field on this entity, by its identifier (the short, lowercase name shown next to the field in the schema editor).

Field typeWhat appears in the result
Short / long / rich textThe text value as-is. (Rich text formatting is stripped.)
NumberThe number formatted as a string.
DateThe date in the format used by your world’s calendar.
Yes/no”true” or “false” — usually wrap with conditional logic in a formula instead.
Single choiceThe selected option’s label.
Multiple choiceA comma-separated list of selected labels.
Entity linkThe linked entity’s name.
Image / audio / fileThe filename or URL.

If a placeholder references a field with no value, it becomes an empty string. So {first_name} {last_name} with last_name empty would render as “Catelyn ” with a trailing space.

This is mostly an issue for templates that mix multiple optional fields. A few patterns to handle it:

  • Accept the trailing space — usually invisible at the end of a line.
  • Use a Formula with coalescecoalesce(nickname, first_name, "").
  • Add a visibility rule — only show the calculated field when the inputs are filled in.

The editor checks every placeholder against your fields when you save. A few things it catches:

ProblemWhat you’ll see
{nonexistent} — field doesn’t exist on this typeSave is blocked with a clear error listing the unknown placeholders.
Typo: {firs_name} instead of {first_name}Same — caught at save time, not at display time.
{has-dash} or {has space} — placeholders with non-identifier charactersTreated as literal text, not a placeholder. The runtime ignores them.

If your template references a field that gets renamed or deleted later, the placeholder stays in the template but resolves to empty at display time. The Behaviours editor will flag it the next time you open that behaviour.

{title} {first_name} {last_name}

When title is “Lord”, first_name is “Eddard”, last_name is “Stark”:
“Lord Eddard Stark”

When title is empty:
” Eddard Stark” (with a leading space)

If the leading space bothers you, this is where a Formula starts to look better:

concat(coalesce(title, ""), if(is_null(title), "", " "), first_name, " ", last_name)

For an Item type with quantity, name, and value fields:

{quantity}× {name} ({value} GP)

“3× Healing Potion (50 GP)“

For a Location with population, government_type, and region:

A {government_type} in {region}, population {population}

“A Republic in The Vale, population 12000”

For a Spell:

Level {level} {school} ({casting_time}, range {range})

“Level 3 Evocation (1 action, range 60 feet)“

Use the live preview. The editor shows a preview underneath the template box with sample values. If your preview doesn’t look right, your template doesn’t read right.

Keep templates short. A template that fills three lines starts to feel like programming. If you’ve got that much logic, switch to a Formula or split into multiple smaller fields.

Templates aren’t searchable as-is. The result is computed at display time and isn’t indexed for search. If users want to search by full name, also keep first_name and last_name as their own fields.

One template, one purpose. Don’t try to make a single template work for every subtype. Use visibility rules to swap in a different template field per subtype if needed.