Add config option to force stock to spawn on a bot during weapon generation

Enable it for various bot types (most bosses/raiders)
This commit is contained in:
Dev 2023-11-03 17:40:00 +00:00
parent b808850e7e
commit 93209e4a76
3 changed files with 27 additions and 12 deletions

View File

@ -432,7 +432,8 @@
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75
"laserIsActiveChancePercent": 75,
"forceStock": true
},
"bossgluhar": {
"nvgIsActiveChanceDayPercent": 10,
@ -440,13 +441,15 @@
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 45,
"lightIsActiveNightChancePercent": 95,
"laserIsActiveChancePercent": 95
"laserIsActiveChancePercent": 95,
"forceStock": true
},
"bosskilla": {
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 35,
"lightIsActiveNightChancePercent": 85,
"laserIsActiveChancePercent": 85
"laserIsActiveChancePercent": 85,
"forceStock": true
},
"bosskojaniy": {
"faceShieldIsActiveChancePercent": 100,
@ -468,7 +471,8 @@
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75
"laserIsActiveChancePercent": 75,
"forceStock": true
},
"bossknight": {
"nvgIsActiveChanceDayPercent": 10,
@ -476,21 +480,24 @@
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75
"laserIsActiveChancePercent": 75,
"forceStock": true
},
"bosszryachiy": {
"nvgIsActiveChanceDayPercent": 10,
"nvgIsActiveChanceNightPercent": 90,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 85,
"laserIsActiveChancePercent": 85
"laserIsActiveChancePercent": 85,
"forceStock": true
},
"bossboar": {
"nvgIsActiveChanceDayPercent": 10,
"nvgIsActiveChanceNightPercent": 90,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 85,
"laserIsActiveChancePercent": 85
"laserIsActiveChancePercent": 85,
"forceStock": true
},
"bosstest": {},
"followerbully": {
@ -547,6 +554,7 @@
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75,
"forceStock": true,
"weaponModLimits": {
"scopeLimit": 1,
"lightLaserLimit": 1
@ -558,7 +566,8 @@
"faceShieldIsActiveChancePercent": 100,
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75
"laserIsActiveChancePercent": 75,
"forceStock": true
},
"followerzryachiy": {
"nvgIsActiveChanceDayPercent": 10,
@ -586,6 +595,7 @@
"lightIsActiveDayChancePercent": 25,
"lightIsActiveNightChancePercent": 75,
"laserIsActiveChancePercent": 75,
"forceStock": true,
"weaponModLimits": {
"scopeLimit": 2,
"lightLaserLimit": 1
@ -616,6 +626,7 @@
"lightIsActiveDayChancePercent": 35,
"lightIsActiveNightChancePercent": 95,
"laserIsActiveChancePercent": 95,
"forceStock": true,
"weaponModLimits": {
"scopeLimit": 1,
"lightLaserLimit": 1
@ -780,7 +791,7 @@
"Backpack": 35,
"FaceCover": 5
},
"randomisedWeaponModSlots": [],
"randomisedWeaponModSlots": [],
"mods": {
"mod_barrel": 20,
"mod_bipod": 10,

View File

@ -273,11 +273,13 @@ export class BotEquipmentModGenerator
modSpawnChances.mod_handguard = 100;
}
// If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure stock gets added
if (modSlot === "mod_stock" && modToAddTemplate._props.Slots.find(x => x._name.includes("mod_stock")))
// If stock mod can take a sub stock mod, force spawn chance to be 100% to ensure sub-stock gets added
// Or if mod_stock is configured to be forced on
if (modSlot === "mod_stock" && (modToAddTemplate._props.Slots.find(x => x._name.includes("mod_stock") || botEquipConfig.forceStock)))
{
// Stock mod can take additional stocks, could be a locking device, force 100% chance
modSpawnChances.mod_stock = 100;
const stockSlots = ["mod_stock", "mod_stock_000", "mod_stock_akms"];
this.adjustSlotSpawnChances(modSpawnChances, stockSlots, 100);
}
const modId = this.hashUtil.generate();

View File

@ -110,6 +110,8 @@ export interface EquipmentFilters
weightingAdjustmentsByBotLevel: WeightingAdjustmentDetails[]
/** Same as weightingAdjustments but based on player level instead of bot level */
weightingAdjustmentsByPlayerLevel?: WeightingAdjustmentDetails[]
/** Should the stock mod be forced to spawn on bot */
forceStock: boolean
}
export interface ModLimits