diff --git a/Valens-AIO ReadMe.pdf b/Valens-AIO ReadMe.pdf index c1dab6b..b52306a 100644 Binary files a/Valens-AIO ReadMe.pdf and b/Valens-AIO ReadMe.pdf differ diff --git a/config/bots.json b/config/bots.json index 076a23a..3a36028 100644 --- a/config/bots.json +++ b/config/bots.json @@ -1,11 +1,22 @@ { "bossChance": - { - "activated": false, - "chance": 100 - }, + { + "activated": false, + "chance": 100 + }, - "maxBotCap": 20, + "maxBotCap": + { + "factory": 25, + "customs": 25, + "woods": 20, + "shoreline": 20, + "lighthouse": 25, + "reservebase": 20, + "interchange": 20, + "laboratory": 25, + "default": 20 + }, "pmc": { diff --git a/config/ts/bots.ts b/config/ts/bots.ts index bb6dfcf..8a87b17 100644 --- a/config/ts/bots.ts +++ b/config/ts/bots.ts @@ -1,7 +1,7 @@ export interface BotsConfig { bossChance: BossChance - maxBotCap: number + maxBotCap: MaxBotCap pmc: Pmc scav: Scav } @@ -57,4 +57,17 @@ export interface LooseWeapon export interface Scav { lootNValue: number +} + +export interface MaxBotCap +{ + factory: number + customs: number + woods: number + shoreline: number + lighthouse: number + reservebase: number + interchange: number + laboratory: number + default: number } \ No newline at end of file diff --git a/package.json b/package.json index 550cfa8..f14ba6b 100644 --- a/package.json +++ b/package.json @@ -1,10 +1,10 @@ { "name": "Valens-AIO", - "version": "1.6.1", + "version": "1.7.0", "main": "src/mod.js", "license": "CC BY-NC-ND 4.0", "author": "Valens", - "akiVersion": "3.2.*", + "akiVersion": "3.4.*", "scripts": { "setup:environment": "npm i", "build:unzipped": "copyfiles -e \"./node_modules/**/*.*\" -e \"./dist/**/*.*\" -e \"./package-lock.json\" -e \"./tsconfig.json\" -e \"./README.txt\" -e \"./mod.code-workspace\" \"./**/*.*\" ./dist", diff --git a/src/bots.ts b/src/bots.ts index 6deeb47..70549c0 100644 --- a/src/bots.ts +++ b/src/bots.ts @@ -87,12 +87,13 @@ export class Bots this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`); } - // Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap - if (mod.maxBotCap != bot.maxBotCap) { - this.botConfig.maxBotCap = mod.maxBotCap; - this.logger.info(`Bot Cap is now ${mod.maxBotCap}`); + for (const [key] of Object.entries(bot.maxBotCap)) + { + bot.maxBotCap[key] = mod.maxBotCap[key]; + this.logger.info(mod.maxBotCap[key]); + } } diff --git a/src/loot.ts b/src/loot.ts index 9e1e077..06a967b 100644 --- a/src/loot.ts +++ b/src/loot.ts @@ -55,26 +55,26 @@ export class Loot { // Customs Marked Room Loot. let spawnPoints = this.tables.getTables().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"); + const customsMarked1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)1203364"); + const customsMarked2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)1198014"); + const customsMarked3 = 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()); + customsMarked1.itemDistribution.push(...this.containers()); + customsMarked2.itemDistribution.push(...this.containers()); + customsMarked3.itemDistribution.push(...this.containers()); // Reserve Marked Room Loot. spawnPoints = this.tables.getTables().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 rsrvRBBK1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)2248454"); + const rsrvRBBK2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (8)2268052"); + const rsrvRBBK3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (9)2238562"); - 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 rsrvRBPKPM1 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (11)2255712"); + const rsrvRBPKPM2 = spawnPoints.find(x=>x.template.Id==="cult_Loot 135 (12)2255152"); - 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"); + const rsrvRBVO1 = spawnPoints.find(x=>x.template.Id==="Loot 135 (10)2259670"); + const rsrvRBVO2 = spawnPoints.find(x=>x.template.Id==="Loot 135 (11)2254476"); + const rsrvRBVO3 = spawnPoints.find(x=>x.template.Id==="Loot 135 (12)2254420"); rsrvRBBK1.itemDistribution.push(...this.containers()); rsrvRBBK2.itemDistribution.push(...this.containers()); diff --git a/src/prewipe.ts b/src/prewipe.ts index 25ed605..2177041 100644 --- a/src/prewipe.ts +++ b/src/prewipe.ts @@ -158,7 +158,7 @@ export class Prewipe for (const trader in this.traders) { - for (const assort in this.traders[trader].assort.barter_scheme) + for (const assort in this.traders[trader]?.assort?.barter_scheme) { const itemScheme = this.traders[trader].assort.barter_scheme[assort]; switch (itemScheme[0][0]._tpl)