Getting Started with SoulslikeCombat
Documentation Unreal Engine AI Tutorial
Installation guide, quick start, and your first enemy in 10 minutes.
Overview
SoulslikeCombat is an AI combat plugin for Unreal Engine 5.6+. It provides tactical enemy behavior for souls-like and action RPG games through a modular component system. Supports single-player and multiplayer (listen server and dedicated server).
Installation
Step 1: Install from Fab Marketplace
- Purchase SoulslikeCombat on Fab Marketplace
- In the Epic Games Launcher or Fab, click Add to Project
- Select your Unreal Engine project
- The plugin installs with all binaries
Step 2: Enable the Plugin
- Open your project in Unreal Editor
- Go to Edit > Plugins
- Search for "SoulslikeCombat" and ensure it is enabled
- Restart the editor if prompted
Step 3: Enable Required Plugins
In Edit > Plugins, ensure these are also enabled. The plugin depends on them and will enable them by default:
- GameplayAbilities
- StateTree
- GameplayStateTree
- MotionWarping
Note: The animation plugin dependencies are only required if you use the showcase enemy that ships with the plugin. If you bring your own animation system, you can disable them.
Step 4: Verify Installation
- Navigate to
Content > SoulslikeEnemyCombat > Showcase > Maps - Open
LVL_SEC_Showcase - Click Play. You should see a working enemy
Note: This plugin requires Unreal Engine 5.6 or later. Older versions have incompatible StateTree APIs.
Quick Start Guide
Your First Enemy in 10 Minutes
1. Study the Showcase
Navigate to
Content/SoulslikeEnemyCombat/Showcase/Maps/LVL_SEC_Showcase and open it. The working enemies here are the reference implementation. Open BP_Dummy from Showcase/AI/Characters/Dummy to see how a combat target is registered.2. Create Enemy Blueprint
Right-click in Content Browser > Blueprint Class > Search for
EnemyCharacterBaseName it:
BP_MyEnemyIn the Blueprint:
- Add your skeletal mesh
- Configure capsule collision
- Set movement speed (recommended: 400)
EnemyCharacterBase comes with these components pre-created:AbilitySystemComponentfor ability executionSECActionSetComponentfor action set resolution and replicationSECReactionSetComponentfor reaction set resolution and replicationSECCombatRoleComponentfor role replication to clientsSECMeleeTraceComponentfor melee hit detection
It also implements
IAbilitySystemInterface and IEnemyAIConfigProvider. You can set the AIConfig property directly on the pawn.Alternative: You do not have to inherit fromEnemyCharacterBase. AnyACharacterworks. ImplementIEnemyAIConfigProvideron your pawn so the controller can query for per-pawn AI settings. Add the components you need manually. If you want ability-based actions (the most common case), your character must also implementIAbilitySystemInterfaceand return a validUAbilitySystemComponentfromGetAbilitySystemComponent(). Without this,ActionEvaluationComponentcannot find the ASC and ability-based actions will not work.
3. Create AI Controller
You have two options:
Option A: Use EnemyControllerBase (Recommended)
Right-click > Blueprint Class > Search for
EnemyControllerBaseName it:
BP_MyEnemyControllerThis comes with all SEC components pre-wired:
SECCombatControllerComponent(core combat plumbing)MovementEvaluatorComponent(tactical positioning)ActionEvaluationComponent(action selection and execution)ThreatDetectionComponent(player attention tracking, disabled by default)BotStateTreeAIComponent(StateTree runner)- Helper
BehaviorTreeComponent(for action BT sequences)
Option B: Use Any AAIController + SECCombatControllerComponent
Create or open your existing AI Controller Blueprint. In the Components panel, add SEC Combat Controller (
SECCombatControllerComponent). Then add whichever SEC components you need (e.g., MovementEvaluatorComponent, ActionEvaluationComponent). All components initialize on possession.4. Create AI Config
Right-click > Miscellaneous > Data Asset > EnemyAIConfig
Name it:
DA_MyAIConfigIn your enemy pawn
BP_MyEnemy, set the AIConfig property to DA_MyAIConfig.AIConfig resolution: If your pawn implementsIEnemyAIConfigProvider(whichEnemyCharacterBasedoes), the controller reads the config from the pawn on possession, supporting per-enemy configs. Without the interface, the controller falls back to its ownDefaultAIConfigproperty, useful when many enemies share a single controller class and config.
5. Create ActionSet Data Asset
Right-click > Miscellaneous > Data Asset > ActionSet
Name it:
DA_MyEnemyActionsAdd your first action:
| Field | Value |
|---|---|
| ActionId | LightAttack |
| AbilityClass | GA_LightAttack (create in next step) |
| DistanceEval > OptimalMin | 100 |
| DistanceEval > OptimalMax | 250 |
| DistanceEval > MaxValue | 500 |
| AngleEval > OptimalMax | 30 |
| Cooldown > Duration | 2.0 |
| SelectionWeight | 1.0 |
AbilityTagandAbilityEndTagare set automatically when you assign anAbilityClass. You can override them manually if needed.
6. Create Gameplay Ability
Right-click > Blueprint Class >
GameplayAbilityBaseName it:
GA_LightAttackThis is the SEC base ability class. If you want ability start/end to be detected by the action system automatically, use this class. Alternatively, inspect the class in C++ and call the necessary events yourself.
Event Graph:
ActivateAbility
↓
PlayMontageAndWait (YourAttackMontage)
↓
EndAbility
TheActionEvaluationComponentlistens for the ability end tag to know the action completed. Without it, the AI will be stuck in the "executing" state until the timeout expires.
7. Configure AI Config
In
DA_MyAIConfig:- DefaultStateTree > Set to
StateTree_SEC_Core(found inShowcase/AI/StateTree/) - RoleActionSets > Add an entry, leave the Role empty (acts as default), and set the ActionSet to
DA_MyEnemyActions - (Optional) DefaultReactionSet > If you created a
ReactionSetdata asset, assign it here. See Reaction System for details.
8. Configure Character
In
BP_MyEnemy > Class Defaults > AI Controller Class > Set to BP_MyEnemyController9. Place and Test
- Drag
BP_MyEnemyinto your level - Register the player as a combat target:
- In your Player Pawn's BeginPlay, get the AICombatRoleSubsystem
- Call RegisterCombatTarget with
Selfas the target actor - See
BP_Dummyin the Showcase for a working example
- Click Play
- Watch Output Log for action selection debug messages
Expected behavior:
- Enemy approaches to ideal distance (100-250 cm based on your DistanceEval)
- Executes light attack when in range and facing the target
- Waits for cooldown, then repositions
- Repeats