Changes to catch the git up to v1.2.3
This commit is contained in:
parent
67f86859c4
commit
70d01dc474
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
"DebugMode": false,
|
"DebugMode": true,
|
||||||
|
|
||||||
"ammo":
|
"ammo":
|
||||||
{
|
{
|
||||||
@ -416,18 +416,18 @@
|
|||||||
"examinedByDefault": false,
|
"examinedByDefault": false,
|
||||||
"removeBackpackFilter": true,
|
"removeBackpackFilter": true,
|
||||||
"removeKeyUsageMax": false,
|
"removeKeyUsageMax": false,
|
||||||
"dollarsMaxStack": 50000,
|
"roublesMaxStack": 10000000,
|
||||||
"eurosMaxStack": 50000,
|
"dollarsMaxStack": 1000000,
|
||||||
"roublesMaxStack": 500000,
|
"eurosMaxStack": 1000000,
|
||||||
"weightModifier": 1
|
"weightModifier": 1
|
||||||
},
|
},
|
||||||
|
|
||||||
"locations":
|
"locations":
|
||||||
{
|
{
|
||||||
"allExtractsAvailable": false,
|
"allExtractsAvailable": true,
|
||||||
"exfilTime": 8,
|
"exfilTime": 3,
|
||||||
"extractionsExtended": false,
|
"extractionsExtended": true,
|
||||||
"noExtractRestrictions": false
|
"noExtractRestrictions": true
|
||||||
},
|
},
|
||||||
|
|
||||||
"loot":
|
"loot":
|
||||||
@ -437,6 +437,11 @@
|
|||||||
"staticLootMultiplier": 1
|
"staticLootMultiplier": 1
|
||||||
},
|
},
|
||||||
|
|
||||||
|
"quests":
|
||||||
|
{
|
||||||
|
"onlyFoundInRaid": true
|
||||||
|
},
|
||||||
|
|
||||||
"raid":
|
"raid":
|
||||||
{
|
{
|
||||||
"carExtractBaseStandingGain": 0.25,
|
"carExtractBaseStandingGain": 0.25,
|
||||||
|
@ -12,6 +12,7 @@ export interface Config
|
|||||||
locations: Locations
|
locations: Locations
|
||||||
loot: Loot
|
loot: Loot
|
||||||
raid: Raid
|
raid: Raid
|
||||||
|
quests: Quests
|
||||||
prewipeEvents: PrewipeEvents
|
prewipeEvents: PrewipeEvents
|
||||||
weapons: Weapons
|
weapons: Weapons
|
||||||
}
|
}
|
||||||
@ -122,36 +123,36 @@ export interface Containers
|
|||||||
export interface CommonContainers
|
export interface CommonContainers
|
||||||
{
|
{
|
||||||
enabled: boolean
|
enabled: boolean
|
||||||
AMMO_CASE: Case
|
ammoCase: Case
|
||||||
DOCUMENTS_CASE: Case
|
docsCase: Case
|
||||||
DOGTAG_CASE: Case
|
dogsCase: Case
|
||||||
GRENADE_CASE: Case
|
grenadeCase: Case
|
||||||
INJECTOR_CASE: Case
|
injectorCase: Case
|
||||||
ITEM_CASE: Case
|
itemCase: Case
|
||||||
KEY_TOOL: Case
|
keyTool: Case
|
||||||
KEYCARD_HOLDER: Case
|
keycardHolder: Case
|
||||||
SCAV_JUNKBOX: Case
|
scavJunkbox: Case
|
||||||
MAGAZINE_CASE: Case
|
magsCase: Case
|
||||||
MEDICINE_CASE: Case
|
medsCase: Case
|
||||||
MONEY_CASE: Case
|
moneyCase: Case
|
||||||
HOLODILNICK_THERMAL_BAG: Case
|
holodilnick: Case
|
||||||
PISTOL_CASE: Case
|
pistolCase: Case
|
||||||
SICC_ORGANIZATIONAL_POUCH: Case
|
siccCase: Case
|
||||||
SIMPLE_WALLET: Case
|
wallet: Case
|
||||||
THICC_ITEM_CASE: Case
|
thiccItemCase: Case
|
||||||
THICC_WEAPON_CASE: Case
|
thiccWeaponCase: Case
|
||||||
WEAPON_CASE: Case
|
weaponCase: Case
|
||||||
WZ_WALLET: Case
|
wzWallet: Case
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface SecuredContainers
|
export interface SecuredContainers
|
||||||
{
|
{
|
||||||
enabled: boolean
|
enabled: boolean
|
||||||
ALPHA: Case
|
alpha: Case
|
||||||
BETA: Case
|
beta: Case
|
||||||
EPSILON: Case
|
epsilon: Case
|
||||||
GAMMA: Case
|
gamma: Case
|
||||||
KAPPA: Case
|
kappa: Case
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Case
|
export interface Case
|
||||||
@ -300,6 +301,11 @@ export interface Loot
|
|||||||
looseLootMultiplier: number
|
looseLootMultiplier: number
|
||||||
staticLootMultiplier: number
|
staticLootMultiplier: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface Quests
|
||||||
|
{
|
||||||
|
onlyFoundInRaid: boolean
|
||||||
|
}
|
||||||
|
|
||||||
export interface Raid
|
export interface Raid
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Valens-AIO",
|
"name": "Valens-AIO",
|
||||||
"version": "1.2.1",
|
"version": "1.2.3",
|
||||||
"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,6 +1,7 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { Config } from "../config/config";
|
import { Config } from "../config/config";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
|
import { Money } from "@spt-aki/models/enums/Money"
|
||||||
|
|
||||||
export class Items
|
export class Items
|
||||||
{
|
{
|
||||||
@ -89,22 +90,22 @@ export class Items
|
|||||||
// Roubles Max Stack
|
// Roubles Max Stack
|
||||||
if (this.mod.roublesMaxStack != 500000)
|
if (this.mod.roublesMaxStack != 500000)
|
||||||
{
|
{
|
||||||
this.items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = this.mod.roublesMaxStack;
|
this.items["5449016a4bdc2d6f028b456f"]._props.StackMaxSize = this.modConfig.items.roublesMaxStack;
|
||||||
this.logger.info(`Rouble Max Stack set to ${this.mod.roublesMaxStack}`);
|
this.logger.info(`Rouble Max Stack set to ${this.mod.roublesMaxStack}`, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Dollars Max Stack
|
// Dollars Max Stack
|
||||||
if (this.mod.dollarsMaxStack != 50000)
|
if (this.mod.dollarsMaxStack != 50000)
|
||||||
{
|
{
|
||||||
this.items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = this.mod.dollarsMaxStack;
|
this.items["5696686a4bdc2da3298b456a"]._props.StackMaxSize = this.modConfig.items.dollarsMaxStack;
|
||||||
this.logger.info(`Dollar Max Stack set to ${this.mod.dollarsMaxStack}`);
|
this.logger.info(`Dollar Max Stack set to ${this.mod.dollarsMaxStack}`, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Euros Max Stack
|
// Euros Max Stack
|
||||||
if (this.mod.eurosMaxStack != 50000)
|
if (this.mod.eurosMaxStack != 50000)
|
||||||
{
|
{
|
||||||
this.items["569668774bdc2da2298b4568"]._props.StackMaxSize = this.mod.eurosMaxStack;
|
this.items["569668774bdc2da2298b4568"]._props.StackMaxSize = this.modConfig.items.eurosMaxStack;
|
||||||
this.logger.info(`Euro Max Stack set to ${this.mod.eurosMaxStack}`);
|
this.logger.info(`Euro Max Stack set to ${this.mod.eurosMaxStack}`, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,138 +18,163 @@ export class Locations
|
|||||||
public updateLocations(): void
|
public updateLocations(): void
|
||||||
{
|
{
|
||||||
const mod = this.modConfig.locations;
|
const mod = this.modConfig.locations;
|
||||||
const maps = this.tables.locations;
|
|
||||||
|
|
||||||
// Gives all extracts 100% chance to spawn.
|
// Gives all extracts 100% chance to spawn.
|
||||||
if (mod.allExtractsAvailable)
|
if (mod.allExtractsAvailable)
|
||||||
{
|
{
|
||||||
for (const map in maps)
|
this.allExtractsAvailable();
|
||||||
{
|
this.logger.info("All Extracts @ 100% Chance to Spawn");
|
||||||
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.
|
// Sets exfil/extract timer to config.
|
||||||
if (mod.exfilTime != 8)
|
if (mod.exfilTime != 8)
|
||||||
{
|
{
|
||||||
for (const map in maps)
|
this.exfilTime();
|
||||||
{
|
this.logger.info(`Exfil Time Set to ${mod.exfilTime}`);
|
||||||
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
|
// Remove extracts restrictions
|
||||||
if (mod.noExtractRestrictions)
|
if (mod.noExtractRestrictions)
|
||||||
{
|
{
|
||||||
for (const i in maps)
|
this.noExtractRestrictions();
|
||||||
{
|
this.logger.info("No Extract Restrictions Enabled");
|
||||||
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
|
// Make all extractions of the map available regardless of the infill
|
||||||
if (mod.extractionsExtended)
|
if (mod.extractionsExtended)
|
||||||
{
|
{
|
||||||
for (const map in maps)
|
this.extractionsExtended();
|
||||||
|
this.logger.info("Extractions Are Extended");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private allExtractsAvailable(): void
|
||||||
|
{
|
||||||
|
const locations = this.tables.locations;
|
||||||
|
for (const i in locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
{
|
{
|
||||||
switch (map)
|
for (const x in locations[i].base.exits)
|
||||||
{
|
{
|
||||||
case "base":
|
if (locations[i].base.exits[x].Name !== "EXFIL_Train")
|
||||||
break;
|
{
|
||||||
case "bigmap":
|
if (locations[i].base.exits[x].Chance !== 100)
|
||||||
for (const extract in maps[map].base.exits)
|
|
||||||
{
|
{
|
||||||
maps[map].base.exits[extract].EntryPoints = "Customs,Boiler Tanks";
|
locations[i].base.exits[x].Chance = 100;
|
||||||
}
|
}
|
||||||
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;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private exfilTime(): void
|
||||||
|
{
|
||||||
|
const maps = this.tables.locations;
|
||||||
|
const mod = this.modConfig.locations;
|
||||||
|
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 exit of mapBase.exits)
|
||||||
|
{
|
||||||
|
exit.ExfiltrationTime = mod.exfilTime;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private noExtractRestrictions(): void
|
||||||
|
{
|
||||||
|
const locations = this.tables.locations;
|
||||||
|
for (const i in locations)
|
||||||
|
{
|
||||||
|
if (i !== "base")
|
||||||
|
{
|
||||||
|
for (const x in locations[i].base.exits)
|
||||||
|
{
|
||||||
|
if (locations[i].base.exits[x].Name !== "EXFIL_Train" &&
|
||||||
|
!locations[i].base.exits[x].Name.includes("lab") ||
|
||||||
|
locations[i].base.exits[x].Name === "lab_Vent")
|
||||||
|
{
|
||||||
|
if (locations[i].base.exits[x].PassageRequirement !== "None")
|
||||||
|
{
|
||||||
|
locations[i].base.exits[x].PassageRequirement = "None";
|
||||||
|
}
|
||||||
|
if (locations[i].base.exits[x].ExfiltrationType !== "Individual")
|
||||||
|
{
|
||||||
|
locations[i].base.exits[x].ExfiltrationType = "Individual";
|
||||||
|
}
|
||||||
|
if (locations[i].base.exits[x].Id !== "")
|
||||||
|
{
|
||||||
|
locations[i].base.exits[x].Id = "";
|
||||||
|
}
|
||||||
|
if (locations[i].base.exits[x].Count !== 0)
|
||||||
|
{
|
||||||
|
locations[i].base.exits[x].Count = 0;
|
||||||
|
}
|
||||||
|
if (locations[i].base.exits[x].RequirementTip !== "")
|
||||||
|
{
|
||||||
|
locations[i].base.exits[x].RequirementTip = "";
|
||||||
|
}
|
||||||
|
if (locations[i].base.exits[x].RequiredSlot)
|
||||||
|
{
|
||||||
|
delete locations[i].base.exits[x].RequiredSlot;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private extractionsExtended(): void
|
||||||
|
{
|
||||||
|
|
||||||
|
const locations = this.tables.locations;
|
||||||
|
for (const map in locations)
|
||||||
|
{
|
||||||
|
switch (map)
|
||||||
|
{
|
||||||
|
case "base":
|
||||||
|
break;
|
||||||
|
case "bigmap":
|
||||||
|
for (const extract in locations[map].base.exits)
|
||||||
|
{
|
||||||
|
locations[map].base.exits[extract].EntryPoints = "Customs,Boiler Tanks";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "interchange":
|
||||||
|
for (const extract in locations[map].base.exits)
|
||||||
|
{
|
||||||
|
locations[map].base.exits[extract].EntryPoints = "MallSE,MallNW";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "shoreline":
|
||||||
|
for (const extract in locations[map].base.exits)
|
||||||
|
{
|
||||||
|
locations[map].base.exits[extract].EntryPoints = "Village,Riverside";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case "woods":
|
||||||
|
for (const extract in locations[map].base.exits)
|
||||||
|
{
|
||||||
|
locations[map].base.exits[extract].EntryPoints = "House,Old Station";
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
@ -25,6 +25,8 @@ import { Logger } from "./logger";
|
|||||||
import { Config } from "../config/config";
|
import { Config } from "../config/config";
|
||||||
import { Weapons } from "./weapons";
|
import { Weapons } from "./weapons";
|
||||||
import { Containers } from "./containers";
|
import { Containers } from "./containers";
|
||||||
|
import { Locations } from "./locations";
|
||||||
|
import { Quests } from "./quests";
|
||||||
//import { Airdrop } from "./airdrop";
|
//import { Airdrop } from "./airdrop";
|
||||||
|
|
||||||
class ValensAIO implements IPostDBLoadMod
|
class ValensAIO implements IPostDBLoadMod
|
||||||
@ -84,8 +86,14 @@ class ValensAIO implements IPostDBLoadMod
|
|||||||
const items = new Items(vLogger, this.databaseServer);
|
const items = new Items(vLogger, this.databaseServer);
|
||||||
items.updateItems();
|
items.updateItems();
|
||||||
|
|
||||||
|
const locations = new Locations(vLogger, this.databaseServer);
|
||||||
|
locations.updateLocations();
|
||||||
|
|
||||||
const loot = new Loot(vLogger, this.databaseServer, this.locationConfig);
|
const loot = new Loot(vLogger, this.databaseServer, this.locationConfig);
|
||||||
loot.updateLoot();
|
loot.updateLoot();
|
||||||
|
|
||||||
|
const quests = new Quests(vLogger, this.databaseServer);
|
||||||
|
quests.updateQuests();
|
||||||
|
|
||||||
const raid = new Raid(vLogger, this.databaseServer, this.inRaidConfig);
|
const raid = new Raid(vLogger, this.databaseServer, this.inRaidConfig);
|
||||||
raid.updateRaid();
|
raid.updateRaid();
|
||||||
|
48
Valens-AIO/src/quests.ts
Normal file
48
Valens-AIO/src/quests.ts
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
import { Logger } from "winston";
|
||||||
|
import { Config } from "../config/config";
|
||||||
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
|
|
||||||
|
export class Quests
|
||||||
|
{
|
||||||
|
private modConfig: Config = require("../config/config.json");
|
||||||
|
private logger: Logger;
|
||||||
|
private databaseServer: DatabaseServer;
|
||||||
|
|
||||||
|
constructor(logger: Logger, databaseServer: DatabaseServer)
|
||||||
|
{
|
||||||
|
this.logger = logger;
|
||||||
|
this.databaseServer = databaseServer.getTables();
|
||||||
|
}
|
||||||
|
|
||||||
|
public updateQuests(): void
|
||||||
|
{
|
||||||
|
if (!this.modConfig.quests.onlyFoundInRaid)
|
||||||
|
{
|
||||||
|
this.onlyFoundInRaid();
|
||||||
|
this.logger.info("Quest Items No Longer Need Be Found In Raid");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Updates the weight modifier (as a multiplier) for all items in database/templates/items.json
|
||||||
|
private onlyFoundInRaid(): void
|
||||||
|
{
|
||||||
|
const quests = this.databaseServer.templates.quests;
|
||||||
|
|
||||||
|
for (const questid in quests)
|
||||||
|
{
|
||||||
|
const questsAvailableForFinishConditions = quests[questid].conditions.AvailableForFinish;
|
||||||
|
const findItemConditions = questsAvailableForFinishConditions.find(x=>x.parent === "FindItem");
|
||||||
|
|
||||||
|
if (!findItemConditions)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (findItemConditions._props.onlyFoundInRaid)
|
||||||
|
{
|
||||||
|
findItemConditions._props.onlyFoundInRaid = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user