Give an enemy Arts¶
Designer · 40 min · No code
Result: your enemy uses its own Arts, with its own animations and cooldowns, and chains them on the party the way the minion does: a Break, then a Topple once its target is Broken.
Before you start¶
- Add an enemy type. You should have your own enemy Blueprint.
- Create an attack art. Enemy Arts are ordinary Art definitions.
- Reactions and statuses: Break, Topple, Daze.
How enemies choose Arts¶
An enemy fights with the same AI as a companion. Every enemy runs the shared StateTree
Characters/Enemies/Core/AI/ST_XenoCore_EnemyFreeroam through the AI controller
Characters/Enemies/Core/BP_AIC_XenoCore_Enemy. While it has someone to fight, the tree's Fight state runs three tasks:
| Task | Job |
|---|---|
| XenoCore Chase Aggro Target | Moves into reach of whoever holds the most aggro on it |
| XenoCore Fight Target | Keeps its auto-attack swinging at that target |
| XenoCore Use Best Art | Every Decision Interval, scores the Arts on its Arts list and uses the best one that is ready |
So an enemy's Arts are data on the enemy, not states in the tree. The tree never names an Art, and one tree serves an enemy with no Arts and an enemy with ten.
Scoring is exactly the companions': an Art must be off cooldown and its target in reach, then it scores its AI Priority plus any condition bonuses. See How a companion chooses an art.
The sample minion, Characters/Enemies/Minion/B_XenoCore_Minion_Melee, has two Arts in
Characters/Enemies/Minion/Arts:
| Art | Does | AI |
|---|---|---|
DA_XenoCore_Minion_Rend |
Break | +2 priority while the target is not Broken |
DA_XenoCore_Minion_Sweep |
Topple | Held until the target is Broken, then jumps the queue |
So a minion that Breaks a party member follows up with a Topple: the same chain the party runs on it.
Steps¶
1. Make the Art¶
- In Plugins › XenoCore Content › Characters › Enemies › Minion › Arts, right-click
DA_XenoCore_Minion_Rend, choose Duplicate, move the copy intoMyGame/Enemies/Golemand name itDA_MyGame_Golem_Crush. Or start blank, as in Create an attack art. - Open it. Under Art, set Display Name, Power, Distance (its reach) and Cooldown Duration.
- Under Art › Effects, set the Effects entry. For a Break, use
Battle/Reactions/GE_XenoCore_Reaction_Break. - Create a gameplay tag for its cooldown in Project Settings ›
Gameplay Tags (click Add New Gameplay Tag), for example
Cooldown.MyGame.Art.GolemCrush. - Under Art, set Cooldown Tag to that tag.
- Under Art › Animation, set Montage to a montage on your enemy's skeleton, made for this Art.
- Click Save.
Fails silently: an Art that borrows the auto-attack's montage
Using an Art stops the enemy's auto-attack, and the auto-attack stops its swing by montage. If
the Art plays the same montage asset as the auto-attack, it is stopped on its first frame:
no hit, no damage, nothing logged. Duplicate the clip's montage under the Art's own name, as
the minion's AM_XenoCore_Minion_Art_Rend and _Sweep are.
Fails silently: two Arts sharing a cooldown tag
A duplicated Art keeps the original's Cooldown Tag. Two Arts with one tag go on cooldown together: using either one makes both unavailable. Give every Art its own tag.
2. Teach it when to fire¶
In the same Art, under Art › Companion AI:
| Setting | Value |
|---|---|
| Usable By AI | On. Off, the enemy never picks it |
| AI Priority | Higher wins. 1 is the default |
| AI Conditions | Optional. For a Break opener, click +, set Check to Target lacks tag, Tag to Status.XenoCore.Reaction.Break, untick Required and set Bonus 2 |
| AI Wait For Reaction | On for a Topple or Daze Art: it is held until its reaction can land |
| AI Chain Bonus | Extra score while its reaction can land. Default 3 |
A Topple or Daze Art needs no conditions: the enemy reads the Art's own Effects and holds it until the target is Broken (or Toppled). See The reaction chain.
Art › Aggro › Threat sets how much aggro the Art builds when an enemy uses it. It matters only for party Arts; you can leave it.
3. Give it to the enemy¶
- Open your enemy Blueprint (here
B_MyGame_Golem) and click Class Defaults. - Under XenoCore › Enemy › Arts, click + beside Arts and pick your Art.
- If your enemy was duplicated from the minion, remove the minion's Arts from the same list (the dropdown beside each entry › Delete).
- Click Compile, then Save.
Arts on this list are granted at level 1 when the enemy spawns. Enemy Arts do not level: the enemy's own Enemy Level already scales its damage through its stats.
Nothing goes in the ability set: the list is the whole job.
4. Pace it¶
In the same Class Defaults, expand AI Profile under XenoCore › Enemy › Arts:
| Setting | Default | What it does |
|---|---|---|
| Decision Interval | 1.5 s |
Time between Art decisions. The auto-attack keeps swinging in between |
| Decision Jitter | 0.3 |
Random spread on each interval, so a group of enemies does not act in unison |
| Post Art Cooldown | 3 s |
After any Art, choose no other for this long, on top of the Art's own cooldown |
| Reliability | 100 % |
Chance to act at all on a decision. Lower makes a lazier enemy |
| Seek Positional Bonus | Off for enemies | Leave off: enemies fight from where they stand |
A boss with a long Post Art Cooldown and high-power Arts feels very different from a swarm enemy with short cooldowns and weak ones, with no AI changes at all.
Test it¶
- Place your enemy in
Maps/L_XenoCore_Gymand press Play. - Hit it once, then stand still and let it fight.
- It auto-attacks, then uses its Break: the struck character shows BREAK. If it has a Topple Art, it follows up within Break's window.
- Open the console (~) and type
log LogXenoAI Verbose. Every decision the enemy makes prints as<enemy>: decision - <Art>=<score> ..., listing each usable Art and its score. - To try the follow-up alone, Break yourself with
XenoCore.Reaction 1; the enemy should use its Topple Art next.
If it doesn't work¶
| Symptom | Fix |
|---|---|
| It only ever auto-attacks | The Art is not on the enemy's Arts list, Usable By AI is off, its Distance is shorter than the distance the enemy fights from, or the Art's montage is the auto-attack's (see step 1). The decision log shows whether the Art is ever considered. |
| It uses Break but never Topple | Topple needs the target Broken when Topple lands. If Break's window is shorter than the time Topple takes to connect, the chain breaks. Use a faster Topple montage, or lengthen the Break on GE_XenoCore_Reaction_Break. That effect is shared, so check what else uses it first. |
| It uses the same Art back to back | The Art has no Cooldown Duration, or no Cooldown Tag. Raise Post Art Cooldown on the enemy too. |
| Two Arts go on cooldown together | They share a Cooldown Tag (see the warning in step 1). |
More in Enemies and AI troubleshooting.
Going further¶
- Enemies and AI, Companion AI and aggro.
- Make an art inflict reactions for the party's side of the chain.
- Tune companion AI: the same Companion AI settings, from the party's side.