Compare commits

..

No commits in common. "main" and "1.3.1" have entirely different histories.
main ... 1.3.1

3 changed files with 26 additions and 316 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "Valens-Progression", "name": "Valens-Progression",
"version": "1.3.3", "version": "1.3.0",
"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",

View File

@ -1,18 +1,16 @@
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { DependencyContainer } from "tsyringe"; import { DependencyContainer } from "tsyringe";
import { IPostDBLoadMod } from "@spt-aki/models/external/IPostDBLoadMod";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
import { ConfigServer } from "@spt-aki/servers/ConfigServer";
import { ConfigTypes } from "@spt-aki/models/enums/ConfigTypes";
import { IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
//import { Scavs } from "./scavs"; //import { Scavs } from "./scavs";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { PMCs } from "./pmc"; import { PMCs } from "./pmc";
class ValensProgression implements IPostDBLoadMod class ValensProgression implements IPostDBLoadMod
{ {
private configServer: ConfigServer; private configServer: ConfigServer;
private locationConfig: ILocationConfig
private botConfig: IBotConfig; private botConfig: IBotConfig;
private databaseServer: DatabaseServer; private databaseServer: DatabaseServer;
// private scavs: Scavs; // private scavs: Scavs;
@ -22,7 +20,6 @@ class ValensProgression implements IPostDBLoadMod
{ {
// get database from server // get database from server
this.configServer = container.resolve<ConfigServer>("ConfigServer"); this.configServer = container.resolve<ConfigServer>("ConfigServer");
this.locationConfig = this.configServer.getConfig<ILocationConfig>(ConfigTypes.LOCATION);
this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT); this.botConfig = this.configServer.getConfig<IBotConfig>(ConfigTypes.BOT);
this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer"); this.databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
@ -30,7 +27,7 @@ class ValensProgression implements IPostDBLoadMod
// this.scavs = new Scavs(this.botConfig, this.databaseServer); // this.scavs = new Scavs(this.botConfig, this.databaseServer);
// this.scavs.updateScavs(); // this.scavs.updateScavs();
this.pmcs = new PMCs(this.locationConfig, this.botConfig, this.databaseServer); this.pmcs = new PMCs(this.botConfig, this.databaseServer);
this.pmcs.updatePmcs(); this.pmcs.updatePmcs();
} }
} }

View File

