Added new features for v1.1.0
This commit is contained in:
parent
74a8df2cbc
commit
d3d1ef149e
Binary file not shown.
@ -1,39 +1,73 @@
|
|||||||
{
|
{
|
||||||
|
"DebugMode": false,
|
||||||
|
|
||||||
|
"ammo":
|
||||||
|
{
|
||||||
|
"ammoStacks":
|
||||||
|
{
|
||||||
|
"grenadeCartridges": 1,
|
||||||
|
"marksmanCartridges": 40,
|
||||||
|
"pistolCartridges": 50,
|
||||||
|
"rifleCartridges": 60,
|
||||||
|
"shotgunCartridges": 20
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
"bots":
|
"bots":
|
||||||
{
|
{
|
||||||
"containersOnBots": true,
|
"bossChance":
|
||||||
"chanceSameSideIsHostilePercent": 50,
|
{
|
||||||
"isUsec": 50,
|
"activated": false,
|
||||||
"maxBackpackLootTotalRub": 150000,
|
"chance": 100
|
||||||
|
},
|
||||||
|
|
||||||
"maxBotCap": 20,
|
"maxBotCap": 20,
|
||||||
|
|
||||||
|
"pmc":
|
||||||
|
{
|
||||||
|
"chanceSameSideIsHostilePercent": 50,
|
||||||
|
"containersOnPMCs": true,
|
||||||
|
"isUsec": 50,
|
||||||
|
"lootNValue": 3,
|
||||||
|
"maxBackpackLootTotalRub": 150000,
|
||||||
"maxPocketLootTotalRub": 50000,
|
"maxPocketLootTotalRub": 50000,
|
||||||
"maxVestLootTotalRub": 50000,
|
"maxVestLootTotalRub": 50000,
|
||||||
"pmcDifficulty": "AsOnline",
|
"pmcDifficulty": "AsOnline",
|
||||||
"pmcNValue": 1.7,
|
|
||||||
"scavNValue": 2
|
"convertIntoPmcChance": {
|
||||||
|
"assault": {
|
||||||
|
"min": 15,
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
"cursedassault": {
|
||||||
|
"min": 15,
|
||||||
|
"max": 40
|
||||||
|
},
|
||||||
|
"pmcbot": {
|
||||||
|
"min": 15,
|
||||||
|
"max": 30
|
||||||
|
},
|
||||||
|
"exusec": {
|
||||||
|
"min": 5,
|
||||||
|
"max": 20
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
"scav":
|
||||||
|
{
|
||||||
|
"lootNValue": 4
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"flea":
|
"flea":
|
||||||
{
|
{
|
||||||
"minUserLevel": 15,
|
"minUserLevel": 15,
|
||||||
|
|
||||||
"time":
|
"blacklist":
|
||||||
{
|
{
|
||||||
"baseSellTime": 15,
|
"enableBsgList": true,
|
||||||
"minSellTime": 5,
|
"enableQuestList": true
|
||||||
"maxSellTime": 15
|
|
||||||
},
|
|
||||||
|
|
||||||
"reputation":
|
|
||||||
{
|
|
||||||
"gain": 0.0000002,
|
|
||||||
"loss": 0.0000002
|
|
||||||
},
|
|
||||||
|
|
||||||
"offerItemCount":
|
|
||||||
{
|
|
||||||
"min": 8,
|
|
||||||
"max": 15
|
|
||||||
},
|
},
|
||||||
|
|
||||||
"condition":
|
"condition":
|
||||||
@ -50,18 +84,49 @@
|
|||||||
"euros": 2
|
"euros": 2
|
||||||
},
|
},
|
||||||
|
|
||||||
"blacklist":
|
"offerItemCount":
|
||||||
{
|
{
|
||||||
"enableBsgList": true,
|
"min": 8,
|
||||||
"enableQuestList": true
|
"max": 15
|
||||||
|
},
|
||||||
|
|
||||||
|
"reputation":
|
||||||
|
{
|
||||||
|
"gain": 0.0000002,
|
||||||
|
"loss": 0.0000002
|
||||||
|
},
|
||||||
|
|
||||||
|
"time":
|
||||||
|
{
|
||||||
|
"baseSellTime": 15,
|
||||||
|
"minSellTime": 5,
|
||||||
|
"maxSellTime": 15
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"globals":
|
"globals":
|
||||||
{
|
{
|
||||||
|
|
||||||
"damagePerMeter": 9,
|
"damagePerMeter": 9,
|
||||||
"safeHeight": 3,
|
"safeHeight": 3,
|
||||||
"maxTraders": false
|
"maxLoyaltyTraders": false,
|
||||||
|
"timeBeforeDeployLocal": 10,
|
||||||
|
|
||||||
|
"match_end":
|
||||||
|
{
|
||||||
|
"survived_exp_requirement": 200,
|
||||||
|
"survived_seconds_requirement": 420,
|
||||||
|
"survived_exp_reward": 300,
|
||||||
|
"mia_exp_reward": 200,
|
||||||
|
"runner_exp_reward": 200,
|
||||||
|
"leftMult": 0,
|
||||||
|
"miaMult": 1,
|
||||||
|
"survivedMult": 1.3,
|
||||||
|
"runnerMult": 0.5,
|
||||||
|
"killedMult": 1,
|
||||||
|
"headShotMult": 1.2,
|
||||||
|
"expOnDamageAllHealth": 50
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
"hideout":
|
"hideout":
|
||||||
@ -115,14 +180,20 @@
|
|||||||
"horizontal": 10
|
"horizontal": 10
|
||||||
},
|
},
|
||||||
|
|
||||||
"examineByDefault": false,
|
"examinedByDefault": false,
|
||||||
"removeBackpackFilter": true,
|
"removeBackpackFilter": true,
|
||||||
"weightModifier": 1,
|
"weightModifier": 1,
|
||||||
"roublesMaxStack": 500000,
|
"roublesMaxStack": 500000,
|
||||||
"dollarsMaxStack": 50000,
|
"dollarsMaxStack": 50000,
|
||||||
"eurosMaxStack": 50000,
|
"eurosMaxStack": 50000
|
||||||
|
},
|
||||||
|
|
||||||
"ammoStacks": 100
|
"locations":
|
||||||
|
{
|
||||||
|
"allExtractsAvailable": false,
|
||||||
|
"exfilTime": 8,
|
||||||
|
"extractionsExtended": false,
|
||||||
|
"noExtractRestrictions": false
|
||||||
},
|
},
|
||||||
|
|
||||||
"loot":
|
"loot":
|
||||||
@ -134,16 +205,25 @@
|
|||||||
|
|
||||||
"raid":
|
"raid":
|
||||||
{
|
{
|
||||||
"timeLimit": 60,
|
"carExtractBaseStandingGain": 0.25,
|
||||||
"fixOpenZones": true,
|
|
||||||
"chompiesBossFix": true,
|
"chompiesBossFix": true,
|
||||||
|
"fixOpenZones": true,
|
||||||
|
"scavExtractGain": 0.01,
|
||||||
|
"timeLimit": 60,
|
||||||
"aiAmount": "AsOnline",
|
"aiAmount": "AsOnline",
|
||||||
"aiDifficulty": "AsOnline",
|
"aiDifficulty": "AsOnline",
|
||||||
"bossEnabled": true,
|
"bossEnabled": true,
|
||||||
"scavWars": false,
|
"scavWars": false,
|
||||||
"taggedAndCursed": false,
|
"taggedAndCursed": false,
|
||||||
"enablePve": true,
|
"enablePve": true
|
||||||
"carExtractBaseStandingGain": 0.25,
|
},
|
||||||
"scavExtractGain": 0.01
|
|
||||||
|
"prewipe_events":
|
||||||
|
{
|
||||||
|
"allBossesOnReserve": false,
|
||||||
|
"allTradersSellCheapItems": false,
|
||||||
|
"glukharOnLabs": false,
|
||||||
|
"killaOnFactory": false,
|
||||||
|
"makeObdolbosPowerful": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Valens-AIO",
|
"name": "Valens-AIO",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"main": "src/mod.js",
|
"main": "src/mod.js",
|
||||||
"license": "CC BY-NC-ND 4.0",
|
"license": "CC BY-NC-ND 4.0",
|
||||||
"author": "Valens",
|
"author": "Valens",
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
/*import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
/*import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { Logger } from "./logger";
|
||||||
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
import { IAirdropConfig } from "@spt-aki/models/spt/config/IAirdropConfig";
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
|
||||||
export class Airdrop
|
export class Airdrop
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.jsonc");
|
private modConfig = require("../config/config.jsonc");
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private tables: IDatabaseTables;
|
private tables: IDatabaseTables;
|
||||||
private airdropConfig: IAirdropConfig;
|
private airdropConfig: IAirdropConfig;
|
||||||
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
constructor(logger: Logger, databaseServer: DatabaseServer, airdropConfig: IAirdropConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer.getTables();
|
this.tables = databaseServer.getTables();
|
||||||
@ -21,7 +21,12 @@ export class Airdrop
|
|||||||
{
|
{
|
||||||
if (this.modConfig.airdropChancePercent != 25)
|
if (this.modConfig.airdropChancePercent != 25)
|
||||||
{
|
{
|
||||||
this.airdropChance();
|
this.airdropConfig.airdropChancePercent["bigmap"] = this.modConfig.airdrop.airdropChancePercent.bigmap;
|
||||||
|
this.airdropConfig.airdropChancePercent["woods"] = this.modConfig.airdrop.airdropChancePercent.woods;
|
||||||
|
this.airdropConfig.airdropChancePercent["lighthouse"] = this.modConfig.airdrop.airdropChancePercent.lighthouse;
|
||||||
|
this.airdropConfig.airdropChancePercent["shoreline"] = this.modConfig.airdrop.airdropChancePercent.shoreline;
|
||||||
|
this.airdropConfig.airdropChancePercent["interchange"] = this.modConfig.airdrop.airdropChancePercent.interchange;
|
||||||
|
this.airdropConfig.airdropChancePercent["reserve"] = this.modConfig.airdrop.airdropChancePercent.reserve;
|
||||||
this.logger.info(`Customs Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.bigmap}`);
|
this.logger.info(`Customs Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.bigmap}`);
|
||||||
this.logger.info(`Woods Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.woods}`);
|
this.logger.info(`Woods Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.woods}`);
|
||||||
this.logger.info(`Lighthouse Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.lighthouse}`);
|
this.logger.info(`Lighthouse Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.lighthouse}`);
|
||||||
@ -30,16 +35,5 @@ export class Airdrop
|
|||||||
this.logger.info(`Reserve Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.reserve}`);
|
this.logger.info(`Reserve Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.reserve}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private airdropChance();
|
|
||||||
{
|
|
||||||
this.airdropConfig.airdropChancePercent["bigmap"] = this.modConfig.airdrop.airdropChancePercent.bigmap;
|
|
||||||
this.airdropConfig.airdropChancePercent["woods"] = this.modConfig.airdrop.airdropChancePercent.woods;
|
|
||||||
this.airdropConfig.airdropChancePercent["lighthouse"] = this.modConfig.airdrop.airdropChancePercent.lighthouse;
|
|
||||||
this.airdropConfig.airdropChancePercent["shoreline"] = this.modConfig.airdrop.airdropChancePercent.shoreline;
|
|
||||||
this.airdropConfig.airdropChancePercent["interchange"] = this.modConfig.airdrop.airdropChancePercent.interchange;
|
|
||||||
this.airdropConfig.airdropChancePercent["reserve"] = this.modConfig.airdrop.airdropChancePercent.reserve;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
*/
|
*/
|
67
Valens-AIO/src/ammo.ts
Normal file
67
Valens-AIO/src/ammo.ts
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import { Grenade, MarksmanCaliber, PistolCaliber, RifleCaliber, Shotguns } from "./ammotypes";
|
||||||
|
|
||||||
|
export class Ammo
|
||||||
|
{
|
||||||
|
private modConfig = require("../config/config.json")
|
||||||
|
private logger: Logger;
|
||||||
|
private databaseServer: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer;
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateAmmo(): void
|
||||||
|
{
|
||||||
|
const items = this.databaseServer.getTables().templates.items;
|
||||||
|
const mod = this.modConfig.ammo;
|
||||||
|
|
||||||
|
if (mod.ammoStacks.grenadeCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(Grenade))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.grenadeCartridges
|
||||||
|
this.logger.info(`Grenade Cartridges Max Stacks set to ${mod.ammoStacks.grenadeCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.marksmanCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(MarksmanCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.marksmanCartridges
|
||||||
|
this.logger.info(`Marksman Cartridges Max Stacks set to ${mod.ammoStacks.marksmanCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.pistolCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(PistolCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.pistolCartridges
|
||||||
|
this.logger.info(`Pistol Cartridges Max Stacks set to ${mod.ammoStacks.pistolCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.rifleCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(RifleCaliber))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.rifleCartridges
|
||||||
|
this.logger.info(`Rifle Cartridges Max Stacks set to ${mod.ammoStacks.rifleCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.ammoStacks.shotgunCartridges != 1)
|
||||||
|
{
|
||||||
|
for (const value of Object.values(Shotguns))
|
||||||
|
{
|
||||||
|
items[value]._props.StackMaxSize = mod.ammoStacks.shotgunCartridges
|
||||||
|
this.logger.info(`Shotgun Cartridges Max Stacks set to ${mod.ammoStacks.shotgunCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
188
Valens-AIO/src/ammotypes.ts
Normal file
188
Valens-AIO/src/ammotypes.ts
Normal file
@ -0,0 +1,188 @@
|
|||||||
|
export enum Grenade
|
||||||
|
{
|
||||||
|
M386_HE_GRENADE = "5ede475b549eed7c6d5c18fb",
|
||||||
|
M576_MP_APERS_GRENADE = "5ede475339ee016e8c534742",
|
||||||
|
M433_HEDP_GRENADE = "5f0c892565703e5c461894e9",
|
||||||
|
M406_HE_GRENADE = "5ede4739e0350d05467f73e8",
|
||||||
|
M381_HE_GRENADE = "5ede474b0c226a66f5402622",
|
||||||
|
M441_HE_GRENADE = "5ede47405b097655935d7d16"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum MarksmanCaliber
|
||||||
|
{
|
||||||
|
M62_TRACER = "5a608bf24f39f98ffc77720e",
|
||||||
|
M80 = "58dd3ad986f77403051cba8f",
|
||||||
|
M61 = "5a6086ea4f39f99cd479502f",
|
||||||
|
BCP_FMJ = "5e023e53d4353e3302577c4c",
|
||||||
|
ULTRA_NOSLER = "5e023e88277cce2b522ff2b1",
|
||||||
|
TCW_SP = "5e023e6e34d52a55c3304f71",
|
||||||
|
M993 = "5e023e6e34d52a55c3304f71",
|
||||||
|
TAC_X = "5fc382b6d6fa9c00c571bbc3",
|
||||||
|
UCW = "5fc382c1016cce60e8341b20",
|
||||||
|
AP = "5fc382a9d724d907e2077dab",
|
||||||
|
FMJ = "5fc275cf85fd526b824a571a",
|
||||||
|
SNB_GZH = "560d61e84bdc2da74d8b4571",
|
||||||
|
LPS_GZH = "5887431f2459777e1612938f",
|
||||||
|
PS_GZH = "59e77a2386f7742ee578960a",
|
||||||
|
T46M_GZH = "5e023cf8186a883be655e54f",
|
||||||
|
BT_GZH = "5e023d34e8a400319a28ed44",
|
||||||
|
BS_GZH = "5e023d48186a883be655e551"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum PistolCaliber
|
||||||
|
{
|
||||||
|
AP_SX = "5ba26835d4351e0035628ff5",
|
||||||
|
ACTION_SX = "5ba26812d4351e003201fef1",
|
||||||
|
FMJ_SX = "5ba2678ad4351e44f824b344",
|
||||||
|
SUBSONIC_SX = "5ba26844d4351e00334c9475",
|
||||||
|
SS198LF = "5cc80f79e4a949033c7343b2",
|
||||||
|
R37_F = "5cc86832d7f00c000d3a6e6c",
|
||||||
|
SS190 = "5cc80f38e4a949001152b560",
|
||||||
|
R37_X = "5cc86840d7f00c002412c56c",
|
||||||
|
L191 = "5cc80f53e4a949000e1ea4f8",
|
||||||
|
SS197SR = "5cc80f8fe4a949033b0224a2",
|
||||||
|
SB193 = "5cc80f67e4a949035e43bbba",
|
||||||
|
FMJ43 = "5735ff5c245977640e39ba7e",
|
||||||
|
LRN = "573601b42459776410737435",
|
||||||
|
P_GL = "5736026a245977644601dc61",
|
||||||
|
PST_GZH762 = "573603562459776430731618",
|
||||||
|
LRNPC = "573602322459776445391df1",
|
||||||
|
AKBS = "5735fdcd2459776445391d61",
|
||||||
|
PT_GZH = "573603c924597764442bd9cb",
|
||||||
|
PM_SP8_GZH = "5737218f245977612125ba51",
|
||||||
|
P_GZH18 = "573719762459775a626ccbc1",
|
||||||
|
PSTM_GZH = "57371aab2459775a77142f22",
|
||||||
|
RG028_GZH = "573720e02459776143012541",
|
||||||
|
BZHT_GZH = "573718ba2459775a75491131",
|
||||||
|
PM_PSV = "5737207f24597760ff7b25f2",
|
||||||
|
SP7_GZH = "57372140245977611f70ee91",
|
||||||
|
PBM_GZH = "573719df2459775a626ccbc2",
|
||||||
|
PSO_GZH18 = "57371f8d24597761006c6a81",
|
||||||
|
PST_GZH18 = "5737201124597760fc4431f1",
|
||||||
|
PS_GS_PPO = "57371f2b24597761224311f1",
|
||||||
|
PRS_GS = "57371eb62459776125652ac1",
|
||||||
|
PPT_GZH = "57371e4124597760ff7b25f1",
|
||||||
|
PPE_GZH = "57371b192459775a9f58a5e0",
|
||||||
|
PSO_GZH = "58864a4f2459770fcc257101",
|
||||||
|
PST_GZH19 = "56d59d3ad2720bdb418b4577",
|
||||||
|
GREEN_TRACER = "5c3df7d588a4501f290594e5",
|
||||||
|
RIP19 = "5c0d56a986f774449d5de529",
|
||||||
|
AP_63 = "5c925fa22e221601da359b7b",
|
||||||
|
LUGER_CCI = "5a3c16fe86f77452b62de32a",
|
||||||
|
PBP_GZH = "5efb0da7a29a85116f6ea05f",
|
||||||
|
QUAKEMAKER = "5efb0e16aeb21837e749c7ff",
|
||||||
|
P_GZH = "5a26abfac4a28232980eabff",
|
||||||
|
PS_GZH = "5a269f97c4a282000b151807",
|
||||||
|
PE_GZH = "5a26ac06c4a282000c5a90a8",
|
||||||
|
BT_GZH = "5a26ac0ec4a28200741e1e18",
|
||||||
|
FMJ = "62330b3ed4dc74626d570b95",
|
||||||
|
HOLLOW_POINT = "62330bfadc5883093563729b",
|
||||||
|
SOFT_POINT = "62330c40bdd19b369e1e53d1",
|
||||||
|
JACKET_HP = "62330c18744e5e31df12f516",
|
||||||
|
MATCH_FMJ = "5e81f423763d9f754677bf2e",
|
||||||
|
HYDRA_SHOK = "5efb0fc6aeb21837e749c801",
|
||||||
|
LASERMATCH_FMJ = "5efb0d4f4bc50b58e81710f3",
|
||||||
|
AP = "5efb0cabfb3e451d70735af5",
|
||||||
|
RIP45 = "5ea2a8e200685063ec28c05a"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum RifleCaliber
|
||||||
|
{
|
||||||
|
PS_GS = "56dff3afd2720bba668b4567",
|
||||||
|
SP = "56dff421d2720b5f5a8b4567",
|
||||||
|
PPBS_GS_IGOLNIK = "5c0d5e4486f77478390952fe",
|
||||||
|
PRS_GS = "56dff338d2720bbd668b4569",
|
||||||
|
BT_GS = "56dff061d2720bb5668b4567",
|
||||||
|
US_GS = "56dff4ecd2720b5f5a8b4568",
|
||||||
|
BP_GS_545 = "56dfef82d2720bbd668b4567",
|
||||||
|
HP_545 = "56dff216d2720bbd668b4568",
|
||||||
|
BS_GS = "56dff026d2720bb8668b4567",
|
||||||
|
T_GS = "56dff4a2d2720bbd668b456a",
|
||||||
|
PP_GS = "56dff2ced2720bb4668b4567",
|
||||||
|
FMJ_545 = "56dff0bed2720bb0668b4567",
|
||||||
|
M856 = "59e68f6f86f7746c9f75e846",
|
||||||
|
MK255_MOD_0_RRLP = "59e6918f86f7746c9f75e849",
|
||||||
|
M995 = "59e690b686f7746c9f75e848",
|
||||||
|
M855A1 = "54527ac44bdc2d36668b4567",
|
||||||
|
M856A1 = "59e6906286f7746c9f75e847",
|
||||||
|
M855 = "54527a984bdc2d4e668b4567",
|
||||||
|
HP_556 = "59e6927d86f77411da468256",
|
||||||
|
FMJ_556 = "59e6920f86f77411d82aa167",
|
||||||
|
WARMAGEDDON = "5c0d5ae286f7741e46554302",
|
||||||
|
MK_318_MOD_0_SOST = "60194943740c5d77f6705eea",
|
||||||
|
SSA_AP = "601949593ae8f707c4608daa",
|
||||||
|
M62_TRACER = "619636be6db0f2477964e710",
|
||||||
|
BCP_FMJ = "5fbe3ffdf8b6a877a729ea82",
|
||||||
|
AP = "5fd20ff893a8961fc660a954",
|
||||||
|
V_MAX = "6196364158ef8c428c287d9f",
|
||||||
|
WHISPER = "6196365d58ef8c428c287da1",
|
||||||
|
PS_GZH = "5656d7c34bdc2d9d198b4587",
|
||||||
|
HP_762 = "59e4d3d286f774176a36250a",
|
||||||
|
US_GZH = "59e4d24686f7741776641ac7",
|
||||||
|
T45M1_GZH = "59e4cf5286f7741778269d8a",
|
||||||
|
BP_GZH = "59e0d99486f7744a32234762",
|
||||||
|
MAI_AP = "601aa3d2b2bcb34913271e6d",
|
||||||
|
SP5_GS = "57a0dfb82459774d3078b56c",
|
||||||
|
BP_GS = "5c0d688c86f77413ae3407b2",
|
||||||
|
SP6_GS = "57a0e5022459774d1673f889",
|
||||||
|
SPP_GS = "5c0d668f86f7747ccb7f13b2",
|
||||||
|
PAB9_GS = "61962d879bb3d20b0946d385",
|
||||||
|
FMJ_366 = "59e6542b86f77411dc52a77a",
|
||||||
|
GEKSA = "59e6658b86f77411d949b250",
|
||||||
|
EKO = "59e655cb86f77411dc52a77b",
|
||||||
|
APM = "5f0596629e22f464da6bbdd9",
|
||||||
|
PS12 = "5cadf6ddae9215051e1c23b2",
|
||||||
|
PS12B = "5cadf6eeae921500134b2799",
|
||||||
|
PS12A = "5cadf6e5ae921500113bb973"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Shotguns
|
||||||
|
{
|
||||||
|
BUCKSHOT_7MM = "560d5e524bdc2d25448b4571",
|
||||||
|
MAGNUM_85MM = "5d6e6806a4b936088465b17e",
|
||||||
|
RIP = "5c0d591486f7744c505b416f",
|
||||||
|
BMG_SLUG_50CAL = "5d6e68c4a4b9361b93413f79",
|
||||||
|
BUCKSHOT_525MM = "5d6e6772a4b936088465b17c",
|
||||||
|
EXPRESS_65MM = "5d6e67fba4b9361bc73bc779",
|
||||||
|
FLECHETTE = "5d6e6911a4b9361bd5780d52",
|
||||||
|
FTX_CUSTOM_LITE_SLUG = "5d6e68e6a4b9361c140bcfe0",
|
||||||
|
AP20_ARMOR_PIERCING_SLUG = "5d6e68a8a4b9360b6c0d54e2",
|
||||||
|
DUAL_SABOT_SLUG = "5d6e68dea4b9361bcc29e659",
|
||||||
|
POLEVA_6U_SLUG_12GA = "5d6e689ca4b9361bc8618956",
|
||||||
|
POLEVA_3_SLUG_12GA = "5d6e6891a4b9361bd473feea",
|
||||||
|
GRIZZLY_40_SLUG = "5d6e6869a4b9361c140bcfde",
|
||||||
|
SUPERFORMANCE_HP_SLUG = "5d6e68d1a4b93622fe60e845",
|
||||||
|
COPPER_SABOT_PREMIER_HP_SLUG = "5d6e68b3a4b9361bca7e50b5",
|
||||||
|
LEAD_SLUG = "58820d1224597753c90aeb13",
|
||||||
|
BUCKSHOT_75MM = "5a38ebd9c4a282000d722a5b",
|
||||||
|
STAR_SLUG = "5d6e6a05a4b93618084f58d0",
|
||||||
|
BUCKSHOT_73MM = "5d6e69c7a4b9360b6c0d54e4",
|
||||||
|
DEVASTATOR_SLUG = "5d6e6a5fa4b93614ec501745",
|
||||||
|
BUCKSHOT_56MM = "5d6e6a5fa4b93614ec501745",
|
||||||
|
POLEVA_6U_SLUG_20GA = "5d6e6a42a4b9364f07165f52",
|
||||||
|
POLEVA_3_SLUG_20GA = "5d6e6a53a4b9361bd473feec",
|
||||||
|
BUCKSHOT_62MM = "5d6e69b9a4b9361bc8618958",
|
||||||
|
SHRAPNEL10_BUCKSHOT = "5e85a9a6eacf8c039e4e2ac1",
|
||||||
|
SHRAPNEL25_BUCKSHOT = "5f647f31b6238e5dd066e196",
|
||||||
|
ZVEZDA_FLASHBANG = "5e85a9f4add9fe03027d9bf1",
|
||||||
|
BARRIKADA_SLUG = "5e85aa1a988a8701445df1f5"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo30x29
|
||||||
|
{
|
||||||
|
VOG_30 = "5d70e500a4b9364de70d38ce"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo127x108
|
||||||
|
{
|
||||||
|
B32 = "5cde8864d7f00c0010373be1",
|
||||||
|
BZT_44M = "5d2f2ab648f03550091993ca"
|
||||||
|
}
|
||||||
|
|
||||||
|
export enum Ammo26x75
|
||||||
|
{
|
||||||
|
GREEN_FLARE = "62389aaba63f32501b1b444f",
|
||||||
|
RED_FLARE = "62389ba9a63f32501b1b4451",
|
||||||
|
WHITE_FLARE = "62389bc9423ed1685422dc57",
|
||||||
|
YELLOW_FLARE = "62389be94d5d474bf712e709"
|
||||||
|
}
|
@ -1,95 +1,360 @@
|
|||||||
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
|
||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
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 { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
import type { BossLocationSpawn } from "@spt-aki/models/eft/common/ILocationBase";
|
||||||
|
import { Traders } from "./traders";
|
||||||
|
import { Money } from "@spt-aki/models/enums/Money"
|
||||||
|
|
||||||
export class Bots
|
export class Bots
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json")
|
private modConfig = require("../config/config.json")
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private botConfig: IBotConfig;
|
private botConfig: IBotConfig;
|
||||||
private tables: IDatabaseTables;
|
private tables: IDatabaseTables;
|
||||||
|
private traders: Traders;
|
||||||
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer, botConfig: IBotConfig)
|
constructor(logger: Logger, databaseServer: DatabaseServer, botConfig: IBotConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.botConfig = botConfig;
|
this.botConfig = botConfig;
|
||||||
this.tables = databaseServer.getTables();
|
this.tables = databaseServer.getTables();
|
||||||
|
this.traders = databaseServer.getTables().traders;
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateBots(): void
|
public updateBots(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.bots.pmcDifficulty.toLowerCase() != "asonline")
|
|
||||||
|
const mod = this.modConfig.bots;
|
||||||
|
|
||||||
|
// Changes PMC difficulty to Easy, Normal, Hard, Impossible or AsOnline. Default AsOnline.
|
||||||
|
if (mod.pmc.pmcDifficulty.toLowerCase() != "AsOnline")
|
||||||
{
|
{
|
||||||
this.pmcDifficulty();
|
this.botConfig.pmc.difficulty = mod.pmcDifficulty;
|
||||||
this.logger.info(`PMC Bot Difficulty set to ${this.modConfig.bots.pmcDifficulty}`);
|
this.logger.info(`PMC Bot Difficulty set to ${mod.pmcDifficulty}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.containersOnBots)
|
// Enables common and secure containers to spawn on PMCs while additionally whitelisting the parent IDs. Rarity adjusted via PMC lootNValue. Default true.
|
||||||
|
if (mod.pmc.containersOnPMCs)
|
||||||
{
|
{
|
||||||
this.containersOnBots();
|
this.containersOnPMCs();
|
||||||
this.logger.info(`Containers On Bots: ${this.modConfig.bots.containersOnBots}`);
|
this.logger.info(`Containers On PMCs: ${mod.pmc.containersOnPMCs}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.isUsec != 50)
|
// Chance that PMC bot will be USEC or BEAR. Higher value means higher chance for the PMC to be USEC. Default is 50%
|
||||||
|
if (mod.pmc.isUsec != 50)
|
||||||
{
|
{
|
||||||
this.isUsec();
|
this.botConfig.pmc.isUsec = mod.isUsec;
|
||||||
this.logger.info(`isUsec Chance is: ${this.modConfig.bots.isUsec}`);
|
this.logger.info(`PMC isUsec Chance is: ${mod.isUsec}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.maxBackpackLootTotalRub != 150000
|
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
||||||
|| this.modConfig.bots.maxPocketLootTotalRub !=50000
|
if (mod.pmc.maxBackpackLootTotalRub != 150000
|
||||||
|| this.modConfig.bots.maxVestLootTotalRub != 50000)
|
|| mod.pmc.maxPocketLootTotalRub !=50000
|
||||||
|
|| mod.pmc.maxVestLootTotalRub != 50000)
|
||||||
{
|
{
|
||||||
this.pmcLoot();
|
this.botConfig.pmc.maxBackpackLootTotalRub = mod.pmc.maxBackpackLootTotalRub;
|
||||||
this.logger.info("PMC Loot totals changed!");
|
this.botConfig.pmc.maxPocketLootTotalRub = mod.pmc.maxPocketLootTotalRub;
|
||||||
this.logger.info(`Max Backpack Total Value: ${this.modConfig.bots.maxBackpackLootTotalRub}`);
|
this.botConfig.pmc.maxVestLootTotalRub = mod.pmc.maxVestLootTotalRub;
|
||||||
this.logger.info(`Max Pocket Total Value: ${this.modConfig.bots.maxPocketLootTotalRub}`);
|
this.logger.info("PMC Loot Value totals changed!");
|
||||||
this.logger.info(`Max Vest Total Value: ${this.modConfig.bots.maxVestLootTotalRub}`);
|
this.logger.info(`Max Backpack Total Value: ${mod.pmc.maxBackpackLootTotalRub}`);
|
||||||
|
this.logger.info(`Max Pocket Total Value: ${mod.pmc.maxPocketLootTotalRub}`);
|
||||||
|
this.logger.info(`Max Vest Total Value: ${mod.pmc.maxVestLootTotalRub}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.chanceSameSideIsHostilePercent != 50)
|
// Chance that the PMC bot of your side (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||||
|
if (mod.pmc.chanceSameSideIsHostilePercent != 50)
|
||||||
{
|
{
|
||||||
this.sameSideIsHostile();
|
this.botConfig.pmc.chanceSameSideIsHostilePercent = mod.pmc.chanceSameSideIsHostilePercent;
|
||||||
this.logger.info(`Chance Same Side Is Hostle is ${this.modConfig.bots.chanceSameSideIsHostilePercent}`);
|
this.logger.info(`Chance Same Side Is Hostle is ${mod.pmc.chanceSameSideIsHostilePercent}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.maxBotCap != 20)
|
// Max Bot Cap located in configs/bot.json/maxBotCap
|
||||||
|
if (mod.maxBotCap != 20)
|
||||||
{
|
{
|
||||||
this.maxBotCap();
|
this.botConfig.maxBotCap = mod.maxBotCap;
|
||||||
this.logger.info(`Bot Cap is now ${this.modConfig.bots.maxBotCap}`);
|
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.bots.pmcNValue != 1.7 || this.modConfig.bots.scavNValue != 2)
|
if (mod.pmc.lootNValue != 3 || mod.scav.lootNValue != 4)
|
||||||
{
|
{
|
||||||
this.lootNValue();
|
this.botConfig.lootNValue.scav = mod.scav.lootNValue;
|
||||||
this.logger.info("Loot NValue has been changed!");
|
this.botConfig.lootNValue.pmc = mod.pmc.lootNValue;
|
||||||
this.logger.info(`Scav NValue set to ${this.modConfig.bots.scavNValue}`);
|
this.logger.info("Loot NValue for bots has been changed!");
|
||||||
this.logger.info(`PMC NValue set to ${this.modConfig.bots.pmcNValue}`);
|
this.logger.info(`Scav lootNValue set to ${mod.scav.lootNValue}`);
|
||||||
|
this.logger.info(`PMC lootNValue set to ${mod.pmc.lootNValue}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mod.pmc.convertIntoPmcChance.assault.min != 15 || mod.pmc.convertIntoPmcChance.assault.max != 40
|
||||||
|
|| mod.pmc.convertIntoPmcChance.cursedassault.min != 15 || mod.pmc.convertIntoPmcChance.cursedassault.max != 40
|
||||||
|
|| mod.pmc.convertIntoPmcChance.pmcbot.min != 15 || mod.pmc.convertIntoPmcChance.pmcbot.max != 30
|
||||||
|
|| mod.pmc.convertIntoPmcChance.exusec.min != 15 || mod.pmc.convertIntoPmcChance.exusec.max != 20)
|
||||||
|
{
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.assault.min = mod.pmc.convertIntoPmcChance.assault.min;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.assault.max = mod.pmc.convertIntoPmcChance.assault.max;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.cursedassault.min = mod.pmc.convertIntoPmcChance.cursedassault.min;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.cursedassault.max = mod.pmc.convertIntoPmcChance.cursedassault.max;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.pmcbot.min = mod.pmc.convertIntoPmcChance.pmcbot.min;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.pmcbot.max = mod.pmc.convertIntoPmcChance.pmcbot.max;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.exusec.min = mod.pmc.convertIntoPmcChance.exusec.min;
|
||||||
|
this.botConfig.pmc.convertIntoPmcChance.exusec.max = mod.pmc.convertIntoPmcChance.exusec.max;
|
||||||
|
this.logger.info("Chance to Convert Bots into PMC Patched");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
// Make all bosses spawn chance configurable.
|
||||||
* Changes Bot Difficulty.
|
const locations = this.tables.locations;
|
||||||
*
|
|
||||||
* Options for PMC are Easy, Normal, Hard, Impossible, As Online.
|
if (mod.bossChance.activated)
|
||||||
*
|
|
||||||
* 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.bots.pmcDifficulty;
|
for (const i in locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
if (locations[i].base.BossLocationSpawn !== [])
|
||||||
|
{
|
||||||
|
for (const x in locations[i].base.BossLocationSpawn)
|
||||||
|
{
|
||||||
|
locations[i].base.BossLocationSpawn[x].BossChance = mod.bossChance.chance;
|
||||||
|
this.logger.info(`Boss Chance set to ${mod.bossChance.chance}`)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private containersOnBots(): void
|
// Prewipe Events
|
||||||
|
if (this.modConfig.prewipe_events.killaOnFactory)
|
||||||
{
|
{
|
||||||
const spawnPoints = this.tables.bots.types;
|
const killaWave = this.botConfig.other.createBossWave("bossKilla", 100, "followerBully", 0, locations.factory4_day.base.OpenZones);
|
||||||
const usec = spawnPoints.usec.inventory.items.Backpack;
|
this.tables.locations.factory4_day.base.BossLocationSpawn.push(killaWave);
|
||||||
const bear = spawnPoints.bear.inventory.items.Backpack;
|
locations.factory4_night.base.BossLocationSpawn.push(killaWave);
|
||||||
|
this.logger.info("Killa Prewipe Event Enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.modConfig.prewipe_events.allBossesOnReserve)
|
||||||
|
{
|
||||||
|
let bossWave = this.botConfig.other.createBossWave("bossKilla", 100, "followerBully", 0, locations.rezervbase.base.OpenZones);
|
||||||
|
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
||||||
|
bossWave = this.botConfig.other.createBossWave("bossBully", 100, "followerBully", 4, locations.rezervbase.base.OpenZones);
|
||||||
|
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
||||||
|
bossWave = this.botConfig.other.createBossWave("bossKojaniy", 100, "followerKojaniy", 2, locations.rezervbase.base.OpenZones);
|
||||||
|
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
||||||
|
bossWave = this.botConfig.other.createBossWave("bossSanitar", 100, "followerSanitar", 2, locations.rezervbase.base.OpenZones);
|
||||||
|
locations.rezervbase.base.BossLocationSpawn.push(bossWave);
|
||||||
|
this.logger.info("Bosses On Reserve Prewipe Event Enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.modConfig.prewipe_events.glukharOnLabs)
|
||||||
|
{
|
||||||
|
const glugluWave: BossLocationSpawn = {
|
||||||
|
"BossName": "bossGluhar",
|
||||||
|
"BossChance": 43,
|
||||||
|
"BossZone": "ZoneRailStrorage,ZoneRailStrorage,ZoneRailStrorage,ZonePTOR1,ZonePTOR2,ZoneBarrack,ZoneBarrack,ZoneBarrack,ZoneSubStorage",
|
||||||
|
"BossPlayer": false,
|
||||||
|
"BossDifficult": "normal",
|
||||||
|
"BossEscortType": "followerGluharAssault",
|
||||||
|
"BossEscortDifficult": "normal",
|
||||||
|
"BossEscortAmount": "0",
|
||||||
|
"Time": -1,
|
||||||
|
"TriggerId": "",
|
||||||
|
"TriggerName": "",
|
||||||
|
"Supports": [
|
||||||
|
{
|
||||||
|
"BossEscortType": "followerGluharAssault",
|
||||||
|
"BossEscortDifficult": [
|
||||||
|
"normal"
|
||||||
|
],
|
||||||
|
"BossEscortAmount": "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BossEscortType": "followerGluharSecurity",
|
||||||
|
"BossEscortDifficult": [
|
||||||
|
"normal"
|
||||||
|
],
|
||||||
|
"BossEscortAmount": "2"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BossEscortType": "followerGluharScout",
|
||||||
|
"BossEscortDifficult": [
|
||||||
|
"normal"
|
||||||
|
],
|
||||||
|
"BossEscortAmount": "2"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
|
glugluWave.BossZone = locations.laboratory.base.OpenZones;
|
||||||
|
locations.laboratory.base.BossLocationSpawn.push(glugluWave);
|
||||||
|
this.logger.info("Glukhar On Labs Prewipe Event Enabled");
|
||||||
|
}
|
||||||
|
|
||||||
|
// All cheap items on traders
|
||||||
|
if (this.modConfig.prewipe_events.allTradersSellCheapItems)
|
||||||
|
{
|
||||||
|
this.logger.info("Cheap Items On Traders Prewipe Event Enabled");
|
||||||
|
for (const trader in this.traders)
|
||||||
|
{
|
||||||
|
for (const assort in this.traders[trader].assort.barter_scheme)
|
||||||
|
{
|
||||||
|
const itemScheme = this.traders[trader].assort.barter_scheme[assort];
|
||||||
|
switch (itemScheme[0][0]._tpl)
|
||||||
|
{
|
||||||
|
case Money.ROUBLES:
|
||||||
|
itemScheme[0][0].count = itemScheme[0][0].count * 0.01;
|
||||||
|
break;
|
||||||
|
case Money.DOLLARS:
|
||||||
|
itemScheme[0][0].count = itemScheme[0][0].count * 0.1;
|
||||||
|
break;
|
||||||
|
case Money.EUROS:
|
||||||
|
itemScheme[0][0].count = itemScheme[0][0].count * 0.05;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.modConfig.prewipe_events.makeObdolbosPowerful)
|
||||||
|
{
|
||||||
|
const obdolbosBuff = [
|
||||||
|
{
|
||||||
|
"BuffType": "StaminaRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 0.5,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 10,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Endurance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 10,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Strength"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 20,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "StressResistance"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 20,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Charisma"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": -20,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Memory"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": -20,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Intellect"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "SkillRate",
|
||||||
|
"Chance": 1,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": -20,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": "Attention"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "Pain",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 0,
|
||||||
|
"AbsoluteValue": false,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "StomachBloodloss",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 0,
|
||||||
|
"AbsoluteValue": false,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "HydrationRate",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": -0.05,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "EnergyRate",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": -0.05,
|
||||||
|
"AbsoluteValue": true,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "DamageModifier",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 0.2,
|
||||||
|
"AbsoluteValue": false,
|
||||||
|
"SkillName": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"BuffType": "QuantumTunnelling",
|
||||||
|
"Chance": 0.25,
|
||||||
|
"Delay": 1,
|
||||||
|
"Duration": 1800,
|
||||||
|
"Value": 0,
|
||||||
|
"AbsoluteValue": false,
|
||||||
|
"SkillName": ""
|
||||||
|
}]
|
||||||
|
|
||||||
|
this.tables.globals.config.Health.Effects.Stimulator.Buffs.Buffs_Obdolbos = obdolbosBuff;
|
||||||
|
this.logger.info("Make Obdolbos Powerful Prewipe Event Enabled");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private containersOnPMCs(): void
|
||||||
|
{
|
||||||
|
const usec = this.tables.bots.types.usec.inventory.items.Backpack;
|
||||||
|
const bear = this.tables.bots.types.bear.inventory.items.Backpack;
|
||||||
|
|
||||||
usec.push(...this.containers());
|
usec.push(...this.containers());
|
||||||
bear.push(...this.containers());
|
bear.push(...this.containers());
|
||||||
@ -100,79 +365,39 @@ export class Bots
|
|||||||
dynaLoot.push("5795f317245977243854e041");
|
dynaLoot.push("5795f317245977243854e041");
|
||||||
}
|
}
|
||||||
|
|
||||||
private isUsec(): void
|
|
||||||
{
|
|
||||||
this.botConfig.pmc.isUsec = this.modConfig.bots.isUsec;
|
|
||||||
}
|
|
||||||
|
|
||||||
private pmcLoot(): void
|
|
||||||
{
|
|
||||||
this.botConfig.pmc.maxBackpackLootTotalRub = this.modConfig.bots.maxBackpackLootTotalRub;
|
|
||||||
this.botConfig.pmc.maxPocketLootTotalRub = this.modConfig.bots.maxPocketLootTotalRub;
|
|
||||||
this.botConfig.pmc.maxVestLootTotalRub = this.modConfig.bots.maxVestLootTotalRub;
|
|
||||||
}
|
|
||||||
|
|
||||||
private sameSideIsHostile(): void
|
|
||||||
{
|
|
||||||
this.botConfig.pmc.chanceSameSideIsHostilePercent = this.modConfig.bots.chanceSameSideIsHostilePercent;
|
|
||||||
}
|
|
||||||
|
|
||||||
private maxBotCap(): void
|
|
||||||
{
|
|
||||||
this.botConfig.maxBotCap = this.modConfig.bots.maxBotCap;
|
|
||||||
}
|
|
||||||
|
|
||||||
private lootNValue(): void
|
|
||||||
{
|
|
||||||
this.botConfig.lootNValue.scav = this.modConfig.bots.scavNValue;
|
|
||||||
this.botConfig.lootNValue.pmc = this.modConfig.bots.pmcNValue;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
private containers(): any[]
|
private containers(): any[]
|
||||||
{
|
{
|
||||||
/* Container "id"s
|
/* Container "id"s
|
||||||
*
|
*
|
||||||
* S I C C pouch: 5d235bb686f77443f4331278
|
* S I C C pouch: 5d235bb686f77443f4331278
|
||||||
*
|
|
||||||
* Magazine Case: 5c127c4486f7745625356c13
|
* Magazine Case: 5c127c4486f7745625356c13
|
||||||
*
|
|
||||||
* Weapon Case: 59fb023c86f7746d0d4b423c
|
* Weapon Case: 59fb023c86f7746d0d4b423c
|
||||||
*
|
|
||||||
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
||||||
*
|
|
||||||
* Item Case: 59fb042886f7746c5005a7b2
|
* Item Case: 59fb042886f7746c5005a7b2
|
||||||
*
|
|
||||||
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
||||||
*
|
|
||||||
* Money case: 59fb016586f7746d0d4b423a
|
* Money case: 59fb016586f7746d0d4b423a
|
||||||
*
|
|
||||||
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
||||||
*
|
|
||||||
* Medicine case: 5aafbcd986f7745e590fff23
|
* Medicine case: 5aafbcd986f7745e590fff23
|
||||||
*
|
|
||||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||||
*
|
|
||||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||||
*
|
* Ammunition case: 5aafbde786f774389d0cbc0f
|
||||||
|
* Documents case: 590c60fc86f77412b13fddcf
|
||||||
|
* Key tool: 59fafd4b86f7745ca07e123
|
||||||
|
* Injector case: 619cbf7d23893217ec30b689
|
||||||
|
* Dogtag case: 5c093e3486f77430cb02e593
|
||||||
|
* Keycard holder: 619cbf9e0a7c3a1a2731940a
|
||||||
|
* WZ Wallet: 60b0f6c058e0b0481a09ad11
|
||||||
|
* Pistol case: 567143bf4bdc2d1a0f8b4567
|
||||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||||
|
* Kappa container: 5c093ca986f7740a1867ab12
|
||||||
|
* Gamme container: 60b0f6c058e0b0481a09ad11
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const lootItems = [];
|
const lootItems = ["5d235bb686f77443f4331278","5c127c4486f7745625356c13","59fb023c86f7746d0d4b423c","5b6d9ce188a4501afc1b2b25","59fb042886f7746c5005a7b2","5c0a840b86f7742ffa4f2482",
|
||||||
lootItems.push({"tpl": "5d235bb686f77443f4331278", "relativeProbability": 12});
|
"59fb016586f7746d0d4b423a","5c093db286f7740a1b2617e3","5aafbcd986f7745e590fff23","5b7c710788a4506dec015957","5e2af55f86f7746d4159f07c","5448bf274bdc2dfc2f8b456a","5c093ca986f7740a1867ab12",
|
||||||
lootItems.push({"tpl": "5c127c4486f7745625356c13", "relativeProbability": 25});
|
"5aafbde786f774389d0cbc0f","590c60fc86f77412b13fddcf","59fafd4b86f7745ca07e1232","619cbf7d23893217ec30b689","619cbf9e0a7c3a1a2731940a","5c093e3486f77430cb02e593","60b0f6c058e0b0481a09ad11",
|
||||||
lootItems.push({"tpl": "59fb023c86f7746d0d4b423c", "relativeProbability": 13});
|
"567143bf4bdc2d1a0f8b4567","60b0f6c058e0b0481a09ad11","59db794186f77448bc595262","5857a8b324597729ab0a0e7d"]
|
||||||
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;
|
return lootItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,114 +1,81 @@
|
|||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Flea
|
export class Flea
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json");
|
private modConfig = require("../config/config.json");
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private ragfairConfig: IRagfairConfig;
|
private ragfairConfig: IRagfairConfig;
|
||||||
private tables: IDatabaseTables;
|
private tables: IDatabaseTables;
|
||||||
|
|
||||||
|
|
||||||
constructor (logger: ILogger, ragfairConfig: IRagfairConfig, tables: IDatabaseTables)
|
constructor (logger: Logger, ragfairConfig: IRagfairConfig, tables: IDatabaseTables)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.ragfairConfig = ragfairConfig;
|
this.ragfairConfig = ragfairConfig;
|
||||||
this.tables = tables;
|
this.tables = tables;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public updateFlea(): void
|
public updateFlea(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.flea.minUserLevel != 15)
|
const mod = this.modConfig.flea;
|
||||||
|
const global = this.tables.globals.config.RagFair;
|
||||||
|
const ragfair = this.ragfairConfig.dynamic;
|
||||||
|
|
||||||
|
if (mod.minUserLevel != 15)
|
||||||
{
|
{
|
||||||
this.ragfairLevel();
|
global.minUserLevel = mod.minUserLevel;
|
||||||
this.logger.info(`Fleamarket unlocked at level ${this.modConfig.flea.minUserLevel}`)
|
this.logger.info(`Fleamarket unlocked at level ${mod.minUserLevel}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
const time = this.modConfig.flea.time;
|
|
||||||
if (time.baseSellTime != 15 || time.minSellTime != 5 || time.maxSellTime != 15)
|
if (!mod.blacklist.enableBsgList || !mod.blacklist.enableQuestList)
|
||||||
{
|
{
|
||||||
this.ragfairTime();
|
ragfair.blacklist.enableBsgList = mod.blacklist.enableBsgList;
|
||||||
this.logger.info("Fleamarket Sell Times patched");
|
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
||||||
|
this.logger.info("Fleamarket Blacklists patched");
|
||||||
}
|
}
|
||||||
|
|
||||||
const currency = this.modConfig.flea.currencies;
|
if (mod.condition.conditionChance != 0.2 || mod.condition.min != 0.6 || mod.condition.max != 1)
|
||||||
if (currency.roubles != 78 || currency.dollars != 20 || currency.euros != 2)
|
|
||||||
{
|
{
|
||||||
this.ragfairCurrencies();
|
ragfair.condition.conditionChance = mod.conditionChance;
|
||||||
|
ragfair.condition.min = mod.min;
|
||||||
|
ragfair.condition.max = mod.max;
|
||||||
|
this.logger.info("Fleamarket Condition patched");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.currencies.roubles != 78 || mod.currencies.dollars != 20 || mod.currencies.euros != 2)
|
||||||
|
{
|
||||||
|
ragfair.currencies["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||||
|
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||||
|
ragfair.currencies["569668774bdc2da2298b4568"] = mod.currencies.euros;
|
||||||
this.logger.info("Fleamarket Currencies patched")
|
this.logger.info("Fleamarket Currencies patched")
|
||||||
}
|
}
|
||||||
|
|
||||||
const rep = this.modConfig.flea.reputation;
|
if (mod.offerItemCount.min != 8 || mod.offerItemCount.max != 15)
|
||||||
if (rep.gain != 0.0000002 || rep.loss != 0.0000002)
|
|
||||||
{
|
{
|
||||||
this.ragfairReputation();
|
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||||
this.logger.info("Fleamarket Reputation patched");
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
}
|
|
||||||
|
|
||||||
const count = this.modConfig.flea.offerItemCount;
|
|
||||||
if (count.min != 8 || count.max != 15)
|
|
||||||
{
|
|
||||||
this.ragfairOfferItemCount();
|
|
||||||
this.logger.info("Fleamarket Offer Item Count patched");
|
this.logger.info("Fleamarket Offer Item Count patched");
|
||||||
}
|
}
|
||||||
|
|
||||||
const condition = this.modConfig.flea.condition;
|
if (mod.reputation.gain != 0.0000002 || mod.reputation.loss != 0.0000002)
|
||||||
if (condition.conditionChance != 0.2 || condition.min != 0.6 || condition.max != 1)
|
|
||||||
{
|
{
|
||||||
this.ragfairItemCondition();
|
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||||
this.logger.info("Fleamarket Item Condition patched");
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
|
this.logger.info("Fleamarket Reputation patched");
|
||||||
}
|
}
|
||||||
|
|
||||||
const list = this.modConfig.flea.blacklist;
|
if (mod.time.baseSellTime != 15 || mod.time.minSellTime != 5 || mod.time.maxSellTime != 15)
|
||||||
if (!list.enableBsgList || !list.enableQuestList)
|
|
||||||
{
|
{
|
||||||
this.ragfairBlacklist();
|
const sell = this.ragfairConfig.sell;
|
||||||
this.logger.info("Fleamarket Blacklists patched");
|
sell.time.base = mod.time.baseSellTime;
|
||||||
|
sell.time.min = mod.time.minSellTime;
|
||||||
|
sell.time.max = mod.time.maxSellTime;
|
||||||
|
this.logger.info("Fleamarket Sell Times patched");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private ragfairLevel(): void
|
|
||||||
{
|
|
||||||
this.tables.globals.config.RagFair.minUserLevel = this.modConfig.flea.minUserLevel;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ragfairTime(): void
|
|
||||||
{
|
|
||||||
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
|
|
||||||
{
|
|
||||||
this.ragfairConfig.dynamic.currencies["5449016a4bdc2d6f028b456f"] = this.modConfig.flea.currencies.roubles;
|
|
||||||
this.ragfairConfig.dynamic.currencies["5696686a4bdc2da3298b456a"] = this.modConfig.flea.currencies.dollars;
|
|
||||||
this.ragfairConfig.dynamic.currencies["569668774bdc2da2298b4568"] = this.modConfig.flea.currencies.euros;
|
|
||||||
}
|
|
||||||
|
|
||||||
private ragfairBlacklist(): void
|
|
||||||
{
|
|
||||||
this.ragfairConfig.dynamic.blacklist.enableBsgList = this.modConfig.flea.blacklist.enableBsgList;
|
|
||||||
this.ragfairConfig.dynamic.blacklist.enableQuestList = this.modConfig.flea.blacklist.enableQuestList;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -1,51 +1,64 @@
|
|||||||
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";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Globals
|
export class Globals
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json");
|
private modConfig = require("../config/config.json");
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private databaseServer: DatabaseServer;
|
private databaseServer: DatabaseServer;
|
||||||
private globals: Falling
|
|
||||||
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.databaseServer = databaseServer;
|
this.databaseServer = databaseServer;
|
||||||
this.globals = this.databaseServer.getTables().globals.config.Health.Falling;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateGlobals(): void
|
public updateGlobals(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.globals.damagePerMeter != 9 || this.modConfig.globals.safeHeight != 3)
|
const mod = this.modConfig.globals;
|
||||||
|
const global = this.databaseServer.getTables().globals;
|
||||||
|
|
||||||
|
if (mod.damagePerMeter != 9 || mod.safeHeight != 3)
|
||||||
{
|
{
|
||||||
this.damagePerMeter();
|
global.config.Health.Falling.DamagePerMeter = mod.damagePerMeter;
|
||||||
this.safeHeight();
|
global.config.Health.Falling.SafeHeight = mod.safeHeight;
|
||||||
this.logger.info(`Safe Fall Height set to ${this.modConfig.globals.safeHeight} meters`);
|
this.logger.info(`Safe Fall Height set to ${mod.safeHeight} meters`);
|
||||||
this.logger.info(`Damage Per Meter set to ${this.modConfig.globals.damagePerMeter} meters`)
|
this.logger.info(`Damage Per Meter set to ${mod.damagePerMeter} meters`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.globals.maxTraders)
|
if (mod.maxLoyaltyTraders)
|
||||||
{
|
{
|
||||||
this.maxTraders();
|
global.config.MaxLoyaltyLevelForAll = mod.maxLoyaltyTraders;
|
||||||
this.logger.info(`Max Loyalty Traders is: ${this.modConfig.globals.maxTraders}`);
|
this.logger.info(`Max Loyalty Traders is: ${mod.maxLoyaltyTraders}`);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private damagePerMeter(): void
|
if (mod.timeBeforeDeployLocal != 10)
|
||||||
{
|
{
|
||||||
this.globals.DamagePerMeter = this.modConfig.globals.damagePerMeter;
|
global.config.TimeBeforeDeployLocal = mod.timeBeforeDeployLocal;
|
||||||
|
this.logger.info(`Time Before Deploy set to: ${mod.timeBeforeDeployLocal}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private safeHeight(): void
|
if (mod.match_end.survived_exp_requirement != 200 || mod.match_end.survived_seconds_requirement != 420 || mod.match_end.survived_exp_reward != 300
|
||||||
|
|| mod.match_end.mia_exp_reward != 200 || mod.match_end.runner_exp_reward != 200 || mod.match_end.leftMult != 0
|
||||||
|
|| mod.match_end.miaMult != 1 || mod.match_end.survivedMult != 1.3 || mod.match_end.runnerMult != 0.5
|
||||||
|
|| mod.match_end.killedMult != 1 || mod.match_end.headShotMult != 1.2 || mod.match_end.expOnDamageAllHealth != 50)
|
||||||
{
|
{
|
||||||
this.globals.SafeHeight = this.modConfig.globals.safeHeight;
|
const global1 = this.databaseServer.getTables().globals.config.exp.match_end;
|
||||||
}
|
const mod = this.modConfig.globals.match_end;
|
||||||
|
|
||||||
private maxTraders(): void
|
global1.survived_exp_requirement = mod.survived_exp_requirement;
|
||||||
{
|
global1.survived_seconds_requirement = mod.survived_seconds_requirement;
|
||||||
this.databaseServer.getTables().globals.config.MaxLoyaltyLevelForAll = this.modConfig.globals.maxTraders;
|
global1.survived_exp_reward = mod.survived_exp_reward;
|
||||||
|
global1.mia_exp_reward = mod.mia_exp_reward;
|
||||||
|
global1.runner_exp_reward = mod.runner_exp_reward;
|
||||||
|
global1.leftMult = mod.leftMult;
|
||||||
|
global1.miaMult = mod.miaMult;
|
||||||
|
global1.survivedMult = mod.survivedMult;
|
||||||
|
global1.runnerMult = mod.runnerMult;
|
||||||
|
global1.killedMult = mod.killedMult;
|
||||||
|
this.databaseServer.getTables().globals.config.exp.kill.headShotMult = mod.headShotMult;
|
||||||
|
this.databaseServer.getTables().globals.config.exp.kill.expOnDamageAllHealth = mod.expOnDamageAllHealth;
|
||||||
|
this.logger.info("Match End Globals Patched");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,14 +1,13 @@
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Hideout
|
export class Hideout
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json")
|
private modConfig = require("../config/config.json")
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private databaseServer: DatabaseServer;
|
private databaseServer: DatabaseServer;
|
||||||
private hideout: {constructionTime: number; productionTime: number; scavCaseTime: number; airFilterUnitFlowRate: number; generatorFuelFlowRate: number; gpuBoostRate: number; };
|
|
||||||
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.databaseServer = databaseServer;
|
this.databaseServer = databaseServer;
|
||||||
@ -16,32 +15,37 @@ export class Hideout
|
|||||||
|
|
||||||
public updateHideout(): void
|
public updateHideout(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.hideout.constructionTime != 1)
|
const mod = this.modConfig.hideout;
|
||||||
|
|
||||||
|
if (mod.constructionTime != 1)
|
||||||
{
|
{
|
||||||
this.updateConstructionTime();
|
this.updateConstructionTime();
|
||||||
this.logger.info(`Construction Time Patched to ${this.modConfig.hideout.constructionTime} `);
|
this.logger.info(`Construction Time Patched to ${mod.constructionTime} `);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.hideout.productionTime != 1)
|
if (mod.productionTime != 1)
|
||||||
{
|
{
|
||||||
this.updateProductionTime();
|
this.updateProductionTime();
|
||||||
this.logger.info(`Production Time Patched to ${this.modConfig.hideout.productionTime} `);
|
this.logger.info(`Production Time Patched to ${mod.productionTime} `);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.hideout.scavCaseTime != 1)
|
if (mod.scavCaseTime != 1)
|
||||||
{
|
{
|
||||||
this.updateScavCase();
|
this.updateScavCase();
|
||||||
this.logger.info(`Scav Case TIme Patched to ${this.modConfig.hideout.scavCaseTime}`);
|
this.logger.info(`Scav Case TIme Patched to ${mod.scavCaseTime}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.hideout.airFilterUnitFlowRate != 0.0047222222222222
|
if (mod.airFilterUnitFlowRate != 0.0047222222222222
|
||||||
||this.modConfig.hideout.generatorFuelFlowRate != 0.0013194444444444
|
||mod.generatorFuelFlowRate != 0.0013194444444444
|
||||||
||this.modConfig.hideout.gpuBoostRate != 0.041225)
|
||mod.gpuBoostRate != 0.041225)
|
||||||
{
|
{
|
||||||
this.updateSettings();
|
const settings = this.databaseServer.getTables().hideout.settings;
|
||||||
this.logger.info(`Air Filter Flow Rate set to ${this.modConfig.hideout.airFilterUnitFlowRate}`);
|
settings.airFilterUnitFlowRate = mod.airFilterUnitFlowRate;
|
||||||
this.logger.info(`Generator Fuel Flow Rate set to ${this.modConfig.hideout.generatorFuelFlowRate}`);
|
settings.generatorFuelFlowRate = mod.generatorFuelFlowRate;
|
||||||
this.logger.info(`GPU Boost Rate set to ${this.modConfig.hideout.gpuBoostRate}`);
|
settings.gpuBoostRate = mod.gpuBoostRate;
|
||||||
|
this.logger.info(`Air Filter Flow Rate set to ${mod.airFilterUnitFlowRate}`);
|
||||||
|
this.logger.info(`Generator Fuel Flow Rate set to ${mod.generatorFuelFlowRate}`);
|
||||||
|
this.logger.info(`GPU Boost Rate set to ${mod.gpuBoostRate}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -73,16 +77,4 @@ export class Hideout
|
|||||||
scavCase.ProductionTime *= this.modConfig.hideout.scavCaseTime;
|
scavCase.ProductionTime *= this.modConfig.hideout.scavCaseTime;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private updateSettings()
|
|
||||||
{
|
|
||||||
const settings = this.databaseServer.getTables().hideout.settings;
|
|
||||||
settings.airFilterUnitFlowRate = this.modConfig.hideout.airFilterUnitFlowRate;
|
|
||||||
settings.generatorFuelFlowRate = this.modConfig.hideout.generatorFuelFlowRate;
|
|
||||||
settings.gpuBoostRate = this.modConfig.hideout.gpuBoostRate;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
@ -1,14 +1,14 @@
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
|
||||||
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Insurance
|
export class Insurance
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json");
|
private modConfig = require("../config/config.json");
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private insuranceConfig: IInsuranceConfig;
|
private insuranceConfig: IInsuranceConfig;
|
||||||
|
|
||||||
|
|
||||||
constructor(logger:ILogger, insuranceConfig: IInsuranceConfig)
|
constructor(logger:Logger, insuranceConfig: IInsuranceConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.insuranceConfig = insuranceConfig;
|
this.insuranceConfig = insuranceConfig;
|
||||||
@ -16,31 +16,21 @@ export class Insurance
|
|||||||
|
|
||||||
public updateInsurance(): void
|
public updateInsurance(): void
|
||||||
{
|
{
|
||||||
const insMult = this.modConfig.insurance.insuranceMultiplier
|
const mod = this.modConfig.insurance;
|
||||||
if (insMult.prapor != 0.16 || insMult.therapist != 0.25)
|
|
||||||
{
|
|
||||||
this.insureMult();
|
|
||||||
this.logger.info(`Prapor Insurance Price Multiplier Set to ${insMult.prapor}`);
|
|
||||||
} this.logger.info(`Therapist Insurance Price Multiplier Set to ${insMult.therapist}`);
|
|
||||||
|
|
||||||
const insReturn = this.modConfig.insurance.returnChancePercent
|
if (mod.insuranceMultiplier.prapor != 0.16 || mod.insuranceMultiplier.therapist != 0.25)
|
||||||
if (insReturn.prapor != 80 || insReturn.therapist != 85)
|
|
||||||
{
|
{
|
||||||
this.insureReturn();
|
this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] = mod.insuranceMultiplier.prapor;
|
||||||
this.logger.info(`Prapor Insurance Return Chance Set to ${this.modConfig.insurance.returnChancePercent.prapor}`);
|
this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] = mod.insuranceMultiplier.therapist;
|
||||||
this.logger.info(`Therapist Insurance Return Chance set to ${this.modConfig.insurance.returnChancePercent.therapist}`);
|
this.logger.info(`Prapor Insurance Price Multiplier Set to ${mod.insuranceMultiplier.prapor}`);
|
||||||
}
|
} this.logger.info(`Therapist Insurance Price Multiplier Set to ${mod.insuranceMultiplier.therapist}`);
|
||||||
}
|
|
||||||
|
|
||||||
private insureMult(): void
|
if (mod.returnChancePercent.prapor != 80 || mod.returnChancePercent.therapist != 85)
|
||||||
{
|
{
|
||||||
this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] = this.modConfig.insurance.insuranceMultiplier.prapor;
|
this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] = mod.returnChancePercent.prapor;
|
||||||
this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] = this.modConfig.insurance.insuranceMultiplier.therapist;
|
this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] = mod.returnChancePercent.therapist;
|
||||||
|
this.logger.info(`Prapor Insurance Return Chance Set to ${mod.returnChancePercent.prapor}`);
|
||||||
|
this.logger.info(`Therapist Insurance Return Chance set to ${mod.returnChancePercent.therapist}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private insureReturn(): void
|
|
||||||
{
|
|
||||||
this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] = this.modConfig.insurance.returnChancePercent.prapor;
|
|
||||||
this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] = this.modConfig.insurance.returnChancePercent.therapist;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger"
|
|
||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Items
|
export class Items
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json")
|
private modConfig = require("../config/config.json")
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private databaseServer: DatabaseServer;
|
private databaseServer: DatabaseServer;
|
||||||
|
|
||||||
constructor(logger: ILogger, databaseServer: DatabaseServer)
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.databaseServer = databaseServer;
|
this.databaseServer = databaseServer;
|
||||||
@ -15,78 +15,94 @@ export class Items
|
|||||||
|
|
||||||
public updateItems(): void
|
public updateItems(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.items.weightModifier != 1)
|
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
const mod = this.modConfig.items;
|
||||||
|
|
||||||
|
// Weight Modifier. Multiplier of Weight *= modConfig.weightModifier
|
||||||
|
if (mod.weightModifier != 1)
|
||||||
{
|
{
|
||||||
this.updateWeight();
|
this.updateWeight();
|
||||||
this.logger.info(`Weight Multipler patched to ${this.modConfig.items.weightModifier}`);
|
this.logger.info(`Weight Multipler patched to ${mod.weightModifier}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.removeBackpackFilter)
|
// Removes the ExcludedFilter on Backpacks
|
||||||
|
// which in turn enables common containers to spawn in the loot pool of AI.
|
||||||
|
if (mod.removeBackpackFilter)
|
||||||
{
|
{
|
||||||
this.updateBackpacks();
|
this.updateBackpacks();
|
||||||
this.logger.info(`Backpack Restrictions Removed: ${this.modConfig.items.removeBackpackFilter}`)
|
this.logger.info(`Backpack Restrictions Removed: ${mod.removeBackpackFilter}`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.standardStash.vertical != 28 || this.modConfig.items.standardStash.horizontal != 10)
|
// Standard Stash Size Changes
|
||||||
|
if (mod.standardStash.vertical != 28 || mod.standardStash.horizontal != 10)
|
||||||
{
|
{
|
||||||
this.standardStash();
|
items["566abbc34bdc2d92178b4576"]._grids._props.cellsV = mod.standardStash.vertical;
|
||||||
this.logger.info(`Standard Stash Vertical changed to ${this.modConfig.items.standardStash.vertical}`);
|
items["566abbc34bdc2d92178b4576"]._grids._props.cellsH = mod.standardStash.horizontal;
|
||||||
this.logger.info(`Standard Stash Horizontal changed to ${this.modConfig.items.standardStash.horizontal}`);
|
this.logger.info(`Standard Stash Vertical changed to ${mod.standardStash.vertical}`);
|
||||||
|
this.logger.info(`Standard Stash Horizontal changed to ${mod.tandardStash.horizontal}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.behindStash.vertical != 38 || this.modConfig.items.behindStash.horizontal != 10)
|
// Left Behind Stash Size Changes
|
||||||
|
if (mod.behindStash.vertical != 38 || mod.behindStash.horizontal != 10)
|
||||||
{
|
{
|
||||||
this.behindStash();
|
items["5811ce572459770cba1a34ea"]._grids._props.cellsV = mod.behindStash.vertical;
|
||||||
this.logger.info(`Left Behind Stash Vertical changed to ${this.modConfig.items.behindStash.vertical}`);
|
items["5811ce572459770cba1a34ea"]._grids._props.cellsH = mod.behindStash.horizontal;
|
||||||
this.logger.info(`Left Behind Stash Horizontal changed to ${this.modConfig.items.behindStash.horizontal}`);
|
this.logger.info(`Left Behind Stash Vertical changed to ${mod.behindStash.vertical}`);
|
||||||
|
this.logger.info(`Left Behind Stash Horizontal changed to ${mod.behindStash.horizontal}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.escapeStash.vertical != 48 || this.modConfig.items.escapeStash.horizontal != 10)
|
// Prepare for Escape Stash Size Changes
|
||||||
|
if (mod.escapeStash.vertical != 48 || mod.escapeStash.horizontal != 10)
|
||||||
{
|
{
|
||||||
this.escapeStash();
|
items["5811ce662459770f6f490f32"]._grids._props.cellsV = mod.escapeStash.vertical;
|
||||||
this.logger.info(`Prepare for Escape Stash Vertical changed to ${this.modConfig.items.escapeStash.vertical}`);
|
items["5811ce662459770f6f490f32"]._grids._props.cellsH = mod.escapeStash.horizontal;
|
||||||
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${this.modConfig.items.escapeStash.horizontal}`);
|
this.logger.info(`Prepare for Escape Stash Vertical changed to ${mod.escapeStash.vertical}`);
|
||||||
|
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${mod.escapeStash.horizontal}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.eodStash.vertical != 68 || this.modConfig.items.eodStash.horizontal != 10)
|
// Edge of Darkness Stash Size Changes
|
||||||
|
if (mod.eodStash.vertical != 68 || mod.eodStash.horizontal != 10)
|
||||||
{
|
{
|
||||||
this.eodStash();
|
items["5811ce772459770e9e5f9532"]._grids._props.cellsV = mod.eodStash.vertical;
|
||||||
this.logger.info(`Edge of Darkness Stash Vertical changed to ${this.modConfig.items.eodStash.vertical}`);
|
items["5811ce772459770e9e5f9532"]._grids._props.cellsH = mod.eodStash.horizontal;
|
||||||
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${this.modConfig.items.eodStash.horizontal}`);
|
this.logger.info(`Edge of Darkness Stash Vertical changed to ${mod.eodStash.vertical}`);
|
||||||
|
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${mod.eodStash.horizontal}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.examineByDefault)
|
// Toggles true/false the Examined By Default config on all items in database/templates/items.json
|
||||||
|
if (mod.examinedByDefault)
|
||||||
{
|
{
|
||||||
this.examineByDefault();
|
this.examinedByDefault();
|
||||||
this.logger.info(`Examine By Default is ${this.modConfig.items.examineByDefault}`);
|
this.logger.info(`Examined By Default is ${mod.examinedByDefault}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.roublesMaxStack != 500000)
|
// Roubles Max Stack
|
||||||
|
if (mod.roublesMaxStack != 500000)
|
||||||
{
|
{
|
||||||
this.roublesMaxStack();
|
items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = mod.roublesMaxStack;
|
||||||
this.logger.info(`Rouble Max Stack set to ${this.modConfig.items.roublesMaxStack}`);
|
this.logger.info(`Rouble Max Stack set to ${mod.roublesMaxStack}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.dollarsMaxStack != 50000)
|
// Dollars Max Stack
|
||||||
|
if (mod.dollarsMaxStack != 50000)
|
||||||
{
|
{
|
||||||
this.dollarsMaxStack();
|
items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = mod.dollarsMaxStack;
|
||||||
this.logger.info(`Dollar Max Stack set to ${this.modConfig.items.dollarsMaxStack}`);
|
this.logger.info(`Dollar Max Stack set to ${mod.dollarsMaxStack}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.eurosMaxStack != 50000)
|
// Euros Max Stack
|
||||||
|
if (mod.eurosMaxStack != 50000)
|
||||||
{
|
{
|
||||||
this.eurosMaxStack();
|
items["569668774bdc2da2298b4568"]._props.StackMaxSize = mod.eurosMaxStack;
|
||||||
this.logger.info(`Euro Max Stack set to ${this.modConfig.items.eurosMaxStack}`);
|
this.logger.info(`Euro Max Stack set to ${mod.eurosMaxStack}`);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.items.ammoStacks)
|
|
||||||
{
|
|
||||||
this.updateAmmoStacks();
|
|
||||||
this.logger.info(`Ammo Stacks set to ${this.modConfig.items.ammoStacks}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
// Functions Functions.
|
||||||
|
|
||||||
|
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||||
private updateWeight(): void
|
private updateWeight(): void
|
||||||
{
|
{
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
@ -99,6 +115,7 @@ export class Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Updates backpacks and removes any values in the ExcludedFilter under props > Grids > props > filters > ExcludedFilter in database/templates/items.json
|
||||||
private updateBackpacks(): void
|
private updateBackpacks(): void
|
||||||
{
|
{
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
@ -112,112 +129,13 @@ export class Items
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private standardStash(): void
|
// Updates the Examined By Default modifier for all items in database/templates/items.json to either True or False depending on the config value.
|
||||||
|
private examinedByDefault(): void
|
||||||
{
|
{
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
for (const item of items)
|
for (const item of items)
|
||||||
{
|
{
|
||||||
if (item._name === "Standard stash 10x28")
|
item._props.ExaminedByDefault = this.modConfig.items.examinedByDefault;
|
||||||
{
|
|
||||||
item._props.Grids["cellsH"] = this.modConfig.items.standardStash.horizontal;
|
|
||||||
item._props.Grids["cellsV"] = this.modConfig.items.standardStash.vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private behindStash(): void
|
|
||||||
{
|
|
||||||
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.items.behindStash.horizontal;
|
|
||||||
item._props.Grids["cellsV"] = this.modConfig.items.behindStash.vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private escapeStash(): void
|
|
||||||
{
|
|
||||||
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.items.escapeStash.horizontal;
|
|
||||||
item._props.Grids["cellsV"] = this.modConfig.items.escapeStash.vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private eodStash(): void
|
|
||||||
{
|
|
||||||
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.items.eodStash.horizontal;
|
|
||||||
item._props.Grids["cellsV"] = this.modConfig.items.eodStash.vertical;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private examineByDefault(): void
|
|
||||||
{
|
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
|
||||||
for (const item of items)
|
|
||||||
{
|
|
||||||
item._props.ExaminedByDefault = this.modConfig.items.examineByDefault;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private roublesMaxStack(): void
|
|
||||||
{
|
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
|
||||||
for (const item of items)
|
|
||||||
{
|
|
||||||
if (item._id === "5449016a4bdc2d6f028b456f")
|
|
||||||
{
|
|
||||||
item._props.StackMaxSize = this.modConfig.items.roublesMaxStack;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private dollarsMaxStack(): void
|
|
||||||
{
|
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
|
||||||
for (const item of items)
|
|
||||||
{
|
|
||||||
if (item._id === "5696686a4bdc2da3298b456a")
|
|
||||||
{
|
|
||||||
item._props.StackMaxSize = this.modConfig.items.roublesMaxStack;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private eurosMaxStack(): void
|
|
||||||
{
|
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
|
||||||
for (const item of items)
|
|
||||||
{
|
|
||||||
if (item._id === "569668774bdc2da2298b4568")
|
|
||||||
{
|
|
||||||
item._props.StackMaxSize = this.modConfig.items.roublesMaxStack;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private updateAmmoStacks(): void
|
|
||||||
{
|
|
||||||
const items = Object.values(this.databaseServer.getTables().templates.items);
|
|
||||||
for (const item of items)
|
|
||||||
{
|
|
||||||
if (item._parent === "5485a8684bdc2da71d8b4567")
|
|
||||||
{
|
|
||||||
item._props.StackMaxSize = this.modConfig.items.ammoStacks;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
154
Valens-AIO/src/locations.ts
Normal file
154
Valens-AIO/src/locations.ts
Normal file
@ -0,0 +1,154 @@
|
|||||||
|
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
|
export class Locations
|
||||||
|
{
|
||||||
|
private modConfig = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private tables: IDatabaseTables;
|
||||||
|
|
||||||
|
constructor (logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateLocations(): void
|
||||||
|
{
|
||||||
|
const mod = this.modConfig.locations;
|
||||||
|
const maps = this.tables.locations;
|
||||||
|
|
||||||
|
// Gives all extracts 100% chance to spawn.
|
||||||
|
if (mod.allExtractsAvailable)
|
||||||
|
{
|
||||||
|
for (const map in maps)
|
||||||
|
{
|
||||||
|
if (map.toLowerCase() === "base")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapBase = this.tables.locations[map].base;
|
||||||
|
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const i in mapBase.exits)
|
||||||
|
{
|
||||||
|
const exit = mapBase[i];
|
||||||
|
exit.Chance = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.logger.info("All Extracts Are Available @ 100% Chance");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Sets exfil/extract timer to config.
|
||||||
|
if (mod.exfilTime != 8)
|
||||||
|
{
|
||||||
|
for (const map in maps)
|
||||||
|
{
|
||||||
|
if (map.toLowerCase() === "base")
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
const mapBase = this.tables.locations[map].base;
|
||||||
|
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
for (const i in mapBase.exits)
|
||||||
|
{
|
||||||
|
const exit = mapBase[i];
|
||||||
|
exit.ExfiltrationTime = mod.exfilTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.logger.info(`Exfil Time is set to ${mod.exfilTime} seconds`);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove extracts restrictions
|
||||||
|
if (mod.noExtractRestrictions)
|
||||||
|
{
|
||||||
|
for (const i in maps)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
for (const x in maps[i].base.exits)
|
||||||
|
{
|
||||||
|
if (maps[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||||
|
!maps[i].base.exits[x].Name.includes("lab") ||
|
||||||
|
maps[i].base.exits[x].Name === "lab_Vent")
|
||||||
|
{
|
||||||
|
if (maps[i].base.exits[x].PassageRequirement !== "None")
|
||||||
|
{
|
||||||
|
maps[i].base.exits[x].PassageRequirement = "None";
|
||||||
|
}
|
||||||
|
if (maps[i].base.exits[x].ExfiltrationType !== "Individual")
|
||||||
|
{
|
||||||
|
maps[i].base.exits[x].ExfiltrationType = "Individual";
|
||||||
|
}
|
||||||
|
if (maps[i].base.exits[x].Id !== "")
|
||||||
|
{
|
||||||
|
maps[i].base.exits[x].Id = "";
|
||||||
|
}
|
||||||
|
if (maps[i].base.exits[x].Count !== 0)
|
||||||
|
{
|
||||||
|
maps[i].base.exits[x].Count = 0;
|
||||||
|
}
|
||||||
|
if (maps[i].base.exits[x].RequirementTip !== "")
|
||||||
|
{
|
||||||
|
maps[i].base.exits[x].RequirementTip = "";
|
||||||
|
}
|
||||||
|
if (maps[i].base.exits[x].RequiredSlot)
|
||||||
|
{
|
||||||
|
delete maps[i].base.exits[x].RequiredSlot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Make all extractions of the map available regardless of the infill
|
||||||
|
if (mod.extractionsExtended)
|
||||||
|
{
|
||||||
|
for (const map in maps)
|
||||||
|
{
|
||||||
|
switch (map)
|
||||||
|
{
|
||||||
|
case "base":
|
||||||
|
break;
|
||||||
|
case "bigmap":
|
||||||
|
for (const extract in maps[map].base.exits)
|
||||||
|
{
|
||||||
|
maps[map].base.exits[extract].EntryPoints = "Customs,Boiler Tanks";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "interchange":
|
||||||
|
for (const extract in maps[map].base.exits)
|
||||||
|
{
|
||||||
|
maps[map].base.exits[extract].EntryPoints = "MallSE,MallNW";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "shoreline":
|
||||||
|
for (const extract in maps[map].base.exits)
|
||||||
|
{
|
||||||
|
maps[map].base.exits[extract].EntryPoints = "Village,Riverside";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "woods":
|
||||||
|
for (const extract in maps[map].base.exits)
|
||||||
|
{
|
||||||
|
maps[map].base.exits[extract].EntryPoints = "House,Old Station";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
20
Valens-AIO/src/logger.ts
Normal file
20
Valens-AIO/src/logger.ts
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
|
|
||||||
|
export class Logger
|
||||||
|
{
|
||||||
|
private modConfig = require("../config/config.json");
|
||||||
|
private logger: ILogger;
|
||||||
|
|
||||||
|
constructor (logger: ILogger)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
}
|
||||||
|
|
||||||
|
public info(text: string, forced = false): void
|
||||||
|
{
|
||||||
|
if (this.modConfig.DebugMode || forced)
|
||||||
|
{
|
||||||
|
this.logger.info(text);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -1,57 +1,48 @@
|
|||||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
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 { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Loot
|
export class Loot
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json");
|
private modConfig = require("../config/config.json");
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private tables: IDatabaseTables;
|
private tables: IDatabaseTables;
|
||||||
private locationConfig: ILocationConfig;
|
private locationConfig: ILocationConfig;
|
||||||
|
|
||||||
constructor (logger: ILogger, databaseServer: DatabaseServer, locationConfig: ILocationConfig)
|
constructor (logger: Logger, databaseServer: DatabaseServer, locationConfig: ILocationConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.locationConfig = locationConfig;
|
this.locationConfig = locationConfig;
|
||||||
this.tables = databaseServer.getTables();
|
this.tables = databaseServer.getTables();
|
||||||
this.modConfig = this.modConfig.loot;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public updateLoot(): void
|
public updateLoot(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.looseLootMultiplier > 1)
|
const mod = this.modConfig.loot;
|
||||||
{
|
|
||||||
this.looseLootMultiplier();
|
|
||||||
this.logger.info(`Loose Loot Multiplier: ${this.modConfig.looseLootMultiplier}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.modConfig.staticLootMultiplier > 1)
|
if (mod.looseLootMultiplier > 1)
|
||||||
{
|
|
||||||
this.staticLootMultiplier();
|
|
||||||
this.logger.info(`Static Loot Multiplier: ${this.modConfig.staticLootMultiplier}`);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.modConfig.containersInMarkedRoom)
|
|
||||||
{
|
|
||||||
this.containersInMarkedRoom();
|
|
||||||
this.logger.info(`Containers In Marked Room: ${this.modConfig.containersInMarkedRoom}`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private looseLootMultiplier(): void
|
|
||||||
{
|
{
|
||||||
for (const map in this.locationConfig.looseLootMultiplier)
|
for (const map in this.locationConfig.looseLootMultiplier)
|
||||||
{
|
{
|
||||||
this.locationConfig.looseLootMultiplier[map] = this.modConfig.looseLootMultiplier;
|
this.locationConfig.looseLootMultiplier[map] = mod.looseLootMultiplier;
|
||||||
}
|
}
|
||||||
|
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
private staticLootMultiplier(): void
|
if (mod.staticLootMultiplier > 1)
|
||||||
{
|
{
|
||||||
for (const map in this.locationConfig.staticLootMultiplier)
|
for (const map in this.locationConfig.staticLootMultiplier)
|
||||||
{
|
{
|
||||||
this.locationConfig.staticLootMultiplier[map] = this.modConfig.staticLootMultiplier;
|
this.locationConfig.staticLootMultiplier[map] = mod.staticLootMultiplier;
|
||||||
|
}
|
||||||
|
this.logger.info(`Static Loot Multiplier: ${mod.staticLootMultiplier}`);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mod.containersInMarkedRoom)
|
||||||
|
{
|
||||||
|
this.containersInMarkedRoom();
|
||||||
|
this.logger.info(`Containers In Marked Room: ${mod.containersInMarkedRoom}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -104,31 +95,18 @@ export class Loot
|
|||||||
|
|
||||||
private containers(): any[]
|
private containers(): any[]
|
||||||
{
|
{
|
||||||
|
|
||||||
/* Container "id"s
|
/* Container "id"s
|
||||||
*
|
|
||||||
* S I C C pouch: 5d235bb686f77443f4331278
|
* S I C C pouch: 5d235bb686f77443f4331278
|
||||||
*
|
|
||||||
* Magazine Case: 5c127c4486f7745625356c13
|
* Magazine Case: 5c127c4486f7745625356c13
|
||||||
*
|
|
||||||
* Weapon Case: 59fb023c86f7746d0d4b423c
|
* Weapon Case: 59fb023c86f7746d0d4b423c
|
||||||
*
|
|
||||||
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
* T H I C C Weapon Case: 5b6d9ce188a4501afc1b2b25
|
||||||
*
|
|
||||||
* Item Case: 59fb042886f7746c5005a7b2
|
* Item Case: 59fb042886f7746c5005a7b2
|
||||||
*
|
|
||||||
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
* T H I C C Item Case: 5c0a840b86f7742ffa4f2482
|
||||||
*
|
|
||||||
* Money case: 59fb016586f7746d0d4b423a
|
* Money case: 59fb016586f7746d0d4b423a
|
||||||
*
|
|
||||||
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
* Mr Holodilnick Thermal Bag: 5c093db286f7740a1b2617e3
|
||||||
*
|
|
||||||
* Medicine case: 5aafbcd986f7745e590fff23
|
* Medicine case: 5aafbcd986f7745e590fff23
|
||||||
*
|
|
||||||
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
* Lucky scav junkbox: 5b7c710788a4506dec015957
|
||||||
*
|
|
||||||
* Grenade case: 5e2af55f86f7746d4159f07c
|
* Grenade case: 5e2af55f86f7746d4159f07c
|
||||||
*
|
|
||||||
* Secure container: 5448bf274bdc2dfc2f8b456a
|
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -148,9 +126,5 @@ export class Loot
|
|||||||
|
|
||||||
return lootItems;
|
return lootItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -11,6 +11,7 @@ import { IInsuranceConfig } from "@spt-aki/models/spt/config/IInsuranceConfig";
|
|||||||
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
import { ILogger } from "@spt-aki/models/spt/utils/ILogger";
|
||||||
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
|
||||||
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
import { IRagfairConfig } from "@spt-aki/models/spt/config/IRagfairConfig";
|
||||||
|
import { Ammo } from "./ammo";
|
||||||
import { Bots } from "./bots";
|
import { Bots } from "./bots";
|
||||||
import { Flea } from "./flea";
|
import { Flea } from "./flea";
|
||||||
import { Hideout } from "./hideout";
|
import { Hideout } from "./hideout";
|
||||||
@ -19,6 +20,7 @@ import { Loot } from "./loot";
|
|||||||
import { Raid } from "./raid";
|
import { Raid } from "./raid";
|
||||||
import { Globals } from "./globals";
|
import { Globals } from "./globals";
|
||||||
import { Insurance } from "./insurance";
|
import { Insurance } from "./insurance";
|
||||||
|
import { Logger } from "./logger";
|
||||||
//import { Airdrop } from "./airdrop";
|
//import { Airdrop } from "./airdrop";
|
||||||
|
|
||||||
class ValensAIO implements IPostDBLoadMod
|
class ValensAIO implements IPostDBLoadMod
|
||||||
@ -38,7 +40,8 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
public postDBLoad(container: DependencyContainer): void
|
public postDBLoad(container: DependencyContainer): void
|
||||||
{
|
{
|
||||||
// get database from server
|
// get database from server
|
||||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
const logger = container.resolve<ILogger>("WinstonLogger");
|
||||||
|
const vLogger = new Logger(logger);
|
||||||
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||||
this.configServer = container.resolve<ConfigServer>("ConfigServer");
|
this.configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||||
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
|
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
|
||||||
@ -51,28 +54,31 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
||||||
//airdrop.updateAirdrops();
|
//airdrop.updateAirdrops();
|
||||||
|
|
||||||
const bots = new Bots(this.logger, this.databaseServer, this.botConfig);
|
const ammo = new Ammo(vLogger, this.databaseServer);
|
||||||
|
ammo.updateAmmo();
|
||||||
|
|
||||||
|
const bots = new Bots(vLogger, this.databaseServer, this.botConfig);
|
||||||
bots.updateBots();
|
bots.updateBots();
|
||||||
|
|
||||||
const flea = new Flea(this.logger, this.ragfairConfig, this.tables);
|
const flea = new Flea(vLogger, this.ragfairConfig, this.tables);
|
||||||
flea.updateFlea();
|
flea.updateFlea();
|
||||||
|
|
||||||
const globals = new Globals(this.logger, this.databaseServer);
|
const globals = new Globals(vLogger, this.databaseServer);
|
||||||
globals.updateGlobals();
|
globals.updateGlobals();
|
||||||
|
|
||||||
const hideout = new Hideout(this.logger, this.databaseServer);
|
const hideout = new Hideout(vLogger, this.databaseServer);
|
||||||
hideout.updateHideout();
|
hideout.updateHideout();
|
||||||
|
|
||||||
const insurance = new Insurance(this.logger, this.insuranceConfig);
|
const insurance = new Insurance(vLogger, this.insuranceConfig);
|
||||||
insurance.updateInsurance();
|
insurance.updateInsurance();
|
||||||
|
|
||||||
const items = new Items(this.logger, this.databaseServer);
|
const items = new Items(vLogger, this.databaseServer);
|
||||||
items.updateItems();
|
items.updateItems();
|
||||||
|
|
||||||
const loot = new Loot(this.logger, this.databaseServer, this.locationConfig);
|
const loot = new Loot(vLogger, this.databaseServer, this.locationConfig);
|
||||||
loot.updateLoot();
|
loot.updateLoot();
|
||||||
|
|
||||||
const raid = new Raid(this.logger, this.databaseServer, this.inRaidConfig);
|
const raid = new Raid(vLogger, this.databaseServer, this.inRaidConfig);
|
||||||
raid.updateRaid();
|
raid.updateRaid();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
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 { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
import { IInRaidConfig } from "@spt-aki/models/spt/config/IInRaidConfig";
|
||||||
|
import { Logger } from "./logger";
|
||||||
|
|
||||||
export class Raid
|
export class Raid
|
||||||
{
|
{
|
||||||
private modConfig = require("../config/config.json")
|
private modConfig = require("../config/config.json")
|
||||||
private logger: ILogger;
|
private logger: Logger;
|
||||||
private tables: IDatabaseTables;
|
private tables: IDatabaseTables;
|
||||||
private inRaidConfig: IInRaidConfig;
|
private inRaidConfig: IInRaidConfig;
|
||||||
|
|
||||||
constructor(logger:ILogger, databaseServer: DatabaseServer, inRaidConfig: IInRaidConfig)
|
constructor(logger:Logger, databaseServer: DatabaseServer, inRaidConfig: IInRaidConfig)
|
||||||
{
|
{
|
||||||
this.logger = logger;
|
this.logger = logger;
|
||||||
this.tables = databaseServer.getTables();
|
this.tables = databaseServer.getTables();
|
||||||
@ -19,50 +19,63 @@ export class Raid
|
|||||||
|
|
||||||
updateRaid(): void
|
updateRaid(): void
|
||||||
{
|
{
|
||||||
if (this.modConfig.raid.fixOpenZones)
|
const mod = this.modConfig.raid;
|
||||||
|
|
||||||
|
if (mod.fixOpenZones)
|
||||||
{
|
{
|
||||||
this.fixOpenZones();
|
this.fixOpenZones();
|
||||||
this.logger.info(`Open Zones: ${this.modConfig.raid.fixOpenZones}.`)
|
this.logger.info(`Open Zones: ${mod.fixOpenZones}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.raid.chompiesBossFix)
|
if (mod.chompiesBossFix)
|
||||||
{
|
{
|
||||||
this.chompiesBossFix();
|
this.chompiesBossFix();
|
||||||
this.logger.info(`Chompies Boss Fix: ${this.modConfig.raid.chompiesBossFix}.`)
|
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.raid.timeLimit)
|
if (mod.timeLimit)
|
||||||
{
|
{
|
||||||
this.raidTimeLimit();
|
const maps = this.tables.locations;
|
||||||
this.logger.info(`Raid Time Limits set to ${this.modConfig.raid.timeLimit} minutes.`);
|
|
||||||
|
for (const map in maps)
|
||||||
|
{
|
||||||
|
if (this.tables.locations[map].base?.EscapeTimeLimit)
|
||||||
|
{
|
||||||
|
this.tables.locations[map].base.EscapeTimeLimit = this.modConfig.raid.timeLimit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.raid.aiAmount.toLowerCase() != "asonline"
|
if (mod.aiAmount.toLowerCase() != "asonline" ||mod.aiDifficulty.toLowerCase() != "asonline" ||mod.bossEnabled != true
|
||||||
||this.modConfig.raid.aiDifficulty.toLowerCase() != "asonline"
|
||mod.scavWars != false ||mod.taggedAndCursed != false ||mod.enablePve != false)
|
||||||
||this.modConfig.raid.bossEnabled != true
|
|
||||||
||this.modConfig.raid.scavWars != false
|
|
||||||
||this.modConfig.raid.taggedAndCursed != false
|
|
||||||
||this.modConfig.raid.enablePve != false)
|
|
||||||
{
|
{
|
||||||
this.raidDifficulty();
|
const inRaidConfig = this.inRaidConfig;
|
||||||
this.logger.info(`AI Amount set to ${this.modConfig.raid.aiAmount}`);
|
|
||||||
this.logger.info(`AI Difficulty set to ${this.modConfig.raid.aiDifficulty}`);
|
inRaidConfig.raidMenuSettings["aiAmount"] = mod.aiAmount;
|
||||||
this.logger.info(`Boss Enabled set to ${this.modConfig.raid.bossEnabled}`);
|
inRaidConfig.raidMenuSettings["aiDifficulty"] = mod.aiDifficulty;
|
||||||
this.logger.info(`Scav Wars set to ${this.modConfig.raid.scavWars}`);
|
inRaidConfig.raidMenuSettings["bossEnabled"] = mod.bossEnabled;
|
||||||
this.logger.info(`Tagged And Cursed set to ${this.modConfig.raid.taggedAndCursed}`);
|
inRaidConfig.raidMenuSettings["scavWars"] = mod.scavWars;
|
||||||
this.logger.info(`Enable PvE set to ${this.modConfig.raid.enablePve}`);
|
inRaidConfig.raidMenuSettings["taggedAndCursed"] = mod.taggedAndCursed;
|
||||||
|
inRaidConfig.raidMenuSettings["enablePve"] = mod.enablePve;
|
||||||
|
this.logger.info(`AI Amount set to ${mod.aiAmount}`);
|
||||||
|
this.logger.info(`AI Difficulty set to ${mod.aiDifficulty}`);
|
||||||
|
this.logger.info(`Boss Enabled set to ${mod.bossEnabled}`);
|
||||||
|
this.logger.info(`Scav Wars set to ${mod.scavWars}`);
|
||||||
|
this.logger.info(`Tagged And Cursed set to ${mod.taggedAndCursed}`);
|
||||||
|
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.raid.carExtractBaseStandingGain != 0.25)
|
if (mod.carExtractBaseStandingGain != 0.25)
|
||||||
{
|
{
|
||||||
this.carExtractsGain();
|
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||||
this.logger.info(`Car Extract Base Standing Gain set to ${this.modConfig.raid.carExtractBaseStandingGain}`);
|
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (this.modConfig.scavExtractGain != 0.01)
|
if (mod.scavExtractGain != 0.01)
|
||||||
{
|
{
|
||||||
this.scavExtractGain();
|
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||||
this.logger.info(`Scav Extract Gain set to ${this.modConfig.raid.scavExtractGain}`);
|
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -112,37 +125,4 @@ export class Raid
|
|||||||
spawn4.TriggerId = "autoId_00000_D2_LEVER";
|
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.raid.aiAmount;
|
|
||||||
this.inRaidConfig.raidMenuSettings["aiDifficulty"] = this.modConfig.raid.aiDifficulty;
|
|
||||||
this.inRaidConfig.raidMenuSettings["bossEnabled"] = this.modConfig.raid.bossEnabled;
|
|
||||||
this.inRaidConfig.raidMenuSettings["scavWars"] = this.modConfig.raid.scavWars;
|
|
||||||
this.inRaidConfig.raidMenuSettings["taggedAndCursed"] = this.modConfig.raid.taggedAndCursed;
|
|
||||||
this.inRaidConfig.raidMenuSettings["enablePve"] = this.modConfig.raid.enablePve;
|
|
||||||
}
|
|
||||||
|
|
||||||
private carExtractsGain(): void
|
|
||||||
{
|
|
||||||
this.inRaidConfig.carExtractBaseStandingGain = this.modConfig.raid.carExtractBaseStandingGain;
|
|
||||||
}
|
|
||||||
|
|
||||||
private scavExtractGain(): void
|
|
||||||
{
|
|
||||||
this.inRaidConfig.scavExtractGain = this.modConfig.raid.scavExtractGain;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
45
Valens-AIO/tmp/airdrop.js
Normal file
45
Valens-AIO/tmp/airdrop.js
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
/*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;
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateAirdrops();
|
||||||
|
{
|
||||||
|
if (this.modConfig.airdropChancePercent != 25)
|
||||||
|
{
|
||||||
|
this.airdropChance();
|
||||||
|
this.logger.info(`Customs Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.bigmap}`);
|
||||||
|
this.logger.info(`Woods Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.woods}`);
|
||||||
|
this.logger.info(`Lighthouse Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.lighthouse}`);
|
||||||
|
this.logger.info(`Shoreline Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.shoreline}`);
|
||||||
|
this.logger.info(`Interchange Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.interchange}`);
|
||||||
|
this.logger.info(`Reserve Airdrop Chance is ${this.modConfig.airdrop.airdropChancePercent.reserve}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private airdropChance();
|
||||||
|
{
|
||||||
|
this.airdropConfig.airdropChancePercent["bigmap"] = this.modConfig.airdrop.airdropChancePercent.bigmap;
|
||||||
|
this.airdropConfig.airdropChancePercent["woods"] = this.modConfig.airdrop.airdropChancePercent.woods;
|
||||||
|
this.airdropConfig.airdropChancePercent["lighthouse"] = this.modConfig.airdrop.airdropChancePercent.lighthouse;
|
||||||
|
this.airdropConfig.airdropChancePercent["shoreline"] = this.modConfig.airdrop.airdropChancePercent.shoreline;
|
||||||
|
this.airdropConfig.airdropChancePercent["interchange"] = this.modConfig.airdrop.airdropChancePercent.interchange;
|
||||||
|
this.airdropConfig.airdropChancePercent["reserve"] = this.modConfig.airdrop.airdropChancePercent.reserve;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
*/
|
259
Valens-AIO/tmp/ammo.js
Normal file
259
Valens-AIO/tmp/ammo.js
Normal file
@ -0,0 +1,259 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Ammo = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Ammo {
|
||||||
|
constructor(logger, databaseServer) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer;
|
||||||
|
}
|
||||||
|
updateAmmo() {
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.ammo);
|
||||||
|
/**
|
||||||
|
* Grenade Launcher Ammo Max Stacks
|
||||||
|
*
|
||||||
|
* 5ede475b549eed7c6d5c18fb = M386 (HE) grenade
|
||||||
|
* 5ede475339ee016e8c534742 = M576 (MP-APERS) grenade
|
||||||
|
* 5f0c892565703e5c461894e9 = M433 (HEDP) grenade
|
||||||
|
* 5ede4739e0350d05467f73e8 = M406 (HE) grenade
|
||||||
|
* 5ede474b0c226a66f5402622 = M381 (HE) grenade
|
||||||
|
* 5ede47405b097655935d7d16 = M441 (HE) grenade
|
||||||
|
*/
|
||||||
|
if (this.modConfig.ammoStacks.grenadeCartridges != 1) {
|
||||||
|
const itemArray = ["5ede475b549eed7c6d5c18fb", "5ede475339ee016e8c534742", "5f0c892565703e5c461894e9", "5ede4739e0350d05467f73e8", "5ede474b0c226a66f5402622", "5ede47405b097655935d7d16"];
|
||||||
|
for (const id in itemArray) {
|
||||||
|
items[id]._props.StackMaxSize = mod.ammoStacks.grenadeCartridges;
|
||||||
|
this.logger.info(`Grenade Cartridges Max Stacks set to ${mod.ammoStacks.grenadeCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Marksman Caliber Ammo Max Stacks // 17
|
||||||
|
*
|
||||||
|
* 5a608bf24f39f98ffc77720e = 7.62x51 M62 Tracer // 7
|
||||||
|
* 58dd3ad986f77403051cba8f = M80
|
||||||
|
* 5a6086ea4f39f99cd479502f = M61
|
||||||
|
* 5e023e53d4353e3302577c4c = BCP FMJ
|
||||||
|
* 5e023e88277cce2b522ff2b1 = Ultra Nosler
|
||||||
|
* 5e023e6e34d52a55c3304f71 = TCW SP
|
||||||
|
* 5e023e6e34d52a55c3304f71 = M993
|
||||||
|
*
|
||||||
|
* 560d61e84bdc2da74d8b4571 = 7.62x54 R SNB gzh // 6
|
||||||
|
* 5887431f2459777e1612938f = R LPS gzh
|
||||||
|
* 59e77a2386f7742ee578960a = R PS gzh
|
||||||
|
* 5e023cf8186a883be655e54f = T-46M gzh
|
||||||
|
* 5e023d34e8a400319a28ed44 = BT gzh
|
||||||
|
* 5e023d48186a883be655e551 = BS gzh
|
||||||
|
*
|
||||||
|
* 5fc382b6d6fa9c00c571bbc3 = .338 LM TAC-X // 4
|
||||||
|
* 5fc382c1016cce60e8341b20 = UCW
|
||||||
|
* 5fc382a9d724d907e2077dab = AP
|
||||||
|
* 5fc275cf85fd526b824a571a = FMJ
|
||||||
|
*/
|
||||||
|
if (mod.ammoStacks.marksmanCartridges != 40) {
|
||||||
|
const itemArray = ["5a608bf24f39f98ffc77720e", "58dd3ad986f77403051cba8f", "5a6086ea4f39f99cd479502f", "5e023e53d4353e3302577c4c", "5e023e88277cce2b522ff2b1", "5e023e6e34d52a55c3304f71",
|
||||||
|
"5e023e6e34d52a55c3304f71", "560d61e84bdc2da74d8b4571", "5887431f2459777e1612938f", "59e77a2386f7742ee578960a", "5e023cf8186a883be655e54f", "5e023d34e8a400319a28ed44",
|
||||||
|
"5e023d48186a883be655e551", "5fc382b6d6fa9c00c571bbc3", "5fc382c1016cce60e8341b20", "5fc382a9d724d907e2077dab", "5fc275cf85fd526b824a571a"];
|
||||||
|
for (const id in itemArray) {
|
||||||
|
items[id]._props.StackMaxSize = mod.ammoStacks.marksmanCartridges;
|
||||||
|
this.logger.info(`Marksman Cartridges Max Stacks set to ${mod.ammoStacks.marksmanCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Pistol Caliber Ammo Max Stacks // 53
|
||||||
|
*
|
||||||
|
* 5ba26835d4351e0035628ff5 = 4.6x30mm AP SX // 4
|
||||||
|
* 5ba26812d4351e003201fef1 = Action SX
|
||||||
|
* 5ba2678ad4351e44f824b344 = FMJ SX
|
||||||
|
* 5ba26844d4351e00334c9475 = Subsonic SX
|
||||||
|
*
|
||||||
|
* 5cc80f79e4a949033c7343b2 = 5.7x28mm SS198LF // 7
|
||||||
|
* 5cc86832d7f00c000d3a6e6c = R37.F
|
||||||
|
* 5cc80f38e4a949001152b560 = SS190
|
||||||
|
* 5cc86840d7f00c002412c56c = R37.X
|
||||||
|
* 5cc80f53e4a949000e1ea4f8 = L191
|
||||||
|
* 5cc80f8fe4a949033b0224a2 = SS197SR
|
||||||
|
* 5cc80f67e4a949035e43bbba = SB193
|
||||||
|
*
|
||||||
|
* 5735ff5c245977640e39ba7e = 7.62x25mm TT FMJ43 // 7
|
||||||
|
* 573601b42459776410737435 = LRN
|
||||||
|
* 5736026a245977644601dc61 = P gl
|
||||||
|
* 573603562459776430731618 = Pst gzh
|
||||||
|
* 573602322459776445391df1 = LRNPC
|
||||||
|
* 5735fdcd2459776445391d61 = AKBS
|
||||||
|
* 573603c924597764442bd9cb - PT gzh
|
||||||
|
*
|
||||||
|
* 5737218f245977612125ba51 = 9x18mm PM SP8 gzh // 14
|
||||||
|
* 573719762459775a626ccbc1 = P gzh
|
||||||
|
* 57371aab2459775a77142f22 = PstM gzh
|
||||||
|
* 573720e02459776143012541 = RG028 gzh
|
||||||
|
* 573718ba2459775a75491131 = BZhT gzh
|
||||||
|
* 5737207f24597760ff7b25f2 = PM PSV
|
||||||
|
* 57372140245977611f70ee91 = SP7 gzh
|
||||||
|
* 573719df2459775a626ccbc2 = PBM gzh
|
||||||
|
* 57371f8d24597761006c6a81 = PSO gzh
|
||||||
|
* 5737201124597760fc4431f1 = Pst gzh
|
||||||
|
* 57371f2b24597761224311f1 = PS gs PPO
|
||||||
|
* 57371eb62459776125652ac1 = PRS gs
|
||||||
|
* 57371e4124597760ff7b25f1 = PPT gzh
|
||||||
|
* 57371b192459775a9f58a5e0 = PPe gzh
|
||||||
|
*
|
||||||
|
* 58864a4f2459770fcc257101 = 9x19mm PSO gzh // 8
|
||||||
|
* 56d59d3ad2720bdb418b4577 = Pst gzh
|
||||||
|
* 5c3df7d588a4501f290594e5 = Green tracer
|
||||||
|
* 5c0d56a986f774449d5de529 = RIP
|
||||||
|
* 5c925fa22e221601da359b7b = AP 6.3
|
||||||
|
* 5a3c16fe86f77452b62de32a = Luger CCI
|
||||||
|
* 5efb0da7a29a85116f6ea05f = PBP gzh
|
||||||
|
* 5efb0e16aeb21837e749c7ff = Quakemaker
|
||||||
|
*
|
||||||
|
* 5a26abfac4a28232980eabff = 9x21mm P gzh // 4
|
||||||
|
* 5a269f97c4a282000b151807 = PS gzh
|
||||||
|
* 5a26ac06c4a282000c5a90a8 = PE gzh
|
||||||
|
* 5a26ac0ec4a28200741e1e18 = BT gzh
|
||||||
|
*
|
||||||
|
* 62330b3ed4dc74626d570b95 = .357 Mag FMJ // 4
|
||||||
|
* 62330bfadc5883093563729b = Hollow Point
|
||||||
|
* 62330c40bdd19b369e1e53d1 = Soft Point
|
||||||
|
* 62330c18744e5e31df12f516 = Jacket HP
|
||||||
|
*
|
||||||
|
* 5e81f423763d9f754677bf2e = .45 ACP Match FMJ // 5
|
||||||
|
* 5efb0fc6aeb21837e749c801 = Hydra-Shok
|
||||||
|
* 5efb0d4f4bc50b58e81710f3 = Lasermatch FMJ
|
||||||
|
* 5efb0cabfb3e451d70735af5 = AP
|
||||||
|
* 5ea2a8e200685063ec28c05a = RIP
|
||||||
|
*/
|
||||||
|
if (mod.ammoStacks.pistolCartridges != 50) {
|
||||||
|
const itemArray = ["5ba26835d4351e0035628ff5", "5ba26812d4351e003201fef1", "5ba2678ad4351e44f824b344", "5ba26844d4351e00334c9475", "5cc80f79e4a949033c7343b2", "5cc86832d7f00c000d3a6e6c",
|
||||||
|
"5cc80f38e4a949001152b560", "5cc86840d7f00c002412c56c", "5cc80f53e4a949000e1ea4f8", "5cc80f8fe4a949033b0224a2", "5cc80f67e4a949035e43bbba", "5735ff5c245977640e39ba7e",
|
||||||
|
"573601b42459776410737435", "5736026a245977644601dc61", "573603562459776430731618", "573602322459776445391df1", "5735fdcd2459776445391d61", "573603c924597764442bd9cb",
|
||||||
|
"5737218f245977612125ba51", "573719762459775a626ccbc1", "57371aab2459775a77142f22", "573720e02459776143012541", "573718ba2459775a75491131", "5737207f24597760ff7b25f2",
|
||||||
|
"57372140245977611f70ee91", "573719df2459775a626ccbc2", "57371f8d24597761006c6a81", "5737201124597760fc4431f1", "57371f2b24597761224311f1", "57371eb62459776125652ac1", "57371e4124597760ff7b25f1", "57371b192459775a9f58a5e0",
|
||||||
|
"58864a4f2459770fcc257101", "56d59d3ad2720bdb418b4577", "5c3df7d588a4501f290594e5", "5c0d56a986f774449d5de529", "5c925fa22e221601da359b7b", "5a3c16fe86f77452b62de32a",
|
||||||
|
"5efb0da7a29a85116f6ea05f", "5efb0e16aeb21837e749c7ff", "5a26abfac4a28232980eabff", "5a269f97c4a282000b151807", "5a26ac06c4a282000c5a90a8", "5a26ac0ec4a28200741e1e18",
|
||||||
|
"62330b3ed4dc74626d570b95", "62330bfadc5883093563729b", "62330c40bdd19b369e1e53d1", "62330c18744e5e31df12f516", "5e81f423763d9f754677bf2e", "5efb0fc6aeb21837e749c801",
|
||||||
|
"5efb0d4f4bc50b58e81710f3", "5efb0cabfb3e451d70735af5", "5ea2a8e200685063ec28c05a"];
|
||||||
|
for (const id in itemArray) {
|
||||||
|
items[id]._props.StackMaxSize = mod.ammoStacks.pistolCartridges;
|
||||||
|
this.logger.info(`Pistol Cartridges Max Stacks set to ${mod.ammoStacks.pistolCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Rifle Calibers Max Ammo Stacks // 47
|
||||||
|
*
|
||||||
|
* 56dff3afd2720bba668b4567 = 5.45x39mm PS gs // 13
|
||||||
|
* 56dff421d2720b5f5a8b4567 = SP
|
||||||
|
* 5c0d5e4486f77478390952fe = PPBS gs "Igolnik"
|
||||||
|
* 56dff338d2720bbd668b4569 = PRS gs
|
||||||
|
* 56dff061d2720bb5668b4567 = BT gs
|
||||||
|
* 56dff4ecd2720b5f5a8b4568 = US gs
|
||||||
|
* 56dfef82d2720bbd668b4567 = BP gs
|
||||||
|
* 56dff216d2720bbd668b4568 = HP
|
||||||
|
* 56dff026d2720bb8668b4567 = BS gs
|
||||||
|
* 56dff4a2d2720bbd668b456a = T gs
|
||||||
|
* 56dff2ced2720bb4668b4567 = PP gs
|
||||||
|
* 56dff0bed2720bb0668b4567 = FMJ
|
||||||
|
*
|
||||||
|
* 59e68f6f86f7746c9f75e846 = 5.56x45mm M856 // 11
|
||||||
|
* 59e6918f86f7746c9f75e849 = Mk255 Mod 0 (RRLP)
|
||||||
|
* 59e690b686f7746c9f75e848 = M995
|
||||||
|
* 54527ac44bdc2d36668b4567 = M855A1
|
||||||
|
* 59e6906286f7746c9f75e847 = M856A1
|
||||||
|
* 54527a984bdc2d4e668b4567 = M855
|
||||||
|
* 59e6927d86f77411da468256 = HP
|
||||||
|
* 59e6920f86f77411d82aa167 = FMJ
|
||||||
|
* 5c0d5ae286f7741e46554302 = Warmage
|
||||||
|
* 60194943740c5d77f6705eea = MK 318 Mod 0 (SOST)
|
||||||
|
* 601949593ae8f707c4608daa = SSA AP
|
||||||
|
*
|
||||||
|
* 619636be6db0f2477964e710 = .300 Blackout M62 Tracer // 5
|
||||||
|
* 5fbe3ffdf8b6a877a729ea82 = BCP FMJ
|
||||||
|
* 5fd20ff893a8961fc660a954 = AP
|
||||||
|
* 6196364158ef8c428c287d9f = V-Max
|
||||||
|
* 6196365d58ef8c428c287da1 = Whisper
|
||||||
|
*
|
||||||
|
* 5656d7c34bdc2d9d198b4587 = 7.62x39mm PS gzh // 6
|
||||||
|
* 59e4d3d286f774176a36250a = HP
|
||||||
|
* 59e4d24686f7741776641ac7 = US gzh
|
||||||
|
* 59e4cf5286f7741778269d8a = T-45M1 gzh
|
||||||
|
* 59e0d99486f7744a32234762 = BP gzh
|
||||||
|
* 601aa3d2b2bcb34913271e6d = MAI AP
|
||||||
|
*
|
||||||
|
* 57a0dfb82459774d3078b56c = 9x39mm SP-5 gs // 5
|
||||||
|
* 5c0d688c86f77413ae3407b2 = BP gs
|
||||||
|
* 57a0e5022459774d1673f889 = SP-6 gs
|
||||||
|
* 5c0d668f86f7747ccb7f13b2 = SPP gs
|
||||||
|
* 61962d879bb3d20b0946d385 = PAB-9 gs
|
||||||
|
*
|
||||||
|
* 59e6542b86f77411dc52a77a = .366 TKM FMJ // 4
|
||||||
|
* 59e6658b86f77411d949b250 = Geksa
|
||||||
|
* 59e655cb86f77411dc52a77b = EKO
|
||||||
|
* 5f0596629e22f464da6bbdd9 = AP-M
|
||||||
|
*
|
||||||
|
* 5cadf6ddae9215051e1c23b2 = 12.7x55mm PS12 // 3
|
||||||
|
* 5cadf6eeae921500134b2799 = PS12B
|
||||||
|
* 5cadf6e5ae921500113bb973 = PS12A
|
||||||
|
*/
|
||||||
|
if (mod.ammoStacks.rifleCartridges != 60) {
|
||||||
|
const itemArray = ["56dff3afd2720bba668b4567", "56dff421d2720b5f5a8b4567", "5c0d5e4486f77478390952fe", "56dff338d2720bbd668b4569", "56dff061d2720bb5668b4567", "56dff4ecd2720b5f5a8b4568",
|
||||||
|
"56dfef82d2720bbd668b4567", "56dff216d2720bbd668b4568", "56dff026d2720bb8668b4567", "56dff4a2d2720bbd668b456a", "56dff2ced2720bb4668b4567", "56dff0bed2720bb0668b4567", "59e68f6f86f7746c9f75e846",
|
||||||
|
"59e6918f86f7746c9f75e849", "59e690b686f7746c9f75e848", "54527ac44bdc2d36668b4567", "59e6906286f7746c9f75e847", "54527a984bdc2d4e668b4567", "59e6927d86f77411da468256", "59e6920f86f77411d82aa167",
|
||||||
|
"5c0d5ae286f7741e46554302", "60194943740c5d77f6705eea", "601949593ae8f707c4608daa", "619636be6db0f2477964e710", "5fbe3ffdf8b6a877a729ea82", "5fd20ff893a8961fc660a954", "6196364158ef8c428c287d9f",
|
||||||
|
"6196365d58ef8c428c287da1", "5656d7c34bdc2d9d198b4587", "59e4d3d286f774176a36250a", "59e4d24686f7741776641ac7", "59e4cf5286f7741778269d8a", "59e0d99486f7744a32234762", "601aa3d2b2bcb34913271e6d",
|
||||||
|
"57a0dfb82459774d3078b56c", "5c0d688c86f77413ae3407b2", "57a0e5022459774d1673f889", "5c0d668f86f7747ccb7f13b2", "61962d879bb3d20b0946d385", "59e6542b86f77411dc52a77a", "59e6658b86f77411d949b250",
|
||||||
|
"59e655cb86f77411dc52a77b", "5f0596629e22f464da6bbdd9", "5cadf6ddae9215051e1c23b2", "5cadf6eeae921500134b2799", "5cadf6e5ae921500113bb973"];
|
||||||
|
for (const id in itemArray) {
|
||||||
|
items[id]._props.StackMaxSize = mod.ammoStacks.rifleCartridges;
|
||||||
|
this.logger.info(`Rifle Cartridges Max Stacks set to ${mod.ammoStacks.rifleCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Shotgun Cartridges Max Ammo Stacks // 28
|
||||||
|
*
|
||||||
|
* 560d5e524bdc2d25448b4571 = 12x70 7mm Buckshot // 16
|
||||||
|
* 5d6e6806a4b936088465b17e = 8.5mm Magnum
|
||||||
|
* 5c0d591486f7744c505b416f = RIP
|
||||||
|
* 5d6e68c4a4b9361b93413f79 = .50 BMG Slug
|
||||||
|
* 5d6e6772a4b936088465b17c = 5.25mm Buckshot
|
||||||
|
* 5d6e67fba4b9361bc73bc779 = 6.5mm Express
|
||||||
|
* 5d6e6911a4b9361bd5780d52 = Flechette
|
||||||
|
* 5d6e68e6a4b9361c140bcfe0 = FTX Custom Lite slug
|
||||||
|
* 5d6e68a8a4b9360b6c0d54e2 = AP-20 armor-piercing slug
|
||||||
|
* 5d6e68dea4b9361bcc29e659 = Dual sabot slug
|
||||||
|
* 5d6e689ca4b9361bc8618956 = Poleva-6u slug
|
||||||
|
* 5d6e6891a4b9361bd473feea = Poleva 3 slug
|
||||||
|
* 5d6e6869a4b9361c140bcfde = Grizzly 40 slug
|
||||||
|
* 5d6e68d1a4b93622fe60e845 = SuperFormance HP slug
|
||||||
|
* 5d6e68b3a4b9361bca7e50b5 = Copper Sabot Premier HP slug
|
||||||
|
* 58820d1224597753c90aeb13 = lead slug
|
||||||
|
*
|
||||||
|
* 5a38ebd9c4a282000d722a5b = 20x70 7.5mm Buckshot // 8
|
||||||
|
* 5d6e6a05a4b93618084f58d0 = Star slug
|
||||||
|
* 5d6e69c7a4b9360b6c0d54e4 = 7.3mm buckshot
|
||||||
|
* 5d6e6a5fa4b93614ec501745 = Devastator slug
|
||||||
|
* 5d6e695fa4b936359b35d852 = 5.6mm buckshot
|
||||||
|
* 5d6e6a42a4b9364f07165f52 = Poleva-6u slug
|
||||||
|
* 5d6e6a53a4b9361bd473feec = Poleva-3 slug
|
||||||
|
* 5d6e69b9a4b9361bc8618958 = 6.2mm buckshot
|
||||||
|
*
|
||||||
|
* 5e85a9a6eacf8c039e4e2ac1 = 23x75mm Shrapnel-10 buckshot // 4
|
||||||
|
* 5f647f31b6238e5dd066e196 = Shrapnel-25 buckshot
|
||||||
|
* 5e85a9f4add9fe03027d9bf1 = Zvezda flashbang round
|
||||||
|
* 5e85aa1a988a8701445df1f5 = Barrikada slug
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
if (mod.ammoStacks.shotgunCartridges != 20) {
|
||||||
|
const itemArray = ["560d5e524bdc2d25448b4571", "5d6e6806a4b936088465b17e", "5c0d591486f7744c505b416f", "5d6e68c4a4b9361b93413f79", "5d6e6772a4b936088465b17c", "5d6e67fba4b9361bc73bc779",
|
||||||
|
"5d6e6911a4b9361bd5780d52", "5d6e68e6a4b9361c140bcfe0", "5d6e68a8a4b9360b6c0d54e2", "5d6e68dea4b9361bcc29e659", "5d6e689ca4b9361bc8618956", "5d6e6891a4b9361bd473feea",
|
||||||
|
"5d6e6869a4b9361c140bcfde", "5d6e68d1a4b93622fe60e845", "5d6e68b3a4b9361bca7e50b5", "58820d1224597753c90aeb13", "5a38ebd9c4a282000d722a5b", "5d6e6a05a4b93618084f58d0",
|
||||||
|
"5d6e69c7a4b9360b6c0d54e4", "5d6e6a5fa4b93614ec501745", "5d6e695fa4b936359b35d852", "5d6e6a42a4b9364f07165f52", "5d6e6a53a4b9361bd473feec", "5d6e69b9a4b9361bc8618958",
|
||||||
|
"5e85a9a6eacf8c039e4e2ac1", "5f647f31b6238e5dd066e196", "5e85a9f4add9fe03027d9bf1", "5e85aa1a988a8701445df1f5"];
|
||||||
|
for (const id in itemArray) {
|
||||||
|
items[id]._props.StackMaxSize = mod.ammoStacks.shotgunCartridges;
|
||||||
|
this.logger.info(`Shotgun Cartridges Max Stacks set to ${mod.ammoStacks.shotgunCartridges}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Ammo = Ammo;
|
101
Valens-AIO/tmp/bots.js
Normal file
101
Valens-AIO/tmp/bots.js
Normal file
@ -0,0 +1,101 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Bots = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Bots {
|
||||||
|
constructor(logger, databaseServer, botConfig) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.botConfig = botConfig;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
updateBots() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.bots);
|
||||||
|
// Changes PMC difficulty to Easy, Normal, Hard, Impossible or AsOnline. Default AsOnline.
|
||||||
|
if (mod.pmc.pmcDifficulty.toLowerCase() != "AsOnline") {
|
||||||
|
this.botConfig.pmc.difficulty = mod.pmcDifficulty;
|
||||||
|
this.logger.info(`PMC Bot Difficulty set to ${mod.pmcDifficulty}`);
|
||||||
|
}
|
||||||
|
// Enables common and secure containers to spawn on PMCs while additionally whitelisting the parent IDs. Rarity adjusted via PMC lootNValue. Default true.
|
||||||
|
if (mod.pmc.containersOnPMCs) {
|
||||||
|
this.containersOnPMCs();
|
||||||
|
this.logger.info(`Containers On PMCs: ${mod.pmc.containersOnPMCs}`);
|
||||||
|
}
|
||||||
|
// Chance that PMC bot will be USEC or BEAR. Higher value means higher chance for the PMC to be USEC. Default is 50%
|
||||||
|
if (mod.pmc.isUsec != 50) {
|
||||||
|
this.botConfig.pmc.isUsec = mod.isUsec;
|
||||||
|
this.logger.info(`PMC isUsec Chance is: ${mod.isUsec}`);
|
||||||
|
}
|
||||||
|
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
||||||
|
if (mod.pmc.maxBackpackLootTotalRub != 150000
|
||||||
|
|| mod.pmc.maxPocketLootTotalRub != 50000
|
||||||
|
|| mod.pmc.maxVestLootTotalRub != 50000) {
|
||||||
|
this.botConfig.pmc.maxBackpackLootTotalRub = mod.pmc.maxBackpackLootTotalRub;
|
||||||
|
this.botConfig.pmc.maxPocketLootTotalRub = mod.pmc.maxPocketLootTotalRub;
|
||||||
|
this.botConfig.pmc.maxVestLootTotalRub = mod.pmc.maxVestLootTotalRub;
|
||||||
|
this.logger.info("PMC Loot Value totals changed!");
|
||||||
|
this.logger.info(`Max Backpack Total Value: ${mod.pmc.maxBackpackLootTotalRub}`);
|
||||||
|
this.logger.info(`Max Pocket Total Value: ${mod.pmc.maxPocketLootTotalRub}`);
|
||||||
|
this.logger.info(`Max Vest Total Value: ${mod.pmc.maxVestLootTotalRub}`);
|
||||||
|
}
|
||||||
|
// Chance that the PMC bot of your side (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||||
|
if (mod.pmc.chanceSameSideIsHostilePercent != 50) {
|
||||||
|
this.botConfig.pmc.chanceSameSideIsHostilePercent = mod.pmc.chanceSameSideIsHostilePercent;
|
||||||
|
this.logger.info(`Chance Same Side Is Hostle is ${mod.pmc.chanceSameSideIsHostilePercent}`);
|
||||||
|
}
|
||||||
|
// Max Bot Cap located in configs/bot.json/maxBotCap
|
||||||
|
if (mod.maxBotCap != 20) {
|
||||||
|
this.botConfig.maxBotCap = mod.maxBotCap;
|
||||||
|
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
||||||
|
}
|
||||||
|
if (mod.pmc.lootNValue != 1.7 || mod.scav.lootNValue != 2) {
|
||||||
|
this.botConfig.lootNValue.scav = mod.scav.lootNValue;
|
||||||
|
this.botConfig.lootNValue.pmc = mod.pmc.lootNValue;
|
||||||
|
this.logger.info("Loot NValue for bots has been changed!");
|
||||||
|
this.logger.info(`Scav lootNValue set to ${mod.scav.lootNValue}`);
|
||||||
|
this.logger.info(`PMC lootNValue set to ${mod.pmc.lootNValue}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
containersOnPMCs() {
|
||||||
|
const usec = this.tables.bots.types.usec.inventory.items.Backpack;
|
||||||
|
const bear = this.tables.bots.types.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");
|
||||||
|
}
|
||||||
|
containers() {
|
||||||
|
/* 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
|
||||||
|
* Ammunition case: 5aafbde786f774389d0cbc0f
|
||||||
|
* Documents case: 590c60fc86f77412b13fddcf
|
||||||
|
* Key tool: 59fafd4b86f7745ca07e123
|
||||||
|
* Injector case: 619cbf7d23893217ec30b689
|
||||||
|
* Dogtag case: 5c093e3486f77430cb02e593
|
||||||
|
* Keycard holder: 619cbf9e0a7c3a1a2731940a
|
||||||
|
* WZ Wallet: 60b0f6c058e0b0481a09ad11
|
||||||
|
* Pistol case: 567143bf4bdc2d1a0f8b4567
|
||||||
|
* Secure container: 5448bf274bdc2dfc2f8b456a
|
||||||
|
* Kappa container: 5c093ca986f7740a1867ab12
|
||||||
|
* Gamme container: 60b0f6c058e0b0481a09ad11
|
||||||
|
*/
|
||||||
|
const lootItems = ["5d235bb686f77443f4331278", "5c127c4486f7745625356c13", "59fb023c86f7746d0d4b423c", "5b6d9ce188a4501afc1b2b25", "59fb042886f7746c5005a7b2", "5c0a840b86f7742ffa4f2482",
|
||||||
|
"59fb016586f7746d0d4b423a", "5c093db286f7740a1b2617e3", "5aafbcd986f7745e590fff23", "5b7c710788a4506dec015957", "5e2af55f86f7746d4159f07c", "5448bf274bdc2dfc2f8b456a", "5c093ca986f7740a1867ab12",
|
||||||
|
"5aafbde786f774389d0cbc0f", "590c60fc86f77412b13fddcf", "59fafd4b86f7745ca07e1232", "619cbf7d23893217ec30b689", "619cbf9e0a7c3a1a2731940a", "5c093e3486f77430cb02e593", "60b0f6c058e0b0481a09ad11",
|
||||||
|
"567143bf4bdc2d1a0f8b4567", "60b0f6c058e0b0481a09ad11", "59db794186f77448bc595262", "5857a8b324597729ab0a0e7d"];
|
||||||
|
return lootItems;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Bots = Bots;
|
56
Valens-AIO/tmp/flea.js
Normal file
56
Valens-AIO/tmp/flea.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Flea = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Flea {
|
||||||
|
constructor(logger, ragfairConfig, tables) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.ragfairConfig = ragfairConfig;
|
||||||
|
this.tables = tables;
|
||||||
|
}
|
||||||
|
updateFlea() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.flea);
|
||||||
|
const global = this.tables.globals.config.RagFair;
|
||||||
|
const ragfair = this.ragfairConfig.dynamic;
|
||||||
|
if (mod.minUserLevel != 15) {
|
||||||
|
global.minUserLevel = mod.minUserLevel;
|
||||||
|
this.logger.info(`Fleamarket unlocked at level ${mod.minUserLevel}`);
|
||||||
|
}
|
||||||
|
if (!mod.blacklist.enableBsgList || !mod.blacklist.enableQuestList) {
|
||||||
|
ragfair.blacklist.enableBsgList = mod.blacklist.enableBsgList;
|
||||||
|
ragfair.blacklist.enableQuestList = mod.blacklist.enableQuestList;
|
||||||
|
this.logger.info("Fleamarket Blacklists patched");
|
||||||
|
}
|
||||||
|
if (mod.condition.conditionChance != 0.2 || mod.condition.min != 0.6 || mod.condition.max != 1) {
|
||||||
|
ragfair.condition.conditionChance = mod.conditionChance;
|
||||||
|
ragfair.condition.min = mod.min;
|
||||||
|
ragfair.condition.max = mod.max;
|
||||||
|
this.logger.info("Fleamarket Condition patched");
|
||||||
|
}
|
||||||
|
if (mod.currencies.roubles != 78 || mod.currencies.dollars != 20 || mod.currencies.euros != 2) {
|
||||||
|
ragfair.currencies["5449016a4bdc2d6f028b456f"] = mod.currencies.roubles;
|
||||||
|
ragfair.currencies["5696686a4bdc2da3298b456a"] = mod.currencies.dollars;
|
||||||
|
ragfair.currencies["569668774bdc2da2298b4568"] = mod.currencies.euros;
|
||||||
|
this.logger.info("Fleamarket Currencies patched");
|
||||||
|
}
|
||||||
|
if (mod.offerItemCount.min != 8 || mod.offerItemCount.max != 15) {
|
||||||
|
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||||
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
|
this.logger.info("Fleamarket Offer Item Count patched");
|
||||||
|
}
|
||||||
|
if (mod.reputation.gain != 0.0000002 || mod.reputation.loss != 0.0000002) {
|
||||||
|
ragfair.offerItemCount.min = mod.offerItemCount.min;
|
||||||
|
ragfair.offerItemCount.max = mod.offerItemCount.max;
|
||||||
|
this.logger.info("Fleamarket Reputation patched");
|
||||||
|
}
|
||||||
|
if (mod.time.baseSellTime != 15 || mod.time.minSellTime != 5 || mod.time.maxSellTime != 15) {
|
||||||
|
const sell = this.ragfairConfig.sell;
|
||||||
|
sell.time.base = mod.time.baseSellTime;
|
||||||
|
sell.time.min = mod.time.minSellTime;
|
||||||
|
sell.time.max = mod.time.maxSellTime;
|
||||||
|
this.logger.info("Fleamarket Sell Times patched");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Flea = Flea;
|
50
Valens-AIO/tmp/globals.js
Normal file
50
Valens-AIO/tmp/globals.js
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Globals = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Globals {
|
||||||
|
constructor(logger, databaseServer) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer;
|
||||||
|
}
|
||||||
|
updateGlobals() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.globals);
|
||||||
|
const global = this.databaseServer.getTables().globals;
|
||||||
|
if (mod.damagePerMeter != 9 || mod.safeHeight != 3) {
|
||||||
|
global.config.Health.Falling.DamagePerMeter = mod.damagePerMeter;
|
||||||
|
global.config.Health.Falling.SafeHeight = mod.safeHeight;
|
||||||
|
this.logger.info(`Safe Fall Height set to ${mod.safeHeight} meters`);
|
||||||
|
this.logger.info(`Damage Per Meter set to ${mod.damagePerMeter} meters`);
|
||||||
|
}
|
||||||
|
if (mod.maxLoyaltyTraders) {
|
||||||
|
global.config.MaxLoyaltyLevelForAll = mod.maxLoyaltyTraders;
|
||||||
|
this.logger.info(`Max Loyalty Traders is: ${mod.maxLoyaltyTraders}`);
|
||||||
|
}
|
||||||
|
if (mod.timeBeforeDeployLocal != 10) {
|
||||||
|
global.config.TimeBeforeDeployLocal = mod.timeBeforeDeployLocal;
|
||||||
|
this.logger.info(`Time Before Deploy set to: ${mod.timeBeforeDeployLocal}`);
|
||||||
|
}
|
||||||
|
if (mod.match_end.survived_exp_requirement != 200 || mod.match_end.survived_seconds_requirement != 420 || mod.match_end.survived_exp_reward != 300
|
||||||
|
|| mod.match_end.mia_exp_reward != 200 || mod.match_end.runner_exp_reward != 200 || mod.match_end.leftMult != 0
|
||||||
|
|| mod.match_end.miaMult != 1 || mod.match_end.survivedMult != 1.3 || mod.match_end.runnerMult != 0.5
|
||||||
|
|| mod.match_end.killedMult != 1 || mod.match_end.headShotMult != 1.2 || mod.match_end.expOnDamageAllHealth != 50) {
|
||||||
|
const global1 = this.databaseServer.getTables().globals.config.exp.match_end;
|
||||||
|
const mod = this.modConfig.globals.match_end;
|
||||||
|
global1.survived_exp_requirement = mod.survived_exp_requirement;
|
||||||
|
global1.survived_seconds_requirement = mod.survived_seconds_requirement;
|
||||||
|
global1.survived_exp_reward = mod.survived_exp_reward;
|
||||||
|
global1.mia_exp_reward = mod.mia_exp_reward;
|
||||||
|
global1.runner_exp_reward = mod.runner_exp_reward;
|
||||||
|
global1.leftMult = mod.leftMult;
|
||||||
|
global1.miaMult = mod.miaMult;
|
||||||
|
global1.survivedMult = mod.survivedMult;
|
||||||
|
global1.runnerMult = mod.runnerMult;
|
||||||
|
global1.killedMult = mod.killedMult;
|
||||||
|
this.databaseServer.getTables().globals.config.exp.kill.headShotMult = mod.headShotMult;
|
||||||
|
this.databaseServer.getTables().globals.config.exp.kill.expOnDamageAllHealth = mod.expOnDamageAllHealth;
|
||||||
|
this.logger.info("Match End Globals Patched");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Globals = Globals;
|
56
Valens-AIO/tmp/hideout.js
Normal file
56
Valens-AIO/tmp/hideout.js
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Hideout = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Hideout {
|
||||||
|
constructor(logger, databaseServer) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer;
|
||||||
|
}
|
||||||
|
updateHideout() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.hideout);
|
||||||
|
if (mod.constructionTime != 1) {
|
||||||
|
this.updateConstructionTime();
|
||||||
|
this.logger.info(`Construction Time Patched to ${mod.constructionTime} `);
|
||||||
|
}
|
||||||
|
if (mod.productionTime != 1) {
|
||||||
|
this.updateProductionTime();
|
||||||
|
this.logger.info(`Production Time Patched to ${mod.productionTime} `);
|
||||||
|
}
|
||||||
|
if (mod.scavCaseTime != 1) {
|
||||||
|
this.updateScavCase();
|
||||||
|
this.logger.info(`Scav Case TIme Patched to ${mod.scavCaseTime}`);
|
||||||
|
}
|
||||||
|
if (mod.airFilterUnitFlowRate != 0.0047222222222222
|
||||||
|
|| mod.generatorFuelFlowRate != 0.0013194444444444
|
||||||
|
|| mod.gpuBoostRate != 0.041225) {
|
||||||
|
const settings = this.databaseServer.getTables().hideout.settings;
|
||||||
|
settings.airFilterUnitFlowRate = mod.airFilterUnitFlowRate;
|
||||||
|
settings.generatorFuelFlowRate = mod.generatorFuelFlowRate;
|
||||||
|
settings.gpuBoostRate = mod.gpuBoostRate;
|
||||||
|
this.logger.info(`Air Filter Flow Rate set to ${mod.airFilterUnitFlowRate}`);
|
||||||
|
this.logger.info(`Generator Fuel Flow Rate set to ${mod.generatorFuelFlowRate}`);
|
||||||
|
this.logger.info(`GPU Boost Rate set to ${mod.gpuBoostRate}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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.hideout.constructionTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateProductionTime() {
|
||||||
|
for (const production of this.databaseServer.getTables().hideout.production) {
|
||||||
|
production.productionTime *= this.modConfig.hideout.productionTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
updateScavCase() {
|
||||||
|
for (const scavCase of this.databaseServer.getTables().hideout.scavcase) {
|
||||||
|
scavCase.ProductionTime *= this.modConfig.hideout.scavCaseTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Hideout = Hideout;
|
27
Valens-AIO/tmp/insurance.js
Normal file
27
Valens-AIO/tmp/insurance.js
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Insurance = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Insurance {
|
||||||
|
constructor(logger, insuranceConfig) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.insuranceConfig = insuranceConfig;
|
||||||
|
}
|
||||||
|
updateInsurance() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.insurance);
|
||||||
|
if (mod.insuranceMultiplier.prapor != 0.16 || mod.insuranceMultiplier.therapist != 0.25) {
|
||||||
|
this.insuranceConfig.insuranceMultiplier["54cb50c76803fa8b248b4571"] = mod.insuranceMultiplier.prapor;
|
||||||
|
this.insuranceConfig.insuranceMultiplier["54cb57776803fa99248b456e"] = mod.insuranceMultiplier.therapist;
|
||||||
|
this.logger.info(`Prapor Insurance Price Multiplier Set to ${mod.insuranceMultiplier.prapor}`);
|
||||||
|
}
|
||||||
|
this.logger.info(`Therapist Insurance Price Multiplier Set to ${mod.insuranceMultiplier.therapist}`);
|
||||||
|
if (mod.returnChancePercent.prapor != 80 || mod.returnChancePercent.therapist != 85) {
|
||||||
|
this.insuranceConfig.returnChancePercent["54cb50c76803fa8b248b4571"] = mod.returnChancePercent.prapor;
|
||||||
|
this.insuranceConfig.returnChancePercent["54cb57776803fa99248b456e"] = mod.returnChancePercent.therapist;
|
||||||
|
this.logger.info(`Prapor Insurance Return Chance Set to ${mod.returnChancePercent.prapor}`);
|
||||||
|
this.logger.info(`Therapist Insurance Return Chance set to ${mod.returnChancePercent.therapist}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Insurance = Insurance;
|
102
Valens-AIO/tmp/items.js
Normal file
102
Valens-AIO/tmp/items.js
Normal file
@ -0,0 +1,102 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Items = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Items {
|
||||||
|
constructor(logger, databaseServer) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer;
|
||||||
|
}
|
||||||
|
updateItems() {
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.items);
|
||||||
|
// Weight Modifier. Multiplier of Weight *= modConfig.weightModifier
|
||||||
|
if (mod.weightModifier != 1) {
|
||||||
|
this.updateWeight();
|
||||||
|
this.logger.info(`Weight Multipler patched to ${mod.weightModifier}`);
|
||||||
|
}
|
||||||
|
// Removes the ExcludedFilter on Backpacks
|
||||||
|
// which in turn enables common containers to spawn in the loot pool of AI.
|
||||||
|
if (mod.removeBackpackFilter) {
|
||||||
|
this.updateBackpacks();
|
||||||
|
this.logger.info(`Backpack Restrictions Removed: ${mod.removeBackpackFilter}`);
|
||||||
|
}
|
||||||
|
// Standard Stash Size Changes
|
||||||
|
if (mod.standardStash.vertical != 28 || mod.standardStash.horizontal != 10) {
|
||||||
|
items["566abbc34bdc2d92178b4576"]._grids._props.cellsV = mod.standardStash.vertical;
|
||||||
|
items["566abbc34bdc2d92178b4576"]._grids._props.cellsH = mod.standardStash.horizontal;
|
||||||
|
this.logger.info(`Standard Stash Vertical changed to ${mod.standardStash.vertical}`);
|
||||||
|
this.logger.info(`Standard Stash Horizontal changed to ${mod.tandardStash.horizontal}`);
|
||||||
|
}
|
||||||
|
// Left Behind Stash Size Changes
|
||||||
|
if (mod.behindStash.vertical != 38 || mod.behindStash.horizontal != 10) {
|
||||||
|
items["5811ce572459770cba1a34ea"]._grids._props.cellsV = mod.behindStash.vertical;
|
||||||
|
items["5811ce572459770cba1a34ea"]._grids._props.cellsH = mod.behindStash.horizontal;
|
||||||
|
this.logger.info(`Left Behind Stash Vertical changed to ${mod.behindStash.vertical}`);
|
||||||
|
this.logger.info(`Left Behind Stash Horizontal changed to ${mod.behindStash.horizontal}`);
|
||||||
|
}
|
||||||
|
// Prepare for Escape Stash Size Changes
|
||||||
|
if (mod.escapeStash.vertical != 48 || mod.escapeStash.horizontal != 10) {
|
||||||
|
items["5811ce662459770f6f490f32"]._grids._props.cellsV = mod.escapeStash.vertical;
|
||||||
|
items["5811ce662459770f6f490f32"]._grids._props.cellsH = mod.escapeStash.horizontal;
|
||||||
|
this.logger.info(`Prepare for Escape Stash Vertical changed to ${mod.escapeStash.vertical}`);
|
||||||
|
this.logger.info(`Prepare for Escape Stash Horizontal changed to ${mod.escapeStash.horizontal}`);
|
||||||
|
}
|
||||||
|
// Edge of Darkness Stash Size Changes
|
||||||
|
if (mod.eodStash.vertical != 68 || mod.eodStash.horizontal != 10) {
|
||||||
|
items["5811ce772459770e9e5f9532"]._grids._props.cellsV = mod.eodStash.vertical;
|
||||||
|
items["5811ce772459770e9e5f9532"]._grids._props.cellsH = mod.eodStash.horizontal;
|
||||||
|
this.logger.info(`Edge of Darkness Stash Vertical changed to ${mod.eodStash.vertical}`);
|
||||||
|
this.logger.info(`Edge of Darkness Stash Horizontal changed to ${mod.eodStash.horizontal}`);
|
||||||
|
}
|
||||||
|
// Toggles true/false the Examined By Default config on all items in database/templates/items.json
|
||||||
|
if (mod.examinedByDefault) {
|
||||||
|
this.examinedByDefault();
|
||||||
|
this.logger.info(`Examined By Default is ${mod.examinedByDefault}`);
|
||||||
|
}
|
||||||
|
// Roubles Max Stack
|
||||||
|
if (mod.roublesMaxStack != 500000) {
|
||||||
|
items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = mod.roublesMaxStack;
|
||||||
|
this.logger.info(`Rouble Max Stack set to ${mod.roublesMaxStack}`);
|
||||||
|
}
|
||||||
|
// Dollars Max Stack
|
||||||
|
if (mod.dollarsMaxStack != 50000) {
|
||||||
|
items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = mod.dollarsMaxStack;
|
||||||
|
this.logger.info(`Dollar Max Stack set to ${mod.dollarsMaxStack}`);
|
||||||
|
}
|
||||||
|
// Euros Max Stack
|
||||||
|
if (mod.eurosMaxStack != 50000) {
|
||||||
|
items["569668774bdc2da2298b4568"]._props.StackMaxSize = mod.eurosMaxStack;
|
||||||
|
this.logger.info(`Euro Max Stack set to ${mod.eurosMaxStack}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Functions Functions.
|
||||||
|
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||||
|
updateWeight() {
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
for (const item of items) {
|
||||||
|
if (item._props?.Weight) {
|
||||||
|
item._props.Weight *= this.modConfig.items.weightModifier;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Updates backpacks and removes any values in the ExcludedFilter under props > Grids > props > filters > ExcludedFilter in database/templates/items.json
|
||||||
|
updateBackpacks() {
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
for (const item of items) {
|
||||||
|
if (item._parent === "5448e53e4bdc2d60728b4567") {
|
||||||
|
for (const grid of item._props.Grids)
|
||||||
|
grid._props.filters[0].ExcludedFilter = [];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Updates the Examined By Default modifier for all items in database/templates/items.json to either True or False depending on the config value.
|
||||||
|
examinedByDefault() {
|
||||||
|
const items = Object.values(this.databaseServer.getTables().templates.items);
|
||||||
|
for (const item of items) {
|
||||||
|
item._props.ExaminedByDefault = this.modConfig.items.examinedByDefault;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Items = Items;
|
32
Valens-AIO/tmp/locations.js
Normal file
32
Valens-AIO/tmp/locations.js
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Locations = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Locations {
|
||||||
|
constructor(logger, databaseServer) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
updateLocations() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.locations);
|
||||||
|
const maps = this.tables.locations;
|
||||||
|
if (mod.allExtractsAvailable) {
|
||||||
|
for (const map in maps) {
|
||||||
|
if (map.toLowerCase() === "base") {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
const mapBase = this.tables.locations[map].base;
|
||||||
|
if (mapBase.Locked === true || mapBase?.EnabledCoop === undefined) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
for (const i in mapBase.exits) {
|
||||||
|
const exit = mapBase[i];
|
||||||
|
exit.Chance = 100;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.logger.info("All Extracts Are Available @ 100% Chance");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Locations = Locations;
|
99
Valens-AIO/tmp/loot.js
Normal file
99
Valens-AIO/tmp/loot.js
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Loot = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Loot {
|
||||||
|
constructor(logger, databaseServer, locationConfig) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.locationConfig = locationConfig;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
updateLoot() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.loot);
|
||||||
|
if (mod.looseLootMultiplier > 1) {
|
||||||
|
for (const map in this.locationConfig.looseLootMultiplier) {
|
||||||
|
this.locationConfig.looseLootMultiplier[map] = mod.looseLootMultiplier;
|
||||||
|
}
|
||||||
|
this.logger.info(`Loose Loot Multiplier: ${mod.looseLootMultiplier}`);
|
||||||
|
}
|
||||||
|
if (mod.staticLootMultiplier > 1) {
|
||||||
|
for (const map in this.locationConfig.staticLootMultiplier) {
|
||||||
|
this.locationConfig.staticLootMultiplier[map] = mod.staticLootMultiplier;
|
||||||
|
}
|
||||||
|
this.logger.info(`Static Loot Multiplier: ${mod.staticLootMultiplier}`);
|
||||||
|
}
|
||||||
|
if (mod.containersInMarkedRoom) {
|
||||||
|
this.containersInMarkedRoom();
|
||||||
|
this.logger.info(`Containers In Marked Room: ${mod.containersInMarkedRoom}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/**
|
||||||
|
* Changes the loot database/tables to include containers in marked rooms.
|
||||||
|
*
|
||||||
|
* @variable containersInMarkedRoom Enables common containers (items case, weapon case, etc.) in Marked Rooms.
|
||||||
|
*/
|
||||||
|
containersInMarkedRoom() {
|
||||||
|
// Customs Marked Room Loot.
|
||||||
|
let 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");
|
||||||
|
cstmsmarked1.itemDistribution.push(...this.containers());
|
||||||
|
cstmsmarked2.itemDistribution.push(...this.containers());
|
||||||
|
cstmsmarked3.itemDistribution.push(...this.containers());
|
||||||
|
// Reserve Marked Room Loot.
|
||||||
|
spawnPoints = this.tables.locations.rezervbase.looseLoot.spawnpoints;
|
||||||
|
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());*/
|
||||||
|
}
|
||||||
|
containers() {
|
||||||
|
/* 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Loot = Loot;
|
51
Valens-AIO/tmp/mod.js
Normal file
51
Valens-AIO/tmp/mod.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
const ConfigTypes_1 = require("@spt-aki/models/enums/ConfigTypes");
|
||||||
|
const ammo_1 = require("./ammo");
|
||||||
|
const bots_1 = require("./bots");
|
||||||
|
const flea_1 = require("./flea");
|
||||||
|
const hideout_1 = require("./hideout");
|
||||||
|
const items_1 = require("./items");
|
||||||
|
const loot_1 = require("./loot");
|
||||||
|
const raid_1 = require("./raid");
|
||||||
|
const globals_1 = require("./globals");
|
||||||
|
const insurance_1 = require("./insurance");
|
||||||
|
//import { Airdrop } from "./airdrop";
|
||||||
|
class ValensAIO {
|
||||||
|
constructor() {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
}
|
||||||
|
postDBLoad(container) {
|
||||||
|
// get database from server
|
||||||
|
this.logger = container.resolve("WinstonLogger");
|
||||||
|
this.databaseServer = container.resolve("DatabaseServer");
|
||||||
|
this.configServer = container.resolve("ConfigServer");
|
||||||
|
this.locationConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.LOCATION);
|
||||||
|
this.ragfairConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.RAGFAIR);
|
||||||
|
this.botConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.BOT);
|
||||||
|
this.tables = this.databaseServer.getTables();
|
||||||
|
this.inRaidConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.IN_RAID);
|
||||||
|
this.insuranceConfig = this.configServer.getConfig(ConfigTypes_1.ConfigTypes.INSURANCE);
|
||||||
|
//const airdrop = new Airdrop(this.logger, this.airdropConfig, this.databaseServer)
|
||||||
|
//airdrop.updateAirdrops();
|
||||||
|
const ammo = new ammo_1.Ammo(this.logger, this.databaseServer);
|
||||||
|
ammo.updateAmmo();
|
||||||
|
const bots = new bots_1.Bots(this.logger, this.databaseServer, this.botConfig);
|
||||||
|
bots.updateBots();
|
||||||
|
const flea = new flea_1.Flea(this.logger, this.ragfairConfig, this.tables);
|
||||||
|
flea.updateFlea();
|
||||||
|
const globals = new globals_1.Globals(this.logger, this.databaseServer);
|
||||||
|
globals.updateGlobals();
|
||||||
|
const hideout = new hideout_1.Hideout(this.logger, this.databaseServer);
|
||||||
|
hideout.updateHideout();
|
||||||
|
const insurance = new insurance_1.Insurance(this.logger, this.insuranceConfig);
|
||||||
|
insurance.updateInsurance();
|
||||||
|
const items = new items_1.Items(this.logger, this.databaseServer);
|
||||||
|
items.updateItems();
|
||||||
|
const loot = new loot_1.Loot(this.logger, this.databaseServer, this.locationConfig);
|
||||||
|
loot.updateLoot();
|
||||||
|
const raid = new raid_1.Raid(this.logger, this.databaseServer, this.inRaidConfig);
|
||||||
|
raid.updateRaid();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module.exports = { mod: new ValensAIO() };
|
90
Valens-AIO/tmp/raid.js
Normal file
90
Valens-AIO/tmp/raid.js
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
"use strict";
|
||||||
|
Object.defineProperty(exports, "__esModule", { value: true });
|
||||||
|
exports.Raid = void 0;
|
||||||
|
const JsonUtil_1 = require("@spt-aki/utils/JsonUtil");
|
||||||
|
class Raid {
|
||||||
|
constructor(logger, databaseServer, inRaidConfig) {
|
||||||
|
this.modConfig = require("../config/config.json");
|
||||||
|
this.logger = logger;
|
||||||
|
this.tables = databaseServer.getTables();
|
||||||
|
this.inRaidConfig = inRaidConfig;
|
||||||
|
}
|
||||||
|
updateRaid() {
|
||||||
|
const mod = JsonUtil_1.JsonUtil.bind(this.modConfig.raid);
|
||||||
|
if (mod.fixOpenZones) {
|
||||||
|
this.fixOpenZones();
|
||||||
|
this.logger.info(`Open Zones: ${mod.fixOpenZones}.`);
|
||||||
|
}
|
||||||
|
if (mod.chompiesBossFix) {
|
||||||
|
this.chompiesBossFix();
|
||||||
|
this.logger.info(`Chompies Boss Fix: ${mod.chompiesBossFix}.`);
|
||||||
|
}
|
||||||
|
if (mod.timeLimit) {
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
this.logger.info(`Raid Time Limits set to ${mod.timeLimit} minutes.`);
|
||||||
|
}
|
||||||
|
if (mod.aiAmount.toLowerCase() != "asonline" || mod.aiDifficulty.toLowerCase() != "asonline" || mod.bossEnabled != true
|
||||||
|
|| mod.scavWars != false || mod.taggedAndCursed != false || mod.enablePve != false) {
|
||||||
|
const inRaidConfig = this.inRaidConfig;
|
||||||
|
inRaidConfig.raidMenuSettings["aiAmount"] = mod.aiAmount;
|
||||||
|
inRaidConfig.raidMenuSettings["aiDifficulty"] = mod.aiDifficulty;
|
||||||
|
inRaidConfig.raidMenuSettings["bossEnabled"] = mod.bossEnabled;
|
||||||
|
inRaidConfig.raidMenuSettings["scavWars"] = mod.scavWars;
|
||||||
|
inRaidConfig.raidMenuSettings["taggedAndCursed"] = mod.taggedAndCursed;
|
||||||
|
inRaidConfig.raidMenuSettings["enablePve"] = mod.enablePve;
|
||||||
|
this.logger.info(`AI Amount set to ${mod.aiAmount}`);
|
||||||
|
this.logger.info(`AI Difficulty set to ${mod.aiDifficulty}`);
|
||||||
|
this.logger.info(`Boss Enabled set to ${mod.bossEnabled}`);
|
||||||
|
this.logger.info(`Scav Wars set to ${mod.scavWars}`);
|
||||||
|
this.logger.info(`Tagged And Cursed set to ${mod.taggedAndCursed}`);
|
||||||
|
this.logger.info(`Enable PvE set to ${mod.enablePve}`);
|
||||||
|
}
|
||||||
|
if (mod.carExtractBaseStandingGain != 0.25) {
|
||||||
|
this.inRaidConfig.carExtractBaseStandingGain = mod.carExtractBaseStandingGain;
|
||||||
|
this.logger.info(`Car Extract Base Standing Gain set to ${mod.carExtractBaseStandingGain}`);
|
||||||
|
}
|
||||||
|
if (mod.scavExtractGain != 0.01) {
|
||||||
|
this.inRaidConfig.scavExtractGain = mod.scavExtractGain;
|
||||||
|
this.logger.info(`Scav Extract Gain set to ${mod.scavExtractGain}`);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
fixOpenZones() {
|
||||||
|
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];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
chompiesBossFix() {
|
||||||
|
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";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
exports.Raid = Raid;
|
Loading…
x
Reference in New Issue
Block a user