Encounters ​
An encounter is a group of NPCs that fights as one: a wolf pack, a bandit camp, a boss and its guards. Without an encounter every NPC acts alone and only fights when it sees an enemy itself. With one, the group joins the fight together, keeps its formation, shares tactics, and reacts to what happens ("when half of us are dead, call for help").
Making one ​
An encounter is not a node in the scene: it is a record (it shows in the Uniques list), and an NPC belongs to it through its own settings. The NPCs of an encounter can stand anywhere in the scene, in a camp, along a road, on two floors of a tower.
- Place the first NPC of the group with the NPCs button and choose New encounter in the Encounter menu of the palette: the encounter is made at the first click, and the menu then points at it, so the next NPCs you place belong to it too. Choose No encounter to go back to lone NPCs, or New encounter again for another group.
- Or give an NPC an encounter later: select it, and in the Unique Object panel (NPC Settings > Encounter) choose one of the encounters of the world, None, or New encounter.
- Edit the encounter: in the same place press Edit encounter for its settings (below); < Back to the NPC returns.
The panel shows how many NPCs each encounter has. The Uniques list shows the members of each encounter and its centre. An encounter that has no NPC when the scene is saved is dropped.
The group is where its members are: its centre is the average position of its living members, and the auto join radius is measured from it. The members are counted when the world loads. An NPC that joins later (reinforcements, a bystander) is a dynamic participant and is handled like a member while the fight lasts.
Basic properties ​
| Field | What it does | Default |
|---|---|---|
| Is active | Whether the encounter is on. An event or quest can switch it off or on; an inactive encounter hides its members and stops them | on |
| Encounter name | A name for you and the debug tools | Unnamed Encounter |
| Auto join combat | When one member enters combat, all the others are forced into it too | on |
| Auto join radius | The members farther than this from the encounter's centre (meters) do not join | 25 |
| Respawns | The group comes back after it is defeated (see Respawning below) | off |
| Combat music | The music of the fight with this encounter: a sound source: a track, a Combat Music Album or a Dynamic Music (a boss fight whose music changes with its phases). It wins over the combat music of the zone and the world while the party fights this encounter. None = the zone's, then the world's | None |
| Respawn delay | Seconds between the defeat of the whole group and its return. Only used when Respawns is on | 60 |
Combat music ​
The Combat music setting plays while the party fights the encounter (the encounter is the group the party is in combat with). It beats the zone's and the world's combat music and ends with the fight. See Music Albums.
Formation and spacing ​
| Field | What it does | Default |
|---|---|---|
| Formation type | None: each acts alone. Circle target: surround the target. Line: a line facing the enemy. Scatter: spread out against area attacks. Defensive cluster: close together. Flanking wings: split into two groups | None |
| Min spacing distance | How far apart the members try to stay (meters) | 3 |
| Spacing check interval | How often the group checks and corrects it (seconds) | 2 |
| Enforce spacing | Keep the spacing during the fight | on |
Group behavior ​
| Field | What it does | Default |
|---|---|---|
| Group behavior | Passive: only defends. Cautious: takes turns attacking, keeps its distance. Balanced: the normal fight. Aggressive: everyone attacks together. Berserker: ignores formation and spacing | Balanced |
| Max simultaneous attackers | At most this many attack at once (0 = the group behavior decides: Cautious about a third of the group, Balanced half, Aggressive and Berserker all) | 0 |
| Attack rotation delay | Seconds between turns when the group takes turns (Cautious) | 1.5 |
A Berserker group does not enforce spacing, whatever Enforce spacing says.
Reactions ​
A reaction is a group-level "when this happens, do this". The list is in the Reaction System section; Add Reaction opens its editor.
| Field | What it does | Default |
|---|---|---|
| Name | For you | |
| Trigger event | What starts it (below) | Damage taken |
| One time | Happens once per fight | off |
| Cooldown | Seconds before it can happen again | 0 |
| Time (seconds) | For Time passed: the interval | 10 |
| Health threshold (%) | For Group health below percent: the average health of the group | 50 |
| Conditions | All must be true for it to happen | none |
| Actions | What it does, each with a priority, a cooldown and conditions of its own | none |
Trigger events: a member takes damage, a member deals damage, a member dies, an enemy dies, anyone dies, a member gains or loses an effect, a member uses an ability, an enemy gains or loses an effect, an enemy uses an ability, time passes (every N seconds in combat), the group's combined health falls below a percentage.
Actions ​
| Action | What it does |
|---|---|
| Call reinforcements | Spawns an NPC (by definition) at a position: how many, all at once or one every N seconds, a maximum in total, and whether they join the encounter at once |
| Group formation | Puts the group into a formation: its type, radius (0 = by group size), whether to keep it, a speed change while moving into it |
| Modify group behavior | Changes the group behavior (and max attackers), for a time or for good, optionally going back to the original afterwards |
| Force group target | Makes every member target the same enemy: nearest, farthest, lowest or highest health, current target, or random; optionally changing targets they already have |
| Spawn effect | Creates a world effect (a fire patch, a shockwave) at the encounter centre or a position |
| Trigger event | Starts an event, so a fight can open a door, play a message or advance a quest |
| Activate quest | Starts a quest |
Conditions ​
The encounter conditions are checked on a reaction or on one action. Each can look at this encounter, the one in the fight, the nearest, or one by id.
| Condition | True when |
|---|---|
| Combat duration | The fight has lasted more (or less) than N seconds |
| Distance from position | The group is near a point |
| Encounter active state | The encounter is on (or off) |
| Encounter combat state | It is in the fight state you choose (out of combat, in combat, defeated) |
| Encounter entity count | The number alive or dead compares with a count |
| Group health percentage | The group's average health compares with a percentage |
| Group members alive | The number of members alive compares with a count |
| Players in area | At least N player characters are within a radius |
Example: a bandit camp ​
A camp of four bandits and a leader, as an encounter:
- Auto join combat on, radius 25: when you meet one, you meet all of them.
- Group behavior Cautious, max attackers
2: they take turns, and the camp feels dangerous but fair. - Reaction Leader's call on Group health below percent 50, one time: Call reinforcements (two archers), then Modify group behavior to Aggressive.
- Reaction Camp cleared on Ally died, condition Group members alive is 0: Trigger event "Bandit camp cleared", which advances a quest.
States ​
An encounter is out of combat, in combat or defeated (every original member is dead). It is defeated at the end of the fight when nobody is left alive, and also when its last member is killed some other way (an event, a trap). A group that merely drove the party off is not defeated: it is ready to fight again.
Respawning ​
With Respawns on, a defeated encounter starts a timer of Respawn delay seconds. When it runs out, every member that is dead stands up again at its starting place with full health, at the level the party needs now (level scaling), and the encounter is ready to fight again with its reactions as new.
Things to know:
- A member with a Respawn timer of its own that is still counting is left alone: it comes back by itself. Use one or the other.
- An NPC marked killable once (Is unique encounter) never comes back.
- With Respawns off the group stays defeated, and what happens when you come back to the world follows its persistence.
See also ​
- NPCs, Combat Scripts for how a single NPC fights.
- How encounters are built.