Docs/Dynamic Components

Combat Templates

A Combat Template is a turn-based fight your reader plays through. You decide who takes part, which side each combatant is on, and what happens after the fight. What each combatant can do (their hit points, abilities, shield, and consumables) is not on the template. It's set in the Combat Settings modal on each character's own Glossary Item. The template is the encounter; the Glossary Item is the fighter. Build the encounter once, and any Trigger in the book can open it for the reader.

Where to find it

You can find Combat Templates in the sidebar, under Dynamic Components. The list shows every fight in this book, with its name, location, and validity. Click Add Combat Template to create a new one, or click a row to open and edit it.

The template

  • Template name: shown in the list and in any Trigger that opens this combat. Required, up to 70 characters. Pick a name you'll recognise later: "Bar brawl in Nantucket" beats "combat 4".
  • Show the title: when on, the reader sees the template name at the top of the fight. Leave it off to keep the focus on the action.
  • Persist changes: when on, the changes the fight makes (health lost, items consumed, status effects applied) carry over after the encounter ends. When off, the world returns to its pre-combat state on exit. Turn it off for sparring sessions, dream battles, or any fight whose changes shouldn't persist.
  • Location: an optional Glossary Item for where the fight happens. It must be in the Location category; the editor only lets you pick those.

Groups of combatants

Up to five groups, three sides

Combatants are organised into groups. A template can hold up to 5 groups. Each group has a name (so you can tell them apart) and a category that decides its side:

  • Ally: fights alongside the reader.
  • Foe: fights against the reader.
  • Wild: on neither side. Use it for anything that doesn't take a side at the start: a pack of beasts that attacks whoever is nearest, or a hostile NPC who attacks both sides.

Prerequisites on a group

A group can have a prerequisites block: conditions that must be true for the group to appear at all. Unlike a Decision Template, there's nothing to choose about the failure case: when the conditions are not met, the group simply stays out of the fight, and the modal says exactly that under When the prerequisites are not met:. Use this when a reinforcement group should only arrive if the reader rang the alarm bell three chapters back.

Participants

The combatants inside each group

A group lists its participants on the Participants tab, up to 10 per group. Each participant points at a Glossary Item from the book: a Character or Creature with Can engage in combats turned on. The picker only shows characters that qualify. Characters that aren't combat-eligible, or that have no container fact for their inventory, don't appear.

Note
The fight kit lives on the Glossary Item, not here. A combatant's abilities, health, energy, shield, secondary effects, and consumable items are all configured on the character's own Glossary Item page, in the Combat Settings modal you open from Can engage in combats. The Combat Template only decides which characters meet and on which sides. If a character's attacks feel weak or their shield is wrong, fix it on their Glossary Item. The fix applies to every fight they're in.

What you set for each participant on the template:

  • Character or creature: the Glossary Item this slot represents.
  • Combat Container: which of the character's Container facts they bring to this fight. Its items are what their consumable abilities can use and what drops on defeat. A character with two containers (say, a backpack and a quiver) can bring different ones to different fights.
  • Behavior type: Direct means the participant always joins. Switch it to Conditional if they should only appear when something specific is true, such as the reader's level being above 5 or a particular flag being set.

Outcomes

What runs when the fight ends

A combat resolves to one of two outcomes: Victory (the reader's side won) or Defeat (it didn't). Each outcome has its own list of results: the things that happen to the world once the fight is over.

Results work the same as a Trigger's: reveal a chapter or header the reader couldn't reach before, change a fact, raise or lower a stat, reveal or hide a Glossary Item, run a multi-select. A Victory can hand out rewards, set a "village saved" flag, and reveal the next chapter. A Defeat can reveal a recovery scene with their wounded character's facts already updated.

Published templates are locked

Once a Combat Template ships in a published expansion of the book, it locks: its card in the list shows a lock icon and no longer opens the editor. Hover the card and click Duplicate to get a fresh copy with (Copy) appended to the name, and edit that. The original keeps running for the readers of that expansion, exactly as they bought it.

Validation

A Combat Template can become invalid for several reasons. The list page marks broken templates with a warning icon and sorts them to the top. The publish check rejects any book that contains an invalid Combat Template.

  • The location points at a Glossary Item that has been deleted, or one that's no longer in the Location category. Pick a different one or clear the field.
  • A participant points at a Glossary Item that has been deleted, or one where Can engage in combats has since been turned off. Open the group and re-pick the character, or re-enable combat on their Glossary Item.
  • A group's prerequisites or a participant's conditions reference a Glossary Item, fact, tag, or Calculation that has since been deleted. The broken row is flagged so you can jump to it.
  • A group has Has Prerequisites switched on but no prerequisites written. Add the conditions or turn the switch off.
  • An outcome result targets a chapter, header, Glossary Item, fact, or tag that has since been deleted. Open the outcome and re-point the row.

Deleting a Combat Template that's in use breaks every Trigger that points at it. The editor warns you when you delete, so you can cancel or fix the Triggers afterwards.