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.


AICombatConfig

Used by: Combat Roles System

Defines combat role selection, behavior logic, and action set binding for an AI.

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
 
// 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
 
// Movement Profile Management
bool ManageMovementProfilesAutomatically; // Swap Movement Profiles based on role
UMovementBehaviorProfile* DefaultMovementProfile; // Fallback Profile
TMap<FGameplayTag, FRoleMovementProfileConfig> RoleMovementProfiles; // Per-role Profiles

Example

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
 
MovementProfiles
  ManageMovementProfilesAutomatically: true
  DefaultMovementProfile: DA_SEC_Movement_Aggressive
 
RoleMovementProfiles
  SEC.Role.Waiter   → DA_SEC_Movement_Passive
  SEC.Role.Flanker  → DA_SEC_Movement_Flanking

Fitness Evaluators are editor-instanced UObjects. Inherit from URoleEvaluator to 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

  1. Right-click → Miscellaneous → Data Asset → ActionSet
  2. Add actions to the Actions array
  3. 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 modifiers

Example 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 distance

Positioning Rules are editor-instanced UObjects. Inherit from UPositioningRule and override EvaluateDirection() 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.1

Usage

Assigned to weapons via the DamageConfig property. Automatically applied during melee traces.

// In weapon Blueprint:
DamageConfig: DA_SwordDamage