Progress towards RC1.0
This commit is contained in:
parent
9f7ab8b299
commit
f2a319bfd2
@ -1,4 +1,18 @@
|
||||
{
|
||||
"bots":
|
||||
{
|
||||
"containersOnBots": true,
|
||||
"chanceSameSideIsHostilePercent": 50,
|
||||
"isUsec": 50,
|
||||
"maxBackpackLootTotalRub": 150000,
|
||||
"maxBotCap": 20,
|
||||
"maxPocketLootTotalRub": 50000,
|
||||
"maxVestLootTotalRub": 50000,
|
||||
"pmcDifficulty": "AsOnline",
|
||||
"pmcNValue": 1.7,
|
||||
"scavNValue": 2
|
||||
},
|
||||
|
||||
"flea":
|
||||
{
|
||||
"minUserLevel": 15,
|
||||
@ -14,7 +28,7 @@
|
||||
{
|
||||
"gain": 0.0000002,
|
||||
"loss": 0.0000002
|
||||
},
|
||||
},
|
||||
|
||||
"offerItemCount":
|
||||
{
|
||||
@ -31,7 +45,7 @@
|
||||
|
||||
"currencies":
|
||||
{
|
||||
"rubles": 78,
|
||||
"roubles": 78,
|
||||
"dollars": 20,
|
||||
"euros": 2
|
||||
},
|
||||
@ -43,27 +57,88 @@
|
||||
}
|
||||
},
|
||||
|
||||
"raid":
|
||||
"globals":
|
||||
{
|
||||
"timeLimit": 60,
|
||||
"fixOpenZones": true,
|
||||
"chompiesBossFix": true
|
||||
"damagePerMeter": 9,
|
||||
"safeHeight": 3,
|
||||
"maxTraders": false
|
||||
},
|
||||
|
||||
|
||||
"hideout":
|
||||
{
|
||||
"airFilterUnitFlowRate": 0.0047222222222222,
|
||||
"constructionTime": 1,
|
||||
"generatorFuelFlowRate": 0.0013194444444444,
|
||||
"gpuBoostRate": 0.041225,
|
||||
"productionTime": 1,
|
||||
"scavCaseTime": 1
|
||||
},
|
||||
|
||||
"insurance":
|
||||
{
|
||||
"insuranceMultiplier":
|
||||
{
|
||||
"prapor": 0.16,
|
||||
"therapist": 0.25
|
||||
},
|
||||
"returnChancePercent":
|
||||
{
|
||||
"prapor": 80,
|
||||
"therapist": 85
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
"items":
|
||||
{
|
||||
"standardStash":
|
||||
{
|
||||
"vertical": 28,
|
||||
"horizontal": 10
|
||||
},
|
||||
|
||||
"behindStash":
|
||||
{
|
||||
"vertical": 38,
|
||||
"horizontal": 10
|
||||
},
|
||||
|
||||
"escapeStash":
|
||||
{
|
||||
"vertical": 48,
|
||||
"horizontal": 10
|
||||
},
|
||||
|
||||
"eodStash":
|
||||
{
|
||||
"vertical": 68,
|
||||
"horizontal": 10
|
||||
},
|
||||
|
||||
"examineByDefault": false,
|
||||
"removeBackpackFilter": true,
|
||||
"weightModifier": 1
|
||||
},
|
||||
|
||||
"loot":
|
||||
{
|
||||
"containersInMarkedRoom": true,
|
||||
"looseLootMultiplier": 1,
|
||||
"staticLootMultiplier": 1
|
||||
},
|
||||
|
||||
"bots":
|
||||
{
|
||||
"pmcDifficulty": "Normal"
|
||||
},
|
||||
|
||||
"globals":
|
||||
"raid":
|
||||
{
|
||||
"safeHeight": 9000
|
||||
"timeLimit": 60,
|
||||
"fixOpenZones": true,
|
||||
"chompiesBossFix": true,
|
||||
"aiAmount": "AsOnline",
|
||||
"aiDifficulty": "AsOnline",
|
||||
"bossEnabled": true,
|
||||
"scavWars": false,
|
||||
"taggedAndCursed": false,
|
||||
"enablePve": true,
|
||||
"carExtractBaseStandingGain": 0.25,
|
||||
"scavExtractGain": 0.01
|
||||
}
|
||||
}
|
||||
}
|
||||
|
46
Valens-AIO/src/airdrop.ts
Normal file
46
Valens-AIO/src/airdrop.ts
Normal file
@ -0,0 +1,46 @@
|
||||
/*import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Airdrop
|
||||
{
|
||||
private modConfig = require("../config/config.jsonc");
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private airdropConfig: IAirdropConfig;
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
this.airdropConfig = airdropConfig;
|
||||
this.modConfig = this.modConfig.airdrop;
|
||||
}
|
||||
|
||||
public updateAirdrops();
|
||||
{
|
||||
if (this.modConfig.airdropChancePercent != 25)
|
||||
{
|
||||
this.airdropChance();
|
||||
this.logger.info(`Customs Airdrop Chance is ${this.modConfig.airdropChancePercent.bigmap}`);
|
||||
this.logger.info(`Woods Airdrop Chance is ${this.modConfig.airdropChancePercent.woods}`);
|
||||
this.logger.info(`Lighthouse Airdrop Chance is ${this.modConfig.airdropChancePercent.lighthouse}`);
|
||||
this.logger.info(`Shoreline Airdrop Chance is ${this.modConfig.airdropChancePercent.shoreline}`);
|
||||
this.logger.info(`Interchange Airdrop Chance is ${this.modConfig.airdropChancePercent.interchange}`);
|
||||
this.logger.info(`Reserve Airdrop Chance is ${this.modConfig.airdropChancePercent.reserve}`);
|
||||
}
|
||||
}
|
||||
|
||||
private airdropChance();
|
||||
{
|
||||
this.airdropConfig.airdropChancePercent["bigmap"] = this.modConfig.airdropChancePercent.bigmap;
|
||||
this.airdropConfig.airdropChancePercent["woods"] = this.modConfig.airdropChancePercent.woods;
|
||||
this.airdropConfig.airdropChancePercent["lighthouse"] = this.modConfig.airdropChancePercent.lighthouse;
|
||||
this.airdropConfig.airdropChancePercent["shoreline"] = this.modConfig.airdropChancePercent.shoreline;
|
||||
this.airdropConfig.airdropChancePercent["interchange"] = this.modConfig.airdropChancePercent.interchange;
|
||||
this.airdropConfig.airdropChancePercent["reserve"] = this.modConfig.airdropChancePercent.reserve;
|
||||
|
||||
}
|
||||
}
|
||||
*/
|
179
Valens-AIO/src/bots.ts
Normal file
179
Valens-AIO/src/bots.ts
Normal file
@ -0,0 +1,179 @@
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Bots
|
||||
{
|
||||
private modConfig = require("../config/config.json")
|
||||
private logger: ILogger;
|
||||
private botConfig: IBotConfig;
|
||||
private tables: IDatabaseTables;
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botConfig: IBotConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.modConfig = this.modConfig.bots;
|
||||
this.botConfig = botConfig;
|
||||
this.tables = databaseServer.getTables();
|
||||
}
|
||||
|
||||
public updateBots(): void
|
||||
{
|
||||
if (this.modConfig.pmcDifficulty.toLowerCase() != "asonline")
|
||||
{
|
||||
this.pmcDifficulty();
|
||||
this.logger.info(`PMC Bot Difficulty set to ${this.modConfig.pmcDifficulty}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.containersOnBots)
|
||||
{
|
||||
this.containersOnBots();
|
||||
this.logger.info(`Containers On Bots: ${this.modConfig.containersOnBots}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.isUsec != 50)
|
||||
{
|
||||
this.isUsec();
|
||||
this.logger.info(`isUsec Chance is: ${this.modConfig.isUsec}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.maxBackpackLootTotalRub != 150000
|
||||
|| this.modConfig.maxPocketLootTotalRub !=50000
|
||||
|| this.modConfig.maxVestLootTotalRub != 50000)
|
||||
{
|
||||
this.pmcLoot();
|
||||
this.logger.info("PMC Loot totals changed!");
|
||||
this.logger.info(`Max Backpack Total Value: ${this.modConfig.maxBackpackLootTotalRub}`);
|
||||
this.logger.info(`Max Pocket Total Value: ${this.modConfig.maxPocketLootTotalRub}`);
|
||||
this.logger.info(`Max Vest Total Value: ${this.modConfig.maxVestLootTotalRub}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.chanceSameSideIsHostilePercent != 50)
|
||||
{
|
||||
this.sameSideIsHostile();
|
||||
this.logger.info(`Chance Same Side Is Hostle is ${this.modConfig.chanceSameSideIsHostilePercent}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.maxBotCap != 20)
|
||||
{
|
||||
this.maxBotCap();
|
||||
this.logger.info(`Bot Cap is now ${this.modConfig.botCap}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.pmcNValue != 1.7 || this.modConfig.scavNValue != 2)
|
||||
{
|
||||
this.lootNValue();
|
||||
this.logger.info("Loot NValue has been changed!");
|
||||
this.logger.info(`Scav NValue set to ${this.modConfig.scavNValue}`);
|
||||
this.logger.info(`PMC NValue set to ${this.modConfig.pmcNValue}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes Bot Difficulty.
|
||||
*
|
||||
* Options for PMC are Easy, Normal, Hard, Impossible, As Online.
|
||||
*
|
||||
* Options for Scav are Easy, Medium, Hard, Impossible, As Online.
|
||||
*
|
||||
* String formatting: "Normal".
|
||||
* @param botConfig SPT Bot Config
|
||||
*/
|
||||
private pmcDifficulty(): void
|
||||
{
|
||||
this.botConfig.pmc.difficulty = this.modConfig.pmcDifficulty;
|
||||
}
|
||||
|
||||
private containersOnBots(): void
|
||||
{
|
||||
const spawnPoints = this.tables.bots.types;
|
||||
const usec = spawnPoints.usec.inventory.items.Backpack;
|
||||
const bear = spawnPoints.bear.inventory.items.Backpack;
|
||||
|
||||
usec.push(...this.containers());
|
||||
bear.push(...this.containers());
|
||||
|
||||
const dynaLoot = this.botConfig.pmc.dynamicLoot.whitelist;
|
||||
|
||||
dynaLoot.push("5448bf274bdc2dfc2f8b456a");
|
||||
dynaLoot.push("5795f317245977243854e041");
|
||||
}
|
||||
|
||||
private isUsec(): void
|
||||
{
|
||||
this.botConfig.pmc.isUsec = this.modConfig.isUsec;
|
||||
}
|
||||
|
||||
private pmcLoot(): void
|
||||
{
|
||||
this.botConfig.pmc.maxBackpackLootTotalRub = this.modConfig.maxBackpackLootTotalRub;
|
||||
this.botConfig.pmc.maxPocketLootTotalRub = this.modConfig.maxPocketLootTotalRub;
|
||||
this.botConfig.pmc.maxVestLootTotalRub = this.modConfig.maxVestLootTotalRub;
|
||||
}
|
||||
|
||||
private sameSideIsHostile(): void
|
||||
{
|
||||
this.botConfig.pmc.chanceSameSideIsHostilePercent = this.modConfig.chanceSameSideIsHostilePercent;
|
||||
}
|
||||
|
||||
private maxBotCap(): void
|
||||
{
|
||||
this.botConfig.maxBotCap = this.modConfig.maxBotCap;
|
||||
}
|
||||
|
||||
private lootNValue(): void
|
||||
{
|
||||
this.botConfig.lootNValue.scav = this.modConfig.scavNValue;
|
||||
this.botConfig.lootNValue.pmc = this.modConfig.pmcNValue;
|
||||
}
|
||||
|
||||
|
||||
private containers(): any[]
|
||||
{
|
||||
/* Container "id"s
|
||||
*
|
||||
* S I C C pouch: 5d235bb686f77443f4331278
|
||||
*
|
||||
* Magazine Case: 5c127c4486f7745625356c13
|
||||
*
|
||||
* Weapon Case: 59fb023c86f7746d0d4b423c
|
||||
*
|
||||
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
||||
*
|
||||
* Item Case: 59fb042886f7746c5005a7b2
|
||||
*
|
||||
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
||||
*
|
||||
* Money case: 59fb016586f7746d0d4b423a
|
||||
*
|
||||
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
||||
*
|
||||
* Medicine case: 5aafbcd986f7745e590fff23
|
||||
*
|
||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||
*
|
||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||
*
|
||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||
*/
|
||||
|
||||
const lootItems = [];
|
||||
lootItems.push({"tpl": "5d235bb686f77443f4331278", "relativeProbability": 12});
|
||||
lootItems.push({"tpl": "5c127c4486f7745625356c13", "relativeProbability": 25});
|
||||
lootItems.push({"tpl": "59fb023c86f7746d0d4b423c", "relativeProbability": 13});
|
||||
lootItems.push({"tpl": "5b6d9ce188a4501afc1b2b25", "relativeProbability": 10});
|
||||
lootItems.push({"tpl": "59fb042886f7746c5005a7b2", "relativeProbability": 13});
|
||||
lootItems.push({"tpl": "5c0a840b86f7742ffa4f2482", "relativeProbability": 10});
|
||||
lootItems.push({"tpl": "59fb016586f7746d0d4b423a", "relativeProbability": 25});
|
||||
lootItems.push({"tpl": "5c093db286f7740a1b2617e3", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
||||
lootItems.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 9});
|
||||
|
||||
return lootItems;
|
||||
}
|
||||
|
||||
}
|
@ -1,142 +1,114 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor";
|
||||
import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor";
|
||||
import { RagFair } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { Money } from "@spt-aki/models/enums/Money";
|
||||
|
||||
class ValensAIO implements IPostDBLoadMod
|
||||
export class Flea
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private databaseServer: DatabaseServer;
|
||||
private configServer: ConfigServer;
|
||||
private botConfig: IBotConfig;
|
||||
private locationConfig: ILocationConfig;
|
||||
private ragfairConfig: IRagfairConfig;
|
||||
private tables: IDatabaseTables;
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
|
||||
constructor (logger: ILogger, ragfairConfig: IRagfairConfig, tables: IDatabaseTables)
|
||||
{
|
||||
// get database from server
|
||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
||||
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
this.configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||
this.ragfairConfig = this.configServer.getConfig<IRagfairConfig>(ConfigTypes.RAGFAIR);
|
||||
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
|
||||
this.tables = this.databaseServer.getTables();
|
||||
this.logger = logger;
|
||||
this.ragfairConfig = ragfairConfig;
|
||||
this.tables = tables;
|
||||
}
|
||||
|
||||
this.logger.info(`Flea Market Level set to ${this.modConfig.globals.unlockLevel}`);
|
||||
this.ragfairLevel(this.tables);
|
||||
|
||||
if (this.modConfig.flea.ragfairTime)
|
||||
{
|
||||
this.logger.info("Fleamarket Base Sell Time patched");
|
||||
this.ragfairTime(this.ragfairConfig);
|
||||
}
|
||||
|
||||
this.ragfairCurrencies();
|
||||
|
||||
if (this.modConfig.flea.reputation)
|
||||
public updateFlea(): void
|
||||
{
|
||||
if (this.modConfig.flea.minUserLevel != 15)
|
||||
{
|
||||
this.logger.info("Fleamarket Reputation patched");
|
||||
this.ragfairReputation(this.ragfairConfig);
|
||||
this.ragfairLevel();
|
||||
this.logger.info(`Fleamarket unlocked at level ${this.modConfig.flea.minUserLevel}`)
|
||||
}
|
||||
|
||||
this.ragfairOfferItemCount(this.ragfairConfig);
|
||||
this.logger.info("Fleamarket Offer Item Count patched");
|
||||
const time = this.modConfig.flea.time;
|
||||
if (time.baseSellTime != 15 || time.minSellTime != 5 || time.maxSellTime != 15)
|
||||
{
|
||||
this.ragfairTime();
|
||||
this.logger.info("Fleamarket Sell Times patched");
|
||||
}
|
||||
|
||||
this.ragfairItemCondition(this.ragfairConfig);
|
||||
this.logger.info("Fleamarket Item Condition patched");
|
||||
const currency = this.modConfig.flea.currencies;
|
||||
if (currency.roubles != 78 || currency.dollars != 20 || currency.euros != 2)
|
||||
{
|
||||
this.ragfairCurrencies();
|
||||
this.logger.info("Fleamarket Currencies patched")
|
||||
}
|
||||
|
||||
this.ragfairBlacklist(this.ragfairConfig);
|
||||
this.logger.info("Fleamarket Reputation patched");
|
||||
const rep = this.modConfig.flea.reputation;
|
||||
if (rep.gain != 0.0000002 || rep.loss != 0.0000002)
|
||||
{
|
||||
this.ragfairReputation();
|
||||
this.logger.info("Fleamarket Reputation patched");
|
||||
}
|
||||
|
||||
const count = this.modConfig.flea.offerItemCount;
|
||||
if (count.min != 8 || count.max != 15)
|
||||
{
|
||||
this.ragfairOfferItemCount();
|
||||
this.logger.info("Fleamarket Offer Item Count patched");
|
||||
}
|
||||
|
||||
const condition = this.modConfig.flea.condition;
|
||||
if (condition.conditionChance != 0.2 || condition.min != 0.6 || condition.max != 1)
|
||||
{
|
||||
this.ragfairItemCondition();
|
||||
this.logger.info("Fleamarket Item Condition patched");
|
||||
}
|
||||
|
||||
const list = this.modConfig.flea.blacklist;
|
||||
if (!list.enableBsgList || !list.enableQuestList)
|
||||
{
|
||||
this.ragfairBlacklist();
|
||||
this.logger.info("Fleamarket Blacklists patched");
|
||||
}
|
||||
}
|
||||
|
||||
private ragfairLevel(tables: IDatabaseTables): void
|
||||
private ragfairLevel(): void
|
||||
{
|
||||
tables.globals.config.RagFair.minUserLevel = this.modConfig.flea.minUserLevel;
|
||||
this.tables.globals.config.RagFair.minUserLevel = this.modConfig.flea.minUserLevel;
|
||||
}
|
||||
|
||||
private ragfairTime(ragfairConfig: IRagfairConfig): void
|
||||
private ragfairTime(): void
|
||||
{
|
||||
ragfairConfig.sell.time.base = this.modConfig.flea.time.baseSellTime;
|
||||
ragfairConfig.sell.time.min = this.modConfig.flea.time.minSellTime;
|
||||
ragfairConfig.sell.time.max = this.modConfig.flea.time.maxSellTime;
|
||||
this.ragfairConfig.sell.time.base = this.modConfig.flea.time.baseSellTime;
|
||||
this.ragfairConfig.sell.time.min = this.modConfig.flea.time.minSellTime;
|
||||
this.ragfairConfig.sell.time.max = this.modConfig.flea.time.maxSellTime;
|
||||
}
|
||||
|
||||
private ragfairReputation(): void
|
||||
{
|
||||
this.ragfairConfig.sell.reputation.gain = this.modConfig.flea.reputation.gain;
|
||||
this.ragfairConfig.sell.reputation.loss = this.modConfig.flea.reputation.loss;
|
||||
}
|
||||
|
||||
private ragfairOfferItemCount(): void
|
||||
{
|
||||
this.ragfairConfig.dynamic.offerItemCount.min = this.modConfig.flea.offerItemCount.min;
|
||||
this.ragfairConfig.dynamic.offerItemCount.max = this.modConfig.flea.offerItemCount.max;
|
||||
}
|
||||
|
||||
private ragfairItemCondition(): void
|
||||
{
|
||||
this.ragfairConfig.dynamic.condition.conditionChance = this.modConfig.flea.conditionChance;
|
||||
this.ragfairConfig.dynamic.condition.min = this.modConfig.flea.min;
|
||||
this.ragfairConfig.dynamic.condition.max = this.modConfig.flea.max;
|
||||
}
|
||||
|
||||
public ragfairCurrencies(): void
|
||||
{
|
||||
|
||||
if (this.modConfig?.flea?.currencies) // checks modConfig has "flea" and "currencies", also has value in it
|
||||
{
|
||||
let patchList: string = "";
|
||||
for (const moni of this.modConfig.flea) // "rubles", "dollars", "euros"
|
||||
{
|
||||
const money = Money[moni.toUpperCase()]; // "rubles" to "RUBLES" for enum check and get a item id
|
||||
if (!money)
|
||||
{
|
||||
this.logger.error(`"${moni}" is not exist on the Currency category, ignored.`);
|
||||
continue;
|
||||
}
|
||||
|
||||
const modValue = this.modConfig.flea.currencies[moni]; // get modConfig flea moni value
|
||||
if (modValue !== money) // check it is same or not in the Money enum values
|
||||
{
|
||||
// If its not the same value, try to edit curreny values
|
||||
this.ragfairConfig.dynamic.currencies[money] = modValue;
|
||||
if (patchList.length > 0)
|
||||
{
|
||||
patchList += `, ${moni}`;
|
||||
}
|
||||
else
|
||||
{
|
||||
patchList = moni;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (patchList.length > 0)
|
||||
{
|
||||
this.logger.info(`Fleamarket Currencies "${patchList}" patched`);
|
||||
}
|
||||
}
|
||||
this.ragfairConfig.dynamic.currencies.roubles = this.modConfig.flea.currencies.roubles;
|
||||
this.ragfairConfig.dynamic.currencies.dollars = this.modConfig.flea.currencies.dollars;
|
||||
this.ragfairConfig.dynamic.currencies.euros = this.modConfig.flea.currencies.euros;
|
||||
}
|
||||
|
||||
private ragfairReputation(ragfairConfig: IRagfairConfig): void
|
||||
private ragfairBlacklist(): void
|
||||
{
|
||||
ragfairConfig.sell.reputation.gain = this.modConfig.flea.reputation.gain;
|
||||
ragfairConfig.sell.reputation.loss = this.modConfig.flea.reputation.loss;
|
||||
}
|
||||
|
||||
private ragfairOfferItemCount(ragfairConfig: IRagfairConfig): void
|
||||
{
|
||||
ragfairConfig.dynamic.offerItemCount.min = this.modConfig.flea.offerItemCount.min;
|
||||
ragfairConfig.dynamic.offerItemCount.max = this.modConfig.flea.offerItemCount.max;
|
||||
}
|
||||
|
||||
private ragfairItemCondition(ragfairConfig: IRagfairConfig): void
|
||||
{
|
||||
ragfairConfig.dynamic.condition.conditionChance = this.modConfig.flea.conditionChance;
|
||||
ragfairConfig.dynamic.condition.min = this.modConfig.flea.min;
|
||||
ragfairConfig.dynamic.condition.max = this.modConfig.flea.max;
|
||||
}
|
||||
|
||||
private ragfairBlacklist(ragfairBlacklist: IRagfairConfig): void
|
||||
{
|
||||
ragfairBlacklist.dynamic.blacklist.enableBsgList = this.modConfig.flea.blacklist.enableBsgList;
|
||||
ragfairBlacklist.dynamic.blacklist.enableQuestList = this.modConfig.flea.blacklist.enableQuestList;
|
||||
this.ragfairConfig.dynamic.blacklist.enableBsgList = this.modConfig.flea.blacklist.enableBsgList;
|
||||
this.ragfairConfig.dynamic.blacklist.enableQuestList = this.modConfig.flea.blacklist.enableQuestList;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = { mod: new ValensAIO() }
|
52
Valens-AIO/src/globals.ts
Normal file
52
Valens-AIO/src/globals.ts
Normal file
@ -0,0 +1,52 @@
|
||||
import { Falling } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Globals
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
private logger: ILogger;
|
||||
private databaseServer: DatabaseServer;
|
||||
private globals: Falling
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
this.globals = this.databaseServer.getTables().globals.config.Health.Falling;
|
||||
this.modConfig = this.modConfig.globals;
|
||||
}
|
||||
|
||||
public updateGlobals(): void
|
||||
{
|
||||
if (this.modConfig.damagePerMeter != 9 || this.modConfig.safeHeight != 3)
|
||||
{
|
||||
this.damagePerMeter();
|
||||
this.safeHeight();
|
||||
this.logger.info(`Safe Fall Height set to ${this.modConfig.safeHeight} meters`);
|
||||
this.logger.info(`Damage Per Meter set to ${this.modConfig.damagePerMeter} meters`)
|
||||
}
|
||||
|
||||
if (this.modConfig.maxTraders)
|
||||
{
|
||||
this.maxTraders();
|
||||
this.logger.info(`Max Loyalty Traders is: ${this.modConfig.maxTraders}`);
|
||||
}
|
||||
}
|
||||
|
||||
private damagePerMeter(): void
|
||||
{
|
||||
this.damagePerMeter = this.modConfig.damagePerMeter;
|
||||
}
|
||||
|
||||
private safeHeight(): void
|
||||
{
|
||||
this.safeHeight = this.modConfig.safeHeight;
|
||||
}
|
||||
|
||||
private maxTraders(): void
|
||||
{
|
||||
this.databaseServer.getTables().globals.config.MaxLoyaltyLevelForAll = this.modConfig.maxTraders;
|
||||
}
|
||||
|
||||
}
|
89
Valens-AIO/src/hideout.ts
Normal file
89
Valens-AIO/src/hideout.ts
Normal file
@ -0,0 +1,89 @@
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Hideout
|
||||
{
|
||||
private modConfig = require("../config/config.json")
|
||||
private logger: ILogger;
|
||||
private databaseServer: DatabaseServer;
|
||||
private hideout: {constructionTime: number; productionTime: number; scavCaseTime: number; airFilterUnitFlowRate: number; generatorFuelFlowRate: number; gpuBoostRate: number; };
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
this.modConfig = this.modConfig.hideout;
|
||||
}
|
||||
|
||||
public updateHideout(): void
|
||||
{
|
||||
if (this.modConfig.constructionTime != 1)
|
||||
{
|
||||
this.updateConstructionTime();
|
||||
this.logger.info(`Construction Time Patched to ${this.hideout.constructionTime} `);
|
||||
}
|
||||
|
||||
if (this.modConfig.productionTime != 1)
|
||||
{
|
||||
this.updateProductionTime();
|
||||
this.logger.info(`Production Time Patched to ${this.hideout.productionTime} `);
|
||||
}
|
||||
|
||||
if (this.modConfig.scavCaseTime != 1)
|
||||
{
|
||||
this.updateScavCase();
|
||||
this.logger.info(`Scav Case TIme Patched to ${this.hideout.scavCaseTime}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.airFilterUnitFlowRate != 0.0047222222222222
|
||||
||this.modConfig.generatorFuelFlowRate != 0.0013194444444444
|
||||
||this.modConfig.gpuBoostRate != 0.041225)
|
||||
{
|
||||
this.updateSettings();
|
||||
this.logger.info(`Air Filter Flow Rate set to ${this.hideout.airFilterUnitFlowRate}`);
|
||||
this.logger.info(`Generator Fuel Flow Rate set to ${this.hideout.generatorFuelFlowRate}`);
|
||||
this.logger.info(`GPU Boost Rate set to ${this.hideout.gpuBoostRate}`);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private updateConstructionTime()
|
||||
{
|
||||
for (const area of this.databaseServer.getTables().hideout.areas)
|
||||
{
|
||||
for (const stage in area.stages)
|
||||
{
|
||||
const stageData = area.stages[stage];
|
||||
stageData.constructionTime *= this.modConfig.constructionTime;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private updateProductionTime()
|
||||
{
|
||||
for (const production of this.databaseServer.getTables().hideout.production)
|
||||
{
|
||||
production.productionTime *= this.modConfig.productionTime;
|
||||
}
|
||||
}
|
||||
|
||||
private updateScavCase()
|
||||
{
|
||||
for (const scavCase of this.databaseServer.getTables().hideout.scavcase)
|
||||
{
|
||||
scavCase.ProductionTime *= this.modConfig.scavCaseTime;
|
||||
}
|
||||
}
|
||||
|
||||
private updateSettings()
|
||||
{
|
||||
const settings = this.databaseServer.getTables().hideout.settings;
|
||||
settings.airFilterUnitFlowRate = this.modConfig.airFilterUnitFlowRate;
|
||||
settings.generatorFuelFlowRate = this.modConfig.generatorFuelFlowRate;
|
||||
settings.gpuBoostRate = this.modConfig.gpuBoostRate;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
53
Valens-AIO/src/insurance.ts
Normal file
53
Valens-AIO/src/insurance.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||
|
||||
export class Insurance
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private insuranceConfig: IInsuranceConfig;
|
||||
|
||||
constructor(logger:ILogger, databaseServer: DatabaseServer, insuranceConfig: IInsuranceConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
this.insuranceConfig = insuranceConfig;
|
||||
this.modConfig = this.modConfig.insurance;
|
||||
}
|
||||
|
||||
updateInsurance(): void
|
||||
{
|
||||
if (this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] != 0.16
|
||||
|| this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] != 0.25)
|
||||
{
|
||||
this.insuranceMultiplier();
|
||||
this.logger.info(`Prapor Insurance Price Multiplier Set to ${this.modConfig.insuranceMultiplier.prapor}`);
|
||||
this.logger.info(`Therapist Insurance Price Multiplier Set to ${this.modConfig.insuranceMultiplier.therapist}`);
|
||||
}
|
||||
|
||||
if (this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] != 80
|
||||
|| this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] != 85)
|
||||
{
|
||||
this.returnChancePercent();
|
||||
this.logger.info(`Prapor Return Chance Percent Set to ${this.modConfig.returnChancePercent.prapor}`);
|
||||
this.logger.info(`Therapist Return Chance Percent Set to ${this.modConfig.returnChancePercent.therapist}`);
|
||||
}
|
||||
}
|
||||
|
||||
private insuranceMultiplier(): void
|
||||
{
|
||||
this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] = this.modConfig.insuranceMultiplier.prapor;
|
||||
this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] = this.modConfig.insuranceMultiplier.therapist;
|
||||
}
|
||||
|
||||
private returnChancePercent(): void
|
||||
{
|
||||
this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] = this.modConfig.returnChancePercent.prapor;
|
||||
this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] = this.modConfig.returnChancePercent.therapist;
|
||||
}
|
||||
|
||||
|
||||
}
|
150
Valens-AIO/src/items.ts
Normal file
150
Valens-AIO/src/items.ts
Normal file
@ -0,0 +1,150 @@
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
export class Items
|
||||
{
|
||||
private modConfig = require("../config/config.json")
|
||||
private logger: ILogger;
|
||||
private databaseServer: DatabaseServer;
|
||||
|
||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.databaseServer = databaseServer;
|
||||
this.modConfig = this.modConfig.items;
|
||||
}
|
||||
|
||||
public updateItems(): void
|
||||
{
|
||||
if (this.modConfig.weightModifier != 1)
|
||||
{
|
||||
this.updateWeight();
|
||||
this.logger.info(`Weight Multipler patched to ${this.modConfig.weightModifier}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.removeBackpackFilter)
|
||||
{
|
||||
this.updateBackpacks();
|
||||
this.logger.info(`Backpack Restrictions Removed: ${this.modConfig.removeBackpackFilter}`)
|
||||
}
|
||||
|
||||
if (this.modConfig.standardStash.vertical != 28 || this.modConfig.standardStash.horizontal != 10)
|
||||
{
|
||||
this.standardStash();
|
||||
this.logger.info(`Standard Stash Vertical changed to ${this.modConfig.standardStash.vertical}`);
|
||||
this.logger.info(`Standard Stash Horizontal changed to ${this.modConfig.standardStash.horizontal}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.behindStash.vertical != 38 || this.modConfig.behindStash.horizontal != 10)
|
||||
{
|
||||
this.behindStash();
|
||||
this.logger.info(`Left Behind Stash Vertical changed to ${this.modConfig.behindStash.vertical}`);
|
||||
this.logger.info(`Left Behind Stash Horizontal changed to ${this.modConfig.behindStash.horizontal}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.escapeStash.vertical != 48 || this.modConfig.escapeStash.horizontal != 10)
|
||||
{
|
||||
this.escapeStash();
|
||||
this.logger.info(`Prepare for Escape Stash Vertical changed to ${this.modConfig.escapeStash.vertical}`);
|
||||
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${this.modConfig.escapeStash.horizontal}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.eodStash.vertical != 68 || this.modConfig.eodStash.horizontal != 10)
|
||||
{
|
||||
this.eodStash();
|
||||
this.logger.info(`Edge of Darkness Stash Vertical changed to ${this.modConfig.eodStash.vertical}`);
|
||||
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${this.modConfig.eodStash.horizontal}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.examineByDefault)
|
||||
{
|
||||
this.examineByDefault();
|
||||
this.logger.info(`Examine By Default is ${this.modConfig.examineByDefault}`);
|
||||
}
|
||||
}
|
||||
|
||||
private updateWeight()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._props?.Weight)
|
||||
{
|
||||
item._props.Weight *= this.modConfig.weightModifier;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private updateBackpacks()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._props.ItemSound === "gear_backpack")
|
||||
{
|
||||
item._props.Grids[0]._props.filters[0].ExcludedFilter = [];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private standardStash()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._name === "Standard stash 10x28")
|
||||
{
|
||||
item._props.Grids["cellsH"] = this.modConfig.standardStash.horizontal;
|
||||
item._props.Grids["cellsV"] = this.modConfig.standardStash.vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private behindStash()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._name === "Left Behind stash 10x38")
|
||||
{
|
||||
item._props.Grids["cellsH"] = this.modConfig.behindStash.horizontal;
|
||||
item._props.Grids["cellsV"] = this.modConfig.behindStash.vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private escapeStash()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._name === "Prepare for escape stash 10x48")
|
||||
{
|
||||
item._props.Grids["cellsH"] = this.modConfig.escapeStash.horizontal;
|
||||
item._props.Grids["cellsV"] = this.modConfig.escapeStash.vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private eodStash()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
if (item._name === "Edge of darkness stash 10x68")
|
||||
{
|
||||
item._props.Grids["cellsH"] = this.modConfig.eodStash.horizontal;
|
||||
item._props.Grids["cellsV"] = this.modConfig.eodStash.vertical;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private examineByDefault()
|
||||
{
|
||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||
for (const item of items)
|
||||
{
|
||||
item._props.ExaminedByDefault = this.modConfig.examineByDefault;
|
||||
}
|
||||
}
|
||||
}
|
@ -1,84 +1,60 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor";
|
||||
import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
|
||||
|
||||
class ValensAIO implements IPostDBLoadMod, IPostAkiLoadMod, IPreAkiLoadMod
|
||||
export class Loot
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private databaseServer: DatabaseServer;
|
||||
private configServer: ConfigServer;
|
||||
private locationConfig: ILocationConfig;
|
||||
|
||||
public preAkiLoad(container: DependencyContainer): void
|
||||
constructor (logger: ILogger, databaseServer: DatabaseServer, locationConfig: ILocationConfig)
|
||||
{
|
||||
return;
|
||||
this.logger = logger;
|
||||
this.locationConfig = locationConfig;
|
||||
this.tables = databaseServer.getTables();
|
||||
}
|
||||
|
||||
public postAkiLoad(container: DependencyContainer): void
|
||||
public updateLoot(): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
|
||||
// get database from server
|
||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
||||
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
this.configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
|
||||
this.tables = this.databaseServer.getTables();
|
||||
|
||||
if (this.modConfig.loot.looseLootMultiplier > 1)
|
||||
{
|
||||
this.logger.info(`Loose Loot Multiplier set to: ${this.modConfig.loot.looseLootMultiplier}`);
|
||||
this.looseLootMultiplier(this.locationConfig);
|
||||
this.looseLootMultiplier();
|
||||
this.logger.info(`Loose Loot Multiplier: ${this.modConfig.loot.looseLootMultiplier}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.loot.staticLootMultiplier > 1)
|
||||
{
|
||||
this.logger.info(`Static Loot Multiplier set to: ${this.modConfig.loot.staticLootMultiplier}`);
|
||||
this.staticLootMultiplier(this.locationConfig);
|
||||
this.staticLootMultiplier();
|
||||
this.logger.info(`Static Loot Multiplier: ${this.modConfig.loot.staticLootMultiplier}`);
|
||||
}
|
||||
|
||||
this.logger.info(`PMC Bot Difficulty set to ${this.modConfig.bots.pmcDifficulty}`);
|
||||
this.pmcDifficulty(this.botConfig);
|
||||
|
||||
if (this.modConfig.loot.containersInMarkedRoom)
|
||||
{
|
||||
this.logger.info(`Containers In Marked Room set to: ${this.modConfig.loot.containersInMarkedRoom}`);
|
||||
this.containersInMarkedRoom(this.tables);
|
||||
}
|
||||
|
||||
private looseLootMultiplier(locationConfig: ILocationConfig): void
|
||||
{
|
||||
for (const map in locationConfig.looseLootMultiplier)
|
||||
{
|
||||
locationConfig.looseLootMultiplier[map] = this.modConfig.loot.looseLootMultiplier;
|
||||
this.containersInMarkedRoom();
|
||||
this.logger.info(`Containers In Marked Room: ${this.modConfig.loot.containersInMarkedRoom}`);
|
||||
}
|
||||
}
|
||||
|
||||
private staticLootMultiplier(locationConfig: ILocationConfig): void
|
||||
private looseLootMultiplier(): void
|
||||
{
|
||||
for (const map in locationConfig.staticLootMultiplier)
|
||||
for (const map in this.locationConfig.looseLootMultiplier)
|
||||
{
|
||||
locationConfig.staticLootMultiplier[map] = this.modConfig.loot.staticLootMultiplier;
|
||||
this.locationConfig.looseLootMultiplier[map] = this.modConfig.loot.looseLootMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
private staticLootMultiplier(): void
|
||||
{
|
||||
for (const map in this.locationConfig.staticLootMultiplier)
|
||||
{
|
||||
this.locationConfig.staticLootMultiplier[map] = this.modConfig.loot.staticLootMultiplier;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes the loot database/tables to include containers in marked rooms.
|
||||
*
|
||||
* Container "id"s
|
||||
@ -109,21 +85,96 @@ class ValensAIO implements IPostDBLoadMod, IPostAkiLoadMod, IPreAkiLoadMod
|
||||
*
|
||||
* @variable containersInMarkedRoom Enables common containers (items case, weapon case, etc.) in Marked Rooms.
|
||||
*/
|
||||
private containersInMarkedRoom(tables: IDatabaseTables): void
|
||||
{
|
||||
const customsmarked1 = tables.locations.bigmap.looseLoot.spawnpoints.find(x=>x.template.Id==="Loot 135 (10)1203364")
|
||||
customsmarked1.itemDistribution.push({"tpl": "5d235bb686f77443f4331278", "relativeProbability": 3});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5c127c4486f7745625356c13", "relativeProbability": 14});
|
||||
customsmarked1.itemDistribution.push({"tpl": "59fb023c86f7746d0d4b423c", "relativeProbability": 9});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5b6d9ce188a4501afc1b2b25", "relativeProbability": 3});
|
||||
customsmarked1.itemDistribution.push({"tpl": "59fb042886f7746c5005a7b2", "relativeProbability": 11});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5c0a840b86f7742ffa4f2482", "relativeProbability": 3});
|
||||
customsmarked1.itemDistribution.push({"tpl": "59fb016586f7746d0d4b423a", "relativeProbability": 10});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5c093db286f7740a1b2617e3", "relativeProbability": 16});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 15});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 9});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 19});
|
||||
customsmarked1.itemDistribution.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 1});
|
||||
}
|
||||
private containersInMarkedRoom(): void
|
||||
{
|
||||
// Customs Marked Room Loot.
|
||||
const spawnPoints = this.tables.locations.bigmap.looseLoot.spawnpoints;
|
||||
const cstmsmarked1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)1203364");
|
||||
const cstmsmarked2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)1198014");
|
||||
const cstmsmarked3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)1207194");
|
||||
|
||||
module.exports = { mod: new ValensAIO() }
|
||||
cstmsmarked1.itemDistribution.push(...this.containers());
|
||||
cstmsmarked2.itemDistribution.push(...this.containers());
|
||||
cstmsmarked3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Reserve Marked Room Loot.
|
||||
const rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)49516");
|
||||
const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)69186");
|
||||
const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)39600");
|
||||
|
||||
const rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (11)56822");
|
||||
const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (12)56254");
|
||||
|
||||
const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)60780");
|
||||
const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (11)55578");
|
||||
const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (12)55522");
|
||||
|
||||
rsrvRBBK1.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK2.itemDistribution.push(...this.containers());
|
||||
rsrvRBBK3.itemDistribution.push(...this.containers());
|
||||
|
||||
rsrvRBPKPM1.itemDistribution.push(...this.containers());
|
||||
rsrvRBPKPM2.itemDistribution.push(...this.containers());
|
||||
|
||||
rsrvRBVO1.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO2.itemDistribution.push(...this.containers());
|
||||
rsrvRBVO3.itemDistribution.push(...this.containers());
|
||||
|
||||
// Lighthouse Marked Room Loot ... Lighthouse Marked Has No Cases; Only Jewelry/Electronics.
|
||||
/*const lhouseBdrm = spawnPoints.find(x=>x.template.Id==="");
|
||||
|
||||
lhouseBdrm.itemDistribution.push(...this.containers());*/
|
||||
}
|
||||
|
||||
private containers(): any[]
|
||||
{
|
||||
|
||||
/* Container "id"s
|
||||
*
|
||||
* S I C C pouch: 5d235bb686f77443f4331278
|
||||
*
|
||||
* Magazine Case: 5c127c4486f7745625356c13
|
||||
*
|
||||
* Weapon Case: 59fb023c86f7746d0d4b423c
|
||||
*
|
||||
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
||||
*
|
||||
* Item Case: 59fb042886f7746c5005a7b2
|
||||
*
|
||||
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
||||
*
|
||||
* Money case: 59fb016586f7746d0d4b423a
|
||||
*
|
||||
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
||||
*
|
||||
* Medicine case: 5aafbcd986f7745e590fff23
|
||||
*
|
||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||
*
|
||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||
*
|
||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||
*/
|
||||
|
||||
const lootItems = [];
|
||||
lootItems.push({"tpl": "5d235bb686f77443f4331278", "relativeProbability": 12});
|
||||
lootItems.push({"tpl": "5c127c4486f7745625356c13", "relativeProbability": 25});
|
||||
lootItems.push({"tpl": "59fb023c86f7746d0d4b423c", "relativeProbability": 13});
|
||||
lootItems.push({"tpl": "5b6d9ce188a4501afc1b2b25", "relativeProbability": 10});
|
||||
lootItems.push({"tpl": "59fb042886f7746c5005a7b2", "relativeProbability": 13});
|
||||
lootItems.push({"tpl": "5c0a840b86f7742ffa4f2482", "relativeProbability": 10});
|
||||
lootItems.push({"tpl": "59fb016586f7746d0d4b423a", "relativeProbability": 25});
|
||||
lootItems.push({"tpl": "5c093db286f7740a1b2617e3", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5aafbcd986f7745e590fff23", "relativeProbability": 30});
|
||||
lootItems.push({"tpl": "5b7c710788a4506dec015957", "relativeProbability": 15});
|
||||
lootItems.push({"tpl": "5e2af55f86f7746d4159f07c", "relativeProbability": 23});
|
||||
lootItems.push({"tpl": "5448bf274bdc2dfc2f8b456a", "relativeProbability": 9});
|
||||
|
||||
return lootItems;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,23 +1,27 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostAkiLoadMod } from "@spt-aki/models/external/IPostAkiLoadMod";
|
||||
|
||||
import { IPreAkiLoadMod } from "@spt-aki/models/external/IPreAkiLoadMod";
|
||||
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
|
||||
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
|
||||
//import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { LogTextColor } from "@spt-aki/models/spt/logging/LogTextColor";
|
||||
import { LogBackgroundColor } from "@spt-aki/models/spt/logging/LogBackgroundColor";
|
||||
import { RagFair } from "@spt-aki/models/eft/common/IGlobals";
|
||||
import { IBaseConfig } from "@spt-aki/models/spt/config/IBaseConfig";
|
||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||
import { Bots } from "./bots";
|
||||
import { Flea } from "./flea";
|
||||
import { Hideout } from "./hideout";
|
||||
import { Items } from "./items";
|
||||
import { Loot } from "./loot";
|
||||
import { Raid } from "./raid";
|
||||
import { Globals } from "./globals";
|
||||
import { Insurance } from "./insurance";
|
||||
//import { Airdrop } from "./airdrop";
|
||||
|
||||
|
||||
class ValensAIO implements IPostDBLoadMod, IPostAkiLoadMod, IPreAkiLoadMod
|
||||
class ValensAIO implements IPostDBLoadMod
|
||||
{
|
||||
private modConfig = require("../config/config.json");
|
||||
private logger: ILogger;
|
||||
@ -25,138 +29,50 @@ class ValensAIO implements IPostDBLoadMod, IPostAkiLoadMod, IPreAkiLoadMod
|
||||
private databaseServer: DatabaseServer;
|
||||
private configServer: ConfigServer;
|
||||
private botConfig: IBotConfig;
|
||||
private insuranceConfig: IInsuranceConfig;
|
||||
private locationConfig: ILocationConfig;
|
||||
private ragfairConfig: IRagfairConfig;
|
||||
|
||||
public preAkiLoad(container: DependencyContainer): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
public postAkiLoad(container: DependencyContainer): void
|
||||
{
|
||||
return;
|
||||
}
|
||||
//private airdropConfig: IAirdropConfig;
|
||||
private inRaidConfig: IInRaidConfig;
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
|
||||
// get database from server
|
||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
||||
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
this.configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||
this.ragfairConfig = this.configServer.getConfig<IRagfairConfig>(ConfigTypes.RAGFAIR);
|
||||
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
|
||||
this.ragfairConfig = this.configServer.getConfig<IRagfairConfig>(ConfigTypes.RAGFAIR);
|
||||
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
|
||||
this.tables = this.databaseServer.getTables();
|
||||
|
||||
if (this.modConfig.raid.openZones)
|
||||
{
|
||||
this.logger.info(`Open Zones ${this.modConfig.raid.alterOpenZones}.`)
|
||||
this.fixOpenZones(this.tables);
|
||||
}
|
||||
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
||||
//airdrop.updateAirdrops();
|
||||
|
||||
const bots = new Bots(this.logger, this.databaseServer, this.botConfig);
|
||||
bots.updateBots();
|
||||
|
||||
const flea = new Flea(this.logger, this.ragfairConfig, this.tables);
|
||||
flea.updateFlea();
|
||||
|
||||
const globals = new Globals(this.logger, this.databaseServer);
|
||||
globals.updateGlobals();
|
||||
|
||||
const hideout = new Hideout(this.logger, this.databaseServer);
|
||||
hideout.updateHideout();
|
||||
|
||||
const insurance = new Insurance(this.logger, this.databaseServer, this.insuranceConfig);
|
||||
insurance.updateInsurance();
|
||||
|
||||
if (this.modConfig.raid.chompiesBossFix)
|
||||
{
|
||||
this.logger.info(`Chompies Boss Fix ${this.modConfig.raid.chompiesBossFix}.`)
|
||||
this.chompiesBossFix(this.tables);
|
||||
}
|
||||
const items = new Items(this.logger, this.databaseServer);
|
||||
items.updateItems();
|
||||
|
||||
/*if (this.modConfig.raid.timeLimit)
|
||||
{
|
||||
this.logger.logWithColor(`Raid Time Limits set to ${this.modConfig.raid.timeLimit}.`, LogTextColor.blue, LogBackgroundColor.yellow);
|
||||
this.raidTimeLimit(this.tables);
|
||||
}*/
|
||||
const loot = new Loot(this.logger, this.databaseServer, this.locationConfig);
|
||||
loot.updateLoot();
|
||||
|
||||
this.logger.info(`Safe Fall Height set to ${this.modConfig.globals.safeHeight}`);
|
||||
this.safeHeight(this.tables);
|
||||
|
||||
|
||||
|
||||
const raid = new Raid(this.logger, this.databaseServer, this.inRaidConfig);
|
||||
raid.updateRaid();
|
||||
}
|
||||
|
||||
private fixOpenZones(tables: IDatabaseTables): void
|
||||
{
|
||||
const zones =
|
||||
{
|
||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneBlockPost,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||
"laboratory": "BotZoneFloor1,BotZoneFloor2,BotZoneBasement",
|
||||
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
||||
"woods": "ZoneRedHouse,ZoneWoodCutter,ZoneHouse,ZoneBigRocks,ZoneRoad,ZoneMiniHouse,ZoneScavBase2,ZoneBrokenVill,ZoneClearVill,ZoneHighRocks",
|
||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZonePassFar,ZonePassClose,ZoneTunnel,ZoneStartVillage,ZoneBunker,ZoneGreenHouses,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneForestTruck,ZoneForestSpawn,ZoneForestGasStation",
|
||||
"lighthouse": "Zone_TreatmentContainers,Zone_LongRoad,Zone_Blockpost,Zone_TreatmentBeach,Zone_Hellicopter,Zone_RoofContainers,Zone_Village,Zone_OldHouse,Zone_RoofRocks,Zone_DestroyedHouse,Zone_Chalet,Zone_SniperPeak,Zone_RoofBeach,Zone_Containers,Zone_TreatmentRocks,Zone_Rocks"
|
||||
}
|
||||
|
||||
for (const location in zones)
|
||||
{
|
||||
tables.locations[location].base.OpenZones = zones[location];
|
||||
}
|
||||
}
|
||||
|
||||
private chompiesBossFix(tables: IDatabaseTables): void
|
||||
{
|
||||
const labsBosses = tables.locations.laboratory.base.BossLocationSpawn;
|
||||
const reserveBosses = tables.locations.rezervbase.base.BossLocationSpawn;
|
||||
|
||||
// Chomps Raider Spawn Fix
|
||||
const spawn1 = labsBosses.find(x => x.TriggerId === "autoId_00008_EXFIL");
|
||||
if (spawn1)
|
||||
{
|
||||
spawn1.TriggerId = "00404";
|
||||
}
|
||||
|
||||
const spawn2 = labsBosses.find(x => x.TriggerId === "autoId_00010_EXFIL");
|
||||
if (spawn2)
|
||||
{
|
||||
spawn2.TriggerId = "00409";
|
||||
}
|
||||
|
||||
const spawn3 = reserveBosses.find(x => x.TriggerId === "00457");
|
||||
if (spawn3)
|
||||
{
|
||||
spawn3.TriggerId = "autoId_00632_EXFIL";
|
||||
}
|
||||
|
||||
const spawn4 = reserveBosses.find(x => x.TriggerId === "00452");
|
||||
if (spawn4)
|
||||
{
|
||||
spawn4.TriggerId = "autoId_00000_D2_LEVER";
|
||||
}
|
||||
}
|
||||
|
||||
private raidTimeLimit(tables: IDatabaseTables): void
|
||||
{
|
||||
// Escape Time Limit/Raid Time Limit configurable.
|
||||
const maps = tables.locations;
|
||||
|
||||
for (const map in maps)
|
||||
{
|
||||
tables.locations[map].base.EscapeTimeLimit = this.modConfig.raid.timeLimit;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Changes Bot Difficulty.
|
||||
*
|
||||
* Options for PMC are Easy, Normal, Hard, Impossible, As Online.
|
||||
*
|
||||
* Options for Scav are Easy, Medium, Hard, Impossible, As Online.
|
||||
*
|
||||
* String formatting: "Normal".
|
||||
* @param botConfig SPT Bot Config
|
||||
*/
|
||||
private pmcDifficulty(botConfig: IBotConfig): void
|
||||
{
|
||||
botConfig.pmc.difficulty = this.modConfig.bots.pmcDifficulty;
|
||||
}
|
||||
|
||||
private safeHeight(tables: IDatabaseTables): void
|
||||
{
|
||||
tables.globals.config.Health.Falling.SafeHeight = this.modConfig.globals.safeHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
module.exports = { mod: new ValensAIO() }
|
149
Valens-AIO/src/raid.ts
Normal file
149
Valens-AIO/src/raid.ts
Normal file
@ -0,0 +1,149 @@
|
||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||
|
||||
export class Raid
|
||||
{
|
||||
private modConfig = require("../config/config.json")
|
||||
private logger: ILogger;
|
||||
private tables: IDatabaseTables;
|
||||
private inRaidConfig: IInRaidConfig;
|
||||
|
||||
constructor(logger:ILogger, databaseServer: DatabaseServer, inRaidConfig: IInRaidConfig)
|
||||
{
|
||||
this.logger = logger;
|
||||
this.tables = databaseServer.getTables();
|
||||
this.inRaidConfig = inRaidConfig;
|
||||
this.modConfig = this.modConfig.raid;
|
||||
}
|
||||
|
||||
updateRaid(): void
|
||||
{
|
||||
if (this.modConfig.fixOpenZones)
|
||||
{
|
||||
this.fixOpenZones();
|
||||
this.logger.info(`Open Zones: ${this.modConfig.raid.fixOpenZones}.`)
|
||||
}
|
||||
|
||||
if (this.modConfig.chompiesBossFix)
|
||||
{
|
||||
this.chompiesBossFix();
|
||||
this.logger.info(`Chompies Boss Fix: ${this.modConfig.raid.chompiesBossFix}.`)
|
||||
}
|
||||
|
||||
if (this.modConfig.timeLimit)
|
||||
{
|
||||
this.raidTimeLimit();
|
||||
this.logger.info(`Raid Time Limits set to ${this.modConfig.raid.timeLimit} minutes.`);
|
||||
}
|
||||
|
||||
if (this.modConfig.aiAmount.toLowerCase() != "asonline"
|
||||
||this.modConfig.aiDifficulty.toLowerCase() != "asonline"
|
||||
||this.modConfig.bossEnabled != true
|
||||
||this.modConfig.scavWars != false
|
||||
||this.modConfig.taggedAndCursed != false
|
||||
||this.modConfig.enablePve != false)
|
||||
{
|
||||
this.raidDifficulty();
|
||||
this.logger.info(`AI Amount set to ${this.modConfig.aiAmount}`);
|
||||
this.logger.info(`AI Difficulty set to ${this.modConfig.aiDifficulty}`);
|
||||
this.logger.info(`Boss Enabled set to ${this.modConfig.bossEnabled}`);
|
||||
this.logger.info(`Scav Wars set to ${this.modConfig.scavWars}`);
|
||||
this.logger.info(`Tagged And Cursed set to ${this.modConfig.taggedAndCursed}`);
|
||||
this.logger.info(`Enable PvE set to ${this.modConfig.enablePve}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.carExtractBaseStandingGain != 0.25)
|
||||
{
|
||||
this.carExtractsGain();
|
||||
this.logger.info(`Car Extract Base Standing Gain set to ${this.modConfig.carExtractBaseStandingGain}`);
|
||||
}
|
||||
|
||||
if (this.modConfig.scavExtractGain != 0.01)
|
||||
{
|
||||
this.scavExtractGain();
|
||||
this.logger.info(`Scav Extract Gain set to ${this.modConfig.scavExtractGain}`);
|
||||
}
|
||||
}
|
||||
|
||||
private fixOpenZones(): void
|
||||
{
|
||||
const zones =
|
||||
{
|
||||
"bigmap": "ZoneBrige,ZoneCrossRoad,ZoneDormitory,ZoneGasStation,ZoneFactoryCenter,ZoneFactorySide,ZoneOldAZS,ZoneSnipeBrige,ZoneSnipeTower,ZoneSnipeFactory,ZoneBlockPost,ZoneBlockPostSniper,ZoneBlockPostSniper3,ZoneBlockPost,ZoneTankSquare,ZoneWade,ZoneCustoms,ZoneScavBase",
|
||||
"laboratory": "BotZoneFloor1,BotZoneFloor2,BotZoneBasement",
|
||||
"rezervbase": "ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBunkerStorage,ZoneSubStorage,ZoneSubCommand",
|
||||
"woods": "ZoneRedHouse,ZoneWoodCutter,ZoneHouse,ZoneBigRocks,ZoneRoad,ZoneMiniHouse,ZoneScavBase2,ZoneBrokenVill,ZoneClearVill,ZoneHighRocks",
|
||||
"shoreline": "ZoneSanatorium1,ZoneSanatorium2,ZonePassFar,ZonePassClose,ZoneTunnel,ZoneStartVillage,ZoneBunker,ZoneGreenHouses,ZoneIsland,ZoneGasStation,ZoneMeteoStation,ZonePowerStation,ZoneBusStation,ZoneRailWays,ZonePort,ZoneForestTruck,ZoneForestSpawn,ZoneForestGasStation",
|
||||
"lighthouse": "Zone_TreatmentContainers,Zone_LongRoad,Zone_Blockpost,Zone_TreatmentBeach,Zone_Hellicopter,Zone_RoofContainers,Zone_Village,Zone_OldHouse,Zone_RoofRocks,Zone_DestroyedHouse,Zone_Chalet,Zone_SniperPeak,Zone_RoofBeach,Zone_Containers,Zone_TreatmentRocks,Zone_Rocks"
|
||||
}
|
||||
|
||||
for (const location in zones)
|
||||
{
|
||||
this.tables.locations[location].base.OpenZones = zones[location];
|
||||
}
|
||||
}
|
||||
|
||||
private chompiesBossFix(): void
|
||||
{
|
||||
const labsBosses = this.tables.locations.laboratory.base.BossLocationSpawn;
|
||||
const reserveBosses = this.tables.locations.rezervbase.base.BossLocationSpawn;
|
||||
const spawn1 = labsBosses.find(x => x.TriggerId === "autoId_00008_EXFIL");
|
||||
if (spawn1)
|
||||
{
|
||||
spawn1.TriggerId = "00404";
|
||||
}
|
||||
|
||||
const spawn2 = labsBosses.find(x => x.TriggerId === "autoId_00010_EXFIL");
|
||||
if (spawn2)
|
||||
{
|
||||
spawn2.TriggerId = "00409";
|
||||
}
|
||||
|
||||
const spawn3 = reserveBosses.find(x => x.TriggerId === "00457");
|
||||
if (spawn3)
|
||||
{
|
||||
spawn3.TriggerId = "autoId_00632_EXFIL";
|
||||
}
|
||||
|
||||
const spawn4 = reserveBosses.find(x => x.TriggerId === "00452");
|
||||
if (spawn4)
|
||||
{
|
||||
spawn4.TriggerId = "autoId_00000_D2_LEVER";
|
||||
}
|
||||
}
|
||||
|
||||
private raidTimeLimit(): void
|
||||
{
|
||||
const maps = this.tables.locations;
|
||||
|
||||
for (const map in maps)
|
||||
{
|
||||
if (this.tables.locations[map].base?.EscapeTimeLimit)
|
||||
{
|
||||
this.tables.locations[map].base.EscapeTimeLimit = this.modConfig.raid.timeLimit;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private raidDifficulty(): void
|
||||
{
|
||||
this.inRaidConfig.raidMenuSettings.aiAmount = this.modConfig.aiAmount
|
||||
this.inRaidConfig.raidMenuSettings.aiDifficulty = this.modConfig.aiDifficulty
|
||||
this.inRaidConfig.raidMenuSettings.bossEnabled = this.modConfig.bossEnabled
|
||||
this.inRaidConfig.raidMenuSettings.scavWars = this.modConfig.scavWars
|
||||
this.inRaidConfig.raidMenuSettings.taggedAndCursed = this.modConfig.taggedAndCursed
|
||||
this.inRaidConfig.raidMenuSettings.enablePve = this.modConfig.enablePve
|
||||
}
|
||||
|
||||
private carExtractsGain(): void
|
||||
{
|
||||
this.inRaidConfig.carExtractBaseStandingGain = this.modConfig.carExtractBaseStandingGain;
|
||||
}
|
||||
|
||||
private scavExtractGain(): void
|
||||
{
|
||||
this.inRaidConfig.scavExtractGain = this.modConfig.scavExtractGain;
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user