Skip to content

Companion AI and aggro

Designer · 15 min read · No code · Last tested: 2026-10-01

Companions fight the way the player does. They use the same target, the same auto-attack, the same arts at the same levels, the same cooldowns, and they take the same reactions and statuses. The AI decides when to do those things; it never gets a separate, simplified copy of them. Enemies, in turn, decide who to attack by aggro, so a companion can draw an enemy off the player.

Out of a fight, companions do not wait in a line for you to move. Each one looks around, wanders, turns to talk to a companion and pulls faces, on its own timer, so the party never acts in unison. That half is covered in Out of battle: a party on its own clock.

This page explains how both work and which numbers you can change. To change them step by step, see Tune companion AI and Give a character its own idle breaks and faces.

Where the knobs are

Nearly every number on this page lives in one of four places: an Art definition (when an art is used), a party member definition (AI Profile: pacing and target choice), the party StateTree Characters/Party/AI/ST_XenoCore_PartyMember (movement, gaze, rest), and BP_XenoCore_Party (tactics and spawn). The table below says which.

The short version

What the player sees What drives it Where you change it
Companions attack what you attack The leader's target lock, through the Attack tactic Party tactics (in play: tap or hold X / F)
They fan out round the enemy The EQS query EQ_XenoCore_CompanionCombatSpot The EQS editor
They use their arts Each art's Companion AI section The art definition
They pace themselves The character's AI Profile The party member definition
They walk behind for Back Slash The art's positional bonus + Seek Positional Bonus Both of the above
They heal when someone is hurt Heal Threshold The party member definition
Enemies turn on whoever hits hardest Aggro, on every enemy Each art's Threat
Companions look around, at you and at each other The XenoCore Party Gaze task ST_XenoCore_PartyMember
At rest they stroll, chat and pull faces The XenoCore Party Hold task ST_XenoCore_PartyMember
Each has its own fidgets and temperament The character's Anim Profile (Idle, Face) The anim profile asset
They start and stop with some weight AI Steering The party pawn Blueprint

Aggro

Every enemy keeps a running score for each party member and attacks whoever is highest. These are XC1's rules:

Action Aggro change
Dealing damage + damage × 0.5
Healing anyone + the heal's amount × 1.25 on every enemy already fighting, even if the target was at full health
Using an art + the art's Threat × (user's level + 14), which drains at 75 per second
Being hit − damage × 2 on the enemy that hit you

A fight opens with every party member at 1 and the leader targeted. A tie never changes the target. A Dazed enemy gains no aggro. A member who goes down is forgotten, and an enemy that walks home or wins forgets everyone.

So, by default: a companion that out-damages you draws the enemy off, a healer who over-heals makes themselves the target, and whoever is being hit sheds aggro over time.

Watch it live

Type log LogXenoThreat Verbose in the console. Every aggro change and every time an enemy switches target is printed with the running total.

What a companion does in a fight

The companion battle state is in Characters/Party/AI/ST_XenoCore_PartyMember. When the party is in battle, it runs two tasks side by side:

  • XenoCore Fight Target takes the party's target and keeps the companion's auto-attack running. The auto-attack pauses while the target is out of reach or the companion is toppled, and picks up again after an art, exactly as it does for you.
  • XenoCore Use Best Art decides on arts.

Draw first, then close in. A companion draws its weapon where it stands, Draw Delay Min–Max (0.15–0.6 s, rolled per member) after the party enters battle, and only then walks in. The follow task holds a sheathed member still for up to Max Hold For Draw (1.5 s) so it does not jog during the wait. The delays are parameters on the XenoCore Fight Target task and the hold on XenoCore Party Follow, both in ST_XenoCore_PartyMember.

Meanwhile XenoCore Party Follow walks the companion to a combat spot. An EQS query picks a point on a ring round the enemy, away from the other party members and from the spots they have already claimed, so bodies do not pile onto one point. Only one member's spot query runs at a time, first come first served: a spot counts as claimed only once its query answers, so two queries in flight together could otherwise pick the same point.

What a companion attacks, and whether it uses arts, follows the party tactics. With Stay Back on, it keeps Stay Back Distance (750 cm, on BP_XenoCore_Party) from the target instead of taking a melee spot.

