Getting Started with Soulslike Enemy Combat
Documentation Unreal Engine AI Tutorial
Turn the plugin on and get a live enemy that spots the player, closes the distance and holds its range, with no C++.
One pawn Blueprint, one data asset, two fields filled in, and you have an enemy that notices the player and comes for them.
See a finished enemy first
Turn on Show Plugin Content in the Content Browser's settings menu, then open
Demo/Maps/LVL_SEC_Demo in plugin content and press Play. It ships with a player, a navmesh, and armed enemies to fight.The pieces worth reading are under
Demo/Characters/Enemy:| Asset | What it is |
|---|---|
BP_SEC_EnemyCharacter | The enemy pawn |
BP_SEC_EnemyController | Its AI controller |
EnemyConfig_SEC_Default | Its AI config: per-role action sets and movement profiles, an awareness config, an awareness-filtered target selector, and ST_SEC_Core as its brain |
Copy them into your own content and edit from there, or build fresh with the recipe below.
For the Blueprint calls behind each system, open the demo map's Level Blueprint (Blueprints > Open Level Blueprint on the toolbar). It holds unconnected example nodes of the calls used most, one comment box per system, from the combat role subsystem and the action and movement evaluators to threat detection and the team helpers. Nothing runs them; copy the ones you need into your own Blueprints.
Set it up
2 minutes- 1
Turn the plugin on
Get Soulslike Enemy Combat on Fab, open the Epic Games Launcher, and click Install to Engine for 5.6, 5.7 or 5.8.In your project, open Edit > Plugins, searchSoulslike Enemy Combat, tick it, and restart when prompted. It switches on what it needs alongside it: Gameplay Abilities, State Tree, Gameplay State Tree, Motion Warping, Animation Warping and Enhanced Input. - 2
Make the enemy Blueprint
Right-click in the Content Browser, Blueprint Class, and search for Enemy Character Base. Name itBP_MyEnemy.Open it and assign your skeletal mesh and its Anim Class. In Class Defaults, AI Controller Class already reads Enemy Controller Base; leave it there.BP_MyEnemy▾PawnAI Controller ClassNoneThe pawn is the body. That controller is the brain, and it ships carrying every component the AI needs. - 3
Create an Enemy AI Config
Right-click in the Content Browser, SEC, AI, Enemy AI Config. Name itDA_AIConfig_Grunt.Content Browser▸ ContentRight-click in the Content Browser, SEC, AI, Enemy AI Config. - 4
Fill in the two fields that ship empty
Open the config. Under Combat Role, set Target Selector to Awareness Filtered Target Selector, and leave its Inner Selector empty so it picks the nearest candidate. Under Awareness, set Awareness Config to a new asset from the same SEC menu, and leave that asset's defaults alone.DA_AIConfig_Grunt▾DetailsTarget SelectorNoneAwareness ConfigNone▾Both ship empty. Without the selector the enemy takes the first target it may fight; without the awareness config it senses nothing, and nothing puts you among its targets. The two work as a pair: the awareness config is what does the perceiving, and the filter offers the enemy only targets it has perceived. Fill in the config alone and the enemy senses targets, but its selector can still pick a hostile it has not sensed, and the built-in brain waits until it senses that one. Set the filter alone and it perceives nothing, so it fights nothing.The awareness defaults are a working guard: 1500 cm of sight across a 180 degree cone, 1200 cm of hearing, and a damage sense that reveals whoever hits it from behind. - 5
Point the pawn at the config, and play
Back inBP_MyEnemy, under Class Defaults > AI, set AI Config toDA_AIConfig_Grunt.BP_MyEnemy▾AIAI ConfigNone▾The controller reads this the moment it possesses the pawn, so one controller class serves every enemy type. Drag the enemy into a level that has a NavMesh Bounds Volume, press Play, and runSEC.Debug.Awareness 1in the console. Walk into its cone. The line above its head climbs toDetected, and the enemy closes to 400 cm and starts circling.
Keep AI Controller Class on Enemy Controller Base, or a Blueprint made from it. Enemy Character Base ships with it set. A pawn whose Class Defaults point it at another controller, such as the engine's AIController, gets one that holds none of the combat components, so nothing on the AI Config reaches the enemy and the log stays quiet about it.
Give it something to hit you with
The enemy from the QuickStart chases and holds its range. Attacks are one more data asset.
- Create an Action Set and add an action to its canvas.
- Set the action's Ability Class to
GA_SEC_MontageAbility, which ships with the plugin, then set the Montage on the payload underneath. - Add a Distance Scorer so the action knows what range it works at.
- Set Default Action Set on the AI Config to that asset.
The Action System walks it through with screens. For the swing to deal damage, the montage also needs a trace window: see Melee Trace.
What the pieces are
| Piece | Made from | Holds |
|---|---|---|
| Enemy pawn | Blueprint from Enemy Character Base | The body: mesh, ability system, health, melee trace, defense, equipment, team and territory |
| AI controller | Blueprint from Enemy Controller Base | The decisions: movement, action scoring, reactions, awareness, threat, and the brain that ticks them |
| Enemy AI Config | Data asset under SEC | Which sets and profiles this enemy uses, how it picks targets, what it can sense |
| Action Set, Reaction Set, Movement Behavior Profile | Data assets under SEC | The moveset, the defensive answers, and the footwork |
Everything the AI decides runs on the server. The pawn replicates the results, so a client's UI can read an enemy's role, action and health without any of the decision-making crossing the wire. See Multiplayer.
What goes on the config
Action Sets
Manage Action Sets Automatically
Default Action Set
ActionSet_SEC_Waiter
Role Action Sets
4 Array elements
Reaction Sets
Manage Reaction Sets Automatically
Default Reaction Set
ReactionSet_SEC_TwoHanded
Role Reaction Sets
0 Array elements
Movement Profiles
Manage Movement Profiles Automatically
Default Movement Profile
MovementProfile_SEC_Waiter
Role Movement Profiles
3 Array elements
Each Default covers every combat role, so one entry per category is enough to start. The Role arrays override it per role: an aggressive moveset for Attacker, a patient one for Waiter. The three Manage Automatically switches are ticked out of the box; untick one to drive that category from Blueprint instead.
The pawn's own health lives on its Vitals component, which ships one Health row at 100. See Vitals.
Leave Default State Tree empty on the config and the enemy runs the plugin's built-in brain: build context, move, then pick and run the best action on a 0.1 second cadence. Nothing needs authoring for that. Point it at a StateTree to take the sequencing over yourself.
Where to go next
| You want | Read |
|---|---|
| A moveset that picks the right attack | Action System |
| To wire that moveset on a canvas | Action Set Editor |
| Circling, spacing and backing off | Movement System |
| Parries, flinches and counters | Reaction System |
| Attacks that deal damage | Melee Trace |
| Stealth, patrols and investigating a noise | Awareness System |
| Several enemies taking turns instead of swarming | Combat Roles and Combat Tokens |
| Who each enemy fights | Targeting System |
| A weapon that carries its own moveset | Weapons |
| Guards that hold a post and give up the chase | Territory |
| A full armed enemy, start to finish | Step-by-Step Enemy |
Debug it
Every overlay draws above the enemy's head in Play In Editor.
SEC.Debug.All 1 // Every overlay at once; SEC.Debug.All 0 clears them
SEC.Debug.Awareness 1 // What each enemy has noticed, and how sure it is
SEC.Debug.Role 1 // Name and combat role, colored by role
SEC.Debug.Decision 1 // Distance, angle, line of sight, speed, threat
SEC.Debug.Movement 1 // Movement layer, strafe side and heading
SEC.Debug.Scoring 1 // What each action scored, highest first
SEC.Debug.WatchPawn <name> narrows every overlay to one enemy, part of a name being enough, and SEC.Debug.WatchClear puts them all back. SEC.Debug.MaxDistance sets how far from the camera a block still draws (4000 cm) and SEC.Debug.TextScale sizes the text.AdvancedThe enemy stands there and does nothing
In the order worth checking:
- AI Controller Class names another controller on the pawn Blueprint. It ships set to Enemy Controller Base, and a controller not made from it carries none of the combat components.
- Target Selector is empty on the AI Config, and the project's Default Target Selector ships empty too. The fallback still hands the enemy the first target it may fight, so check this when the enemy engages the wrong one rather than when it engages nothing.
- Awareness Config is empty, so the enemy senses nothing and never adds you to its targets. The built-in brain still fights a target that reaches it another way, such as Register Combat Target; a StateTree that gates its combat on the Awareness State At Least condition never enters combat.
- No navmesh. Past 800 cm the enemy asks for a path, the request fails, and it asks again about every 0.25 seconds without closing in. Add a NavMesh Bounds Volume, build navigation, and press P to check it covers the floor.
- AI Config is empty on the pawn. On Enemy Character Base the pawn's AI Config is the one read, even when empty, so the controller's Default AI Config never backs it up. That controller field counts only for a pawn that provides no config of its own.
SEC.Debug.Role 1 reads None for an enemy that never took a target. No block above the pawn at all means it carries no SEC components, which points at the first cause. Troubleshooting covers the longer list.AlternativeUse a character Blueprint you already have
Reparent it rather than rebuilding it.
- Open your character Blueprint.
- File > Reparent Blueprint, then pick Enemy Character Base.
- Your existing components, variables and graphs stay. You inherit the ability system, the combat components, the damage interfaces and the dedicated-server socket fix.
- Delete any duplicate the Blueprint added itself, such as its own ability system component, so only the inherited ones remain.
- Set AI Config in Class Defaults and check that AI Controller Class reads Enemy Controller Base, since a controller your Blueprint named before the reparent stays. Then carry on as normal.
A character that has to inherit from a different C++ base can still work: it needs the same components, an initialized ability system, and the AI config interface implemented. The API Reference lists what to reproduce.
AlternativeUse an AI controller you already have
File > Reparent Blueprint to Enemy Controller Base, the same as the pawn.
Adding the components to a bare AI controller is not equivalent. The base class holds the AI's facing during an attack and turns it toward a target's last-known location, and attack abilities rely on that. A plain controller keeps tracking the target mid-swing and loses that facing logic.
AlternativeStart the fight the moment the level loads
Skip stealth for an arena or a boss room.
Tick Always Aware on the Awareness Config. The enemy then knows about every hostile target from the start, without needing to see or hear one, and never forgets. Sight, hearing and the escalation meter are bypassed while it is on.
A target still has to exist in the shared pool for that to bite. Register the player once, on the player pawn's Event BeginPlay: add Get AICombat Role Subsystem, then call Register Combat Target with Target Actor set to Self and Auto Assign Unassigned ticked. Branch on Has Authority first, since AI decisions run on the server.
Player pawn · Event BeginPlay
AICombatRoleSubsystem
Register Combat Target
Target is AICombat Role Subsystem
Target
Target ActorSelf
Auto Assign Unassigned
Reevaluate Existing
With awareness doing the work instead, that node is optional: an enemy that reaches Detected on its own adds that target to the pool, so the rest of the pack can be assigned to it too. See Targeting.
AlternativeRun a StateTree instead of the built-in brain
Set Default State Tree on the AI Config to take over the sequencing: patrol, investigate, engage, retreat, phase transitions.
ST_SEC_Core under Demo/AI/StateTrees is a working graph to start from or copy.The evaluation components stay the same either way. The graph decides when to poll and when to act; the components still do the scoring and the steering. See StateTree Integration.
AdvancedWhich engine versions, and what ships in the box
Version 3.2.0 runs on Unreal Engine 5.6, 5.7 and 5.8, in single player and in multiplayer on a listen or dedicated server.
The plugin ships three runtime modules and an editor module. Its content sits in two folders: Core holds the pieces a shipping game reaches for (the montage ability, the reaction ability, the damage types, the default impact surfaces), and Demo holds the demo level, its player, its enemies and their data assets, one folder per purpose.