diff --git a/project/assets/configs/bot.json b/project/assets/configs/bot.json index 2d1bfec4..0dd12781 100644 --- a/project/assets/configs/bot.json +++ b/project/assets/configs/bot.json @@ -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, diff --git a/project/src/generators/BotEquipmentModGenerator.ts b/project/src/generators/BotEquipmentModGenerator.ts index 673710a1..4de2393b 100644 --- a/project/src/generators/BotEquipmentModGenerator.ts +++ b/project/src/generators/BotEquipmentModGenerator.ts @@ -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(); diff --git a/project/src/models/spt/config/IBotConfig.ts b/project/src/models/spt/config/IBotConfig.ts index 7f1edbb5..035fa869 100644 --- a/project/src/models/spt/config/IBotConfig.ts +++ b/project/src/models/spt/config/IBotConfig.ts @@ -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