@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/naming-convention */ /* eslint-disable @typescript-eslint/naming-convention */
import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig"; import { EquipmentFilterDetails, EquipmentFilters, IBotConfig } from "@spt-aki/models/spt/config/IBotConfig";
import { ILocationConfig } from "@spt-aki/models/spt/config/ILocationConfig";
import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables"; import { IDatabaseTables } from "@spt-aki/models/spt/server/IDatabaseTables";
import { DatabaseServer } from "@spt-aki/servers/DatabaseServer"; import { DatabaseServer } from "@spt-aki/servers/DatabaseServer";
@ -8,13 +7,11 @@ export class PMCs
{ {
private botConfig: IBotConfig; private botConfig: IBotConfig;
private databaseServer: IDatabaseTables; private databaseServer: IDatabaseTables;
private locationConfig: ILocationConfig;
constructor (locationConfig: ILocationConfig, botConfig: IBotConfig, databaseServer: DatabaseServer) constructor (botConfig: IBotConfig, databaseServer: DatabaseServer)
{ {
this.botConfig = botConfig; this.botConfig = botConfig;
this.locationConfig = locationConfig;
this.databaseServer = databaseServer.getTables(); this.databaseServer = databaseServer.getTables();
} }
@ -26,290 +23,6 @@ export class PMCs
private generatePmcs() private generatePmcs()
{ {
// Reduce Custom PMC Boss Chances
const pmcBoss = this.locationConfig.customWaves.boss;
pmcBoss.factory4_day = [{
"sptId": "sptBearFactoryDayBossSpawn",
"BossName": "sptBear",
"BossChance": 15,
"BossZone": "BotZone",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}, {
"sptId": "sptUsecFactoryDayBossSpawn",
"BossName": "sptUsec",
"BossChance": 15,
"BossZone": "BotZone",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}
];
pmcBoss.bigmap =
[{
"sptId": "sptBearCustomsScavBaseNormalSpawn",
"BossName": "sptBear",
"BossChance": 15,
"BossZone": "ZoneScavBase",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}, {
"sptId": "sptUsecCustomsScavBaseNormalSpawn",
"BossName": "sptUsec",
"BossChance": 15,
"BossZone": "ZoneScavBase",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}
];
pmcBoss.woods =
[{
"sptId": "sptBearWoodScavBaseNormalSpawn",
"BossName": "sptBear",
"BossChance": 15,
"BossZone": "ZoneScavBase2",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}, {
"sptId": "sptUsecWoodScavBaseNormalSpawn",
"BossName": "sptUsec",
"BossChance": 15,
"BossZone": "ZoneScavBase2",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "2"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}];
pmcBoss.shoreline =
[{
"sptId": "sptBearShorelinePortNormalSpawn",
"BossName": "sptBear",
"BossChance": 15,
"BossZone": "ZonePort",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}, {
"sptId": "sptUsecShorelinePortNormalSpawn",
"BossName": "sptUsec",
"BossChance": 15,
"BossZone": "ZonePort",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "2",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
},
{
"sptId": "sptUsecShorelineSanatorium1NormalSpawn",
"BossName": "sptUsec",
"BossChance": 10,
"BossZone": "ZoneSanatorium1",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
},
{
"sptId": "sptBearShorelineSanatorium1NormalSpawn",
"BossName": "sptBear",
"BossChance": 10,
"BossZone": "ZoneSanatorium1",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
},
{
"sptId": "sptUsecShorelineSanatorium2NormalSpawn",
"BossName": "sptUsec",
"BossChance": 10,
"BossZone": "ZoneSanatorium2",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptUsec",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptUsec",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
},
{
"sptId": "sptBearShorelineSanatorium2NormalSpawn",
"BossName": "sptBear",
"BossChance": 10,
"BossZone": "ZoneSanatorium2",
"BossPlayer": false,
"BossDifficult": "normal",
"BossEscortType": "sptBear",
"BossEscortDifficult": "normal",
"BossEscortAmount": "1",
"Time": -1,
"Supports": [{
"BossEscortType": "sptBear",
"BossEscortDifficult": [
"normal"
],
"BossEscortAmount": "1"
}
],
"RandomTimeSpawn": false,
"TriggerId": "",
"TriggerName": ""
}];
// Gear Arrays // Gear Arrays
// Primary Weapon Array // Primary Weapon Array
const primaryWeaponArrayLL1 = ["5926bb2186f7744b1c6c6e60", "574d967124597745970e7c94", "57dc2fa62459775949412633", "57f3c6bd24597738e730fa2f", "5839a40f24597726f856b511", "57d14d2524597714373db789", "57f4c844245977379d5c14d1", "59984ab886f7743e98271174", "5ea03f7400685063ec28bfa8", "5a7828548dc32e5a9c28b516", "5bfd297f0db834001a669119", "59d6088586f774275f37482f", "583990e32459771419544dd2", "59e6152586f77473dc057aa1", "5c07c60e0db834002330051f", "5a38e6bac4a2826c6e06d79b", "56dee2bdd2720bc8328b4567", "5447a9cd4bdc2dbd208b4567", "5d2f0d8048f0356c925bc3b0", "5d2f0d8048f0356c925bc3b0", "5fc3e272f8b6a877a729eac5", "58948c8e86f77409493f7266", "59e6687d86f77411d949b251", "54491c4f4bdc2db1078b4568", "5ba26383d4351e00334c93d9", "587e02ff24597743df3deaeb", "5c501a4d2e221602b412b540", "60db29ce99594040e04c4a27", "5580223e4bdc2d1c128b457f", "61f7c9e189e6fb1a5e3ea78d", "5e870397991fd70db46995c8", "5de652c31b7e3716273428be"]; const primaryWeaponArrayLL1 = ["5926bb2186f7744b1c6c6e60", "574d967124597745970e7c94", "57dc2fa62459775949412633", "57f3c6bd24597738e730fa2f", "5839a40f24597726f856b511", "57d14d2524597714373db789", "57f4c844245977379d5c14d1", "59984ab886f7743e98271174", "5ea03f7400685063ec28bfa8", "5a7828548dc32e5a9c28b516", "5bfd297f0db834001a669119", "59d6088586f774275f37482f", "583990e32459771419544dd2", "59e6152586f77473dc057aa1", "5c07c60e0db834002330051f", "5a38e6bac4a2826c6e06d79b", "56dee2bdd2720bc8328b4567", "5447a9cd4bdc2dbd208b4567", "5d2f0d8048f0356c925bc3b0", "5d2f0d8048f0356c925bc3b0", "5fc3e272f8b6a877a729eac5", "58948c8e86f77409493f7266", "59e6687d86f77411d949b251", "54491c4f4bdc2db1078b4568", "5ba26383d4351e00334c93d9", "587e02ff24597743df3deaeb", "5c501a4d2e221602b412b540", "60db29ce99594040e04c4a27", "5580223e4bdc2d1c128b457f", "61f7c9e189e6fb1a5e3ea78d", "5e870397991fd70db46995c8", "5de652c31b7e3716273428be"];
@ -510,8 +223,8 @@ export class PMCs
"5f9949d869e2777a0e779ba5": 1 "5f9949d869e2777a0e779ba5": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.ArmBand = pmcEquipment.ArmBand; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.ArmBand;
this.databaseServer.bots.types.bear.inventory.equipment.ArmBand = pmcEquipment.ArmBand; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.ArmBand;
// PMC Armor Vest Weighting // PMC Armor Vest Weighting
@ -561,8 +274,8 @@ export class PMCs
"5df8a4d786f77412672a1e3b": 1 "5df8a4d786f77412672a1e3b": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.Backpack = pmcEquipment.Backpack; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.Backpack;
this.databaseServer.bots.types.bear.inventory.equipment.Backpack = pmcEquipment.Backpack; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.Backpack;
// PMC Earpiece Weighting // PMC Earpiece Weighting
@ -575,8 +288,8 @@ export class PMCs
"5a16b9fffcdbcb0176308b34": 1 "5a16b9fffcdbcb0176308b34": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.Earpiece = pmcEquipment.Earpiece; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.Earpiece;
this.databaseServer.bots.types.bear.inventory.equipment.Earpiece = pmcEquipment.Earpiece; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.Earpiece;
// PMC Eyewear Weighting // PMC Eyewear Weighting
@ -591,8 +304,8 @@ export class PMCs
"5c0d32fcd174af02a1659c75": 1 "5c0d32fcd174af02a1659c75": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.Eyewear = pmcEquipment.Eyewear; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.Eyewear;
this.databaseServer.bots.types.bear.inventory.equipment.Eyewear = pmcEquipment.Eyewear; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.Eyewear;
// PMC FaceCover Weighting // PMC FaceCover Weighting
@ -605,8 +318,8 @@ export class PMCs
"5b432f3d5acfc4704b4a1dfb": 1 "5b432f3d5acfc4704b4a1dfb": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.FaceCover = pmcEquipment.FaceCover; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.FaceCover;
this.databaseServer.bots.types.bear.inventory.equipment.FaceCover = pmcEquipment.FaceCover; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.FaceCover;
// PMC FirstPrimaryWeapon Weighting // PMC FirstPrimaryWeapon Weighting
@ -684,8 +397,8 @@ export class PMCs
"5df24cf80dee1b22f862e9bc": 1 "5df24cf80dee1b22f862e9bc": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.FirstPrimaryWeapon = pmcEquipment.FirstPrimaryWeapon; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.FirstPrimaryWeapon;
this.databaseServer.bots.types.bear.inventory.equipment.FirstPrimaryWeapon = pmcEquipment.FirstPrimaryWeapon; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.FirstPrimaryWeapon;
// PMC Headwear Weighting // PMC Headwear Weighting
@ -709,8 +422,8 @@ export class PMCs
"5d6d3716a4b9361bc8618872": 1 "5d6d3716a4b9361bc8618872": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.Headwear = pmcEquipment.Headwear; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.Headwear;
this.databaseServer.bots.types.bear.inventory.equipment.Headwear = pmcEquipment.Headwear; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.Headwear;
// PMC Holster Weighting // PMC Holster Weighting
@ -736,8 +449,8 @@ export class PMCs
"633ec7c2a6918cb895019c6c": 1 "633ec7c2a6918cb895019c6c": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.Holster = pmcEquipment.Holster; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.Holster;
this.databaseServer.bots.types.bear.inventory.equipment.Holster = pmcEquipment.Holster; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.Holster;
// PMC Tactical Vest Weighting // PMC Tactical Vest Weighting
@ -774,8 +487,8 @@ export class PMCs
"5df8a42886f77412640e2e75": 1 "5df8a42886f77412640e2e75": 1
}; };
this.databaseServer.bots.types.usec.inventory.equipment.TacticalVest = pmcEquipment.TacticalVest; this.databaseServer.bots.types.usec.inventory.equipment.ArmorVest = pmcEquipment.TacticalVest;
this.databaseServer.bots.types.bear.inventory.equipment.TacticalVest = pmcEquipment.TacticalVest; this.databaseServer.bots.types.bear.inventory.equipment.ArmorVest = pmcEquipment.TacticalVest;