diff --git a/project/assets/configs/pmc.json b/project/assets/configs/pmc.json index c7ea13fb..1fffe543 100644 --- a/project/assets/configs/pmc.json +++ b/project/assets/configs/pmc.json @@ -778,7 +778,7 @@ "additionalEnemyTypes": [ "bossPartisan" ], - "ChancedEnemies": [{ + "chancedEnemies": [{ "EnemyChance": 100, "Role": "assault" }, { @@ -789,8 +789,10 @@ "Role": "pmcUSEC" } ], - "BearEnemyChance": 85, - "UsecEnemyChance": 100 + "bearEnemyChance": 85, + "usecEnemyChance": 100, + "savageEnemyChance": 95, + "savagePlayerBehaviour": "ChancedEnemies" }, "pmcbear": { "additionalEnemyTypes": [ @@ -807,8 +809,10 @@ "Role": "pmcBEAR" } ], - "BearEnemyChance": 85, - "UsecEnemyChance": 100 + "bearEnemyChance": 85, + "usecEnemyChance": 100, + "savageEnemyChance": 95, + "savagePlayerBehaviour": "ChancedEnemies" } }, "forceHealingItemsIntoSecure": true, diff --git a/project/src/models/eft/common/ILocationBase.ts b/project/src/models/eft/common/ILocationBase.ts index 50beffd7..7e3bbc97 100644 --- a/project/src/models/eft/common/ILocationBase.ts +++ b/project/src/models/eft/common/ILocationBase.ts @@ -197,6 +197,7 @@ export interface IAdditionalHostilitySettings { ChancedEnemies: IChancedEnemy[]; Neutral: string[]; SavagePlayerBehaviour: string; + SavageEnemyChance?: number; UsecEnemyChance: number; UsecPlayerBehaviour: string; Warn: string[]; diff --git a/project/src/models/spt/config/IPmcConfig.ts b/project/src/models/spt/config/IPmcConfig.ts index 668cc85a..a533a4dd 100644 --- a/project/src/models/spt/config/IPmcConfig.ts +++ b/project/src/models/spt/config/IPmcConfig.ts @@ -55,9 +55,10 @@ export interface IHostilitySettings { /** Bot roles that are 100% an enemy */ additionalEnemyTypes?: string[]; /** Objects that determine the % chance another bot type is an enemy */ - ChancedEnemies?: IChancedEnemy[]; - BearEnemyChance?: number; - UsecEnemyChance?: number; + chancedEnemies?: IChancedEnemy[]; + bearEnemyChance?: number; + usecEnemyChance?: number; + savageEnemyChance?: number; /** Bot roles that are 100% an friendly */ additionalFriendlyTypes?: string[]; savagePlayerBehaviour?: string; diff --git a/project/src/services/LocationLifecycleService.ts b/project/src/services/LocationLifecycleService.ts index 988998c7..c68958df 100644 --- a/project/src/services/LocationLifecycleService.ts +++ b/project/src/services/LocationLifecycleService.ts @@ -167,8 +167,8 @@ export class LocationLifecycleService { } // Add/edit chance settings - if (configHostilityChanges.ChancedEnemies) { - for (const chanceDetailsToApply of configHostilityChanges.ChancedEnemies) { + if (configHostilityChanges.chancedEnemies) { + for (const chanceDetailsToApply of configHostilityChanges.chancedEnemies) { const locationBotDetails = locationBotHostilityDetails.ChancedEnemies.find( (botChance) => botChance.Role === chanceDetailsToApply.Role, ); @@ -192,13 +192,18 @@ export class LocationLifecycleService { } // Adjust bear hostility chance - if (typeof configHostilityChanges.BearEnemyChance !== "undefined") { - locationBotHostilityDetails.BearEnemyChance = configHostilityChanges.BearEnemyChance; + if (typeof configHostilityChanges.bearEnemyChance !== "undefined") { + locationBotHostilityDetails.BearEnemyChance = configHostilityChanges.bearEnemyChance; } // Adjust usec hostility chance - if (typeof configHostilityChanges.UsecEnemyChance !== "undefined") { - locationBotHostilityDetails.UsecEnemyChance = configHostilityChanges.UsecEnemyChance; + if (typeof configHostilityChanges.usecEnemyChance !== "undefined") { + locationBotHostilityDetails.UsecEnemyChance = configHostilityChanges.usecEnemyChance; + } + + // Adjust usec hostility chance + if (typeof configHostilityChanges.savageEnemyChance !== "undefined") { + locationBotHostilityDetails.SavageEnemyChance = configHostilityChanges.savageEnemyChance; } // Adjust scav hostility behaviour