Fixed PMCs not being hostile to player scav until they're very close
Fixed incorrect capitalisation Added `SavageEnemyChance` property to pmc config
This commit is contained in:
parent
5d5adb263c
commit
d35063ecb1
@ -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,
|
||||
|
@ -197,6 +197,7 @@ export interface IAdditionalHostilitySettings {
|
||||
ChancedEnemies: IChancedEnemy[];
|
||||
Neutral: string[];
|
||||
SavagePlayerBehaviour: string;
|
||||
SavageEnemyChance?: number;
|
||||
UsecEnemyChance: number;
|
||||
UsecPlayerBehaviour: string;
|
||||
Warn: string[];
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user