Configuration Reference
Documentation Unreal Engine AI Configuration Reference
Complete reference for all data assets: AICombatConfig, ActionSets, Movement Profiles, and Damage Config.
All data assets in one place. Link here from system pages for specific configuration details.
EnemyAIConfig
Defines combat role selection, behavior logic, and action set binding for an AI.
Config Resolution Order:
SECCombatControllerComponentcached config (fromDefaultAIConfigproperty)- Pawn implementing
IEnemyAIConfigProvider
Set the config on the pawn for per-enemy customization, or on the
SECCombatControllerComponent's DefaultAIConfig when all units sharing a controller should use the same config.SECCombatControllerComponent Properties
| Property | Category | Default | Purpose |
|---|---|---|---|
DefaultAIConfig | AI|SEC | nullptr | Fallback AI Config when pawn doesn't provide one |
bAutoRegisterForCombatRoles | Combat Role | true | Auto-register with the role subsystem on possession |
bEnableThreatDetection | Threat Response | true | Enable ThreatDetectionComponent on BeginPlay |
SECCombatControllerComponent Delegates
| Delegate | Purpose |
|---|---|
OnCombatRoleChanged | Broadcast when combat role changes (new role, old role) |
OnCombatTargetLost | Broadcast when assigned combat target is destroyed/unregistered |
OnCombatRoleSystemReady | Broadcast after successful registration with the role subsystem. Safe to call ForceAssignRole here. |
MovementBehaviorProfile Threat Response
These settings live on the
MovementBehaviorProfile data asset, so they automatically change when the AI switches combat roles:| Property | Default | Purpose |
|---|---|---|
bSwapStrafeOnHighThreat | false | Swap strafe direction when threat duration exceeded |
bAdjustDistanceByThreat | false | Adjust movement distance based on threat level |
ThreatDistanceScale | 1.0 | Scale factor: DistMultiplier = 1.0 + ThreatLevel * Scale |
Full Structure
// Role Registration
bool AutoRegisterForCombatRoles; // Auto-register with role subsystem
TArray<FGameplayTag> AllowedRoles; // Roles this AI can take
int32 Priority; // Lower = higher priority for slots
FGameplayTag PreferredRole; // Default role when available
// Fitness Evaluation
TArray<URoleEvaluator*> FitnessEvaluators; // Scoring objects for role assignment
// Target Selection
UTargetSelector* TargetSelector; // Per-AI target selector (instanced)
bool bIgnoreTargetRedistribution; // Opt out of periodic target reshuffling
// Behavior
UStateTree* StateTree; // Main AI behavior tree
// Action Set Management
bool ManageActionSetsAutomatically; // Swap ActionSets based on role
UActionSet* DefaultActionSet; // Fallback ActionSet
TMap<FGameplayTag, FRoleActionSetMapping> RoleActionSets; // Per-role ActionSets
// Reaction Set Management
bool bManageReactionSetsAutomatically; // Swap ReactionSets based on role
UReactionSet* DefaultReactionSet; // Fallback ReactionSet
TMap<FGameplayTag, FRoleReactionSetMapping> RoleReactionSets; // Per-role ReactionSets
// Movement Profile Management
bool ManageMovementProfilesAutomatically; // Swap Movement Profiles based on role
UMovementBehaviorProfile* DefaultMovementProfile; // Fallback Profile
TMap<FGameplayTag, FRoleMovementProfileConfig> RoleMovementProfiles; // Per-role ProfilesExample
Name: DA_SEC_CombatConfig_Default
CombatRole
AutoRegisterForCombatRoles: true
RoleRegistration
AllowedRoles:
- SEC.Role.Attacker
- SEC.Role.Flanker
- SEC.Role.Supporter
- SEC.Role.Waiter
Priority: 0
PreferredRole: SEC.Role.Attacker
FitnessEvaluators
- DistanceEvaluator
- BP_HealthEvaluator
- BP_RandomEvaluator
Behavior
StateTree: StateTree_SEC_Core
ActionSets
ManageActionSetsAutomatically: true
DefaultActionSet: DA_SEC_ActionSet_Attacker
RoleActionSets
SEC.Role.Waiter → DA_SEC_ActionSet_Waiter
SEC.Role.Flanker → DA_SEC_ActionSet_Flanker
SEC.Role.Supporter → DA_SEC_ActionSet_Ranged
ReactionSets
bManageReactionSetsAutomatically: true
DefaultReactionSet: DA_SEC_ReactionSet_Default
RoleReactionSets
SEC.Role.Attacker → DA_SEC_ReactionSet_Aggressive
SEC.Role.Waiter → DA_SEC_ReactionSet_Defensive
MovementProfiles
ManageMovementProfilesAutomatically: true
DefaultMovementProfile: DA_SEC_Movement_Aggressive
RoleMovementProfiles
SEC.Role.Waiter → DA_SEC_Movement_Passive
SEC.Role.Flanker → DA_SEC_Movement_FlankingFitness Evaluators are editor-instanced UObjects. Inherit fromURoleEvaluatorto create custom scoring logic for role assignment.
ActionSet
Used by: Action System
Contains an array of
FActionSpec, which are all available actions for an AI.Creating an ActionSet
- Right-click → Miscellaneous → Data Asset → ActionSet
- Add actions to the Actions array
- Configure each action's properties
FActionSpec Structure
struct FActionSpec
{
// Identity
FName Id; // Unique identifier
FString DisplayName; // Editor display name
EActionExecutionMode ExecutionMode; // Ability or BehaviorTree
// Gameplay Ability Mode
FGameplayTag AbilityTag; // Tag to activate ability
FGameplayTag AbilityEndTag; // Completion signal tag
// Behavior Tree Mode
TArray<UBehaviorTree*> BehaviorTrees; // Sequence of BTs to run
float BehaviorTreeTimeout; // Max execution time
// Scoring
FRangeEval Distance; // Optimal distance range
FRangeEval Angle; // Optimal angle to target
FRangeEval Health; // Optimal self-health range
float BaseWeight; // Base priority multiplier
// Cooldowns
FActionCooldown Cooldown;
float Duration; // Time before reuse
float WarmupCooldown; // Starting cooldown
float RandomDeviation; // Randomness range
// Chaining
FName PreferredNextAction; // Bonus for this action next
float ChainBonusMultiplier; // Score multiplier if chaining
// Context Tags
FGameplayTagContainer RequiredTags;// Must have these to use
FGameplayTagContainer BlockedTags; // Cannot use if these exist
FGameplayTagContainer AddTags; // Added while action active
};FRangeEval Explained
Defines a scoring curve for distance, angle, or health:
struct FRangeEval
{
float MinValue; // Score = 0 below this (invalid)
float OptimalMin; // Score = 1.0 starts here
float OptimalMax; // Score = 1.0 ends here
float MaxValue; // Score = 0 above this (invalid)
};Visualization:
0 100 250 400
|-----|========|--------|
0.0 1.0 1.0 0.0
↑ ↑ ↑ ↑
Min OptMin OptMax Max
Example: Melee attack valid 0-400cm, optimal 100-250cm:
Distance.MinValue = 0;
Distance.OptimalMin = 100;
Distance.OptimalMax = 250;
Distance.MaxValue = 400;MovementBehaviorProfile
Used by: Movement System
Contains all parameters for
MovementEvaluatorComponent.Full Structure
// Distance
float DesiredMinDistance; // Approach until this close
float DesiredMaxDistance; // Retreat if farther than this
float DistanceTolerance; // Acceptable variance (0.0-1.0)
// Strafing
bool EnableStrafe; // Allow lateral movement
bool AutoStrafeSwap; // Randomly change direction
float StrafeSpeedPenalty; // Speed multiplier when strafing
// Strafe Fatigue
bool EnableStrafeRest; // Pause strafing periodically
float StrafeTimeLimit; // Seconds before rest
float StrafeRestDuration; // Rest duration
// Avoidance
bool EnableAvoidance; // Avoid other pawns
float AvoidanceRadius; // Distance to maintain
// Hybrid Navigation
bool EnableHybridMovement; // Switch pathfind/direct
float HybridSwitchDistance; // Distance threshold
// Custom Rules
TArray<UPositioningRule*> PositioningRules; // Custom direction modifiersExample Profile
Name: DA_AggressiveMelee
DesiredMinDistance: 200
DesiredMaxDistance: 350
DistanceTolerance: 0.15
EnableStrafe: true
AutoStrafeSwap: true
StrafeSpeedPenalty: 0.8
EnableStrafeRest: true
StrafeTimeLimit: 5.0
StrafeRestDuration: 1.0
EnableAvoidance: true
AvoidanceRadius: 125
PositioningRules: []Built-in Presets
For quick setup without data assets:
FMovementBehaviorConfig::MakeAttacker(); // Close-range aggressive
FMovementBehaviorConfig::MakeWaiter(); // Mid-range patient
FMovementBehaviorConfig::MakeFlanker(); // Wide circling
FMovementBehaviorConfig::MakeCoward(); // Maintains distancePositioning Rules are editor-instanced UObjects. Inherit fromUPositioningRuleand overrideEvaluateDirection()to create custom direction scoring.
DamageConfig
Used by: Melee Trace System
Contains damage values and type for melee attacks.
Full Structure
float BaseDamage; // Base damage value
TSubclassOf<UDamageType> DamageType; // Damage type class
float ImpulseStrength; // Physics impulse on hit
bool bCanBeBlocked; // Can target block this?
bool bCanBeParried; // Can target parry this?
bool bCanCritical; // Can this crit?
float CriticalMultiplier; // Damage multiplier on crit
float CriticalChance; // Base crit chance (0.0-1.0)Example
Name: DA_SwordDamage
BaseDamage: 25.0
DamageType: UDamageType_Physical
ImpulseStrength: 500.0
bCanBeBlocked: true
bCanBeParried: true
bCanCritical: true
CriticalMultiplier: 2.0
CriticalChance: 0.1Usage
Assigned to weapons via the
DamageConfig property. Automatically applied during melee traces.// In weapon Blueprint:
DamageConfig: DA_SwordDamage