Custom Characters
This page aims to explain how you can setup every character in your game to work with the Enemy AI - Toolkit.
The Problem
If you use a pre-made AI template, you will need to implement it in your custom characters. Many AI systems are not flexible enough to support this straight away, often forcing users to use custom classes that are packed with unnecessary boilerplate. However, the Enemy AI - Toolkit package adheres to Unreal Engine best practices, allowing it to solve this issue.
When working with AI in Unreal Engine, it is recommended that you use a character (or 'pawn') as the 'actor' class to represent the character in the world. The 'AIController' performs AI-related logic and passes data to the 'brain' of the AI (the 'blackboard'), while the 'behaviour tree' (or another decision-making system) handles the AI's behaviour. This is precisely the structure of the Enemy AI - Toolkit package.
Enemy Character
The package contains a lightweight character class with the necessary logic to set up simple enemy AI in your game. Here is a quick overview what the character class does:
Config & Route: The character references the selected configuration, the patrol route (in case your enemy should patrol) and the functions required to safely access those properties.
Integrated Health System: This character class already includes a health system, so no further setup is required in your inheriting enemies.
Healthbar Widget: The Healthbar Widget is visualized in world space for each character using a Widget Component which is located within the components of the character class.
It is recommended that you use the Enemy Character Base as the template class for all your enemy characters. Since the AI logic is completely handled in the controller, and this class only manages external systems (health and UI) and references (config and route), using this class incurs no additional cost.
If your project does not use Unreal’s default Character class as the base for your characters — for example, if you have created your own custom character class or are using one from another system — you must ensure that the Enemy Character Base also inherits from that class.
This ensures the Enemy Character Base retains all features and functionality from your custom base character (such as movement logic, animation setup, or additional components) while still adding its own systems like health, UI, and config/route handling.
Setup Example
Setting up a custom character couldn't be easier. This section will give you a solid understanding of how to prepare your own enemy character using the Enemy Character Base. We will assume that you already have a character set up that you want to use in your game. This section will show you how to transform that character into an enemy agent.
First, open the character blueprint of your desired custom character. In this example, I am using a custom character that is a copy of the third-person example character, with a mesh from the marketplace. As you can see in the image, the character blueprint inherits from the default Character class. This is usually fine, but the Enemy AI - Toolkit requires you to use the provided character as your base.

To change your character's current inheritance, simply open the character blueprint editor. First, select 'File' from the menu at the top of the editor, then navigate to 'Reparent Blueprint'. This will open a small context window that lets you select the new base class for your character. Make sure you select the correct class, as selecting the wrong one could cause issues with your character build. Search for and select the 'BP_EnemyCharacterBase' class, then choose it as the new parent.



Your character now inherits from the Enemy Character Base, meaning it has all of its features — plus any functionality from your custom base class, if used.
Last updated