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

  1. Purchase SoulslikeCombat on Fab Marketplace
  2. In the Epic Games Launcher or Fab, click Add to Project
  3. Select your Unreal Engine project
  4. The plugin installs with all binaries

Step 2: Enable the Plugin

  1. Open your project in Unreal Editor
  2. Go to Edit > Plugins
  3. Search for "SoulslikeCombat" and ensure it is enabled
  4. 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

  1. Navigate to Content > SoulslikeEnemyCombat > Showcase > Maps
  2. Open LVL_SEC_Showcase
  3. 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 EnemyCharacterBase
Name it: BP_MyEnemy
In the Blueprint:
  • Add your skeletal mesh
  • Configure capsule collision
  • Set movement speed (recommended: 400)
EnemyCharacterBase comes with these components pre-created:
  • AbilitySystemComponent for ability execution
  • SECActionSetComponent for action set resolution and replication
  • SECReactionSetComponent for reaction set resolution and replication
  • SECCombatRoleComponent for role replication to clients
  • SECMeleeTraceComponent for 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 from EnemyCharacterBase. Any ACharacter works. Implement IEnemyAIConfigProvider on 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 implement IAbilitySystemInterface and return a valid UAbilitySystemComponent from GetAbilitySystemComponent(). Without this, ActionEvaluationComponent cannot 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 EnemyControllerBase
Name it: BP_MyEnemyController
This 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_MyAIConfig
In your enemy pawn BP_MyEnemy, set the AIConfig property to DA_MyAIConfig.
AIConfig resolution: If your pawn implements IEnemyAIConfigProvider (which EnemyCharacterBase does), the controller reads the config from the pawn on possession, supporting per-enemy configs. Without the interface, the controller falls back to its own DefaultAIConfig property, 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_MyEnemyActions
Add your first action:
FieldValue
ActionIdLightAttack
AbilityClassGA_LightAttack (create in next step)
DistanceEval > OptimalMin100
DistanceEval > OptimalMax250
DistanceEval > MaxValue500
AngleEval > OptimalMax30
Cooldown > Duration2.0
SelectionWeight1.0
AbilityTag and AbilityEndTag are set automatically when you assign an AbilityClass. You can override them manually if needed.

6. Create Gameplay Ability

Right-click > Blueprint Class > GameplayAbilityBase
Name it: GA_LightAttack
This 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
The ActionEvaluationComponent listens 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 in Showcase/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 ReactionSet data asset, assign it here. See Reaction System for details.

8. Configure Character

In BP_MyEnemy > Class Defaults > AI Controller Class > Set to BP_MyEnemyController

9. Place and Test

  1. Drag BP_MyEnemy into your level
  2. Register the player as a combat target:
    • In your Player Pawn's BeginPlay, get the AICombatRoleSubsystem
    • Call RegisterCombatTarget with Self as the target actor
    • See BP_Dummy in the Showcase for a working example
  3. Click Play
  4. 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