Added A Mod; Fixed One Mod Installation

Added
- Black Clothing Pack

Fixed
- Make Val/VSS Great Again
This commit is contained in:
2025-01-15 20:59:57 -05:00
parent a161750966
commit 5d24318a39
390 changed files with 9572 additions and 28024 deletions
@@ -0,0 +1,31 @@
{
"name": "Make VAL-VSS Great Again",
"version": "1.0.7",
"sptVersion": "3.10.x",
"license": "MIT",
"loadBefore": [],
"loadAfter": [],
"incompatibilities": [],
"isBundleMod": false,
"main": "src/mod.js",
"scripts": {
"setup": "npm i",
"build": "node ./build.mjs",
"buildinfo": "node ./build.mjs --verbose"
},
"devDependencies": {
"@types/node": "20.11",
"@typescript-eslint/eslint-plugin": "7.2",
"@typescript-eslint/parser": "7.2",
"archiver": "^6.0",
"eslint": "8.57",
"fs-extra": "11.2",
"ignore": "^5.2",
"tsyringe": "4.8.0",
"typescript": "5.4",
"winston": "3.12"
},
"author": "z_Hacker228",
"contributors": [],
"license": "MIT"
}
@@ -0,0 +1,90 @@
import { DependencyContainer } from "tsyringe";
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
import { IPostAkiLoadMod } from "@spt/models/external/IPostAkiLoadMod";
import { DatabaseServer } from "@spt/servers/DatabaseServer";
import { ILogger } from "@spt/models/spt/utils/ILogger";
import { LogTextColor } from "@spt/models/spt/logging/LogTextColor";
class Mod implements IPostDBLoadMod, IPostAkiLoadMod {
public IPostAkiLoadMod(container: DependencyContainer): void {
const logger = container.resolve<ILogger>("WinstonLogger");
logger.info("Mod: Make VSS Great Again version: 1.0.7 by: Hacker228 loaded");
}
public postDBLoad(container: DependencyContainer): void {
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
const tables = databaseServer.getTables();
// Define constant values
const HEAT_FACTOR_BY_SHOT = 2.17;
const HEAT_FACTOR_GUN = 0.98;
const HEAT_FACTOR_AMMO_SP_5 = 1.273;
const HEAT_FACTOR_AMMO_SP_6 = 1.34;
const HEAT_FACTOR_AMMO_PUB_9 = 1.3;
const HEAT_FACTOR_AMMO_SPP = 1.206;
const HEAT_FACTOR_AMMO_BP = 1.55;
// Define item IDs and names to update
const itemsToUpdate = [
{ id: "57838ad32459774a17445cd2", name_gun: "VSS" },
{ id: "57c44b372459772d2b39b8ce", name_gun: "VAL" },
{ id: "651450ce0e00edc794068371", name_gun: "SR-3m" }
];
const ammoToUpdate = [
{ id: "57a0dfb82459774d3078b56c", heatFactor: HEAT_FACTOR_AMMO_SP_5, name_ammo: "SP-5" },
{ id: "57a0e5022459774d1673f889", heatFactor: HEAT_FACTOR_AMMO_SP_6, name_ammo: "SP-6" },
{ id: "61962d879bb3d20b0946d385", heatFactor: HEAT_FACTOR_AMMO_PUB_9, name_ammo: "PUB-9" },
{ id: "5c0d668f86f7747ccb7f13b2", heatFactor: HEAT_FACTOR_AMMO_SPP, name_ammo: "SPP" },
{ id: "5c0d688c86f77413ae3407b2", heatFactor: HEAT_FACTOR_AMMO_SPP, name_ammo: "BP" }
];
// Define delay before starting to log messages in seconds
const initialDelayInSeconds = 3;
// Use setTimeout for initial delay
setTimeout(() => {
// Log an empty line before the first message
const logger = container.resolve<ILogger>("WinstonLogger");
logger.info("");
itemsToUpdate.forEach(({ id, name_gun }) => {
const item = tables.templates.items[id];
if (item) {
// Update properties using constants
item._props.HeatFactorByShot = HEAT_FACTOR_BY_SHOT;
item._props.HeatFactorGun = HEAT_FACTOR_GUN;
// Log message if the item ID is found
logger.logWithColor(`${name_gun} item ID found. Сhanges applied.`, LogTextColor.GREEN);
} else {
// Log message if the item ID is not found
logger.logWithColor(`${name_gun} item ID not found. Changes not applied.`, LogTextColor.RED);
}
});
ammoToUpdate.forEach(({ id, heatFactor, name_ammo }) => {
const ammoItem = tables.templates.items[id];
if (ammoItem) {
// Update ammo properties
ammoItem._props.HeatFactor = heatFactor;
// Log message if the ammo ID is found
logger.logWithColor(`${name_ammo} item ID found. Changes applied.`, LogTextColor.GREEN);
} else {
// Log message if the ammo ID is not found
logger.logWithColor(`${name_ammo} item ID not found. Changes not applied.`, LogTextColor.RED);
}
});
// Log an empty line after all messages
logger.info("");
}, initialDelayInSeconds * 1000); // Convert seconds to milliseconds
}
}
module.exports = { mod: new Mod() };
+28
View File
@@ -0,0 +1,28 @@
[General]
gameName=spt
modid=0
version=d2025.1.15.0
newestVersion=
category="1,"
nexusFileStatus=1
installationFile=Make-3M-VAL-VSS- Great-Again.zip
repository=
ignoredVersion=
comments=
notes=
nexusDescription=
url=
hasCustomURL=true
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2025-01-16T01:50:38Z
nexusCategory=0
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0
[installedFiles]
1\modid=0
1\fileid=0
size=1