How to Add New Melee Bot

There are several preconfigured melee bots in the project that you can use as a base for your own setup:

  • BP_AI_CC_Easy
  • BP_AI_CC_Medium
  • BP_AI_CC_Hard

Naming Convention

Bot names follow this pattern:

BP_AI_<BOT_TYPE>_<DIFFICULTY>

Where:

  • CC = close combat
  • Easy, Medium, Hard = difficulty level

No-Loot Variants

By default, bots drop loot after death. If you do not want loot to spawn, use these variants instead:

  • BP_AI_CC_Easy_NoLoot
  • BP_AI_CC_Medium_NoLoot
  • BP_AI_CC_Hard_NoLoot

Create a New Melee Bot

To create a bot that fights with melee weapons or bare hands, create a child actor from one of the classes listed above.

After that, open the new actor and configure its components.

1. BP_AI_Component

Edit these parameters:

  • RandomName — array of Name. If UseRandomName = true, the bot name will be selected randomly from this array.
  • UseRandomNamebool.
  • NameName. If UseRandomName = false, this value will be used as the bot name.
  • ExperienceSystemBP_DA_ExperienceSystem data asset. Its parameter Experience Points For Killing defines how much experience the player receives for killing this bot.

2. BP_CharacterSkinComponent

Use this component to set the character skin.

  • Start Character SkinBP_ItemData data asset. Set the skin that should be equipped on this bot.

3. BP_EquipmentComponent

Configure the bot inventory and starting equipment here.

Inventory

Inventory is an array of S_StartupItems.

Fields:

  • ItemData — item data asset
  • Quantity — item amount

StartupWeapon

StartupWeapon is an array of S_StartupWeapon.

Fields:

  • Item DataBP_ItemData
  • Skin
  • Modifications — array of weapon modifications
  • Ammo — ammo BP_ItemData
  • Ammo Quantity

Clothes

Clothes is a Map<GameplayTag, S_StartupSimpleItemContainer>.

S_StartupSimpleItemContainer fields:

  • Items — array of S_StartupSimpleItem

S_StartupSimpleItem fields:

  • Item DataBP_ItemData
  • Skins — array of BP_DA_Skins

Use Clothes to define which item slot receives which clothing set.
You can add multiple clothing items to the same slot, and one of them will be selected randomly.
The Skins array is also used for random skin selection.

4. BP_StatsComponent

Configure the bot stats here:

  • HealthMaximal
  • HealthRegenerationDelta
  • HealthRegenerationFrequency

Done

Your melee bot is now ready to use.