Back to Guides

Guides 3 min read

Your first behaviour: three rules, then a fourth

A practical guide to the behaviour editor: what a rule is made of, the order rules are read in, the conditions and actions worth knowing first, and how to see why a rule did not fire.

A tribe moving across the map

A behaviour is a list of rules. A rule is a set of conditions and the actions they trigger. Your tribe runs that list over and over while the fight happens, and nothing else decides what it does.

How a rule is read

The list is read from the top. The first rule whose conditions all pass is the one played; the rest of the list is ignored for that pass. If no rule passes, that person stands there until the next pass.

Two consequences, and they are the whole craft:

  1. Order is priority. A survival rule placed under an attack rule never fires, because the attack rule passes first.
  2. A rule with no condition always passes. It belongs at the bottom, as the default — usually attack the closest enemy.

The three rules to start with

1. if  closest enemy health  <  30%        ->  attack the closest enemy
2. if  mana                  >=  100%      ->  cast spell slot 1
3. if  own health            <  50%        ->  flee

Read in that order it finishes wounded enemies, spends mana as soon as it is there, and runs before dying. Written in the other order, rule 3 would be the only one that ever matters.

Then the fourth

The fourth rule is where a tribe stops being generic. A few that pay off:

  • If the closest enemy is casting → cast the interrupt slot. Nothing in the game punishes a caster harder than being hit mid-cast.
  • If an ally is badly hurt → cast the heal slot. A condition on the closest ally’s health, not on your own.
  • If I already carry this enchantment → do nothing. The negative form of the condition is what stops your shaman re-casting a buff that is already up.
  • If the closest enemy is further than my spell’s range → stop running and wait. Range discipline beats damage far more often than players expect.
  • If I am holding the wrong weapon → equip the bow. A person can switch weapon mid-fight, and the rule costs nothing.

The conditions you have

Health and mana, as a percentage. Distance to the closest enemy or ally. Whether you are in combat at all. Whether the closest enemy is casting. The closest ally’s health, and whether any ally is badly hurt. Whether a given spell slot is in range of its target. Which weapon is equipped — or is not. How long since you last took damage. Whether your target is still alive. And a plain random chance, for behaviour that should not be perfectly predictable.

The actions you have

Cast one of your spell slots at a target the game picks. Attack the closest enemy. Flee. Equip a weapon. Start or stop running. Wait a number of seconds. Move to a random point within a radius — which is how you stop a group from clumping. Cancel the cast. Walk to the group’s rally point. Go to the closest resource of a given kind, which is how a craftsman feeds a build without being told.

Groups are how you use all of it

One list for the whole tribe is a waste. Split the tribe into groups and give each its own list: melee that holds a line, archers that keep their distance, a shaman whose only job is the heal rule. Then the macro keys flip a group’s posture mid-fight, and that is the part that is still played with your hands.

Start with three rules. Lose a fight. Press F2 and read which rule fired. That loop is the game.

Get the game on Steam Play the free demo

Keep reading