When the battle is won the companions sheathe, play their victory emotes, and go back to following you (see The combat loop). A companion still armed out of battle for Sheathe Reassert Delay (1.5 s) is asked to sheathe again.

How a companion chooses an art

Every Decision Interval (1.5 s by default, ± 30 % so companions do not act in lockstep) the companion looks at the arts on its body:

  1. Only arts slotted in its Arts menu, at their learned levels, plus its weapon's Talent Art. An art that is learned but not on the bar is not on the body at all, so it can never be used.
  2. Only arts the player could use right now. The art must be off cooldown, the target in its reach, and nothing blocking it. These are the same checks the palette makes for you.
  3. Each usable art gets a score: its AI Priority, plus the Bonus of every optional condition that passes. A required condition that fails removes the art. A Talent Art gets +1.
  4. The highest score is used. On a tie, the earlier palette slot wins.

After using an art the companion waits its Post-Art Cooldown (3 s) before considering another. This is the main thing that stops a large AI party out-performing a player, and it is a per-character number.

See every decision

log LogXenoAI Verbose prints each decision with every usable art and its score, for example decision - Turn Strike=4.0 Back Slash=1.0. Tune against that line, not against a guess.

Conditions

An art's Companion AI › AI Conditions list reads live state:

Condition Passes when
Target has tag / lacks tag The enemy carries (or does not carry) a tag: a reaction such as Status.XenoCore.Reaction.Break, a status, an aura
… Still Active On Impact (Has tag only.) The tag will still be there when this art's hit lands, so a Topple is not fired into a Break that runs out mid-swing
Target health below / above % The enemy's health compared with Percent
I hold / do not hold the target's aggro The enemy is (or is not) attacking this companion
Target is / is not facing me The companion is (or is not) in front of the enemy
An ally is below my heal threshold Any living party member is below this companion's Heal Threshold
Recipient lacks tag Whoever the art lands on does not already have the buff

Ticking Required makes a condition a gate. Unticking it makes it a bonus worth Bonus points.

A heal art needs no condition: one with no "ally below heal threshold" condition is given one automatically, so a companion never heals a full-health party.

The shipped Break arts (Air Slash, Stream Edge, Turn Strike) have one optional condition, Target lacks tag Status.XenoCore.Reaction.Break worth +2, so a companion opens the reaction chain rather than re-breaking a broken enemy.

The reaction chain

A Topple or Daze art needs no AI conditions at all. The companion reads the art's Effects: a Topple effect only lands on a Broken enemy, and a Daze effect only on a Toppled one. From that:

  • The art is held until its reaction can land. A companion never spends Wild Down on an enemy that is not Broken. If it did, it would get a weak hit and a 25-second cooldown, and the next Break would go unanswered. Untick AI Wait For Reaction on an art whose damage is worth using on its own.
  • The art jumps the queue when its reaction can land. It scores AI Chain Bonus (+3) extra while the enemy is Broken (for Topple) or Toppled (for Daze). It also needs the reaction to still be there when the hit lands, so it never fires into a Break that is about to run out.

The chain works across the party: anyone's Break lets any companion Topple. Mira ships with XC1 Reyn's Wild Down (Topple) and Shield Bash (Daze) to show it.

See why a reaction did not land

log LogXenoArts Verbose prints every art's roll (hit, MISS, BLOCKED) and every status it applied or had refused. A missed hit carries no statuses, and a blocked hit cannot Topple.

Moving into position

An art with a positional bonus (Back Slash from behind), or an effect that only lands from the side or behind (Slit Edge, Air Slash), is worth moving for. When it wins a decision and the companion is not in position, the companion holds the art and walks behind or beside the enemy, using no art meanwhile. It uses the art when it arrives, or after Positional Timeout (2 s) wherever it is.

It never does this while the enemy is attacking it, and it tries once per art per enemy. Untick Seek Positional Bonus for XC1 behaviour, where companions use these arts from the front.

Enemies use the same AI

An enemy fights with the same two tasks as a companion. The only difference is its target: an enemy goes after whoever holds the most aggro on it, and a companion goes after the party's target.

