Skip to content

Add an enemy type

Designer · 90 min · No code

Result: a new enemy type with its own body, animations, gameplay abilities, stats and loot, built from its own assets rather than borrowing the melee minion's. You can then place as many as you like.

Before you start

  • Your first enemy. That tutorial makes a variant of the minion (new name and level, same everything else). This recipe makes a new type.
  • Enemies and AI.
  • A skeletal mesh for the new enemy, with attack, hit-reaction and death animations on its skeleton.

What an enemy type owns

Every asset below belongs to one enemy type. Make your own copy of each; share nothing except the parts in the last table.

Piece Minion sample Holds
Enemy Blueprint Characters/Enemies/Minion/B_XenoCore_Minion_Melee Mesh, anim class, name, level, rewards, loot, death, Arts, patrol
Anim Blueprint ABP_XenoCore_Minion_Melee Locomotion for this skeleton
Locomotion blend space Minion/Animations/BS_XenoCore_Minion_Locomotion2D Idle, walk, jog, and side and back jogs, by direction and speed
Pawn data PawnData_XenoCore_Minion_Melee Which ability sets the enemy is given
Ability set AbilitySet_XenoCore_Minion_Melee Auto-attack, hit reaction, knock-downs, guard, recoil, dodge
Auto-attack GA_XenoCore_Minion_Attack Swing montages, range, damage effect
Hit reaction GA_XenoCore_Minion_HitReact Flinch montages
Knock-downs GA_XenoCore_Minion_Topple / _Daze The Topple and Daze montages, held while the reaction lasts
Guard, recoil, dodge GA_XenoCore_Minion_Guard / _Recoil / _Evade Clips for a block, being blocked, and a dodge
Arts Minion/Arts/DA_XenoCore_Minion_Rend / _Sweep Art definitions on the Blueprint's Arts list. See Give an enemy Arts
Stats effect Battle/Attributes/GE_XenoCore_BaseStats_Minion_Melee Stats at its level. See Set an enemy's statline
Drop table Inventory/Loot/DA_XenoCore_Drops_Minion See Build a drop table

Shared by every enemy, and not to be copied:

Shared piece What it gives
Characters/Enemies/Core/B_XenoCore_Enemy_Base Parent Blueprint: health bar, target chevron, AI controller, death sequence
Characters/Enemies/Core/AbilitySet_XenoCore_Enemy_Common Death, and the stat attributes
Characters/Enemies/Core/BP_AIC_XenoCore_Enemy The AI controller, its team, and the shared behaviour tree ST_XenoCore_EnemyFreeroam

Steps

1. Make the Golem from the minion's set

  1. Create MyGame/Enemies/Golem.
  2. Right-click Characters/Enemies/Minion/B_XenoCore_Minion_Melee, choose Create Child Blueprint Class, and save it in your folder as B_MyGame_Golem. A child keeps every component and setting that already works, and picks up fixes to the minion.
  3. Duplicate into your folder: PawnData_XenoCore_Minion_Melee, AbilitySet_XenoCore_Minion_Melee, GA_XenoCore_Minion_Attack, GA_XenoCore_Minion_HitReact, GA_XenoCore_Minion_Topple, GA_XenoCore_Minion_Daze, GA_XenoCore_Minion_Guard, GA_XenoCore_Minion_Recoil, GA_XenoCore_Minion_Evade. Rename each with MyGame in place of XenoCore and Golem in place of Minion_Melee (or Minion), for example PawnData_MyGame_Golem and AbilitySet_MyGame_Golem.
  4. Duplicate Battle/Attributes/GE_XenoCore_BaseStats_Minion_Melee → GE_MyGame_BaseStats_Golem.

The seven sample enemy types in Characters/Enemies/Minion/Variants/ are made the same way: each is an empty child of B_XenoCore_Minion_Melee. If your enemy shares the minion's skeleton (or a compatible one), the child alone is enough: keep the minion's pawn data and abilities and change only its class defaults.

