From 0986bd09321b0101b2090325242631f5c5e204e7 Mon Sep 17 00:00:00 2001 From: Dev Date: Wed, 11 Oct 2023 17:05:06 +0100 Subject: [PATCH] Make separate bossKill min/max properties + adjust various difficulty values --- project/assets/configs/quest.json | 54 +++++++++++-------- .../controllers/RepeatableQuestController.ts | 4 +- project/src/models/spt/config/IQuestConfig.ts | 2 + 3 files changed, 38 insertions(+), 22 deletions(-) diff --git a/project/assets/configs/quest.json b/project/assets/configs/quest.json index 4f9429e1..f4a7204c 100644 --- a/project/assets/configs/quest.json +++ b/project/assets/configs/quest.json @@ -238,15 +238,17 @@ "data": ["LeftLeg", "RightLeg"] } ], - "specificLocationProb": 0.25, + "specificLocationProb": 0.15, "distLocationBlacklist": ["laboratory", "factory4_day", "factory4_night"], - "distProb": 0.25, + "distProb": 0.2, "maxDist": 100, "minDist": 20, "maxKills": 3, "minKills": 2, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxBossKills": 1, + "minBossKills": 1, + "weaponRequirementProb": 0.1, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 15, @@ -418,10 +420,12 @@ "distProb": 0.25, "maxDist": 200, "minDist": 20, - "maxKills": 5, - "minKills": 2, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxKills": 15, + "minKills": 5, + "maxBossKills": 2, + "minBossKills": 1, + "weaponRequirementProb": 0.2, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 10, @@ -671,15 +675,17 @@ "data": ["LeftLeg", "RightLeg"] } ], - "specificLocationProb": 0.25, + "specificLocationProb": 0.15, "distLocationBlacklist": ["laboratory", "factory4_day", "factory4_night"], "distProb": 0.20, "maxDist": 100, "minDist": 20, "maxKills": 10, "minKills": 5, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxBossKills": 1, + "minBossKills": 1, + "weaponRequirementProb": 0.1, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 10, @@ -853,8 +859,10 @@ "minDist": 20, "maxKills": 15, "minKills": 5, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxBossKills": 3, + "minBossKills": 1, + "weaponRequirementProb": 0.2, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 10, @@ -1018,15 +1026,17 @@ "data": ["LeftLeg", "RightLeg"] } ], - "specificLocationProb": 0.25, + "specificLocationProb": 0.15, "distLocationBlacklist": ["laboratory"], "distProb": 0.20, "maxDist": 100, "minDist": 20, "maxKills": 3, "minKills": 1, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxBossKills": 1, + "minBossKills": 1, + "weaponRequirementProb": 0.1, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 10, @@ -1131,12 +1141,14 @@ "specificLocationProb": 0.25, "distLocationBlacklist": ["laboratory"], "distProb": 0.25, - "maxDist": 200, + "maxDist": 150, "minDist": 20, - "maxKills": 5, - "minKills": 2, - "weaponRequirementProb": 0.9, - "weaponCategoryRequirementProb": 0.2, + "maxKills": 15, + "minKills": 3, + "maxBossKills": 3, + "minBossKills": 1, + "weaponRequirementProb": 0.2, + "weaponCategoryRequirementProb": 0.3, "weaponCategoryRequirements": [{ "key": "Shotgun", "relativeProbability": 10, diff --git a/project/src/controllers/RepeatableQuestController.ts b/project/src/controllers/RepeatableQuestController.ts index 34da9d37..e3f57d77 100644 --- a/project/src/controllers/RepeatableQuestController.ts +++ b/project/src/controllers/RepeatableQuestController.ts @@ -753,7 +753,9 @@ export class RepeatableQuestController } // Draw how many npm kills are required - const kills = this.randomUtil.randInt(eliminationConfig.minKills, eliminationConfig.maxKills + 1); + const kills = (targetsConfig.data(targetKey).isBoss) + ? this.randomUtil.randInt(eliminationConfig.minBossKills, eliminationConfig.maxBossKills + 1) + : this.randomUtil.randInt(eliminationConfig.minKills, eliminationConfig.maxKills + 1); const killDifficulty = kills; // not perfectly happy here; we give difficulty = 1 to the quest reward generation when we have the most diffucult mission diff --git a/project/src/models/spt/config/IQuestConfig.ts b/project/src/models/spt/config/IQuestConfig.ts index 73843d3c..3f43b8ab 100644 --- a/project/src/models/spt/config/IQuestConfig.ts +++ b/project/src/models/spt/config/IQuestConfig.ts @@ -117,6 +117,8 @@ export interface IEliminationConfig minDist: number maxKills: number minKills: number + minBossKills: number + maxBossKills: number weaponCategoryRequirementProb: number weaponCategoryRequirements: IWeaponRequirement[] weaponRequirementProb: number