The BP_EnemyInfo is a Data Asset within the Combat AI Behavior System for Unreal Engine 5, designed to centralize configuration data for enemy AI in Action RPGs. It enables developers to define AI attributes, behaviors, abilities, and combat styles in a single, reusable asset, streamlining enemy setup and customization. The asset addresses the need for modular, async-loaded AI configurations, integrating with BP_BaseEnemy, BP_BehaviorManagerComponent, and other system components in the Advanced ARPG Combat framework to drive dynamic enemy behavior.

Basic Usage
This section outlines how to use BP_EnemyInfo to configure enemy AI. The following functions and interactions are essential for accessing and applying its data.
-
SetEnemyInfoRef:
- Purpose: Assigns a
BP_EnemyInfoasset to an AI actor to initialize its configuration. - Usage: Call in
BP_BaseEnemyto link the asset during setup.
- Purpose: Assigns a
-
GetEnemyInfo:
- Purpose: Retrieves data from
BP_EnemyInfofor use in gameplay logic or components. - Usage: Access in Blueprints to query attributes, abilities, or behaviors.
- Purpose: Retrieves data from
-
IsValidEnemyInfo:
- Purpose: Verifies the
BP_EnemyInfoasset contains valid data before use. - Usage: Call to ensure data integrity during initialization.
- Purpose: Verifies the
Key Properties
| Property Name | Purpose |
|---|---|
AI Pawn Class | Specifies the AI character Blueprint (e.g., BP_BaseEnemy) for instantiation. |
Anim Class | Defines the animation Blueprint for the AI’s skeletal mesh. |
Enemy Name | Sets a unique name for the enemy (e.g., “Humanoid Soldier”) for identification. |
Behavior Tree | Assigns the Behavior Tree (e.g., BT_HumanoidCombat) for task execution. |
Behavior Classes | Lists behavior state machines (e.g., SM_Humanoid_CombatBehavior) for AI logic. |
Default Behavior State | Sets the initial behavior state (e.g., State.Patrol) for the AI. |
BB Hostile Tags | Gameplay Tags in a Blackboard map identifying hostile targets (e.g., Player.Character). |
BB Key Names | Defines Blackboard keys used by the AI for behavior data storage. |
State Classes | Specifies state manager classes for managing AI states. |
Default Combat Style | Sets the default combat type (e.g., Melee) to determine ability behavior. |
Combat Component | Assigns a combat component Blueprint (e.g., BP_CombatComponent) for combat logic. |
Enemy Ability Set | Lists GA_EnemyAbility classes (e.g., GA_EnemyMeleeAttack) granted to the AI. |
Enemy Gameplay Cues | Defines gameplay cues specific to the enemy (e.g., attack effects). |
Default Gameplay Cues | Sets default gameplay cues applied to the enemy (e.g., spawn effects). |
Default Target Types | Specifies target types in a map for AI targeting logic. |
Attributes | Configures AI stats (e.g., health, damage) via an attribute set. |
Extended Attributes | Allows additional attribute configurations for extended AI stats. |
Key Concepts
Centralized AI Configuration
The BP_EnemyInfo acts as a single source for all AI configuration data, including attributes, abilities, and behaviors. This concept simplifies enemy setup and ensures consistency across instances.
- Purpose: Consolidates AI data for easy management and reuse.
- Usage: Create a
BP_EnemyInfoasset and assign it toBP_BaseEnemyorBP_EnemySpawnerviaSetEnemyInfoRef. - Benefit: Reduces setup time and minimizes errors in AI configuration.
Async Loading Support
The BP_EnemyInfo supports asynchronous loading to optimize performance, particularly for dynamic spawning via BP_EnemySpawner. This concept ensures efficient resource handling in large levels.
- Purpose: Enables scalable AI instantiation without performance bottlenecks.
- Usage: Reference
BP_EnemyInfoinBP_EnemySpawnerfor async-loaded enemy spawning. - Benefit: Improves runtime performance in complex scenes.
Modular Behavior Integration
The BP_EnemyInfo integrates with SM_Humanoid_CombatBehavior and Behavior Trees via Behavior Classes and Behavior Tree properties. This concept allows developers to define AI logic modularly.
- Purpose: Facilitates flexible AI behavior assignment.
- Usage: Set
Behavior ClassestoSM_Humanoid_CombatBehaviorandBehavior TreetoBT_HumanoidCombatin the asset. - Benefit: Supports diverse AI behaviors with minimal reconfiguration.
Ability and Combat Customization
The Enemy Ability Set and Default Combat Style properties enable tailored combat behaviors, such as melee, ranged, or magic attacks. This concept allows developers to create varied enemy types.
- Purpose: Defines unique combat roles for enemies.
- Usage: Configure
Enemy Ability Setwith abilities likeGA_EnemyMeleeAttackand setDefault Combat Styleto match. - Benefit: Enhances combat variety and immersion.
Best Practices
- Workflows:
- Create a
BP_EnemyInfoasset for each enemy type (e.g.,BP_EnemyInfo_Humanoid) to maintain clarity. - Use demo
BP_EnemyInfoassets to test default configurations before customizing. - Assign hierarchical
Gameplay Tags(e.g.,Enemy.Hostile.Player) inBB Hostile Tagsfor precise targeting.
- Create a
- Pitfalls to Avoid:
- Don’t leave
AI Pawn ClassorBehavior Treeunassigned, as this prevents AI initialization. - Avoid hard-referencing assets; rely on
BP_EnemyInfofor async loading. - Don’t duplicate
BB Key NamesacrossBP_EnemyInfoassets to prevent Blackboard conflicts.
- Don’t leave