Add 1% chance all PMCs in players game are named after them with random prefixes

This commit is contained in:
Dev 2023-08-01 13:31:58 +01:00
parent 82de7c097d
commit 1bf3dba1a9
4 changed files with 62 additions and 3 deletions

View File

@ -1557,7 +1557,8 @@
},
"enemyTypes": ["assault", "marksman", "pmcBot", "bossBully", "bossKilla", "bossKojaniy", "bossGluhar", "bossSanitar", "bossTagilla", "bossKnight", "bossZryachiy", "followerBully", "followerKojaniy", "followerGluharAssault", "followerGluharSecurity", "followerGluharScout", "followerGluharSnipe", "followerSanitar", "followerBirdEye", "followerBigPipe", "followerZryachiy", "sectantWarrior", "sectantPriest"],
"forceHealingItemsIntoSecure": true,
"addPrefixToSameNamePMCAsPlayerChance": 40
"addPrefixToSameNamePMCAsPlayerChance": 40,
"allPMCsHavePlayerNameWithRandomPrefixChance": 1,
},
"showTypeInNickname": false,
"maxBotCap": {

View File

@ -505,6 +505,48 @@
"pmcresponse-killer_plead_11": "i need to kill {{playerSide}}, i hope you understand",
"pmcresponse-killer_plead_12": "Does nobody in this stupid game have a gas analyser",
"pmcresponse-unable_to_find_key": "Unable to find PMC response pool, none exist for key: %s",
"pmc-name_prefix_1": "Angelic",
"pmc-name_prefix_2": "Evil",
"pmc-name_prefix_3": "Tired",
"pmc-name_prefix_4": "Frugal",
"pmc-name_prefix_5": "Angry",
"pmc-name_prefix_6": "Honest",
"pmc-name_prefix_7": "Sensible",
"pmc-name_prefix_8": "Careless",
"pmc-name_prefix_9": "Ambitious",
"pmc-name_prefix_10": "Confident",
"pmc-name_prefix_11": "Charming",
"pmc-name_prefix_12": "Sophisticated",
"pmc-name_prefix_13": "Fashionable",
"pmc-name_prefix_14": "Divine",
"pmc-name_prefix_15": "Dishonest",
"pmc-name_prefix_16": "Greedy",
"pmc-name_prefix_17": "Balding",
"pmc-name_prefix_18": "Attractive",
"pmc-name_prefix_19": "Childish",
"pmc-name_prefix_20": "Demonic",
"pmc-name_prefix_21": "Humble",
"pmc-name_prefix_22": "Fabulous",
"pmc-name_prefix_23": "Lethargic",
"pmc-name_prefix_24": "Nervous",
"pmc-name_prefix_25": "Ostentatious",
"pmc-name_prefix_26": "Resourceful",
"pmc-name_prefix_27": "Restless",
"pmc-name_prefix_28": "Zealous",
"pmc-name_prefix_29": "Conscientious",
"pmc-name_prefix_30": "Girlboss",
"pmc-name_prefix_31": "Boss-Babe",
"pmc-name_prefix_32": "King",
"pmc-name_prefix_33": "Chief",
"pmc-name_prefix_34": "Tricky",
"pmc-name_prefix_35": "Serious",
"pmc-name_prefix_36": "Sussy",
"pmc-name_prefix_37": "Suspicious",
"pmc-name_prefix_38": "Cringe",
"pmc-name_prefix_39": "Dank",
"pmc-name_prefix_40": "Goat",
"pmc-name_prefix_41": "Zesty",
"pmc-name_prefix_41": "Fake",
"launcher-profile_standard": "Same as live, basic stash size (10x28), 500,000 roubles",
"launcher-profile_leftbehind": "Same as Standard plus; larger stash size (10x38), extra equipment/items, 500 dollars",
"launcher-profile_preparetoescape": "Same as Left Behind plus; larger stash size (10x48), extra equipment/items, higher starting reputation with traders, 250 euros",

View File

@ -17,6 +17,7 @@ import { IServerDetails } from "../models/eft/game/IServerDetails";
import { IAkiProfile } from "../models/eft/profile/IAkiProfile";
import { ConfigTypes } from "../models/enums/ConfigTypes";
import { Traders } from "../models/enums/Traders";
import { IBotConfig } from "../models/spt/config/IBotConfig";
import { ICoreConfig } from "../models/spt/config/ICoreConfig";
import { IHttpConfig } from "../models/spt/config/IHttpConfig";
import { ILocationConfig } from "../models/spt/config/ILocationConfig";
@ -33,6 +34,7 @@ import { ProfileFixerService } from "../services/ProfileFixerService";
import { SeasonalEventService } from "../services/SeasonalEventService";
import { EncodingUtil } from "../utils/EncodingUtil";
import { JsonUtil } from "../utils/JsonUtil";
import { RandomUtil } from "../utils/RandomUtil";
import { TimeUtil } from "../utils/TimeUtil";
@injectable()
@ -44,6 +46,7 @@ export class GameController
protected coreConfig: ICoreConfig;
protected locationConfig: ILocationConfig;
protected ragfairConfig: IRagfairConfig;
protected botConfig: IBotConfig;
constructor(
@inject("WinstonLogger") protected logger: ILogger,
@ -52,6 +55,7 @@ export class GameController
@inject("TimeUtil") protected timeUtil: TimeUtil,
@inject("PreAkiModLoader") protected preAkiModLoader: PreAkiModLoader,
@inject("HttpServerHelper") protected httpServerHelper: HttpServerHelper,
@inject("RandomUtil") protected randomUtil: RandomUtil,
@inject("EncodingUtil") protected encodingUtil: EncodingUtil,
@inject("HideoutHelper") protected hideoutHelper: HideoutHelper,
@inject("ProfileHelper") protected profileHelper: ProfileHelper,
@ -69,6 +73,7 @@ export class GameController
this.coreConfig = this.configServer.getConfig(ConfigTypes.CORE);
this.locationConfig = this.configServer.getConfig(ConfigTypes.LOCATION);
this.ragfairConfig = this.configServer.getConfig(ConfigTypes.RAGFAIR);
this.botConfig = this.configServer.getConfig(ConfigTypes.BOT);
}
/**
@ -165,6 +170,16 @@ export class GameController
if (pmcProfile.Info)
{
this.addPlayerToPMCNames(pmcProfile);
if (this.randomUtil.getChance100(this.botConfig.pmc.allPMCsHavePlayerNameWithRandomPrefixChance))
{
this.botConfig.pmc.addPrefixToSameNamePMCAsPlayerChance = 100;
if (pmcProfile?.Info?.Nickname)
{
this.databaseServer.getTables().bots.types.bear.firstName = [pmcProfile.Info.Nickname];
this.databaseServer.getTables().bots.types.usec.firstName = [pmcProfile.Info.Nickname];
}
}
}
if (this.seasonalEventService.isAutomaticEventDetectionEnabled())

View File

@ -41,8 +41,9 @@ export interface IPmcConfig
/** How many levels above player level can a PMC be */
botRelativeLevelDeltaMax: number
/** Force a number of healing items into PMCs secure container to ensure they can heal */
forceHealingItemsIntoSecure: boolean;
addPrefixToSameNamePMCAsPlayerChance: number;
forceHealingItemsIntoSecure: boolean
addPrefixToSameNamePMCAsPlayerChance: number
allPMCsHavePlayerNameWithRandomPrefixChance: number
}
export interface PmcTypes