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_EasyBP_AI_Ranged_Medium
Naming Convention
Bot names follow this pattern:
BP_AI_<BOT_TYPE>_<DIFFICULTY>
Where:
Ranged= firearmsEasy,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_NoLootBP_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 ofName. IfUseRandomName = true, the bot name will be selected randomly from this array.UseRandomName—bool.Name—Name. IfUseRandomName = false, this value will be used as the bot name.ExperienceSystem—BP_DA_ExperienceSystemdata asset. ItsExperience Points For Killingparameter defines how much experience the player receives for killing this bot.
2. BP_CharacterSkinComponent
Use this component to set the character skin.
Start Character Skin—BP_ItemDatadata 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 assetQuantity— item amount
StartupWeapon
StartupWeapon is an array of S_StartupWeapon.
Fields:
Item Data—BP_ItemDataSkinModifications— array of weapon modificationsAmmo— ammoBP_ItemDataAmmo Quantity
Clothes
Clothes is a Map<GameplayTag, S_StartupSimpleItemContainer>.
S_StartupSimpleItemContainer fields:
Items— array ofS_StartupSimpleItem
S_StartupSimpleItem fields:
Item Data—BP_ItemDataSkins— array ofBP_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:
HealthMaximalHealthRegenerationDeltaHealthRegenerationFrequency
5. BP_FirearmsComponent
Configure firearms-specific parameters here:
Max Bullet Ricochets— maximum number of times a bullet can ricochetCritical Hit Body Parts— array ofName; hits to these bones will be treated as critical hits
Done
Your firearms bot is now ready to use.