Final changes for v1.6.1
This commit is contained in:
parent
efb5872836
commit
c85b851a38
BIN
Valens-AIO_1.6.1.7z
Normal file
BIN
Valens-AIO_1.6.1.7z
Normal file
Binary file not shown.
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "Valens-AIO",
|
"name": "Valens-AIO",
|
||||||
"version": "1.6.0",
|
"version": "1.6.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,8 +1,7 @@
|
|||||||
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
import { Grenade, Ammo762x51, Ammo762x54, Ammo86x70, Ammo46x30, Ammo57x28, Ammo762x25, Ammo9x18, Ammo9x19, Ammo9x21, Ammo9x33R, Ammo1143x23ACP, Ammo545x39, Ammo556x45, Ammo762x35, Ammo762x39, Ammo9x39, Ammo366TKM, Ammo127x55, Ammo12Gauge, Ammo20Gauge, Ammo23x75, Ammo30x29, Ammo26x75 } from "@spt-aki/models/enums/AmmoTypes";
|
import { Grenade, Ammo762x51, Ammo762x54, Ammo86x70, Ammo46x30, Ammo57x28, Ammo762x25, Ammo9x18, Ammo9x19, Ammo9x21, Ammo9x33R, Ammo1143x23ACP, Ammo545x39, Ammo556x45, Ammo762x35, Ammo762x39, Ammo9x39, Ammo366TKM, Ammo127x55, Ammo12Gauge, Ammo20Gauge, Ammo23x75, Ammo30x29, Ammo26x75 } from "@spt-aki/models/enums/AmmoTypes";
|
||||||
//import { Weapons127x55, Weapons86x70, Weapons9x39, Weapons762x54R, Weapons762x51, Weapons366TKM, Weapons762x39, Weapons762x35, Weapons556x45, Weapons545x39, Weapons57x28FN, Weapons46x30HK, Weapons1143x23, Weapons9x33R, Weapons9x21, Weapons9x19, Weapons9x18, Weapons762x25, Weapons12Gauge, Weapons20Gauge, Weapons23x75 } from "@spt-aki/models/enums/WeaponTypes";
|
import { Weapons127x55, Weapons86x70, Weapons9x39, Weapons762x54R, Weapons762x51, Weapons366TKM, Weapons762x39, Weapons762x35, Weapons556x45, Weapons545x39, Weapons57x28FN, Weapons46x30HK, Weapons1143x23, Weapons9x33R, Weapons9x21, Weapons9x19, Weapons9x18, Weapons762x25, Weapons12Gauge, Weapons20Gauge, Weapons23x75 } from "@spt-aki/models/enums/WeaponTypes";
|
||||||
import { Weapons127x55, Weapons86x70, Weapons9x39, Weapons762x54R, Weapons762x51, Weapons366TKM, Weapons762x39, Weapons762x35, Weapons556x45, Weapons545x39, Weapons57x28FN, Weapons46x30HK, Weapons1143x23, Weapons9x33R, Weapons9x21, Weapons9x19, Weapons9x18, Weapons762x25, Weapons12Gauge, Weapons20Gauge, Weapons23x75 } from "../config/ts/WeaponTypes";
|
|
||||||
import { AmmoConfig } from "../config/ts/ammo";
|
import { AmmoConfig } from "../config/ts/ammo";
|
||||||
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
|
||||||
|
|
||||||
@ -21,7 +20,7 @@ export class Ammo
|
|||||||
|
|
||||||
public updateAmmo(): void
|
public updateAmmo(): void
|
||||||
{
|
{
|
||||||
const items = this.tables.templates.items;
|
const items = this.tables;
|
||||||
const stacks = this.modConfig.stacks;
|
const stacks = this.modConfig.stacks;
|
||||||
|
|
||||||
|
|
||||||
|
25
src/bots.ts
25
src/bots.ts
@ -3,6 +3,7 @@ import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
|
|||||||
import { Logger } from "./logger";
|
import { Logger } from "./logger";
|
||||||
import { BotsConfig } from "../config/ts/bots";
|
import { BotsConfig } from "../config/ts/bots";
|
||||||
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
import { WeightedRandomHelper } from "@spt-aki/helpers/WeightedRandomHelper";
|
||||||
|
|
||||||
export class Bots
|
export class Bots
|
||||||
{
|
{
|
||||||
private modConfig: BotsConfig = require("../config/bots.json");
|
private modConfig: BotsConfig = require("../config/bots.json");
|
||||||
@ -28,6 +29,7 @@ export class Bots
|
|||||||
|
|
||||||
// Server side variables
|
// Server side variables
|
||||||
const pmc = this.botConfig.pmc;
|
const pmc = this.botConfig.pmc;
|
||||||
|
const bot = this.botConfig;
|
||||||
const lootNValue = this.botConfig.lootNValue;
|
const lootNValue = this.botConfig.lootNValue;
|
||||||
|
|
||||||
// Start modifications
|
// Start modifications
|
||||||
@ -61,7 +63,7 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Chance that PMC bot will be USEC or BEAR. Default is 50%
|
// Chance that PMC bot will be USEC or BEAR. Default is 50%
|
||||||
if (modPMC.isUsec != 50)
|
if (modPMC.isUsec != pmc.isUsec)
|
||||||
{
|
{
|
||||||
pmc.isUsec = modPMC.isUsec;
|
pmc.isUsec = modPMC.isUsec;
|
||||||
this.logger.info(`PMC isUsec Chance is: ${modPMC.isUsec}`);
|
this.logger.info(`PMC isUsec Chance is: ${modPMC.isUsec}`);
|
||||||
@ -69,9 +71,9 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
// Max Loot Value in Rubles for PMC bots in Backpack, Pockets, and Vest respectively. Default is 150,000/50,000/50,000
|
||||||
if (modPMC.maxBackpackLootTotalRub != 150000
|
if (modPMC.maxBackpackLootTotalRub != pmc.maxBackpackLootTotalRub
|
||||||
|| modPMC.maxPocketLootTotalRub !=50000
|
|| modPMC.maxPocketLootTotalRub != pmc.maxPocketLootTotalRub
|
||||||
|| modPMC.maxVestLootTotalRub != 50000)
|
|| modPMC.maxVestLootTotalRub != pmc.maxVestLootTotalRub)
|
||||||
{
|
{
|
||||||
this.changeMaxLootvalue();
|
this.changeMaxLootvalue();
|
||||||
this.logger.info(`PMC Loot Value totals changed! \n Max Backpack Total Value: ${modPMC.maxBackpackLootTotalRub} \n Max Pocket Total Value: ${modPMC.maxPocketLootTotalRub} \n Max Vest Total Value: ${modPMC.maxVestLootTotalRub}`);
|
this.logger.info(`PMC Loot Value totals changed! \n Max Backpack Total Value: ${modPMC.maxBackpackLootTotalRub} \n Max Pocket Total Value: ${modPMC.maxPocketLootTotalRub} \n Max Vest Total Value: ${modPMC.maxVestLootTotalRub}`);
|
||||||
@ -79,7 +81,7 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
// Chance that the PMC bot of your faction (BEAR/USEC) will be hostile or not. Default is 50%.
|
||||||
if (modPMC.chanceSameSideIsHostile != 50)
|
if (modPMC.chanceSameSideIsHostile != pmc.chanceSameSideIsHostilePercent)
|
||||||
{
|
{
|
||||||
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostile;
|
pmc.chanceSameSideIsHostilePercent = modPMC.chanceSameSideIsHostile;
|
||||||
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
this.logger.info(`Chance Same Side Is Hostle is ${modPMC.chanceSameSideIsHostile}`);
|
||||||
@ -87,7 +89,7 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
// Adjusts the Max Bot Cap located in configs/bot.json/maxBotCap
|
||||||
if (mod.maxBotCap != 20)
|
if (mod.maxBotCap != bot.maxBotCap)
|
||||||
{
|
{
|
||||||
this.botConfig.maxBotCap = mod.maxBotCap;
|
this.botConfig.maxBotCap = mod.maxBotCap;
|
||||||
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
this.logger.info(`Bot Cap is now ${mod.maxBotCap}`);
|
||||||
@ -95,7 +97,7 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Modifies the lootNValue of PMC or Scav if configured outside of the defaults.
|
// Modifies the lootNValue of PMC or Scav if configured outside of the defaults.
|
||||||
if (modPMC.lootNValue != 3 || modScav.lootNValue != 4)
|
if (modPMC.lootNValue != lootNValue.pmc || modScav.lootNValue != lootNValue.scav)
|
||||||
{
|
{
|
||||||
lootNValue.scav = modScav.lootNValue;
|
lootNValue.scav = modScav.lootNValue;
|
||||||
lootNValue.pmc = modPMC.lootNValue;
|
lootNValue.pmc = modPMC.lootNValue;
|
||||||
@ -104,11 +106,10 @@ export class Bots
|
|||||||
|
|
||||||
|
|
||||||
// Adjusts the chance for PMC to spawn instead of the default bot type if configured outside of the default values.
|
// Adjusts the chance for PMC to spawn instead of the default bot type if configured outside of the default values.
|
||||||
const pmcChance = modPMC.convertIntoPmcChance;
|
if (this.modConfig.pmc.convertIntoPmcChance.assault.min != 15 || this.modConfig.pmc.convertIntoPmcChance.assault.max != 40
|
||||||
if (pmcChance.assault.min != 15 || pmcChance.assault.max != 40
|
|| this.modConfig.pmc.convertIntoPmcChance.cursedAssault.min != 15 || this.modConfig.pmc.convertIntoPmcChance.cursedAssault.max != 40
|
||||||
|| pmcChance.cursedAssault.min != 15 || pmcChance.cursedAssault.max != 40
|
|| this.modConfig.pmc.convertIntoPmcChance.pmcBot.min != 15 || this.modConfig.pmc.convertIntoPmcChance.pmcBot.max != 30
|
||||||
|| pmcChance.pmcBot.min != 15 || pmcChance.pmcBot.max != 30
|
|| this.modConfig.pmc.convertIntoPmcChance.exUsec.min != 5 || this.modConfig.pmc.convertIntoPmcChance.exUsec.max != 20)
|
||||||
|| pmcChance.exUsec.min != 5 || pmcChance.exUsec.max != 20)
|
|
||||||
{
|
{
|
||||||
this.adjustPmcChance();
|
this.adjustPmcChance();
|
||||||
this.logger.info("Chance to Convert Bots into PMC Patched");
|
this.logger.info("Chance to Convert Bots into PMC Patched");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user