Configuration
This page elaborates on the configuration assets provided and explains how you can create your own configuration assets, and therefore your own enemy presets.

Overview & Usecases
The Enemy AI - Toolkit is a set of template AI behaviours built with a data-driven architecture in mind. This allows us to easily modify the behaviour of any AI agent by simply changing the data set used. Configurations are implemented as UDataAssets
and contain pre-coded properties that the owning AI will later use. Since UDataAssets
are treated as 'singletons', the same data asset can be used for all kinds of enemies and changes to the asset will affect all agents using it. The main benefits of using data-driven architecture and config assets are listed below:
Separation of logic & data: Code remains clean while the data is managed in central data assets that can easily be switched and modified.
Scalability & Modularity: New enemy presets can easily be created in the editor and applied to agents with just a few clicks. There is no need to type any code / blueprints.
Faster iteration & development: Using config assets allows you to change the behaviour of large groups of enemies without having to worry about all the exact enemy implementations.
Using Configuration Assets
In addition to all the advantages that configuration assets offer, they are fortunatly also very easy to use. The package already defines a few enemy template configs. Included are:
Default Enemy: A simple enemy agent preset that causes the enemy to wait at its point of origin.
Patrolling Enemy: Enemies given this configuration will use 'Patrolling' as their default state, enabling them to patrol their assigned routes.
Roaming Enemy: The roaming enemy configuration allows enemies to be set to the 'Roam' state by default, enabling them to wander/roam the environment.
Now that we've covered that, let's look at how you can assign a new configuration asset to your enemy character. To assign a new config asset, open your enemy’s Blueprint, switch to Class Defaults, locate the Config property, and pick the desired asset from the dropdown. That’s it – swapping this single asset instantly changes the behaviour of every enemy instance of that type.
Select & Open your custom character blueprint
Select Class Defaults & Navigate to the Config property
Select the property and choose the desired configuration from the dropdown menu
Alternatively, you can select the agent placed in your level directly and search for the 'Config' property in its details. Setting the config asset here effectively overrides the config set in the blueprint for this specific instance of your agent.

Creating Custom Configurations
Creating your own configuration assets is easy! Simply right-click in your content folder to open the context menu for that asset. Go to the 'Miscellaneous' category, where you will find the 'Data Asset' option. Selecting this will bring you to the data asset creation pop-up, where you can select the 'Enemy Config' data asset. Create a new config, give it a name, and you're ready to use it as described above!


Last updated