From 154578dd4486747c6f079177308cc84eefbe7cb2 Mon Sep 17 00:00:00 2001 From: Dev Date: Tue, 9 Jan 2024 16:15:31 +0000 Subject: [PATCH] Update randomisation config to specifiy its for weapon mods + add equipment mod adjustment system Adjust PMCs to use more gear mods at higher levels --- project/assets/configs/bot.json | 63 +++++++++++++++---- project/src/models/spt/config/IBotConfig.ts | 6 +- .../src/services/BotEquipmentFilterService.ts | 3 +- 3 files changed, 58 insertions(+), 14 deletions(-) diff --git a/project/assets/configs/bot.json b/project/assets/configs/bot.json index 0abb259d..2d2bf4de 100644 --- a/project/assets/configs/bot.json +++ b/project/assets/configs/bot.json @@ -863,7 +863,17 @@ "FaceCover": 5 }, "randomisedWeaponModSlots": [], - "mods": { + "equipmentMods": { + "back_plate": 60, + "left_side_plate": 0, + "rightside_plate": 0, + "mod_equipment": 3, + "mod_equipment_000": 3, + "mod_equipment_001": 3, + "mod_equipment_002": 3, + "mod_nvg": 3 + }, + "weaponMods": { "mod_barrel": 20, "mod_bipod": 10, "mod_flashlight": 5, @@ -931,9 +941,19 @@ "mod_mount_000", "mod_mount_001", "mod_mount_002", "mod_mount_003", "mod_mount_004", "mod_mount_005", "mod_mount_006", "mod_tactical", "mod_tactical_2", "mod_tactical_000", "mod_tactical_001", "mod_tactical_002", "mod_tactical_003" ], - "mods": { + "equipmentMods": { + "back_plate": 75, + "left_side_plate": 25, + "rightside_plate": 25, + "mod_equipment": 10, + "mod_equipment_000": 10, + "mod_equipment_001": 10, + "mod_equipment_002": 5, + "mod_nvg": 15 + }, + "weaponMods": { "mod_barrel": 50, - "mod_bipod": 10, + "mod_bipod": 15, "mod_flashlight": 35, "mod_foregrip": 45, "mod_handguard": 25, @@ -950,11 +970,6 @@ "mod_muzzle": 25, "mod_muzzle_000": 20, "mod_muzzle_001": 20, - "mod_equipment": 30, - "mod_equipment_000": 40, - "mod_equipment_001": 35, - "mod_equipment_002": 30, - "mod_nvg": 20, "mod_pistol_grip_akms": 35, "mod_pistol_grip": 40, "mod_scope": 15, @@ -971,16 +986,42 @@ "mod_tactical_003": 30, "mod_tactical_2": 15 } - }, - { + }, { "levelRange": { "min": 23, + "max": 45 + }, + "equipment": { + "SecondPrimaryWeapon": 20 + }, + "randomisedArmorSlots": ["Headwear", "TacticalVest", "ArmorVest"], + "randomisedWeaponModSlots": ["mod_scope", "mod_scope_000", "mod_scope_001", "mod_scope_002", "mod_scope_003", + "mod_handguard", "mod_magazine", "mod_muzzle", "mod_bipod", + "mod_muzzle_000", "mod_muzzle_001", "mod_charge", + "mod_gas_block", "mod_pistol_grip", "mod_pistolgrip", "mod_pistol_grip_akms", "mod_pistolgrip_000", + "mod_foregrip", "mod_trigger", "mod_reciever", "mod_hammer", + "mod_stock", "mod_stock_000", "mod_stock_001", "mod_stock_akms", "mod_stock_axis", + "mod_mount_000", "mod_mount_001", "mod_mount_002", "mod_mount_003", "mod_mount_004", "mod_mount_005", "mod_mount_006", + "mod_tactical", "mod_tactical_2", "mod_tactical_000", "mod_tactical_001", "mod_tactical_002", "mod_tactical_003" + ] + }, { + "levelRange": { + "min": 46, "max": 100 }, "equipment": { "SecondPrimaryWeapon": 20 }, - "randomisedArmorSlots": ["Headwear"], + "equipmentMods": { + "left_side_plate": 90, + "rightside_plate": 90, + "mod_equipment": 75, + "mod_equipment_000": 80, + "mod_equipment_001": 75, + "mod_equipment_002": 90, + "mod_nvg": 60 + }, + "randomisedArmorSlots": ["Headwear", "TacticalVest", "ArmorVest"], "randomisedWeaponModSlots": ["mod_scope", "mod_scope_000", "mod_scope_001", "mod_scope_002", "mod_scope_003", "mod_handguard", "mod_magazine", "mod_muzzle", "mod_bipod", "mod_muzzle_000", "mod_muzzle_001", "mod_charge", diff --git a/project/src/models/spt/config/IBotConfig.ts b/project/src/models/spt/config/IBotConfig.ts index e2c7abad..0e62e37e 100644 --- a/project/src/models/spt/config/IBotConfig.ts +++ b/project/src/models/spt/config/IBotConfig.ts @@ -138,8 +138,10 @@ export interface RandomisationDetails randomisedArmorSlots?: string[]; /** Equipment chances */ equipment?: Record; - /** Mod chances */ - mods?: Record; + /** Weapon mod chances */ + weaponMods?: Record; + /** Equipment mod chances */ + equipmentMods?: Record; } export interface EquipmentFilterDetails diff --git a/project/src/services/BotEquipmentFilterService.ts b/project/src/services/BotEquipmentFilterService.ts index 3e7b84e3..f2d5a199 100644 --- a/project/src/services/BotEquipmentFilterService.ts +++ b/project/src/services/BotEquipmentFilterService.ts @@ -89,7 +89,8 @@ export class BotEquipmentFilterService if (randomisationDetails) { this.adjustChances(randomisationDetails?.equipment, baseBotNode.chances.equipment); - this.adjustChances(randomisationDetails?.mods, baseBotNode.chances.weaponMods); + this.adjustChances(randomisationDetails?.weaponMods, baseBotNode.chances.weaponMods); + this.adjustChances(randomisationDetails?.equipmentMods, baseBotNode.chances.equipmentMods); this.adjustGenerationChances(randomisationDetails?.generation, baseBotNode.generation); } }