Add option to force healing items into PMCs secure
Make bots heal to a 90% instead of 65% Log when item cannot fit into container when genning bots
This commit is contained in:
parent
6581896e30
commit
2d57bdb0ef
@ -475,7 +475,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 3,
|
"MIN_SHOOTS_TIME": 3,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.90,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -972,7 +972,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.90,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -1469,7 +1469,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.90,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -1968,7 +1968,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.90,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
|
@ -475,7 +475,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 3,
|
"MIN_SHOOTS_TIME": 3,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.9,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -972,7 +972,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.9,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -1469,7 +1469,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.9,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
@ -1968,7 +1968,7 @@
|
|||||||
"MIN_SHOOTS_TIME": 2,
|
"MIN_SHOOTS_TIME": 2,
|
||||||
"MIN_START_AGGRESION_COEF": 1,
|
"MIN_START_AGGRESION_COEF": 1,
|
||||||
"NO_RUN_AWAY_FOR_SAFE": true,
|
"NO_RUN_AWAY_FOR_SAFE": true,
|
||||||
"PART_PERCENT_TO_HEAL": 0.65,
|
"PART_PERCENT_TO_HEAL": 0.9,
|
||||||
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
"PISTOL_SHOTGUN_AMBUSH_DIST": 30,
|
||||||
"PROTECT_DELTA_HEAL_SEC": 10,
|
"PROTECT_DELTA_HEAL_SEC": 10,
|
||||||
"PROTECT_TIME_REAL": true,
|
"PROTECT_TIME_REAL": true,
|
||||||
|
@ -73,6 +73,12 @@ export class BotLootGenerator
|
|||||||
const stimItemCount = this.getRandomisedCount(itemCounts.stims.min, itemCounts.stims.max, 3);
|
const stimItemCount = this.getRandomisedCount(itemCounts.stims.min, itemCounts.stims.max, 3);
|
||||||
const grenadeCount = this.getRandomisedCount(itemCounts.grenades.min, itemCounts.grenades.max, 4);
|
const grenadeCount = this.getRandomisedCount(itemCounts.grenades.min, itemCounts.grenades.max, 4);
|
||||||
|
|
||||||
|
// Forced pmc healing loot
|
||||||
|
if (isPmc)
|
||||||
|
{
|
||||||
|
this.addForcedMedicalItemsToPmcSecure(botInventory, botRole);
|
||||||
|
}
|
||||||
|
|
||||||
// Special items
|
// Special items
|
||||||
this.addLootFromPool(
|
this.addLootFromPool(
|
||||||
this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SPECIAL, botJsonTemplate),
|
this.botLootCacheService.getLootFromCache(botRole, isPmc, LootCacheType.SPECIAL, botJsonTemplate),
|
||||||
@ -169,6 +175,47 @@ export class BotLootGenerator
|
|||||||
isPmc);
|
isPmc);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Force healing items onto bot to ensure they can heal in-raid
|
||||||
|
* @param botInventory Inventory to add items to
|
||||||
|
* @param botRole Role of bot (sptBear/sptUsec)
|
||||||
|
*/
|
||||||
|
protected addForcedMedicalItemsToPmcSecure(botInventory: PmcInventory, botRole: string): void
|
||||||
|
{
|
||||||
|
const grizzly = this.itemHelper.getItem("590c657e86f77412b013051d")[1];
|
||||||
|
this.addLootFromPool(
|
||||||
|
[grizzly],
|
||||||
|
[EquipmentSlots.SECURED_CONTAINER],
|
||||||
|
2,
|
||||||
|
botInventory,
|
||||||
|
botRole,
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
true);
|
||||||
|
|
||||||
|
const surv12 = this.itemHelper.getItem("5d02797c86f774203f38e30a")[1];
|
||||||
|
this.addLootFromPool(
|
||||||
|
[surv12],
|
||||||
|
[EquipmentSlots.SECURED_CONTAINER],
|
||||||
|
1,
|
||||||
|
botInventory,
|
||||||
|
botRole,
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
true);
|
||||||
|
|
||||||
|
const morphine = this.itemHelper.getItem("544fb3f34bdc2d03748b456a")[1];
|
||||||
|
this.addLootFromPool(
|
||||||
|
[morphine],
|
||||||
|
[EquipmentSlots.SECURED_CONTAINER],
|
||||||
|
3,
|
||||||
|
botInventory,
|
||||||
|
botRole,
|
||||||
|
false,
|
||||||
|
0,
|
||||||
|
true);
|
||||||
|
}
|
||||||
|
|
||||||
protected getRandomisedCount(min: number, max: number, nValue: number): number
|
protected getRandomisedCount(min: number, max: number, nValue: number): number
|
||||||
{
|
{
|
||||||
const range = max - min;
|
const range = max - min;
|
||||||
|
@ -231,6 +231,10 @@ export class BotWeaponGeneratorHelper
|
|||||||
inventory.items.push(...itemWithChildren);
|
inventory.items.push(...itemWithChildren);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
this.logger.warning(`Unable to find space in container: ${container.slotId} item: ${itemWithChildren[0]._tpl}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,8 @@ export interface IPmcConfig
|
|||||||
enemyTypes: string[]
|
enemyTypes: string[]
|
||||||
/** How many levels above player level can a PMC be */
|
/** How many levels above player level can a PMC be */
|
||||||
botRelativeLevelDeltaMax: number
|
botRelativeLevelDeltaMax: number
|
||||||
|
/** Force a number of healing items into PMCs secure container to ensure they can heal */
|
||||||
|
forceHealingItemsIntoSecure: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PmcTypes
|
export interface PmcTypes
|
||||||
|
Loading…
Reference in New Issue
Block a user