Various Mod Updates for SPT 3.11

This commit is contained in:
2025-05-13 05:33:12 -04:00
parent 306af72daf
commit 37519a6093
462 changed files with 21565 additions and 4784 deletions
@@ -1,3 +1,3 @@
{
"CurrentlySelectedPreset":"Default"
"CurrentlySelectedPreset":"null"
}
@@ -1,8 +1,8 @@
{
"name": "SVM",
"author": "GhostFenixx",
"version": "1.10.1",
"sptVersion": "3.10.x",
"version": "1.11.1",
"sptVersion": "3.11.x",
"license": "PUSL",
"devdependencies": {},
"main": "src/SVM.js"
@@ -3,9 +3,10 @@
"ARifle":["762x39", "545x39", "556x45", "9x39", "366", "762x35", "300blk", "ATL15", "GRENDEL", "50WLF", "KURZ"],
"Shotgun":["12x70", "20x70", "23x75"],
"MRifle":["762x51", "68x51", "762х54R", "762x54r", "86x70", "127x55", "277", "BMG"],
"OddKeys":["5448ba0b4bdc2d02308b456c","63a399193901f439517cafb6","63a39fc0af870e651d58e6ae","63a39fdf1e21260da44a0256","6582dbf0b8d7830efc45016f","664d3db6db5dea2bad286955","664d3dd590294949fe2d81b7","664d3ddfdda2e85aca370d75","664d3de85f2355673b09aed5","664d4b0103ef2c61246afb56","6761a6ccd9bbb27ad703c48a","6761a6f90575f25e020816a4"],
"MarkedKeys":["5780cf7f2459777de4559322", "5d80c60f86f77440373c4ece", "5d80c62a86f7744036212b3f", "5ede7a8229445733cb4c18e2", "63a3a93f8a56922e82001f5d", "64ccc25f95763a1ae376e447", "62987dfc402c7f69bf010923"],
"traderArray": ["54cb50c76803fa8b248b4571", "54cb57776803fa99248b456e", "58330581ace78e27b8b10cee", "5935c25fb3acc3127c3d8cd9", "5a7c2eca46aef81a7ca2145d", "5ac3b934156ae10c4430e83c", "5c0647fdd443bc2504c2d371"],
"CasesID":["59fb016586f7746d0d4b423a","5783c43d2459774bbe137486","60b0f6c058e0b0481a09ad11","5e2af55f86f7746d4159f07c","59fb042886f7746c5005a7b2","59fb023c86f7746d0d4b423c","5b7c710788a4506dec015957","5aafbde786f774389d0cbc0f","5c127c4486f7745625356c13","5c093e3486f77430cb02e593","5aafbcd986f7745e590fff23","5c0a840b86f7742ffa4f2482","5b6d9ce188a4501afc1b2b25","5d235bb686f77443f4331278","59fafd4b86f7745ca07e1232","590c60fc86f77412b13fddcf","567143bf4bdc2d1a0f8b4567","5c093db286f7740a1b2617e3","619cbf7d23893217ec30b689","619cbf9e0a7c3a1a2731940a","62a09d3bcf4a99369e262447","66bc98a01a47be227a5e956e"],
"traderArray": ["54cb50c76803fa8b248b4571", "54cb57776803fa99248b456e","579dc571d53a0658a154fbec", "58330581ace78e27b8b10cee", "5935c25fb3acc3127c3d8cd9", "5a7c2eca46aef81a7ca2145d", "5ac3b934156ae10c4430e83c", "5c0647fdd443bc2504c2d371","6617beeaa9cfa777ca915b7c"],
"CasesID":["59fb016586f7746d0d4b423a","5783c43d2459774bbe137486","60b0f6c058e0b0481a09ad11","5e2af55f86f7746d4159f07c","59fb042886f7746c5005a7b2","59fb023c86f7746d0d4b423c","5b7c710788a4506dec015957","5aafbde786f774389d0cbc0f","5c127c4486f7745625356c13","5c093e3486f77430cb02e593","5aafbcd986f7745e590fff23","5c0a840b86f7742ffa4f2482","5b6d9ce188a4501afc1b2b25","5d235bb686f77443f4331278","59fafd4b86f7745ca07e1232","590c60fc86f77412b13fddcf","567143bf4bdc2d1a0f8b4567","5c093db286f7740a1b2617e3","619cbf7d23893217ec30b689","619cbf9e0a7c3a1a2731940a","62a09d3bcf4a99369e262447","66bc98a01a47be227a5e956e","67600929bd0a0549d70993f6"],
"SecConID":["544a11ac4bdc2d470e8b456a","5c093ca986f7740a1867ab12","5857a8b324597729ab0a0e7d","59db794186f77448bc595262","5857a8bc2459772bad15db29","665ee77ccf2d642e98220bca","5732ee6a24597719ae0c0281","64f6f4c5911bcdfe8b03b0dc"],
"AIAmount":["AsOnline","Low","Medium","High","Horde","NoBots"],
"AIDifficulty":["AsOnline","Easy","Medium","Hard","Impossible","Random"],
@@ -1,6 +1,5 @@
{
"funni":[
"So, how's Erdtree? Or maybe you're into Dawntrail?",
"Have you tried Minecraft though?",
"I hope Nikita is proud of me",
"This release provides you 16x time the details according to Todd Howard",
@@ -27,7 +26,6 @@
"Don't play Gaijin games, such a cash grab, good source of classified data tho",
"YOU, YES YOU, YOU ARE AWESOME, NOW LIVE WITH THAT!",
"Did you wash your dishes?",
"Sanitar did nothing wrong",
"I actually played tarkov, finally",
"rat attac",
"Don't worry, I won't judge your preferences, you're my favorite casual <3",
@@ -52,14 +50,11 @@
"No more Autumn in Tarkov",
"The Holy Fox is gone",
"Don't play MMO's, those are unhealthy",
"I swear, stop putting those lines on Reddit",
"I really hope you do not restart the server to read those",
"There will be Up. Date. A creator on website nodes his head.",
"Stay Hydrated",
"Have you tried Gray Zone Warfare? :D",
"Still filled with bugs, don't worry",
"Pls leave a like and subscribe, don't forget to click a bell button",
"Google Clearly doesn't like me ;-;",
"Name of your PMC is disgusting, please revaluate your life choices",
"Why do you want to carry 2000 rounds in one slot?",
"Really? 20x2 cell sized pockets?",
@@ -70,7 +65,6 @@
"Each new line added in message of the day is increasing the load on your CPU, let that sink in",
"Totally against Nikita(tm) vision(tm).",
"3 HEAVY BLEEDS IN ONE SHOT, THANKS SCAV!",
"What else can be so joyful than making a mod on my birthday? Not playing SPT afterwards!",
"Nice work bitch!",
"You can never go wrong loading .366 into 7.62x39 chamber",
"There was a blue sky and bright yellow field, but now it is always dark and gray",
@@ -82,11 +76,9 @@
"They added a Deagle in the game...Makes me miss KMC once again",
"Swedish siesta is fun ngl",
"Yep, people still seem to fail to install this mod",
"3.9.8 huh? SPT lads do stack those numbers high",
"Cats are still superior than dogs, CWX.",
"Someday the war will be over and world won't be the same...",
"Someday the war will be over but the world won't be the same...",
"Do yourself a favor, stop shitposting",
"If SPT can go 3.10, so is SVM can go 1.10",
"Show must go on!",
">Are You Happy? >No. >Why? >I play Escape from Tarkov",
"Deagle or Rsh12? That's the question.",
@@ -117,11 +109,19 @@
"More music? Fine: Saint Asonia, Alesti, Memphis May Fire",
"Not really hyped for 2025 ngl",
"Four letters is better than three",
"No, these messages is not made by ChatGPT",
"No, these messages are not made by ChatGPT",
"I finally tried stalker 2, could've been better",
"Unironically gonna listen to C418",
"Want some DnB? Celldweller, Raizer, Blue Stahli",
"I hate winter",
"Astrobot being GOTY is a joke",
"I really ran out of stuff to type here",
"Denuvo sucks, big corpos never learn",
"I'll miss Ubisoft",
"Yes, i hate Jaeger quests sometimes as well",
"Haha, your SSD goes BRRRRR",
"Not a fan or orange color really, neither of alternate current",
"XcQ, IYKYK",
"\nI/Ii\nI|/I_",
"You cannot Escape From -REDACTED BY LICENSE VIOLATION-"]
}
@@ -21,68 +21,10 @@ class MainSVM {
Logger.error(e.message + "\n");
return
}
const PresetLoader = require('../Loader/loader.json');
const Config = require('../Presets/' + PresetLoader.CurrentlySelectedPreset + '.json');
const StaticRouterModService = container.resolve("StaticRouterModService");
const HttpResponse = container.resolve("HttpResponseUtil");
const repeatableQuestController = container.resolve("RepeatableQuestController");
//PRE LOAD - QUESTS SECTION
if (Config.Quests.EnableQuests && Config.Quests.EnableQuestsMisc)//Horrible, as usual
{
try {
container.afterResolution("QuestCallbacks", (_t, result) => {
result.activityPeriods = (url, info, sessionID) => {
let Edited = repeatableQuestController.getClientRepeatableQuests(sessionID);
for (let quests in Edited) {
for (let act in Edited[quests].activeQuests) {//this needs to be trimmed as well, eventually.
if (Edited[quests].activeQuests[act].changeCost[0].count !== undefined) {
Edited[quests].activeQuests[act].changeCost[0].count = 5000 * Config.Quests.QuestCostMult;
}
if (Config.Quests.QuestRepToZero) {
Edited[quests].activeQuests[act].changeStandingCost = 0;
}
}
for (let inact in Edited[quests].inactiveQuests) {
if (Edited[quests].inactiveQuests[inact].changeCost[0].count !== undefined) {
Edited[quests].inactiveQuests[inact].changeCost[0].count = 5000 * Config.Quests.QuestCostMult;
}
if (Config.Quests.QuestRepToZero) {
Edited[quests].inactiveQuests[inact].changeStandingCost = 0;
}
}
for (let req in Edited[quests].changeRequirement) {
Edited[quests].changeRequirement[req].changeCost[0].count = 5000 * Config.Quests.QuestCostMult;
if (Config.Quests.QuestRepToZero) {
Edited[quests].changeRequirement[req].changeStandingCost = 0;
}
}
}
return HttpResponse.getBody(Edited);
}
}, { frequency: "Always" });
container.afterResolution("QuestCallbacks", (_t, result) => {
result.changeRepeatableQuest = (pmcData, body, sessionID) => {
//const repeatableQuestController = container.resolve("RepeatableQuestController");
let Edited = repeatableQuestController.changeRepeatableQuest(pmcData, body, sessionID);
for (let quests in Edited.profileChanges) {
for (let test in Edited.profileChanges[quests].repeatableQuests[0].changeRequirement) {
Edited.profileChanges[quests].repeatableQuests[0].changeRequirement[test].changeCost[0].count = 5000 * Config.Quests.QuestCostMult;
if (Config.Quests.QuestRepToZero) {
Edited.profileChanges[quests].repeatableQuests[0].changeRequirement[test].changeStandingCost = 0;
}
}
}
return Edited;
}
}, { frequency: "Always" });
}
catch (e) {
Logger.error("[SVM] REPEATABLE QUEST HANDLED EXCEPTION - Something wrong attempting to change quest reroll price\n" + e.message + "\n");
}
}
//PRE LOAD - RAIDS SECTION
if (Config.Raids.RaidEvents.Halloween || Config.Raids.RaidEvents.Christmas)//Extra check, just in case
{
@@ -123,7 +65,7 @@ class MainSVM {
if (Config.Raids.SafeExit) {
container.afterResolution("MatchCallbacks", (_t, result) => {
result.endLocalRaid = (url, info, sessionID) => {
if (info.results.result == "Left") {
if (info.results.result == "Left" && info.results.profile.Info.Side !== "Savage") {
info.results.result = "Runner"
}
const MatchController = container.resolve("MatchController");
@@ -135,7 +77,7 @@ class MainSVM {
if (Config.Raids.SaveGearAfterDeath) {
container.afterResolution("MatchCallbacks", (_t, result) => {
result.endLocalRaid = (url, info, sessionID) => {
if (info.results.result !== "Survived") {
if (info.results.result !== "Survived" && info.results.profile.Info.Side !== "Savage") {
info.results.result = "Runner"
}
const MatchController = container.resolve("MatchController");
@@ -189,7 +131,7 @@ class MainSVM {
return HttpResponse.nullResponse();
}
catch (e) {
Logger.error("[SVM] CSM CUSTOM POCKETS - New profile detected, Cancelling function, restart the game to fix it.\n" + e.message)
Logger.warning("[SVM] CSM CUSTOM POCKETS - New profile detected, Cancelling function, restart the game to fix it.\n" + e.message)
return HttpResponse.nullResponse();
}
}
@@ -232,7 +174,7 @@ class MainSVM {
return HttpResponse.nullResponse();
}
catch (e) {
Logger.error("[SVM] PMC/SCAV HEALTH/STATS - Didn't manage to apply settings, new profile?\n" + e)
Logger.warning("[SVM] PMC/SCAV HEALTH/STATS - Didn't manage to apply settings, new profile?\n" + e)
return HttpResponse.nullResponse();
}
}
@@ -240,6 +182,7 @@ class MainSVM {
}
if (Config.Scav.EnableScavHealth || Config.Scav.ScavCustomPockets || Config.Scav.EnableStats) { // TO OVERRIDE NEXT SCAVS HEALTH + POCKETS
//May Omnissiah save our souls, have to use both because register affects deaths and resolution affects extracts. Don't ask
// ###### SURVIVED
container.afterResolution("ProfileController", (_t, result) => {
result.generatePlayerScav = (sessionID) => {
const playerScavGenerator = container.resolve("PlayerScavGenerator");
@@ -262,13 +205,13 @@ class MainSVM {
return scavData;
}
}, { frequency: "Always" });
// ###### DIED
StaticRouterModService.registerStaticRouter("EditHealthv2",
[
{
url: "/client/match/local/end",
action: (url, info, sessionID) => {
if (info.results.result !== "survived" && info.results.result !== "runner") // 3.9.0 If statement for avoiding rerolling survived SCAV, biggest issue of 1.8.3
if (info.results.result !== "Survived" && info.results.result !== "Transit" && info.results.result !== "Runner") // 3.9.0 If statement for avoiding rerolling survived SCAV, biggest issue of 1.8.3
{
const saveServer = container.resolve("SaveServer");
const playerScavGenerator = container.resolve("PlayerScavGenerator");
@@ -351,6 +294,7 @@ class MainSVM {
//const Inventory = configServer.getConfig("aki-inventory");
const BlackItems = configServer.getConfig("spt-item");
const PMC = configServer.getConfig("spt-pmc")
//############## FLEAMARKET SECTION ###########
if (Config.Fleamarket.EnableFleamarket) {
if (Config.Fleamarket.EnablePlayerOffers) {
@@ -599,39 +543,20 @@ class MainSVM {
const BotTypeID = ["assault", "marksman", "pmcbot", "exusec", "pmc", "boss", "follower"]
for (let durab in BotTypeID) {
Bots.durability[BotTypeID[durab]].weapon.lowestMax = BotWepMinID[durab];
Bots.durability[BotTypeID[durab]].weapon.highestMax = BotWepMaxID[durab];
Bots.durability[BotTypeID[durab]].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability[BotTypeID[durab]].armor.minDelta = 100 - BotArmorMaxID[durab];
AdjustDurab(Bots.durability[BotTypeID[durab]], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
switch (BotTypeID[durab]) {
case "assault":
Bots.durability["cursedassault"].weapon.lowestMax = BotWepMinID[durab]
Bots.durability["cursedassault"].weapon.highestMax = BotWepMaxID[durab]
Bots.durability["cursedassault"].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability["cursedassault"].armor.minDelta = 100 - BotArmorMaxID[durab];
Bots.durability["crazyassaultevent"].weapon.lowestMax = BotWepMinID[durab]
Bots.durability["crazyassaultevent"].weapon.highestMax = BotWepMaxID[durab]
Bots.durability["crazyassaultevent"].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability["crazyassaultevent"].armor.minDelta = 100 - BotArmorMaxID[durab];
AdjustDurab(Bots.durability["cursedassault"], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
AdjustDurab(Bots.durability["crazyassaultevent"], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
break;
case "pmcbot":
Bots.durability["arenafighterevent"].weapon.lowestMax = BotWepMinID[durab]
Bots.durability["arenafighterevent"].weapon.highestMax = BotWepMaxID[durab]
Bots.durability["arenafighterevent"].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability["arenafighterevent"].armor.minDelta = 100 - BotArmorMaxID[durab];
AdjustDurab(Bots.durability["arenafighterevent"], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
break
case "boss":
Bots.durability["sectantpriest"].weapon.lowestMax = BotWepMinID[durab];
Bots.durability["sectantpriest"].weapon.highestMax = BotWepMaxID[durab];
Bots.durability["sectantpriest"].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability["sectantpriest"].armor.minDelta = 100 - BotArmorMaxID[durab];
AdjustDurab(Bots.durability["sectantpriest"], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
break;
case "follower":
Bots.durability["sectantwarrior"].weapon.lowestMax = BotWepMinID[durab];
Bots.durability["sectantwarrior"].weapon.highestMax = BotWepMaxID[durab];
Bots.durability["sectantwarrior"].armor.maxDelta = 100 - BotArmorMinID[durab];
Bots.durability["sectantwarrior"].armor.minDelta = 100 - BotArmorMaxID[durab];
AdjustDurab(Bots.durability["sectantwarrior"], BotWepMinID[durab], BotWepMaxID[durab], BotArmorMinID[durab], BotArmorMaxID[durab])
break;
}
}
@@ -874,7 +799,8 @@ class MainSVM {
Cases.InjectorCase,
Cases.KeycardHolderCase,
Cases.GKeychain,
Cases.StreamerCase
Cases.StreamerCase,
Cases.ArmorPlateCase
]
const Filts = [ // I think i can shortcut this eventually
Cases.MoneyCase.Filter,
@@ -898,7 +824,8 @@ class MainSVM {
Cases.InjectorCase.Filter,
Cases.KeycardHolderCase.Filter,
Cases.GKeychain.Filter,
Cases.StreamerCase.Filter
Cases.StreamerCase.Filter,
Cases.ArmorPlateCase.Filter
]
for (let Case in Arrays.CasesID) {
items[Arrays.CasesID[Case]]._props.Grids[0]._props["cellsV"] = Size[Case].Height;
@@ -988,6 +915,7 @@ class MainSVM {
if (base._type !== "Node" && base._type !== undefined && (base._parent !== "557596e64bdc2dc2118b4571" || base._parent !== "55d720f24bdc2d88028b456d")) {
EditSimpleItemData(id, "Weight", parseFloat(Config.Items.WeightChanger * base._props.Weight).toFixed(3));
}
//Remove gear penalty
if (Config.Items.NoGearPenalty) {
if (base._props.mousePenalty) {
EditSimpleItemData(id, "mousePenalty", 0)
@@ -1055,14 +983,17 @@ class MainSVM {
//Remove the keys usage - God i hate how i wrote it
if (Config.Items.EnableKeys) {
if ((base._parent == "5c99f98d86f7745c314214b3") && base._props.MaximumNumberOfUsage !== undefined && Config.Items.InfiniteKeys) {
if (base._parent == "5c99f98d86f7745c314214b3" && base._props.MaximumNumberOfUsage == 1 && !Config.Items.AvoidSingleKeys) {
base._props.MaximumNumberOfUsage = 0
}
if (Arrays.MarkedKeys.includes(base._id) && !Config.Items.AvoidMarkedKeys) {
base._props.MaximumNumberOfUsage = 0
}
if (!(Arrays.MarkedKeys.includes(base._id)) && base._props.MaximumNumberOfUsage !== 1) {
if (Arrays.OddKeys.includes(base._id) && !Config.Items.AvoidOddKeys)//Currently list is static, maybe i'll rework to just consider changing due to odd numbers.
{
base._props.MaximumNumberOfUsage = 0
}
if (!Arrays.MarkedKeys.includes(base._id) && !Arrays.OddKeys.includes(base._id) && base._props.MaximumNumberOfUsage !== 1) {
base._props.MaximumNumberOfUsage = 0
}
}
@@ -1232,7 +1163,7 @@ class MainSVM {
globals.Stamina.BaseRestorationRate = Config.Player.RegenStaminaLegs
globals.Stamina.JumpConsumption = Config.Player.JumpConsumption
globals.Stamina.StandupConsumption.x = Config.Player.LayToStand
globals.Stamina.PoseLevelConsumptionPerNotch.x = Config.Player.CrouchToStand/10;
globals.Stamina.PoseLevelConsumptionPerNotch.x = Config.Player.CrouchToStand / 10;
}
if (Config.Player.EnableStaminaHands) {
// globals.Stamina.AimDrainRate = Config.Player.
@@ -1271,6 +1202,7 @@ class MainSVM {
hideout.settings.airFilterUnitFlowRate *= Config.Hideout.AirFilterRate;
hideout.settings.gpuBoostRate *= Config.Hideout.GPUBoostRate;
HideoutConfig.cultistCircle.maxRewardItemCount = Config.Hideout.CultistMaxRewards
HideoutConfig.cultistCircle.hideoutTaskRewardTimeSeconds = parseInt(HideoutConfig.cultistCircle.hideoutTaskRewardTimeSeconds * Config.Hideout.CultistTime)
for (let time in HideoutConfig.cultistCircle.craftTimeThreshholds) {
HideoutConfig.cultistCircle.craftTimeThreshholds[time].craftTimeSeconds = parseInt(HideoutConfig.cultistCircle.craftTimeThreshholds[time].craftTimeSeconds * Config.Hideout.CultistTime)
}
@@ -1333,7 +1265,7 @@ class MainSVM {
}
}
//Remove construction requirements
if (Config.Hideout.RemoveConstructionsRequirements || Config.Hideout.RemoveSkillRequirements || Config.Hideout.RemoveTraderLevelRequirements) {
if (Config.Hideout.RemoveConstructionsRequirements || Config.Hideout.RemoveSkillRequirements || Config.Hideout.RemoveTraderLevelRequirements || Config.Hideout.RemoveConstructionsFIRRequirements) {
for (const data in hideout.areas) {
let areaData = hideout.areas[data]
for (const stage in areaData.stages) {
@@ -1341,6 +1273,9 @@ class MainSVM {
let rewriter = [];
for (let req in areaData.stages[stage].requirements)//This is horrible
{
if (areaData.stages[stage].requirements[req].hasOwnProperty("isSpawnedInSession") && Config.Hideout.RemoveConstructionsFIRRequirements) {
areaData.stages[stage].requirements[req].isSpawnedInSession = false;
}
if (areaData.stages[stage].requirements[req].hasOwnProperty("templateId") && !Config.Hideout.RemoveConstructionsRequirements) {
rewriter.push(areaData.stages[stage].requirements[req])
}
@@ -1442,6 +1377,7 @@ class MainSVM {
}
if (locations[i].base.exits[x].PassageRequirement == "TransferItem" && Config.Raids.EnableCarCoop) {
locations[i].base.exits[x].ExfiltrationTime = Config.Raids.Exfils.CarExtractTime;
locations[i].base.exits[x].ExfiltrationTimePVE = Config.Raids.Exfils.CarExtractTime;
switch (i) {
case "woods":
if (Config.Raids.Exfils.CarWoods !== 0) {
@@ -1586,6 +1522,7 @@ class MainSVM {
for (let x in locations[i].base.exits) {
if (locations[i].base.exits[x].Name !== "EXFIL_Train") {
locations[i].base.exits[x].Chance = 100;
locations[i].base.exits[x].ChancePVE = 100;
}
}
}
@@ -1907,7 +1844,7 @@ class MainSVM {
}
globals.BTRSettings.BasePriceTaxi = Config.Raids.BTRTaxiPrice
globals.BTRSettings.CleanUpPrice = Config.Raids.BTRCoverPrice
globals.BTRSettings.BearPriceMod = Config.Raids.BearMults
globals.BTRSettings.BearPriceMod = Config.Raids.BearMult
globals.BTRSettings.UsecPriceMod = Config.Raids.UsecMult
globals.BTRSettings.ScavPriceMod = Config.Raids.ScavMult
}
@@ -1951,17 +1888,12 @@ class MainSVM {
Mark.Peacekeeper,
Mark.Mechanic,
Mark.Ragman,
Mark.Jaeger
Mark.Jaeger,
Mark.Ref
]
let i = 0;
for (let CurTrader in traders) {//Bad solution to avoid modded traders.
if (CurTrader !== "ragfair" && (CurTrader == "5a7c2eca46aef81a7ca2145d" || CurTrader == "5ac3b934156ae10c4430e83c" ||
CurTrader == "5c0647fdd443bc2504c2d371" || CurTrader == "54cb50c76803fa8b248b4571" || CurTrader == "54cb57776803fa99248b456e" ||
CurTrader == "579dc571d53a0658a154fbec" || CurTrader == "5935c25fb3acc3127c3d8cd9" || CurTrader == "58330581ace78e27b8b10cee")) {
for (let level in traders[CurTrader].base.loyaltyLevels) {
traders[CurTrader].base.loyaltyLevels[level].buy_price_coef = 100 - MarkArray[i]
}
i++
for (let CurTrader in Arrays.traderArray) {
for (let level in traders[Arrays.traderArray[CurTrader]].base.loyaltyLevels) {
traders[Arrays.traderArray[CurTrader]].base.loyaltyLevels[level].buy_price_coef = 100 - MarkArray[CurTrader]
}
}
//Enable all the quests
@@ -2039,23 +1971,27 @@ class MainSVM {
Sell.Peacekeeper,
Sell.Mechanic,
Sell.Ragman,
Sell.Jaeger
Sell.Jaeger,
Sell.Ref
]
let p = 0;
for (let CurTrader in Arrays.traderArray) {
for (let assortment in traders[Arrays.traderArray[CurTrader]].assort.barter_scheme) {
let TradeAssort = traders[Arrays.traderArray[CurTrader]].assort.barter_scheme[assortment][0][0];
switch (TradeAssort._tpl) {
case "5449016a4bdc2d6f028b456f":
case "569668774bdc2da2298b4568":
case "5696686a4bdc2da3298b456a":
if (TradeAssort.count !== undefined) {
TradeAssort.count = parseFloat((TradeAssort.count * SellArray[p]).toFixed(2));
}
break;
if (Arrays.traderArray[CurTrader] != "579dc571d53a0658a154fbec") { //Bandaid, added it to fit markup yet there is no assort to edit for fence
for (let assortment in traders[Arrays.traderArray[CurTrader]].assort.barter_scheme) {
let TradeAssort = traders[Arrays.traderArray[CurTrader]].assort.barter_scheme[assortment][0][0];
switch (TradeAssort._tpl) {
case "5449016a4bdc2d6f028b456f":
case "569668774bdc2da2298b4568":
case "5696686a4bdc2da3298b456a":
case "5d235b4d86f7742e017bc88a":
if (TradeAssort.count !== undefined) {
TradeAssort.count = parseFloat((TradeAssort.count * SellArray[p]).toFixed(2));
}
break;
}
}
p++;
}
p++;
}
if (Config.Traders.RemoveCurrencyOffers || Config.Traders.RemoveBarterOffers) {
for (let CurTrader in traders) {
@@ -2096,36 +2032,19 @@ class MainSVM {
}
}
}
//############## PMC SECTION ##################,
//############## PMC SECTION ##################
if (Config.PMC.EnablePMC) {
if (Config.PMC.EnableConvert) {
PMC.convertIntoPmcChance.default.assault.min = Config.PMC.AItoPMC.ScavToPMC;
PMC.convertIntoPmcChance.default.cursedassault.min = Config.PMC.AItoPMC.CursedToPMC;
PMC.convertIntoPmcChance.default.pmcbot.min = Config.PMC.AItoPMC.RaiderToPMC;
PMC.convertIntoPmcChance.default.exusec.min = Config.PMC.AItoPMC.RogueToPMC;
PMC.convertIntoPmcChance.default.marksman = {};
PMC.convertIntoPmcChance.default.marksman.min = Config.PMC.AItoPMC.SnipertoPMC;
PMC.convertIntoPmcChance.default.assault.max = Config.PMC.AItoPMC.ScavToPMC;
PMC.convertIntoPmcChance.default.cursedassault.max = Config.PMC.AItoPMC.CursedToPMC;
PMC.convertIntoPmcChance.default.pmcbot.max = Config.PMC.AItoPMC.RaiderToPMC;
PMC.convertIntoPmcChance.default.exusec.max = Config.PMC.AItoPMC.RogueToPMC;
PMC.convertIntoPmcChance.default.marksman.max = Config.PMC.AItoPMC.SniperToPMC;
PMC.convertIntoPmcChance.factory4_day.assault.min = Config.PMC.AItoPMC.ScavToPMCFactory;
PMC.convertIntoPmcChance.factory4_day.assault.max = Config.PMC.AItoPMC.ScavToPMCFactory;
PMC.isUsec = Config.PMC.PMCRatio;
for (let i in locations) {
if (i !== "base" && locations[i].base.BossLocationSpawn !== undefined) {//I Really think this is overkill, but oh well.
for (let ai in locations[i].base.BossLocationSpawn) {
if (locations[i].base.BossLocationSpawn[ai].BossName == "pmcBEAR" || locations[i].base.BossLocationSpawn[ai].BossName == "pmcUSEC") {
let randnum = Math.floor(Math.random() * 100) + 1
if (randnum > Config.PMC.PMCRatio) {
locations[i].base.BossLocationSpawn[ai].BossName = "pmcBEAR";
}
else {
locations[i].base.BossLocationSpawn[ai].BossName = "pmcUSEC";
}
PMC.isUsec = Config.PMC.PMCRatio;
for (let i in locations) {
if (i !== "base" && locations[i].base.BossLocationSpawn !== undefined) {//I Really think this is overkill, but oh well.
for (let ai in locations[i].base.BossLocationSpawn) {
if (locations[i].base.BossLocationSpawn[ai].BossName == "pmcBEAR" || locations[i].base.BossLocationSpawn[ai].BossName == "pmcUSEC") {
let randnum = Math.floor(Math.random() * 100) + 1
if (randnum > Config.PMC.PMCRatio) {
locations[i].base.BossLocationSpawn[ai].BossName = "pmcBEAR";
}
else {
locations[i].base.BossLocationSpawn[ai].BossName = "pmcUSEC";
}
}
}
@@ -2198,6 +2117,17 @@ class MainSVM {
const Daily = Config.Quests.DailyQuests;
const Weekly = Config.Quests.WeeklyQuests;
const ScavDaily = Config.Quests.ScavQuests;
//Logger.info(DB.templates.repeatableQuests.templates)
if (Config.Quests.EnableQuestsMisc) {
for (let types in DB.templates.repeatableQuests.templates) {
DB.templates.repeatableQuests.templates[types].changeCost[0].count *= Config.Quests.QuestCostMult
}
if (Config.Quests.QuestRepToZero) {
for (let types in Quest.repeatableQuests) {
Quest.repeatableQuests[types].standingChangeCost = [0];
}
}
}
//Requirements
QuestDetails(Daily, "0")
QuestDetails(Weekly, "1")
@@ -2388,9 +2318,9 @@ class MainSVM {
case 2: Quest.repeatableQuests[2].types.push(Arrays.Types[0], Arrays.Types[1])
}
}
Quest.repeatableQuests[Digit].numQuests = Type.QuestAmount;
Quest.repeatableQuests[Digit].freeChanges = Type.Reroll
Quest.repeatableQuests[Digit].freeChangesAvailable = Type.Reroll
Quest.repeatableQuests[Digit].minPlayerLevel = Type.Access
Quest.repeatableQuests[Digit].rewardScaling.rewardSpread = Type.Spread;
Quest.repeatableQuests[Digit].questConfig.Exploration.maxExtracts = Type.Extracts;
@@ -2533,6 +2463,12 @@ class MainSVM {
return JSON.parse(object)
}
}
function AdjustDurab(Type, WepMin, WepMax, ArmMin, ArmMax) {
Type.weapon.lowestMax = WepMin;
Type.weapon.highestMax = WepMax;
Type.armor.maxDelta = 100 - ArmMax;
Type.armor.minDelta = 100 - ArmMin;
}
function SymbolCheck(Value) {
return (Value == "*" || Value == "/" || Value == "+" || Value == "-");
}