Archived
Adding Mods w/Symlink
This commit is contained in:
Binary file not shown.
@@ -0,0 +1,28 @@
|
||||
[General]
|
||||
gameName=spt
|
||||
modid=0
|
||||
version=d2024.12.16.0
|
||||
newestVersion=
|
||||
category="1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=boogle-skeletonkey_103.zip
|
||||
repository=Nexus
|
||||
ignoredVersion=
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=true
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-12-16T05:54:04Z
|
||||
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
|
||||
@@ -0,0 +1,6 @@
|
||||
## Installation
|
||||
Drag and drop the files like any other mod
|
||||
|
||||
## Config
|
||||
There is a config file where you can edit the prices and number of usage of each key
|
||||
Set the usage to 0 for infinite
|
||||
@@ -0,0 +1,12 @@
|
||||
{
|
||||
"KeyPrice": 3000000,
|
||||
"KeycardPrice": 5000000,
|
||||
"KeyUses": 10,
|
||||
"KeycardUses": 6,
|
||||
"ContainersDropChance": {
|
||||
"578f8778245977358849a9b5": 5,
|
||||
"578f87b7245977356274f2cd": 2
|
||||
},
|
||||
"BotDropChance": 0,
|
||||
"BannedBots": ["assault", "assaultgroup", "bear", "exusec", "usec", "pmcbear", "pmcbot", "pmcusec", "followerBully", "followerGluharAssault", "followerGluharScout", "followerGluharSecurity", "followerGluharSnipe", "followerKojaniy", "followerSanitar", "followerTagilla", "followerBirdEye", "followerBigPipe", "followerZryachiy", "followerTest", "followerBoar", "followerBoarClose1", "followerBoarClose2", "followerKolontayAssault", "followerKolontaySecurity"]
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"name": "SkeletonKey",
|
||||
"version": "1.0.3",
|
||||
"sptVersion": "~3.10",
|
||||
"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": "Boogle",
|
||||
"contributors": [],
|
||||
"license": "MIT"
|
||||
}
|
||||
@@ -0,0 +1,112 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mod = void 0;
|
||||
const skeletonKeyId = "673e1f10aaf0fe810c488218";
|
||||
const keycardId = "673e213fc6be39d06423d6b7";
|
||||
class Mod {
|
||||
config = require("../config/config.json");
|
||||
addToStaticLoot(container, containerId, itemId, relativeProbability) {
|
||||
const db = container.resolve("DatabaseServer");
|
||||
const locations = db.getTables().locations;
|
||||
for (const locationId in locations) {
|
||||
const location = locations[locationId];
|
||||
if (!location || !location.staticLoot) {
|
||||
continue;
|
||||
}
|
||||
const lootcontainer = location.staticLoot[containerId];
|
||||
if (lootcontainer) {
|
||||
lootcontainer.itemDistribution.push({ "tpl": itemId, "relativeProbability": relativeProbability });
|
||||
}
|
||||
}
|
||||
}
|
||||
addToBossLoot(container, itemId, relativeProbability, bannedBosses = []) {
|
||||
const db = container.resolve("DatabaseServer");
|
||||
const bosses = db.getTables().bots;
|
||||
for (const bossId in bosses.types) {
|
||||
if (bannedBosses.includes(bossId)) {
|
||||
continue;
|
||||
}
|
||||
const boss = bosses.types[bossId];
|
||||
if (!boss || !boss.inventory || !boss.inventory.items) {
|
||||
continue;
|
||||
}
|
||||
// boss.inventory.items.Backpack[itemId] = relativeProbability;
|
||||
boss.inventory.items.Pockets[itemId] = relativeProbability;
|
||||
}
|
||||
}
|
||||
postDBLoad(container) {
|
||||
const customItem = container.resolve("CustomItemService");
|
||||
const keyPrice = this.config.KeyPrice;
|
||||
const keycardPrice = this.config.KeycardPrice;
|
||||
const keyUses = this.config.KeyUses;
|
||||
const keycardUses = this.config.KeycardUses;
|
||||
const bannedBots = this.config.BannedBots;
|
||||
const botDropChance = this.config.BotDropChance;
|
||||
const containers = this.config.Containers;
|
||||
const skeletonKey = {
|
||||
itemTplToClone: "5780cf7f2459777de4559322",
|
||||
overrideProperties: {
|
||||
MaximumNumberOfUsage: keyUses,
|
||||
BackgroundColor: "yellow",
|
||||
Prefab: {
|
||||
"path": "assets/content/items/spec/keys/item_key_11.bundle",
|
||||
"rcid": ""
|
||||
}
|
||||
},
|
||||
parentId: "5c99f98d86f7745c314214b3",
|
||||
newId: skeletonKeyId,
|
||||
fleaPriceRoubles: keyPrice,
|
||||
handbookPriceRoubles: keyPrice,
|
||||
handbookParentId: "5c518ec986f7743b68682ce2",
|
||||
locales: {
|
||||
en: {
|
||||
name: "Skeleton Key",
|
||||
shortName: "Skeleton",
|
||||
description: "Unlocks any door in the Tarkov region, incredibly rare and expensive."
|
||||
}
|
||||
}
|
||||
};
|
||||
const skeletonKeycard = {
|
||||
itemTplToClone: "5c94bbff86f7747ee735c08f",
|
||||
overrideProperties: {
|
||||
MaximumNumberOfUsage: keycardUses,
|
||||
BackgroundColor: "violet",
|
||||
Prefab: {
|
||||
"path": "assets/content/items/spec/item_keycard_lab/item_keycard_lab_priority_serv.bundle",
|
||||
"rcid": ""
|
||||
}
|
||||
},
|
||||
parentId: "5c164d2286f774194c5e69fa",
|
||||
newId: keycardId,
|
||||
fleaPriceRoubles: keycardPrice,
|
||||
handbookPriceRoubles: keycardPrice,
|
||||
handbookParentId: "5c518ed586f774119a772aee",
|
||||
locales: {
|
||||
en: {
|
||||
name: "TerraGroup Labs priority access keycard",
|
||||
shortName: "Priority",
|
||||
description: "Unlocks any keycard door in the TerraGroup Laboratory and surrounding areas throughout the Tarkov region. Likely owned by a high-ranking TerraGroup employee."
|
||||
}
|
||||
}
|
||||
};
|
||||
customItem.createItemFromClone(skeletonKey);
|
||||
customItem.createItemFromClone(skeletonKeycard);
|
||||
for (const containerId in containers) {
|
||||
const dropchance = containers[containerId];
|
||||
this.addToStaticLoot(container, containerId, skeletonKeyId, dropchance); // Adds the Skeleton Key to jackets
|
||||
}
|
||||
this.addToBossLoot(container, skeletonKeyId, botDropChance, bannedBots); // Adds the Skeleton Key to bosses
|
||||
this.addToBossLoot(container, keycardId, botDropChance, bannedBots); // Adds the Skeleton Keycard to bosses
|
||||
}
|
||||
postSptLoad(container) {
|
||||
const db = container.resolve("DatabaseServer");
|
||||
const item = db.getTables().templates.items;
|
||||
const key = item[skeletonKeyId];
|
||||
const keycard = item[keycardId];
|
||||
if (key && keycard) {
|
||||
console.log("Skeleton Key and Skeleton Keycard loaded successfully.");
|
||||
}
|
||||
}
|
||||
}
|
||||
exports.mod = new Mod();
|
||||
//# sourceMappingURL=mod.js.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mod.js","sourceRoot":"","sources":["mod.ts"],"names":[],"mappings":";;;AAWA,MAAM,aAAa,GAAG,0BAA0B,CAAA;AAChD,MAAM,SAAS,GAAG,0BAA0B,CAAA;AAE5C,MAAM,GAAG;IAEG,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC,CAAA;IAEzC,eAAe,CAAC,SAA8B,EAAE,WAAmB,EAAE,MAAc,EAAE,mBAA2B;QAEpH,MAAM,EAAE,GAAG,SAAS,CAAC,OAAO,CAAiB,gBAAgB,CAAC,CAAC;QAE/D,MAAM,SAAS,GAAG,EAAE,CAAC,SAAS,EAAE,CAAC,SAAS,CAAC;QAE3C,KAAK,MAAM,UAAU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oadMod";
|
||||
import { CustomItemService } from "@spt/services/mod/CustomItemService";
|
||||
import { NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails";
|
||||
import { IPostSptLoadMod } from "@spt/models/external/IPostSptLoadMod";
|
||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||
import { ILocation } from "@spt/models/eft/common/ILocation";
|
||||
import { IBotType } from "@spt/models/eft/common/tables/IBotType";
|
||||
|
||||
|
||||
const skeletonKeyId = "673e1f10aaf0fe810c488218"
|
||||
const keycardId = "673e213fc6be39d06423d6b7"
|
||||
|
||||
class Mod implements IPostDBLoadMod, IPostSptLoadMod
|
||||
{
|
||||
private config = require("../config/config.json")
|
||||
|
||||
private addToStaticLoot(container: DependencyContainer, containerId: string, itemId: string, relativeProbability: number)
|
||||
{
|
||||
const db = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
|
||||
const locations = db.getTables().locations;
|
||||
|
||||
for (const locationId in locations)
|
||||
{
|
||||
const location: ILocation = locations[locationId];
|
||||
|
||||
if (!location || !location.staticLoot)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
const lootcontainer = location.staticLoot[containerId];
|
||||
|
||||
if (lootcontainer)
|
||||
{
|
||||
lootcontainer.itemDistribution.push({"tpl": itemId, "relativeProbability": relativeProbability});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private addToBossLoot(container: DependencyContainer, itemId: string, relativeProbability: number, bannedBosses: string[] = [])
|
||||
{
|
||||
const db = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
|
||||
const bosses = db.getTables().bots
|
||||
|
||||
for (const bossId in bosses.types)
|
||||
{
|
||||
if (bannedBosses.includes(bossId))
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
const boss: IBotType = bosses.types[bossId];
|
||||
|
||||
if (!boss || !boss.inventory || !boss.inventory.items)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
// boss.inventory.items.Backpack[itemId] = relativeProbability;
|
||||
boss.inventory.items.Pockets[itemId] = relativeProbability;
|
||||
}
|
||||
}
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
const customItem = container.resolve<CustomItemService>("CustomItemService");
|
||||
|
||||
const keyPrice: number = this.config.KeyPrice;
|
||||
const keycardPrice: number = this.config.KeycardPrice;
|
||||
const keyUses: number = this.config.KeyUses;
|
||||
const keycardUses: number = this.config.KeycardUses;
|
||||
const bannedBots: string[] = this.config.BannedBots;
|
||||
const botDropChance: number = this.config.BotDropChance;
|
||||
const containers: Record<string, number> = this.config.Containers;
|
||||
|
||||
|
||||
|
||||
const skeletonKey: NewItemFromCloneDetails = {
|
||||
itemTplToClone: "5780cf7f2459777de4559322",
|
||||
overrideProperties: {
|
||||
MaximumNumberOfUsage: keyUses,
|
||||
BackgroundColor: "yellow",
|
||||
Prefab: {
|
||||
"path": "assets/content/items/spec/keys/item_key_11.bundle",
|
||||
"rcid": ""
|
||||
}
|
||||
},
|
||||
parentId: "5c99f98d86f7745c314214b3",
|
||||
newId: skeletonKeyId,
|
||||
fleaPriceRoubles: keyPrice,
|
||||
handbookPriceRoubles: keyPrice,
|
||||
handbookParentId: "5c518ec986f7743b68682ce2",
|
||||
locales: {
|
||||
en: {
|
||||
name: "Skeleton Key",
|
||||
shortName: "Skeleton",
|
||||
description: "Unlocks any door in the Tarkov region, incredibly rare and expensive."
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
const skeletonKeycard: NewItemFromCloneDetails = {
|
||||
itemTplToClone: "5c94bbff86f7747ee735c08f",
|
||||
overrideProperties: {
|
||||
MaximumNumberOfUsage: keycardUses,
|
||||
BackgroundColor: "violet",
|
||||
Prefab: {
|
||||
"path": "assets/content/items/spec/item_keycard_lab/item_keycard_lab_priority_serv.bundle",
|
||||
"rcid": ""
|
||||
}
|
||||
},
|
||||
parentId: "5c164d2286f774194c5e69fa",
|
||||
newId: keycardId,
|
||||
fleaPriceRoubles: keycardPrice,
|
||||
handbookPriceRoubles: keycardPrice,
|
||||
handbookParentId: "5c518ed586f774119a772aee",
|
||||
locales: {
|
||||
en: {
|
||||
name: "TerraGroup Labs priority access keycard",
|
||||
shortName: "Priority",
|
||||
description: "Unlocks any keycard door in the TerraGroup Laboratory and surrounding areas throughout the Tarkov region. Likely owned by a high-ranking TerraGroup employee."
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
customItem.createItemFromClone(skeletonKey);
|
||||
customItem.createItemFromClone(skeletonKeycard);
|
||||
|
||||
for (const containerId in containers)
|
||||
{
|
||||
const dropchance = containers[containerId];
|
||||
this.addToStaticLoot(container, containerId, skeletonKeyId, dropchance); // Adds the Skeleton Key to jackets
|
||||
}
|
||||
|
||||
|
||||
this.addToBossLoot(container, skeletonKeyId, botDropChance, bannedBots); // Adds the Skeleton Key to bosses
|
||||
this.addToBossLoot(container, keycardId, botDropChance, bannedBots); // Adds the Skeleton Keycard to bosses
|
||||
}
|
||||
|
||||
public postSptLoad(container: DependencyContainer): void
|
||||
{
|
||||
const db = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
const item = db.getTables().templates.items;
|
||||
|
||||
const key = item[skeletonKeyId];
|
||||
const keycard = item[keycardId];
|
||||
|
||||
if (key && keycard)
|
||||
{
|
||||
console.log("Skeleton Key and Skeleton Keycard loaded successfully.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export const mod = new Mod();
|
||||
Reference in New Issue
Block a user