2. Give it its body

  1. Open B_MyGame_Golem and select the Mesh component.
  2. Set Skeletal Mesh Asset to your mesh and adjust its location so the feet sit at the bottom of the capsule.
  3. Set Anim Class. For a new skeleton, create an Animation Blueprint for it whose parent class is XenoCoreAnimInstance, and copy the shape of ABP_XenoCore_Minion_Melee:
    • A 2D blend space on your skeleton: Direction from -180 to 180 across, speed up the side. Put idle along the bottom, a forward walk and jog at their own speeds at direction 0, a left jog at -90, a right jog at 90, and a back jog at both -180 and 180. BS_XenoCore_Minion_Locomotion2D is the worked example.
    • An Idle and a Move state. Move plays the blend space, its two axes driven by the Direction and Ground Speed variables the parent class provides.
    • Transitions on Ground Speed with a gap between them: Idle to Move above 20, Move to Idle below 8. Play Idle at a play rate of 1.
  4. On B_MyGame_Golem, set Patrol Speed (XenoCore › AI › Patrol) to the speed your walk clip covers the ground at, so a patrol plays the walk without sliding.
  5. Resize the Capsule Component to fit.
  6. Under XenoCore › Death, set Death Montages to one or more death montages on your skeleton.

Fails silently: a forward-only blend space

A blend space with speed but no direction has nothing to play when the enemy strafes round its attackers or backs away. The legs run forward, or half-idle, while the body slides sideways, and nothing is logged. Give it side and back clips.

Fails silently: transitions that read the pawn's velocity

Read Ground Speed and Direction from the parent class, never the pawn's own velocity. The parent class treats a hit's knockback as standing still, so a shove slides the body under a held pose. Velocity read directly turns every hit into a burst of forward running while the body moves backwards.

Anim Blueprints: parent to the C++ class, never to another ABP

An Anim Blueprint made as a child of another Anim Blueprint loses its own AnimGraph. Always parent a new one to XenoCoreAnimInstance.

3. Give it its moves

  1. Open GA_MyGame_Golem_Attack. Under XenoCore › AutoAttack:
    • Attack Montages: your attack montages. One is picked per swing.
    • Attack Range: how far the swing reaches, in centimetres.
    • Leave Target Source on Nearest Hostile, Requires Arming off and Damage Effect on GE_XenoCore_Damage.
  2. Open GA_MyGame_Golem_HitReact. Under XenoCore › Reaction, set Directional Montages to your flinch montages, in the order Front, Back, Left, Right. An empty entry means no flinch from that side. A flinch must layer over the Golem's swing, not replace it, so:
    • Make each flinch clip additive: duplicate the animation sequence, open the copy, and in its Asset Details set Additive Settings › Additive Anim Type to Local Space and Base Pose Type to Selected animation frame, with the original clip and frame 0.
    • Make a montage from each additive clip and set its slot to AdditiveHitReact.
    • Register that slot on the Golem's skeleton in its own slot group. Open the skeleton, choose Window › Anim Slot Manager, click Add Group and name it AdditiveGroup, then Add Slot AdditiveHitReact and right-click it › Set Slot AdditiveHitReact Group to › AdditiveGroup.
    • Give the Golem's Animation Blueprint an additive branch just before Output Pose: open ABP_XenoCore_Minion_Melee's AnimGraph and copy its last three nodes into yours: Additive Identity Pose feeds the AdditiveHitReact Slot's Source, the Slot feeds Apply Additive's Additive pin, your existing pose goes into its Base, and Apply Additive feeds Output Pose. Apply Additive's Alpha sets how hard the jolt reads.

Under XenoCore › HitReact › Push, lower Push Distance for a heavy enemy, or set it to 0 so it is never knocked back.

