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_EasyBP_AI_CC_MediumBP_AI_CC_Hard
Naming Convention
Bot names follow this pattern:
BP_AI_<BOT_TYPE>_<DIFFICULTY>
Where:
CC= close combatEasy,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_NoLootBP_AI_CC_Medium_NoLootBP_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 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. Its parameterExperience Points For Killingdefines 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
Done
Your melee bot is now ready to use.