Archived
Complete Remake of the Modpack
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
[General]
|
||||
gameName=spt
|
||||
modid=0
|
||||
version=d2024.12.16.0
|
||||
version=d2025.5.14.0
|
||||
newestVersion=
|
||||
category="1,"
|
||||
category="-1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=acidphantasm-bosseshavelegamedals.zip
|
||||
repository=Nexus
|
||||
@@ -15,7 +15,7 @@ url=
|
||||
hasCustomURL=false
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-12-16T07:04:00Z
|
||||
nexusLastModified=2025-05-14T13:40:40Z
|
||||
nexusCategory=0
|
||||
converted=false
|
||||
validated=false
|
||||
|
||||
+4
-2
@@ -6,6 +6,8 @@
|
||||
// A setting of 40 is roughly 36% chance
|
||||
// A setting of 100 is roughly 66% chance
|
||||
// A setting of 500 is roughly 97% chance
|
||||
// IF YOU WANT TO SEE THE CHANCE OF THE VALUE YOU SET, LOOK IN YOUR SERVER LOG
|
||||
"legaMedalChance": 15
|
||||
// IF YOU WANT TO SEE THE ACTUAL CHANCE OF THE VALUE YOU SET, ENABLE DEBUGLOGGING & LOOK IN YOUR SERVER LOG
|
||||
"legaMedalChance": 15,
|
||||
|
||||
"debugLogging": false
|
||||
}
|
||||
+6
-5
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "Bosses Have Lega Medals",
|
||||
"version": "1.2.0",
|
||||
"sptVersion": "~3.10",
|
||||
"version": "1.3.0",
|
||||
"sptVersion": "~3.11",
|
||||
"loadBefore": [],
|
||||
"loadAfter": [],
|
||||
"incompatibilities": [],
|
||||
@@ -13,7 +13,7 @@
|
||||
"buildinfo": "node ./build.mjs --verbose"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.11",
|
||||
"@types/node": "22.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "7.2",
|
||||
"@typescript-eslint/parser": "7.2",
|
||||
"archiver": "^6.0",
|
||||
@@ -21,8 +21,9 @@
|
||||
"fs-extra": "11.2",
|
||||
"ignore": "^5.2",
|
||||
"tsyringe": "4.8.0",
|
||||
"typescript": "5.4",
|
||||
"winston": "3.12"
|
||||
"typescript": "5.7.3",
|
||||
"winston": "3.17.0",
|
||||
"jsonc": "2.0.0"
|
||||
},
|
||||
"author": "acidphantasm",
|
||||
"contributors": [],
|
||||
|
||||
@@ -4,16 +4,16 @@ import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||
import { DatabaseService } from "@spt/services/DatabaseService";
|
||||
import { IDatabaseTables } from "@spt/models/spt/server/IDatabaseTables";
|
||||
import { ILogger } from "@spt/models/spt/utils/ILogger";
|
||||
import jsonc from "jsonc";
|
||||
import { jsonc } from "jsonc";
|
||||
import path from "path";
|
||||
import { VFS } from "@spt/utils/VFS";
|
||||
import { FileSystemSync } from "@spt/utils/FileSystemSync";
|
||||
|
||||
class BossesHaveLegaMedals implements IPostDBLoadMod
|
||||
{
|
||||
private logger: ILogger
|
||||
|
||||
private static vfs = container.resolve<VFS>("VFS");
|
||||
private static config: Config = jsonc.parse(BossesHaveLegaMedals.vfs.readFile(path.resolve(__dirname, "../config/config.jsonc")));
|
||||
private static fileSystemSync = container.resolve<FileSystemSync>("FileSystemSync");
|
||||
private static config: Config = jsonc.parse(BossesHaveLegaMedals.fileSystemSync.read(path.resolve(__dirname, "../config/config.jsonc")));
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
@@ -41,7 +41,7 @@ class BossesHaveLegaMedals implements IPostDBLoadMod
|
||||
value = Math.round((chance / 100) * (bossTotal + guess));
|
||||
rollChance = value / (bossTotal + value)
|
||||
//this.logger.debug(`[BossesHaveLegaMedals] ${botType}: ${(bossTotal + value)} --- if value: ${value} then chance is ${rollChance}`);
|
||||
this.logger.debug(`[BossesHaveLegaMedals] ${botType}: Chance is ${Number(rollChance).toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2})}`);
|
||||
if (BossesHaveLegaMedals.config.debugLogging) this.logger.debug(`[BossesHaveLegaMedals] ${botType}: Chance is ${Number(rollChance).toLocaleString(undefined,{style: 'percent', minimumFractionDigits:2})}`);
|
||||
bossPockets["6656560053eaaa7a23349c86"] = value;
|
||||
}
|
||||
}
|
||||
@@ -50,6 +50,7 @@ class BossesHaveLegaMedals implements IPostDBLoadMod
|
||||
interface Config
|
||||
{
|
||||
legaMedalChance: number,
|
||||
debugLogging: boolean
|
||||
}
|
||||
|
||||
export const mod = new BossesHaveLegaMedals();
|
||||
|
||||
Reference in New Issue
Block a user