!!! warning "Fails silently: the flinch slot in DefaultGroup"
    Compiling the anim Blueprint registers `AdditiveHitReact` in `DefaultGroup`, beside the
    attack slots. Montages in one group stop each other: every hit cuts the Golem's swing short
    and its next swing cuts the flinch off, so you rarely see a flinch at all. Nothing is logged. Check the slot's group in the **Anim Slot
    Manager** after compiling, and move it back to `AdditiveGroup` if it changed.
  1. Open GA_MyGame_Golem_Topple and GA_MyGame_Golem_Daze. Under XenoCore › Reaction, set Directional Montages to your knock-down montage (one entry is enough). Leave Hold While Trigger Tag Present on, so the Golem stays down for exactly as long as the reaction lasts. Add a get-up as Follow Up Montage if you have one. The trigger and the hold come from the parent class; there is nothing else to set.
  2. Open GA_MyGame_Golem_Guard, _Recoil and _Evade (copies of the minion's). Under XenoCore › Reaction, set Directional Montages to your block, recoil and dodge clips. See Blocks and dodges for which side each slot means. No clips for one of them? Leave it out of the ability set: the Golem still blocks, recoils and dodges in the rules, just without an animation.

!!! tip "Same skeleton as an existing enemy? Skip the copies" If the Golem shares a skeleton with an enemy you already have, keep that enemy's reaction abilities in the set and give the Golem its own clips through an Anim Profile instead (XenoCore › Animation › Anim Profile on B_MyGame_Golem). See Give a character its own combat animations. 5. Open AbilitySet_MyGame_Golem. Replace the attack, hit-react, Topple, Daze, guard, recoil and evade entries with yours. Arts are not in the ability set; they come in step 5. 6. Compile and Save each.

Fails silently: Requires Arming on an enemy

Requires Arming must be off. Enemies have no draw animation, so an enemy auto-attack waiting to be armed waits forever and never swings.

4. Wire the pawn data

  1. Open PawnData_MyGame_Golem.
  2. Set Pawn Class to B_MyGame_Golem.
  3. Ability Sets: keep AbilitySet_XenoCore_Enemy_Common and replace the minion's set with AbilitySet_MyGame_Golem.
  4. Save.

5. Wire the Blueprint

  1. Open B_MyGame_Golem, Class Defaults.
  2. Under XenoCore › Enemy: Enemy Pawn Data PawnData_MyGame_Golem, Stats Effect GE_MyGame_BaseStats_Golem, Display Name Golem, Enemy Level, Experience Reward. Experience Reward is the type's weight; Experience Level Scale (a curve row, the minion's is Minion.ExperienceScale in CT_XenoCore_EnemyStats) scales it by the enemy's level. Leave that row empty for a flat reward.
  3. Under XenoCore › Enemy › Arts: the Arts it should use. A child of the minion keeps Rend and Sweep, which play the minion's montages; replace them with your own. See Give an enemy Arts.
  4. Under XenoCore › Loot: your Drop Table.
  5. Under XenoCore › Enemy, adjust Health Bar Height and Chevron Height so both clear the new mesh's head.
  6. Compile and Save.

Test it

  1. Place B_MyGame_Golem in Maps/L_XenoCore_Gym, on the navigation mesh, and press Play. (In a real level, put it on an enemy spawner instead: Place enemies.)
  2. Walk up to it. Whether it attacks first depends on its Detection (XenoCore › AI › Detection): with None (passive) it waits to be hit. Set Sight to have it charge when it sees you.
  3. Hit it. It turns, chases you if you back off, and swings with your montages. Circle round it while it fights: its legs step sideways and backwards to follow you, never running forward.
  4. Lock on: the badge shows Golem. Defeat it: it plays your death montage, disappears, and drops a chest.

If it doesn't work

It cannot be damaged and cannot die

Enemy Pawn Data is empty, or its ability sets do not include AbilitySet_XenoCore_Enemy_Common. An error naming the enemy is logged.

It stands still when hit

There is no navigation mesh where it stands, or AI Controller Class is no longer BP_AIC_XenoCore_Enemy. Press P in the editor viewport to show the nav mesh.

Its stats are the attribute defaults

Stats Effect is empty. The log says the enemy "will run on attribute defaults, not its statline".

Its Arts play no animation, or do nothing

The Arts list still holds the minion's Rend and Sweep, whose montages are on the minion's skeleton. Replace them with Arts that play montages on the Golem's skeleton.

Toppled, it stands still instead of falling

Its ability set has no Topple or Daze ability, or they still point at the minion's montages on another skeleton. The Golem still cannot act while Toppled (that rule is on the auto-attack), so the only symptom is the missing animation.

It is friendly

The team comes only from the AI controller. A Blueprint AI controller of your own cannot carry a team; always use BP_AIC_XenoCore_Enemy or a child of it.

Going further