To give an enemy arts:

  1. Author each art as an ordinary Art Definition and fill in its Companion AI section. Priority, conditions and the chain bonus work as described above.
  2. Add the arts to the enemy Blueprint's Arts list. They are granted at level 1. Enemy arts do not level; the enemy's own level scales its damage through its stats.
  3. Tune the enemy's pacing in its AI Profile (decision interval, post-art cooldown). Seek Positional Bonus is off for enemies by default, because XC1 enemies fight from where they stand.

The sample minion has two arts:

  • Rend is a Break, with +2 priority while you are not Broken.
  • Sweep is a Topple. It is held until you are Broken.

So a minion that Breaks you follows up with a Topple, the same chain your party runs on it.

Out of a fight, a placed enemy walks its Patrol Points (drag them in the viewport). It waits Patrol Wait seconds at each point and walks at Patrol Speed. An enemy from a spawner wanders inside its spawner's Wander Radius instead. Either way it walks back home after a fight. See Enemies and AI.

Seeing who an enemy is after

While an enemy is fighting, a red ring sits under its target. The Aggro Indicator component on the enemy draws it. Its settings:

Setting Default What it does
Ring System NS_XenoCore_AggroRing The effect. Clear it to hide the ring.
Ring Lift 8 cm How far above the ground the ring starts.
Hide Grace 0.4 s How long the ring stays up after the target is lost, so a target switch does not flicker.

The ring's size is the Ring Size user parameter on NS_XenoCore_AggroRing. Y and Z are the diameter (220 cm). X is how deep it projects; keep that shallow, or the ring tints the legs of the character it sits under.

Out of battle: a party on its own clock

A group of people does not move, stop and look around on the same beat. What gives a robotic party away is synchrony: everyone stopping together, fidgeting together, staring straight ahead together. So every timer below is rolled per member, and nothing waits for the leader except the decision to follow.

All of it runs in Characters/Party/AI/ST_XenoCore_PartyMember. The numbers are parameters on the tasks in that tree. To change them, duplicate the tree and set it on your own child of Characters/Party/BP_AIC_XenoCore_PartyMember; Party AI has the steps.

Where they look

XenoCore Party Gaze runs on the Active state, beside the movement task, so it works in and out of battle. It turns only the head and neck; the body keeps doing whatever it was doing.

Out of battle, every Glance Interval Min–Max seconds (1.8–5 s) the member picks something new to look at, by relative chance:

Look at Chance Notes
The leader Leader Chance (2.5)
Another member Ally Chance (2.5) × Eye Contact Multiplier (2.5) if that member is already looking back
An enemy that has not noticed the party Enemy Chance (2) Only inside Enemy Notice Radius (22 m)
The view View Chance (1.5) A point View Distance out, within View Yaw Range of the body's facing
Straight ahead Ahead Chance (1.5) × Walking Ahead Multiplier (4) while walking: eyes go where the feet go

Nothing beyond Max Gaze Distance (20 m) is looked at. In battle the head stays on the party's target, with a quick glance at an ally Battle Glance Chance (20 %) of the time.

The head turn itself is on the host anim Blueprint, ABP_XenoCore_Base: see Animation. A player-controlled body has no gaze and looks straight ahead, so the leader you drive is never turned by this.

Make a member look at something

From any Blueprint, take the member's body, call Get Controller, Cast To BP_AIC_XenoCore_PartyMember, and call Request Attention with an actor and a number of seconds. That beats whatever the gaze task would pick, which makes it the call for a cutscene beat or a scripted line. Set Gaze Target and Clear Gaze Target point the head without a time limit.

What they do while they wait

XenoCore Party Hold is the travel state a member is in while the leader is close. It no longer just stands still.

Slack. Each time a member comes to rest it rolls its own leash: Follow Start Distance (5.2 m) plus up to Leash Jitter (2.6 m). A small step by the leader moves nobody. A real departure sets members off one at a time, nearest leash first, each after its own Reaction Delay Min–Max (0.2–1 s). Past Immediate Follow Multiplier (1.6) times its leash, a member goes at once.

Activities. Every Activity Interval Min–Max seconds (3.5–9 s) a resting member picks one, by relative chance:

