Soulslike Framework Docs
  • Welcome to Soulslike Framework!
  • Framework Overview
    • About the Framework
    • Features & Systems
    • Before Purchasing
    • Personal Assistance
  • Getting Started
    • Setting up Animations
      • Setup Locomotion Blendspaces
      • Setup Custom Montages
    • Using the Utility Tools
      • Easy Setup Tool
      • Asset Creators
      • Asset Browsers
    • Actor Tags
    • Finding References
  • Workflow
    • Using a Custom Character
    • Creating & Editing Actions
    • Creating & Editing Stats/Attributes
    • Creating & Editing Status Effects
    • Creating & Editing Buffs
    • Creating & Editing Items
      • Creating & Editing Weapons
    • Creating an Enemy
    • Creating Cinematics
  • Animation Notifies
    • Damaging & Combo's
      • Register Attack Notify
      • Weapon Trace Notify
        • AI Weapon Trace Notify
      • Fist Trace Notify
        • AI Fist Trace Notify
      • Area of Effect Damage Notify
      • Spawn Projectile Notify
        • AI Spawn Projectile Notify
    • Defensive
      • Try Guard Notify
      • Hyper Armor Notify
      • Invincibility Frame Notify
    • Feedback
      • Weapon Trail Notify
        • AI Weapon Trail Notify
      • Camera Shake Notify
        • World Camera Shake Notify
      • Launch Field Notify
      • Chaos Field Notify
      • Footstep Notify
    • Miscellaneous
      • Input Buffer Notify
      • Interrupt Montage Notify
      • Camera Sequence Notify
      • Set Movement Mode Notify
      • AI State Notify
      • AI Rotate Towards Target Notify
      • Adjust Stat Notify
  • Components / Managers
    • Player Specific Components
      • Input Buffer
      • Action Manager
      • Combat Manager
      • Interaction Manager
      • Inventory Manager
      • Equipment Manager
      • Ladder Manager
      • Progress Manager
      • Save/Load Manager
      • Radar & Radar Element Components
      • Central Debug Component
    • Shared Components
      • Stat/Attribute Manager
      • Status Effect Manager
      • Weapon Collision Manager
      • Buff Manager
      • Loot Drop Manager
    • AI-Only Components
      • AI Interaction Manager
      • AI Behavior Manager
      • AI Combat Manager
      • AI Boss Manager
  • Extending Functionality
    • Using Motion Warping
    • Custom Saving/Loading
    • Adding New Settings
    • Extending Weapon Animsets
    • Weapon Specific Impact Sounds
    • Resetting Enemies After Resting
Powered by GitBook
On this page
  • How It Works
  • Example Usage

Was this helpful?

  1. Components / Managers
  2. AI-Only Components

AI Behavior Manager

PreviousAI Interaction ManagerNextAI Combat Manager

Last updated 3 months ago

Was this helpful?

The AI Behavior Manager (AC_AI_BehaviorManager) component is responsible for managing AI states (such as Idle, Patrolling, Random Roam, Investigating, Combat, etc.), ensuring smooth transitions between them. Additionally, the component allows for fine-tuning AI behavior through various configurable parameters.

It is added to the Soulslike Enemy (B_Soulslike_Enemy) class by default.

How It Works

  • Behavior Tree Initialization

    • On Begin Play, the component checks if the AI has a valid Behavior Tree assigned.

    • If a Patrol Path is present, the AI starts in a Patrolling state immediately.

    • Otherwise, it defaults to the Idle state.

  • State Management

    • The component dynamically adjusts the AI's state based on environmental triggers (e.g., detecting the player, being attacked).

    • State changes are handled through the SetState method, ensuring smooth transitions between behaviors.

  • Fine-Tuning AI Behavior

    • The following parameters allow for custom AI tuning:

      • MaxChaseDistanceThreshold: Maximum distance AI will chase a target before stopping.

      • AttackDistanceThreshold: The distance at which AI will initiate an attack.

      • StrafeDistanceThreshold: Controls how far the AI must be from its target for strafing.

      • SpeedAdjustDistanceThreshold: Adjusts AI movement speed based on distance to the target.

      • MinimumStrafePointDistance: The minimum distance for strafing logic.

      • StrafeMethods: Defines how AI will strafe (e.g., directional preferences).

  • Event Based Blackboard Updates

    • The component is responsible for adjusting Blackboard values to ensure the AI’s Behavior Tree reacts correctly to its state.

  • Target & Patrol Tracking

    • The SetTarget() function updates AI’s current target (e.g., player or other AI).

    • The SetPatrolPath() function assigns a patrol route.

Example Usage