Fix for PMC Difficulty. Versioning Update to 1.1.1

This commit is contained in:
VforValens 2022-08-04 16:32:36 -04:00
parent 37ea60b3de
commit 446d309d3f
5 changed files with 370 additions and 109 deletions

3
.gitignore vendored
View File

@ -27,4 +27,5 @@ dist
## windows
config.json.bk
desktop.ini
*.zip
*.zip
*.js

View File

@ -5,11 +5,11 @@
{
"ammoStacks":
{
"grenadeCartridges": 1,
"marksmanCartridges": 40,
"pistolCartridges": 50,
"rifleCartridges": 60,
"shotgunCartridges": 20
"grenadeCartridges": 2,
"marksmanCartridges": 2,
"pistolCartridges": 2,
"rifleCartridges": 2,
"shotgunCartridges": 2
}
},
@ -17,22 +17,22 @@
{
"bossChance":
{
"activated": false,
"chance": 100
"activated": true,
"chance": 2
},
"maxBotCap": 20,
"maxBotCap": 2,
"pmc":
{
"chanceSameSideIsHostilePercent": 50,
"chanceSameSideIsHostilePercent": 2,
"containersOnPMCs": true,
"isUsec": 50,
"lootNValue": 3,
"maxBackpackLootTotalRub": 150000,
"maxPocketLootTotalRub": 50000,
"maxVestLootTotalRub": 50000,
"pmcDifficulty": "AsOnline",
"isUsec": 2,
"lootNValue": 2,
"maxBackpackLootTotalRub": 2,
"maxPocketLootTotalRub": 2,
"maxVestLootTotalRub": 2,
"pmcDifficulty": "Easy",
"convertIntoPmcChance":
{
@ -46,17 +46,17 @@
"min": 18,
"max": 45
},
"cursedassault for 3.2.0":
"cursedassault for 3.2.0":
{
"min": 18,
"max": 45
},
"pmcbot for 3.2.0":
"pmcbot for 3.2.0":
{
"min": 18,
"max": 35
},
"exusec for 3.2.0":
"exusec for 3.2.0":
{
"min": 5,
"max": 25
@ -66,13 +66,13 @@
"scav":
{
"lootNValue": 4
"lootNValue": 2
}
},
"flea":
{
"minUserLevel": 15,
"minUserLevel": 2,
"blacklist":
{
@ -82,84 +82,84 @@
"condition":
{
"conditionChance": 0.2,
"min": 0.6,
"max": 1
"conditionChance": 0.4,
"min": 0.8,
"max": 0.9
},
"currencies":
{
"roubles": 78,
"dollars": 20,
"euros": 2
"roubles": 79,
"dollars": 21,
"euros": 1
},
"offerItemCount":
{
"min": 8,
"max": 15
"min": 9,
"max": 16
},
"reputation":
{
"gain": 0.0000002,
"loss": 0.0000002
"gain": 0.000002,
"loss": 0.000002
},
"time":
{
"baseSellTime": 15,
"minSellTime": 5,
"maxSellTime": 15
"baseSellTime": 1,
"minSellTime": 1,
"maxSellTime": 1
}
},
"globals":
{
"damagePerMeter": 9,
"safeHeight": 3,
"maxLoyaltyTraders": false,
"timeBeforeDeployLocal": 10,
"damagePerMeter": 3,
"safeHeight": 9,
"maxLoyaltyTraders": true,
"timeBeforeDeployLocal": 1,
"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
"survived_exp_requirement": 1,
"survived_seconds_requirement": 1,
"survived_exp_reward": 1,
"mia_exp_reward": 1,
"runner_exp_reward": 1,
"leftMult": 2,
"miaMult": 12,
"survivedMult": 2,
"runnerMult": 2,
"killedMult": 2,
"headShotMult": 12,
"expOnDamageAllHealth": 52
}
},
"hideout":
{
"airFilterUnitFlowRate": 0.0047222222222222,
"constructionTime": 1,
"generatorFuelFlowRate": 0.0013194444444444,
"gpuBoostRate": 0.041225,
"productionTime": 1,
"scavCaseTime": 1
"airFilterUnitFlowRate": 0.004722222222222,
"constructionTime": 2,
"generatorFuelFlowRate": 0.001319444444444,
"gpuBoostRate": 0.04125,
"productionTime": 2,
"scavCaseTime": 2
},
"insurance":
{
"insuranceMultiplier":
{
"prapor": 0.16,
"therapist": 0.25
"prapor": 0.1,
"therapist": 0.2
},
"returnChancePercent":
{
"prapor": 80,
"therapist": 85
"prapor": 8,
"therapist": 8
}
},
@ -168,72 +168,72 @@
{
"standardStash":
{
"vertical": 28,
"horizontal": 10
"vertical": 2,
"horizontal": 11
},
"behindStash":
{
"vertical": 38,
"horizontal": 10
"vertical": 3,
"horizontal": 11
},
"escapeStash":
{
"vertical": 48,
"horizontal": 10
"vertical": 4,
"horizontal": 11
},
"eodStash":
{
"vertical": 68,
"horizontal": 10
"vertical": 6,
"horizontal": 11
},
"examinedByDefault": false,
"examinedByDefault": true,
"removeBackpackFilter": true,
"weightModifier": 1,
"roublesMaxStack": 500000,
"dollarsMaxStack": 50000,
"eurosMaxStack": 50000
"weightModifier": 2,
"roublesMaxStack": 2,
"dollarsMaxStack": 2,
"eurosMaxStack": 2
},
"locations":
{
"allExtractsAvailable": false,
"exfilTime": 8,
"extractionsExtended": false,
"noExtractRestrictions": false
"allExtractsAvailable": true,
"exfilTime": 2,
"extractionsExtended": true,
"noExtractRestrictions": true
},
"loot":
{
"containersInMarkedRoom": true,
"looseLootMultiplier": 1,
"staticLootMultiplier": 1
"looseLootMultiplier": 2,
"staticLootMultiplier": 2
},
"raid":
{
"carExtractBaseStandingGain": 0.25,
"carExtractBaseStandingGain": 0.2,
"chompiesBossFix": true,
"fixOpenZones": true,
"scavExtractGain": 0.01,
"timeLimit": 60,
"aiAmount": "AsOnline",
"aiDifficulty": "AsOnline",
"bossEnabled": true,
"scavWars": false,
"taggedAndCursed": false,
"enablePve": true
"scavExtractGain": 0.02,
"timeLimit": 2,
"aiAmount": "High",
"aiDifficulty": "Medium",
"bossEnabled": false,
"scavWars": true,
"taggedAndCursed": true,
"enablePve": false
},
"prewipe_events":
{
"allBossesOnReserve": false,
"allTradersSellCheapItems": false,
"glukharOnLabs": false,
"killaOnFactory": false,
"makeObdolbosPowerful": false
"allBossesOnReserve": true,
"allTradersSellCheapItems": true,
"glukharOnLabs": true,
"killaOnFactory": true,
"makeObdolbosPowerful": true
}
}

261
Valens-AIO/config/config.ts Normal file
View File

@ -0,0 +1,261 @@
export interface Root
{
DebugMode: boolean
ammo: Ammo
bots: Bots
flea: Flea
globals: Globals
hideout: Hideout
insurance: Insurance
items: Items
locations: Locations
loot: Loot
raid: Raid
prewipe_events: PrewipeEvents
}
export interface Ammo
{
ammoStacks: AmmoStacks
}
export interface AmmoStacks
{
grenadeCartridges: number
marksmanCartridges: number
pistolCartridges: number
rifleCartridges: number
shotgunCartridges: number
}
export interface Bots
{
bossChance: BossChance
maxBotCap: number
pmc: Pmc
scav: Scav
}
export interface BossChance
{
activated: boolean
chance: number
}
export interface Pmc
{
chanceSameSideIsHostilePercent: number
containersOnPMCs: boolean
isUsec: number
lootNValue: number
maxBackpackLootTotalRub: number
maxPocketLootTotalRub: number
maxVestLootTotalRub: number
pmcDifficulty: string
convertIntoPmcChance: ConvertIntoPmcChance
}
export interface ConvertIntoPmcChance
{
assault: number
cursedAssault: number
pmcBot: number
exUsec: number
"assault for 3.2.0": AssaultFor320
"cursedassault for 3.2.0": CursedassaultFor320
"pmcbot for 3.2.0": PmcbotFor320
"exusec for 3.2.0": ExusecFor320
}
export interface AssaultFor320
{
min: number
max: number
}
export interface CursedassaultFor320
{
min: number
max: number
}
export interface PmcbotFor320
{
min: number
max: number
}
export interface ExusecFor320
{
min: number
max: number
}
export interface Scav
{
lootNValue: number
}
export interface Flea
{
minUserLevel: number
blacklist: Blacklist
condition: Condition
currencies: Currencies
offerItemCount: OfferItemCount
reputation: Reputation
time: Time
}
export interface Blacklist
{
enableBsgList: boolean
enableQuestList: boolean
}
export interface Condition
{
conditionChance: number
min: number
max: number
}
export interface Currencies
{
roubles: number
dollars: number
euros: number
}
export interface OfferItemCount
{
min: number
max: number
}
export interface Reputation
{
gain: number
loss: number
}
export interface Time
{
baseSellTime: number
minSellTime: number
maxSellTime: number
}
export interface Globals
{
damagePerMeter: number
safeHeight: number
maxLoyaltyTraders: boolean
timeBeforeDeployLocal: number
match_end: MatchEnd
}
export interface MatchEnd
{
survived_exp_requirement: number
survived_seconds_requirement: number
survived_exp_reward: number
mia_exp_reward: number
runner_exp_reward: number
leftMult: number
miaMult: number
survivedMult: number
runnerMult: number
killedMult: number
headShotMult: number
expOnDamageAllHealth: number
}
export interface Hideout
{
airFilterUnitFlowRate: number
constructionTime: number
generatorFuelFlowRate: number
gpuBoostRate: number
productionTime: number
scavCaseTime: number
}
export interface Insurance
{
insuranceMultiplier: InsuranceMultiplier
returnChancePercent: ReturnChancePercent
}
export interface InsuranceMultiplier
{
prapor: number
therapist: number
}
export interface ReturnChancePercent
{
prapor: number
therapist: number
}
export interface Items
{
standardStash: Stash
behindStash: Stash
escapeStash: Stash
eodStash: Stash
examinedByDefault: boolean
removeBackpackFilter: boolean
weightModifier: number
roublesMaxStack: number
dollarsMaxStack: number
eurosMaxStack: number
}
export interface Stash
{
vertical: number
horizontal: number
}
export interface Locations
{
allExtractsAvailable: boolean
exfilTime: number
extractionsExtended: boolean
noExtractRestrictions: boolean
}
export interface Loot
{
containersInMarkedRoom: boolean
looseLootMultiplier: number
staticLootMultiplier: number
}
export interface Raid
{
carExtractBaseStandingGain: number
chompiesBossFix: boolean
fixOpenZones: boolean
scavExtractGain: number
timeLimit: number
aiAmount: string
aiDifficulty: string
bossEnabled: boolean
scavWars: boolean
taggedAndCursed: boolean
enablePve: boolean
}
export interface PrewipeEvents
{
allBossesOnReserve: boolean
allTradersSellCheapItems: boolean
glukharOnLabs: boolean
killaOnFactory: boolean
makeObdolbosPowerful: boolean
}

View File

@ -1,6 +1,6 @@
{
"name": "Valens-AIO",
"version": "1.1.0",
"version": "1.1.1",
"main": "src/mod.js",
"license": "CC BY-NC-ND 4.0",
"author": "Valens",

View File

@ -5,10 +5,11 @@ 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"
import { Config } from "../config/config";
export class Bots
{
private modConfig = require("../config/config.json")
private modConfig: Config= require("../config/config.json");
private logger: Logger;
private botConfig: IBotConfig;
private tables: IDatabaseTables;
@ -28,10 +29,10 @@ export class Bots
const mod = this.modConfig.bots;
// Changes PMC difficulty to Easy, Normal, Hard, Impossible or AsOnline. Default AsOnline.
if (mod.pmc.pmcDifficulty.toLowerCase() != "AsOnline")
if (mod.pmc.pmcDifficulty.toLowerCase() != "asonline")
{
this.botConfig.pmc.difficulty = mod.pmcDifficulty;
this.logger.info(`PMC Bot Difficulty set to ${mod.pmcDifficulty}`);
this.botConfig.pmc.difficulty = mod.pmc.pmcDifficulty
this.logger.info(`PMC Bot Difficulty set to ${mod.pmc.pmcDifficulty}`);
}
// Enables common and secure containers to spawn on PMCs while additionally whitelisting the parent IDs. Rarity adjusted via PMC lootNValue. Default true.
@ -86,29 +87,27 @@ export class Bots
}
if (mod.pmc.convertIntoPmcChance.assault != 25 || mod.pmc.convertIntoPmcChance.cursedAssault != 25
|| mod.pmc.convertIntoPmcChance.pmcBot != 25 || mod.pmc.convertIntoPmcChance.exUsec != 10)
{
this.botConfig.pmc.types.assault = mod.pmc.convertIntoPmcChance.assault;
this.botConfig.pmc.types.cursedAssault = mod.pmc.convertIntoPmcChance.cursedAssault;
this.botConfig.pmc.types.pmcBot = mod.pmc.convertIntoPmcChance.pmcBot;
this.botConfig.pmc.types.exUsec = mod.pmc.convertIntoPmcChance.exUsec;
this.logger.info("Chance to Convert Bots into PMC Patched");
}
|| mod.pmc.convertIntoPmcChance.pmcBot != 25 || mod.pmc.convertIntoPmcChance.exUsec != 10)
{
this.botConfig.pmc.types.assault = mod.pmc.convertIntoPmcChance.assault;
this.botConfig.pmc.types.cursedAssault = mod.pmc.convertIntoPmcChance.cursedAssault;
this.botConfig.pmc.type.pmcBot = mod.pmc.convertIntoPmcChance.pmcBot;
this.botConfig.pmc.type.exUsec = mod.pmc.convertIntoPmcChance.exUsec;
}
/*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.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.botConfig.pmc.convertIntoPmcChance.exusec.max = mod.pmc.convertIntoPmcChance.exusec.max;
this.logger.info("Chance to Convert Bots into PMC Patched");
}*/