Activity Chance What you see
Stroll Stroll Chance (3) Ambles Stroll Min Distance–Max Distance (1–3.2 m) to a free spot inside the group, at Amble Speed
Social Social Chance (3) Steps up to a companion within Social Max Partner Distance (9 m), stops Social Stand Distance Min–Max (1.15–1.65 m) away, and the two look at each other for Social Attention Min–Max (3–6 s). Each may pull one of its Social Expressions
Solo Solo Chance (1) Pulls one of its Solo Expressions, alone
Stay Stay Chance (2) Nothing. Standing is also something people do

No new activity starts while the leader moves faster than Leader Moving Speed (60 cm/s), and a stroll in progress is dropped if the leader walks off. Min Separation (1 m) keeps strolls and social spots off other members.

Turning to face someone. When a resting member's attention target (a companion talking to it, one it is talking to) is more than Turn To Attention Angle (55°) off its facing, it takes one short step toward them. When it is already too close to step, it turns on the spot at Turn In Place Rate (140°/s). There is no turn-in-place clip, so keep that rate gentle.

The faces and fidgets are per character, in the character's anim profile. See Give a character its own idle breaks and faces.

Who is speaking

When a voiced line has an Addressee, the speaker and the addressee look at each other for the line, plus Attention Linger (1.5 s) so a reply lands while they still face each other. Other companions within Listener Radius (9 m) glance at the speaker Listener Glance Chance (60 %) of the time. A field exchange only pairs two members within Exchange Max Distance (5 m), so a conversation is never shouted across the party.

These are on the voice config, Audio/Voice/DA_XenoCore_BattleVoiceConfig, under Who Is Speaking. Writing the lines themselves is Battle voices and banter.

How they move

Catch-up pace. XenoCore Party Follow Leader never runs faster than the leader's speed × Catch Up Ratio (1.5) + Catch Up Margin (120 cm/s), and eases its pace toward the target at Pace Smoothing (3 per second). Behind a walking leader, companions walk a little faster instead of sprinting, stopping and walking again. Once the leader stops they come in at Arrive Speed.

AI Steering. On the pawn Blueprint, XenoCore › Movement › AI Steering gives a body softer movement while the AI drives it: Rotation Rate Yaw (420°/s), Max Acceleration (1500) and Braking Deceleration Walking (1100). The player's numbers are tuned for a hand on the stick and look robotic on a body nobody steers. When the player takes the body over, the Blueprint's own movement values come straight back. It is on for B_XenoCore_PartyMember_Base, B_XenoCore_Party_VRoid_Base and B_XenoCore_Player, and off (untick Enabled) for anything that does not opt in, enemies included.

Crowd avoidance. Out of battle, members follow their paths straight; Detour Crowd avoidance is switched off. With it on, members re-steer round each other every frame and the whole party wobbles as it walks, at every quality setting. In battle it is always on, because members converge on one enemy and need to get round each other. To have it while travelling as well, tick Crowd Avoidance While Travelling on BP_AIC_XenoCore_PartyMember (XenoCore › AI › Crowd). The same category holds Crowd Avoidance Quality, Crowd Anticipate Turns, Crowd Separation Weight and Crowd Collision Query Range.

Where they appear

When the party first spawns, members land on a loose scatter behind the leader rather than in a formation. The settings are on BP_XenoCore_Party under XenoCore › Party › Spawn:

Setting Default What it does
Spawn Inner Radius 190 cm Distance of the nearest member from the leader
Spawn Radius Step 55 cm Each later member lands this much further out, on average
Spawn Radius Jitter 45 cm Random spread on each radius
Spawn Arc Degrees 240° The arc behind the leader members are scattered across. 360 surrounds it
Spawn Min Separation 120 cm No two members closer than this
Spawn Face Leader 0.35 0 faces where the leader faces, 1 faces the leader
Spawn Facing Jitter 40° Random turn on each member's facing

What companions do not do yet

  • They do not revive you or each other, and do not help a toppled ally up. Reviving is the player's move, paid from the Party Gauge.
  • They do not react to Visions. In XC1, warning an ally is the player's move.
  • They never start a fight. Even with the Attack tactic on At Will, a companion only picks enemies that are already fighting the party. See Party tactics.