How to Add New Firearms Bot

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

  • BP_AI_Ranged_Easy
  • BP_AI_Ranged_Medium

Naming Convention

Bot names follow this pattern:

BP_AI_<BOT_TYPE>_<DIFFICULTY>

Where:

  • Ranged = firearms
  • Easy, Medium = 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_Ranged_Easy_NoLoot
  • BP_AI_Ranged_Medium_NoLoot

Create a New Firearms Bot

To create a bot that fights with firearms, 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 Experience Points For Killing parameter 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

5. BP_FirearmsComponent

Configure firearms-specific parameters here:

  • Max Bullet Ricochets — maximum number of times a bullet can ricochet
  • Critical Hit Body Parts — array of Name; hits to these bones will be treated as critical hits

Done

Your firearms bot is now ready to use.