Archived
Adding Mods w/Symlink
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Rider ignored files
|
||||
/modules.xml
|
||||
/.idea.Choccy-KSG12.iml
|
||||
/contentModel.xml
|
||||
/projectSettingsUpdater.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
||||
@@ -0,0 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="UserContentModel">
|
||||
<attachedFolders />
|
||||
<explicitIncludes />
|
||||
<explicitExcludes />
|
||||
</component>
|
||||
</project>
|
||||
@@ -0,0 +1,49 @@
|
||||
{
|
||||
"manifest": [
|
||||
{
|
||||
"key": "china lake/client_assets.bundle",
|
||||
"dependencyKeys": [
|
||||
"china lake/textures.bundle",
|
||||
"cubemaps",
|
||||
"shaders"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "china lake/textures.bundle",
|
||||
"dependencyKeys": [
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "china lake/china_lake_bank.bundle",
|
||||
"dependencyKeys": [
|
||||
"assets/content/audio/blendoptions/assets.bundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "china lake/mod_magazine_china_lake_3_rnd_tube.bundle",
|
||||
"dependencyKeys": [
|
||||
"china lake/client_assets.bundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "china lake/mod_scope_leaf_sight.bundle",
|
||||
"dependencyKeys": [
|
||||
"china lake/client_assets.bundle"
|
||||
]
|
||||
},
|
||||
{
|
||||
"key": "china lake/weapon_china_lake_container.bundle",
|
||||
"dependencyKeys": [
|
||||
"assets/content/audio/weapons/generic",
|
||||
"assets/content/weapons/additional_hands/client_assets.bundle",
|
||||
"assets/content/weapons/weapon_root_anim_fix.bundle",
|
||||
"assets/content/weapons/wip/kibas tuning prefabs/muzzlejets_templates/default_assets.bundle",
|
||||
"assets/systems/effects/heathaze/defaultheathaze.bundle",
|
||||
"assets/systems/effects/muzzleflash/muzzleflash.bundle",
|
||||
"assets/systems/effects/smoke.bundle",
|
||||
"china lake/client_assets.bundle",
|
||||
"china lake/china_lake_bank.bundle"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"name": "China Lake",
|
||||
"version": "1.0.0",
|
||||
"main": "src/mod.js",
|
||||
"license": "CC-BY 3.0",
|
||||
"author": "Choccy",
|
||||
"isBundleMod": true,
|
||||
"sptVersion": "~3.10",
|
||||
"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"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,72 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
// This is a simple script used to build a mod package. The script will copy necessary files to the build directory
|
||||
// and compress the build directory into a zip file that can be easily shared.
|
||||
|
||||
const fs = require("fs-extra");
|
||||
const glob = require("glob");
|
||||
const zip = require('bestzip');
|
||||
const path = require("path");
|
||||
|
||||
// Load the package.json file to get some information about the package so we can name things appropriately. This is
|
||||
// atypical, and you would never do this in a production environment, but this script is only used for development so
|
||||
// it's fine in this case. Some of these values are stored in environment variables, but those differ between node
|
||||
// versions; the 'author' value is not available after node v14.
|
||||
const { author, name:packageName, version } = require("./package.json");
|
||||
|
||||
// Generate the name of the package, stripping out all non-alphanumeric characters in the 'author' and 'name'.
|
||||
const modName = `${author.replace(/[^a-z0-9]/gi, "")}-${packageName.replace(/[^a-z0-9]/gi, "")}-${version}`;
|
||||
console.log(`Generated package name: ${modName}`);
|
||||
|
||||
// Delete the old build directory and compressed package file.
|
||||
fs.rmSync(`${__dirname}/dist`, { force: true, recursive: true });
|
||||
console.log("Previous build files deleted.");
|
||||
|
||||
// Generate a list of files that should not be copied over into the distribution directory. This is a blacklist to ensure
|
||||
// we always copy over additional files and directories that authors may have added to their project. This may need to be
|
||||
// expanded upon by the mod author to allow for node modules that are used within the mod; example commented out below.
|
||||
const ignoreList = [
|
||||
"node_modules/",
|
||||
// "node_modules/!(weighted|glob)", // Instead of excluding the entire node_modules directory, allow two node modules.
|
||||
"src/**/*.js",
|
||||
"types/",
|
||||
".git/",
|
||||
".gitea/",
|
||||
".eslintignore",
|
||||
".eslintrc.json",
|
||||
".gitignore",
|
||||
".DS_Store",
|
||||
"packageBuild.ts",
|
||||
"mod.code-workspace",
|
||||
"package-lock.json",
|
||||
"tsconfig.json"
|
||||
];
|
||||
const exclude = glob.sync(`{${ignoreList.join(",")}}`, { realpath: true, dot: true });
|
||||
|
||||
// For some reason these basic-bitch functions won't allow us to copy a directory into itself, so we have to resort to
|
||||
// using a temporary directory, like an idiot. Excuse the normalize spam; some modules cross-platform, some don't...
|
||||
fs.copySync(__dirname, path.normalize(`${__dirname}/../~${modName}`), {filter:(filePath) =>
|
||||
{
|
||||
return !exclude.includes(filePath);
|
||||
}});
|
||||
fs.moveSync(path.normalize(`${__dirname}/../~${modName}`), path.normalize(`${__dirname}/${modName}`), { overwrite: true });
|
||||
fs.copySync(path.normalize(`${__dirname}/${modName}`), path.normalize(`${__dirname}/dist`));
|
||||
console.log("Build files copied.");
|
||||
|
||||
// Compress the files for easy distribution. The compressed file is saved into the dist directory. When uncompressed we
|
||||
// need to be sure that it includes a directory that the user can easily copy into their game mods directory.
|
||||
zip({
|
||||
source: modName,
|
||||
destination: `dist/${modName}.zip`,
|
||||
cwd: __dirname
|
||||
}).catch(function(err)
|
||||
{
|
||||
console.error("A bestzip error has occurred: ", err.stack);
|
||||
}).then(function()
|
||||
{
|
||||
console.log(`Compressed mod package to: /dist/${modName}.zip`);
|
||||
|
||||
// Now that we're done with the compression we can delete the temporary build directory.
|
||||
fs.rmSync(`${__dirname}/${modName}`, { force: true, recursive: true });
|
||||
console.log("Build successful! your zip file has been created and is ready to be uploaded to hub.sp-tarkov.com/files/");
|
||||
});
|
||||
@@ -0,0 +1,227 @@
|
||||
{
|
||||
"items": [
|
||||
{
|
||||
"_id": "66cf2a5d69fb0c98e6a9411b",
|
||||
"_tpl": "66ce63fe2fce038160aa9ac6",
|
||||
"parentId": "hideout",
|
||||
"slotId": "hideout",
|
||||
"upd": {
|
||||
"UnlimitedCount": true,
|
||||
"StackObjectsCount": 7531
|
||||
}
|
||||
},
|
||||
{
|
||||
"_id": "66cf2a631e3685e558dce877",
|
||||
"_tpl": "66ce64029424740723b70288",
|
||||
"parentId": "66cf2a5d69fb0c98e6a9411b",
|
||||
"slotId": "mod_magazine"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2a6538a0af9020433ac3",
|
||||
"_tpl": "5bc09a18d4351e003562b68e",
|
||||
"parentId": "66cf2a5d69fb0c98e6a9411b",
|
||||
"slotId": "mod_sight_rear"
|
||||
},
|
||||
{
|
||||
"_id": "66cf28bf10ea8b6a8a8eafb9",
|
||||
"_tpl": "5bc09a30d4351e00367fb7c8",
|
||||
"parentId": "66cf2a5d69fb0c98e6a9411b",
|
||||
"slotId": "mod_sight_front"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"_id": "66cf2b200dd2c22301adbc21",
|
||||
"_tpl": "66ce63fe2fce038160aa9ac6",
|
||||
"parentId": "hideout",
|
||||
"slotId": "hideout",
|
||||
"upd": {
|
||||
"UnlimitedCount": true,
|
||||
"StackObjectsCount": 5532
|
||||
}
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b252936b5de9c70a136",
|
||||
"_tpl": "66ce64029424740723b70288",
|
||||
"parentId": "66cf2b200dd2c22301adbc21",
|
||||
"slotId": "mod_magazine"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b27e4995dc333ecfeda",
|
||||
"_tpl": "584924ec24597768f12ae244",
|
||||
"parentId": "66cf2b200dd2c22301adbc21",
|
||||
"slotId": "mod_scope"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b2883787f00d44d4ad4",
|
||||
"_tpl": "5c87ca002e221600114cb150",
|
||||
"parentId": "66cf2b200dd2c22301adbc21",
|
||||
"slotId": "mod_foregrip"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b2a62a0de6a3dceca0c",
|
||||
"_tpl": "5bc09a18d4351e003562b68e",
|
||||
"parentId": "66cf2b200dd2c22301adbc21",
|
||||
"slotId": "mod_sight_rear"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b2c6c10fa1a3dd89111",
|
||||
"_tpl": "5bc09a30d4351e00367fb7c8",
|
||||
"parentId": "66cf2b200dd2c22301adbc21",
|
||||
"slotId": "mod_sight_front"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"_id": "66cf2b8b45d73907343924a3",
|
||||
"_tpl": "66ce63fe2fce038160aa9ac6",
|
||||
"parentId": "hideout",
|
||||
"slotId": "hideout",
|
||||
"upd": {
|
||||
"UnlimitedCount": true,
|
||||
"StackObjectsCount": 7531
|
||||
}
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b95febcdccef1464156",
|
||||
"_tpl": "66ce64029424740723b70288",
|
||||
"parentId": "66cf2b8b45d73907343924a3",
|
||||
"slotId": "mod_magazine"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b96986c2ebac83a61dc",
|
||||
"_tpl": "5bc09a18d4351e003562b68e",
|
||||
"parentId": "66cf2b8b45d73907343924a3",
|
||||
"slotId": "mod_sight_rear"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2b9813dd1fd762131ae9",
|
||||
"_tpl": "5bc09a30d4351e00367fb7c8",
|
||||
"parentId": "66cf2b8b45d73907343924a3",
|
||||
"slotId": "mod_sight_front"
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
"_id": "66cf2bde82ea790ad007f1fa",
|
||||
"_tpl": "66ce63fe2fce038160aa9ac6",
|
||||
"parentId": "hideout",
|
||||
"slotId": "hideout",
|
||||
"upd": {
|
||||
"UnlimitedCount": true,
|
||||
"StackObjectsCount": 5532
|
||||
}
|
||||
},
|
||||
{
|
||||
"_id": "66cf2bf9ca5b96982f9b5972",
|
||||
"_tpl": "66ce64029424740723b70288",
|
||||
"parentId": "66cf2bde82ea790ad007f1fa",
|
||||
"slotId": "mod_magazine"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2bfb0940e8d0c47ae35d",
|
||||
"_tpl": "57c69dd424597774c03b7bbc",
|
||||
"parentId": "66cf2bde82ea790ad007f1fa",
|
||||
"slotId": "mod_scope"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2c00bb4ecab519ef6fdd",
|
||||
"_tpl": "5c1cd46f2e22164bef5cfedb",
|
||||
"parentId": "66cf2bde82ea790ad007f1fa",
|
||||
"slotId": "mod_foregrip"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2c02db06cff9e183f17c",
|
||||
"_tpl": "5bc09a18d4351e003562b68e",
|
||||
"parentId": "66cf2bde82ea790ad007f1fa",
|
||||
"slotId": "mod_sight_rear"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2c047b59010a035f8f0d",
|
||||
"_tpl": "5bc09a30d4351e00367fb7c8",
|
||||
"parentId": "66cf2bde82ea790ad007f1fa",
|
||||
"slotId": "mod_sight_front"
|
||||
},
|
||||
{
|
||||
"_id": "66cf2c062e771cc14c56c1c7",
|
||||
"_tpl": "5b2388675acfc4771e1be0be",
|
||||
"parentId": "66cf2bfb0940e8d0c47ae35d",
|
||||
"slotId": "mod_scope"
|
||||
},
|
||||
{
|
||||
"_id": "66cf3512f8e69a857c1ef843",
|
||||
"_tpl": "66ce64029424740723b70288",
|
||||
"parentId": "hideout",
|
||||
"slotId": "hideout",
|
||||
"upd": {
|
||||
"UnlimitedCount": true,
|
||||
"StackObjectsCount": 8722
|
||||
}
|
||||
}
|
||||
],
|
||||
"barter_scheme": {
|
||||
"66cf2a5d69fb0c98e6a9411b": [
|
||||
[
|
||||
{
|
||||
"_tpl": "5d1c819a86f774771b0acd6c",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"_tpl": "590a386e86f77429692b27ab",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"_tpl": "59e35cbb86f7741778269d83",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
],
|
||||
"66cf2b200dd2c22301adbc21": [
|
||||
[
|
||||
{
|
||||
"_tpl": "5672cb724bdc2dc2088b456b",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"_tpl": "590c5c9f86f77477c91c36e7",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
],
|
||||
"66cf2b8b45d73907343924a3": [
|
||||
[
|
||||
{
|
||||
"_tpl": "5696686a4bdc2da3298b456a",
|
||||
"count": 563
|
||||
}
|
||||
]
|
||||
],
|
||||
"66cf2bde82ea790ad007f1fa": [
|
||||
[
|
||||
{
|
||||
"_tpl": "590c645c86f77412b01304d9",
|
||||
"count": 2
|
||||
},
|
||||
{
|
||||
"_tpl": "5733279d245977289b77ec24",
|
||||
"count": 1
|
||||
}
|
||||
]
|
||||
],
|
||||
"66cf3512f8e69a857c1ef843": [
|
||||
[
|
||||
{
|
||||
"_tpl": "5696686a4bdc2da3298b456a",
|
||||
"count": 23
|
||||
}
|
||||
]
|
||||
]
|
||||
},
|
||||
"loyal_level_items":{
|
||||
"66cf2a5d69fb0c98e6a9411b": 1,
|
||||
"66cf2b200dd2c22301adbc21": 2,
|
||||
"66cf2b8b45d73907343924a3": 2,
|
||||
"66cf2bde82ea790ad007f1fa": 1,
|
||||
"66cf3512f8e69a857c1ef843": 2
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
{
|
||||
"ItemPresets": {
|
||||
"67472f2e5df4a4a1dc77b94f": {
|
||||
"_changeWeaponName": false,
|
||||
"_encyclopedia": "6745d112eb0900ac53e5f356",
|
||||
"_id": "67472f2e5df4a4a1dc77b94f",
|
||||
"_items": [
|
||||
{
|
||||
"_id": "67472f6818210542f6964460",
|
||||
"_tpl": "6745d112eb0900ac53e5f356"
|
||||
},
|
||||
{
|
||||
"_id": "67472f8a2f534ea03379b714",
|
||||
"_tpl": "6745d11b2fe0e0c66e2ac8e9",
|
||||
"parentId": "67472f6818210542f6964460",
|
||||
"slotId": "mod_magazine"
|
||||
},
|
||||
{
|
||||
"_id": "67472f8debdc0caf2f54b876",
|
||||
"_tpl": "6745f1c80545a067a6838681",
|
||||
"parentId": "67472f6818210542f6964460",
|
||||
"slotId": "mod_scope"
|
||||
}
|
||||
],
|
||||
"_name": "China Lake Stock",
|
||||
"_parent": "67472f6818210542f6964460",
|
||||
"_type": "Preset"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,319 @@
|
||||
{
|
||||
"spawnsRezerv": [
|
||||
{
|
||||
"locationId": "(78.797 2.4313 -13.9751|37.4873 226.9819 316.1582)",
|
||||
"probability": 0.345273,
|
||||
"template": {
|
||||
"Id": "6651567375381abb786f3a5b",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": 78.797,
|
||||
"y": 2.4313,
|
||||
"z": -13.9751
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 37.4873,
|
||||
"y": 226.9819,
|
||||
"z": 316.1582
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "6651567738f38ab0f6c52bc2",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "6651567ed962a5b792248fa6",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156862404d5899b738021",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "6651567ed962a5b792248fa6",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "6651567ed962a5b792248fa6"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"locationId": "(11.5916 -0.7892 4.6904|353.6969 48.8262 41.7712)",
|
||||
"probability": 0.044532,
|
||||
"template": {
|
||||
"Id": "66515689253af484c5f1303a",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": 11.5916,
|
||||
"y": -0.7892,
|
||||
"z": 4.6904
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 353.6969,
|
||||
"y": 48.8262,
|
||||
"z": 41.7712
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "6651568ca4b26f481f19cda6",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "66515693328c890700469175",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156918928bd149c60e827",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "66515693328c890700469175",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "66515693328c890700469175"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"locationId": "(-57.1463 2.6746 20.5125|332.6287 14.0353 93.8348)",
|
||||
"probability": 0.007432,
|
||||
"template": {
|
||||
"Id": "6651569a10759cb0de48342f",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": -57.1463,
|
||||
"y": 2.6746,
|
||||
"z": 20.5125
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 332.6287,
|
||||
"y": 14.0353,
|
||||
"z": 93.8348
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "6651569d1466068c6cf8b2b2",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "665156a3b260a8bf5125a4b7",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156a05ac9ddcd5afa52d2",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "665156a3b260a8bf5125a4b7",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "665156a3b260a8bf5125a4b7"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"locationId": "(-40.0311 19.3493 182.6263|359.9928 29.7891 272.4274)",
|
||||
"probability": 0.115632,
|
||||
"template": {
|
||||
"Id": "665156b386eb1fb0aa4423d8",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": -40.0311,
|
||||
"y": 19.3493,
|
||||
"z": 182.6263
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 359.9928,
|
||||
"y": 29.7891,
|
||||
"z": 272.4274
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "665156b6e05850fe3e39d38e",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "665156bcf71631770429e3ad",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156b953844543601b15ca",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "665156bcf71631770429e3ad",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "665156bcf71631770429e3ad"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"spawnsWoods":[
|
||||
{
|
||||
"locationId": "(54.0311 -1.9997 -47.0143|1.7769 44.5448 93.2316)",
|
||||
"probability": 0.15673,
|
||||
"template": {
|
||||
"Id": "665156c6e89a63667409ae9b",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": 54.0311,
|
||||
"y": -1.9997,
|
||||
"z": -47.0143
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 1.7769,
|
||||
"y": 44.5448,
|
||||
"z": 93.2316
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "665156ca4aeb42ea90e12402",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "665156d18439fd78ee89f7fa",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156cdfbc726f414d55e81",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "665156d18439fd78ee89f7fa",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "665156d18439fd78ee89f7fa"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"locationId": "(-203.8976 -1.006 217.1824|359.8936 156.5553 49.0165)",
|
||||
"probability": 0.24673,
|
||||
"template": {
|
||||
"Id": "665156d66283b8245a51ee10",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": -203.8976,
|
||||
"y": -1.006,
|
||||
"z": 217.1824
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 359.8936,
|
||||
"y": 156.5553,
|
||||
"z": 49.0165
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "665156d92118013ac5fc6364",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "665156e00c98d72dd4cde0f9",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156ddb836ed40339d2688",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "665156e00c98d72dd4cde0f9",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "665156e00c98d72dd4cde0f9"
|
||||
},
|
||||
"relativeProbability": 8
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"spawnsFactory": [
|
||||
{
|
||||
"locationId": "(25.5145 8.6044 40.7727|0.1531 106.4753 158.1044)",
|
||||
"probability": 0.07643,
|
||||
"template": {
|
||||
"Id": "665156e757dec8b8d7dd5f0b",
|
||||
"IsContainer": false,
|
||||
"useGravity": true,
|
||||
"randomRotation": false,
|
||||
"Position": {
|
||||
"x": 25.5145,
|
||||
"y": 8.6044,
|
||||
"z": 40.7727
|
||||
},
|
||||
"Rotation": {
|
||||
"x": 0.1531,
|
||||
"y": 106.4753,
|
||||
"z": 158.1044
|
||||
},
|
||||
"IsGroupPosition": false,
|
||||
"GroupPositions": [],
|
||||
"IsAlwaysSpawn": false,
|
||||
"Root": "665156eac2285ec483385e8d",
|
||||
"Items": [
|
||||
{
|
||||
"_id": "665156ef5ddfea15aa6e1b1b",
|
||||
"_tpl": "665152810b4c784f2258d7d0"
|
||||
},
|
||||
{
|
||||
"_id": "665156edbf39d6a24be36ec7",
|
||||
"_tpl": "665154c4019e9e7d5ad6d0cc",
|
||||
"parentId": "665156ef5ddfea15aa6e1b1b",
|
||||
"slotId": "mod_magazine"
|
||||
}
|
||||
]
|
||||
},
|
||||
"itemDistribution": [
|
||||
{
|
||||
"composedKey": {
|
||||
"key": "665156ef5ddfea15aa6e1b1b"
|
||||
},
|
||||
"relativeProbability": 4
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
"spawnsLight": [],
|
||||
"spawnsShore": [],
|
||||
"spawnsCustom": []
|
||||
}
|
||||
@@ -0,0 +1,360 @@
|
||||
"use strict";
|
||||
var __importDefault = (this && this.__importDefault) || function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.mod = exports.HandbookTPL = exports.WeaponIds = void 0;
|
||||
const global_item_preset_json_1 = __importDefault(require("../src/global_item_preset.json"));
|
||||
//import spawnPoints from "../src/loot/Spawns.json";
|
||||
const ItemTpl_1 = require("C:/snapshot/project/obj/models/enums/ItemTpl");
|
||||
const Traders_1 = require("C:/snapshot/project/obj/models/enums/Traders");
|
||||
const ConfigTypes_1 = require("C:/snapshot/project/obj/models/enums/ConfigTypes");
|
||||
var WeaponIds;
|
||||
(function (WeaponIds) {
|
||||
WeaponIds["CHLK"] = "6745d112eb0900ac53e5f356";
|
||||
WeaponIds["CHLK_MAG"] = "6745d11b2fe0e0c66e2ac8e9";
|
||||
WeaponIds["CHLK_SIGHT"] = "6745f1c80545a067a6838681";
|
||||
})(WeaponIds || (exports.WeaponIds = WeaponIds = {}));
|
||||
var HandbookTPL;
|
||||
(function (HandbookTPL) {
|
||||
HandbookTPL["SHOTGUN"] = "5b5f794b86f77409407a7f92";
|
||||
HandbookTPL["ASSAULT_RIFLE"] = "5b5f78fc86f77409407a7f90";
|
||||
HandbookTPL["PISTOL"] = "5b5f792486f77447ed5636b3";
|
||||
HandbookTPL["CARBINE"] = "5b5f78e986f77447ed5636b1";
|
||||
HandbookTPL["MARKSMAN"] = "5b5f791486f774093f2ed3be";
|
||||
HandbookTPL["SMG"] = "5b5f796a86f774093f2ed3c0";
|
||||
})(HandbookTPL || (exports.HandbookTPL = HandbookTPL = {}));
|
||||
class Mod {
|
||||
postDBLoad(container) {
|
||||
const customitem = container.resolve("CustomItemService");
|
||||
const databaseServer = container.resolve("DatabaseServer");
|
||||
const db = databaseServer.getTables();
|
||||
const globals = db.globals;
|
||||
const configServer = container.resolve("ConfigServer");
|
||||
const productionConfig = configServer.getConfig(ConfigTypes_1.ConfigTypes.HIDEOUT);
|
||||
const PK = db.traders[Traders_1.Traders.PEACEKEEPER].assort;
|
||||
const SKR = db.traders[Traders_1.Traders.SKIER].assort;
|
||||
// WEAPON LISTING AND ATTACHMENT
|
||||
const china_Lake = {
|
||||
itemTplToClone: ItemTpl_1.ItemTpl.SHOTGUN_REMINGTON_MODEL_870_12GA_PUMPACTION,
|
||||
overrideProperties: {
|
||||
Prefab: {
|
||||
path: "china lake/weapon_china_lake_container.bundle",
|
||||
rcid: ""
|
||||
},
|
||||
AimPlane: 0.24,
|
||||
Name: "weapon_china_lake_gl",
|
||||
ShortName: "weapon_china_lake_gl",
|
||||
Description: "weapon_china_lake_gl",
|
||||
CenterOfImpact: 0.15,
|
||||
ReloadMode: "InternalMagazine",
|
||||
Width: 6,
|
||||
Height: 2,
|
||||
Ergonomics: 64,
|
||||
CanSellOnRagfair: false,
|
||||
CanRequireOnRagfair: true,
|
||||
ExaminedByDefault: false,
|
||||
ExamineExperience: 20,
|
||||
SightingRange: 100,
|
||||
IronSightRange: 50,
|
||||
LootExperience: 15,
|
||||
RecoilAngle: 94,
|
||||
RecoilCenter: {
|
||||
x: 0,
|
||||
y: -0.274,
|
||||
z: 0
|
||||
},
|
||||
RecoilForceUp: 563,
|
||||
RecoilForceBack: 311,
|
||||
RecoilPosZMult: 0.7,
|
||||
RecoilCamera: 0.04,
|
||||
RecoilReturnPathDampingHandRotation: 0.62,
|
||||
RecoilReturnSpeedHandRotation: 3.75,
|
||||
RecoilDampingHandRotation: 0.76,
|
||||
CameraToWeaponAngleStep: 0.2,
|
||||
CameraSnap: 3.2,
|
||||
CompactHandling: false,
|
||||
RotationCenter: {
|
||||
x: 0,
|
||||
y: 0.153,
|
||||
z: -0.075
|
||||
},
|
||||
RotationCenterNoStock: {
|
||||
x: 0,
|
||||
y: -0.188,
|
||||
z: -0.018
|
||||
},
|
||||
Chambers: [
|
||||
{
|
||||
"_name": "patron_in_weapon",
|
||||
"_id": "6745e12fa75bd8d525b95d43",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Filter": [
|
||||
"5ede474b0c226a66f5402622",
|
||||
"5ede475b549eed7c6d5c18fb",
|
||||
"5ede4739e0350d05467f73e8",
|
||||
"5f0c892565703e5c461894e9",
|
||||
"5ede47405b097655935d7d16",
|
||||
"5ede475339ee016e8c534742",
|
||||
"5ede47641cf3836a88318df1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_required": false,
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_proto": "55d4af244bdc2d962f8b4571"
|
||||
}
|
||||
],
|
||||
Slots: [
|
||||
{
|
||||
_id: "6745d38f0ea1dc7da36a9c6d",
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_name": "mod_magazine",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"AnimationIndex": 0,
|
||||
"Filter": [
|
||||
WeaponIds.CHLK_MAG
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_proto": "55d30c394bdc2dae468b4577",
|
||||
"_required": true
|
||||
},
|
||||
{
|
||||
"_name": "mod_scope",
|
||||
"_id": "6284bf82efa4bf770d31ea5f",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Shift": 0,
|
||||
"Filter": [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_required": false,
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_proto": "55d30c4c4bdc2db4468b457e"
|
||||
}
|
||||
],
|
||||
Weight: 3.72,
|
||||
ammoCaliber: "Caliber40x46",
|
||||
defAmmo: "5ede474b0c226a66f5402622",
|
||||
defMagType: WeaponIds.CHLK_MAG,
|
||||
durabSpawnMax: 100,
|
||||
durabSpawnMin: 35,
|
||||
AllowFeed: false,
|
||||
AllowJam: false,
|
||||
AllowMisfire: false,
|
||||
AllowSlide: false,
|
||||
AllowOverheat: false
|
||||
},
|
||||
parentId: "5447b6094bdc2dc3278b4567",
|
||||
newId: WeaponIds.CHLK,
|
||||
handbookParentId: "5b5f79eb86f77447ed5636b7",
|
||||
handbookPriceRoubles: 268334,
|
||||
fleaPriceRoubles: 388421,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake \"NATIC\" Pump-action 40mm Grenade Launcher",
|
||||
shortName: "China Lake",
|
||||
description: "A pump-action grenade launcher designed in the 1967. A rare prized commodity that only few existed, can be loaded up to 3 rounds (4 including in the chamber). The China Lake NATIC designation is also erroneous as the weapon was never known by that designation. Since it was made on an ad hoc basis for special operations forces, it was not formally adopted and has no official military designation. Thus the SEALs referred to the experimental weapon as the \"China Lake grenade launcher\" in reference to the facility which produced it."
|
||||
}
|
||||
}
|
||||
};
|
||||
customitem.createItemFromClone(china_Lake);
|
||||
const china_Lake_tube = {
|
||||
itemTplToClone: ItemTpl_1.ItemTpl.MAGAZINE_12G_M870X10_10RND,
|
||||
overrideProperties: {
|
||||
Cartridges: [
|
||||
{
|
||||
"_id": "6745d900550a2919fa49a951",
|
||||
"_max_count": 3,
|
||||
"_name": "cartridges",
|
||||
"_parent": WeaponIds.CHLK_MAG,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Filter": [
|
||||
"5ede474b0c226a66f5402622",
|
||||
"5ede475b549eed7c6d5c18fb",
|
||||
"5ede4739e0350d05467f73e8",
|
||||
"5f0c892565703e5c461894e9",
|
||||
"5ede47405b097655935d7d16",
|
||||
"5ede475339ee016e8c534742",
|
||||
"5ede47641cf3836a88318df1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_proto": "5748538b2459770af276a261"
|
||||
}
|
||||
],
|
||||
Ergonomics: -24,
|
||||
Weight: 0.24,
|
||||
ExamineExperience: 7,
|
||||
ExaminedByDefault: false,
|
||||
Name: "mod_magazine_china_lake_tube",
|
||||
ShortName: "mod_magazine_china_lake_tube",
|
||||
Description: "mod_magazine_china_lake_tube",
|
||||
Width: 3,
|
||||
Height: 1,
|
||||
ExtraSizeLeft: 0,
|
||||
Prefab: {
|
||||
path: "china lake/mod_magazine_china_lake_3_rnd_tube.bundle",
|
||||
rcid: ""
|
||||
}
|
||||
},
|
||||
parentId: "5448bc234bdc2d3c308b4569",
|
||||
newId: WeaponIds.CHLK_MAG,
|
||||
handbookParentId: "5b5f754a86f774094242f19b",
|
||||
handbookPriceRoubles: 5361,
|
||||
fleaPriceRoubles: 7433,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake 3-round magazine tube",
|
||||
shortName: "China Lake",
|
||||
description: "3-Round standard magazine tube for the China Lake pump-action grenade launcher."
|
||||
}
|
||||
}
|
||||
};
|
||||
customitem.createItemFromClone(china_Lake_tube);
|
||||
const china_Lake_sight = {
|
||||
itemTplToClone: ItemTpl_1.ItemTpl.COLLIMATOR_MILKOR_M2A1_GRENADE_LAUNCHER_REFLEX_SIGHT,
|
||||
overrideProperties: {
|
||||
SightingRange: 100,
|
||||
CalibrationDistances: [
|
||||
[
|
||||
50
|
||||
]
|
||||
],
|
||||
Ergonomics: -10,
|
||||
Slots: [],
|
||||
Weight: 0.08,
|
||||
sightModType: "ironsight",
|
||||
ExamineExperience: 7,
|
||||
ExaminedByDefault: false,
|
||||
Name: "mod_scope_china_lake",
|
||||
ShortName: "mod_scope_china_lake",
|
||||
Description: "mod_scope_china_lake",
|
||||
Width: 1,
|
||||
Height: 1,
|
||||
ExtraSizeLeft: 0,
|
||||
IsAnimated: true,
|
||||
Prefab: {
|
||||
path: "china lake/mod_scope_leaf_sight.bundle",
|
||||
rcid: ""
|
||||
}
|
||||
},
|
||||
parentId: "55818ad54bdc2ddc698b4569",
|
||||
newId: WeaponIds.CHLK_SIGHT,
|
||||
handbookParentId: "5b5f73ec86f774093e6cb4fd",
|
||||
handbookPriceRoubles: 876,
|
||||
fleaPriceRoubles: 932,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake leaf iron sight",
|
||||
shortName: "China Lake",
|
||||
description: "Standard issue adjustable iron sight for the China Lake."
|
||||
}
|
||||
}
|
||||
};
|
||||
customitem.createItemFromClone(china_Lake_sight);
|
||||
/* ["6275303a9f372d6ea97f9ec7"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["6357c98711fb55120211f7e1"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["62e7e7bbe6da9612f743f1e0"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["5e81ebcd8e146c7080625e15"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5}; */
|
||||
/* const cultist_Recipe: Record<string, IDirectRewardSettings> = {
|
||||
"6275303a9f372d6ea97f9ec7": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"6357c98711fb55120211f7e1": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"62e7e7bbe6da9612f743f1e0": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"5e81ebcd8e146c7080625e15": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5}
|
||||
}
|
||||
|
||||
hideout.cultistCircle.directRewards.push(cultist_Recipe) */
|
||||
const cultist_Recipes = {
|
||||
"6275303a9f372d6ea97f9ec7": { rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960 },
|
||||
"6357c98711fb55120211f7e1": { rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960 },
|
||||
"62e7e7bbe6da9612f743f1e0": { rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960 },
|
||||
"5e81ebcd8e146c7080625e15": { rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960 }
|
||||
};
|
||||
for (const recipeToAddKey in cultist_Recipes) {
|
||||
productionConfig.cultistCircle.directRewards[recipeToAddKey] = cultist_Recipes[recipeToAddKey];
|
||||
}
|
||||
// MASTERY AND TRADER
|
||||
const Chlk_mastery = {
|
||||
"Name": "China Lake",
|
||||
"Templates": [
|
||||
WeaponIds.CHLK
|
||||
],
|
||||
"Level2": 350,
|
||||
"Level3": 700
|
||||
};
|
||||
globals.config.Mastering.push(Chlk_mastery);
|
||||
for (const itemPreset in global_item_preset_json_1.default.ItemPresets) {
|
||||
globals.ItemPresets[itemPreset] = global_item_preset_json_1.default.ItemPresets[itemPreset];
|
||||
}
|
||||
//trader push
|
||||
/* PK.items.push(...preset_file.items);
|
||||
|
||||
for (const bsc in preset_file.barter_scheme)
|
||||
{
|
||||
PK.barter_scheme[bsc] = preset_file.barter_scheme[bsc];
|
||||
}
|
||||
|
||||
for (const llv in preset_file.loyal_level_items)
|
||||
{
|
||||
PK.loyal_level_items[llv] = preset_file.loyal_level_items[llv];
|
||||
} */
|
||||
//push loot
|
||||
/* const weaponcrateloot =
|
||||
{
|
||||
"tpl": WeaponIds.KSG12,
|
||||
"relativeProbability": 17
|
||||
} */
|
||||
const locations = db.locations;
|
||||
/* locations.rezervbase.looseLoot.spawnpoints.push(...spawnPoints.spawnsRezerv);
|
||||
locations.woods.looseLoot.spawnpoints.push(...spawnPoints.spawnsWoods);
|
||||
locations.factory4_day.looseLoot.spawnpoints.push(...spawnPoints.spawnsFactory);
|
||||
locations.factory4_night.looseLoot.spawnpoints.push(...spawnPoints.spawnsFactory); */
|
||||
/* for (const locationKey in locations)
|
||||
{
|
||||
const location: ILocation = locations[locationKey];
|
||||
if (!location || !location.staticLoot)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_5X5]?.itemDistribution.push(weaponcrateloot);
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_6X3]?.itemDistribution.push(weaponcrateloot);
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_5X2]?.itemDistribution.push(weaponcrateloot);
|
||||
} */
|
||||
const scav = db.bots.types["assault"];
|
||||
scav.inventory.equipment.FirstPrimaryWeapon[WeaponIds.CHLK] = 83;
|
||||
scav.inventory.mods[WeaponIds.CHLK] =
|
||||
{
|
||||
mod_magazine: [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
],
|
||||
mod_scope: [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
]
|
||||
};
|
||||
customitem.addCustomWeaponToPMCs(WeaponIds.CHLK, 3, "SecondPrimaryWeapon");
|
||||
//ON GOD WACKY AHH ID INVENTORY THING
|
||||
db.templates.items["55d7217a4bdc2d86028b456d"]._props.Slots[0]._props.filters[0].Filter.push(WeaponIds.CHLK);
|
||||
db.templates.items["55d7217a4bdc2d86028b456d"]._props.Slots[1]._props.filters[0].Filter.push(WeaponIds.CHLK);
|
||||
}
|
||||
}
|
||||
exports.mod = new Mod();
|
||||
//# sourceMappingURL=mod.js.map
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,398 @@
|
||||
/* eslint-disable no-mixed-spaces-and-tabs */
|
||||
/* eslint-disable @typescript-eslint/indent */
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
import { IPostDBLoadMod } from "@spt/models/external/IPostDBLoadMod";
|
||||
import { CustomItemService } from "@spt/services/mod/CustomItemService";
|
||||
import { NewItemFromCloneDetails } from "@spt/models/spt/mod/NewItemDetails";
|
||||
import { DatabaseServer } from "@spt/servers/DatabaseServer";
|
||||
import { ILocation } from "@spt/models/eft/common/ILocation";
|
||||
|
||||
import preset_file from "../src/Item_Preset.json";
|
||||
import global_preset_file from "../src/global_item_preset.json";
|
||||
//import spawnPoints from "../src/loot/Spawns.json";
|
||||
import { ItemTpl } from "@spt/models/enums/ItemTpl";
|
||||
import { Traders } from "@spt/models/enums/Traders";
|
||||
import { ConfigServer } from "@spt/servers/ConfigServer";
|
||||
import { IHideoutConfig, ICultistCircleSettings, IDirectRewardSettings } from "@spt/models/spt/config/IHideoutConfig"
|
||||
import { ConfigTypes } from "@spt/models/enums/ConfigTypes";
|
||||
|
||||
export enum WeaponIds
|
||||
{
|
||||
CHLK = "6745d112eb0900ac53e5f356",
|
||||
CHLK_MAG = "6745d11b2fe0e0c66e2ac8e9",
|
||||
CHLK_SIGHT = "6745f1c80545a067a6838681"
|
||||
}
|
||||
|
||||
export enum HandbookTPL
|
||||
{
|
||||
SHOTGUN = "5b5f794b86f77409407a7f92",
|
||||
ASSAULT_RIFLE = "5b5f78fc86f77409407a7f90",
|
||||
PISTOL= "5b5f792486f77447ed5636b3",
|
||||
CARBINE= "5b5f78e986f77447ed5636b1",
|
||||
MARKSMAN= "5b5f791486f774093f2ed3be",
|
||||
SMG= "5b5f796a86f774093f2ed3c0"
|
||||
}
|
||||
|
||||
class Mod implements IPostDBLoadMod
|
||||
{
|
||||
public postDBLoad(container: DependencyContainer): void {
|
||||
const customitem = container.resolve<CustomItemService>("CustomItemService");
|
||||
const databaseServer = container.resolve<DatabaseServer>("DatabaseServer");
|
||||
const db = databaseServer.getTables();
|
||||
const globals = db.globals;
|
||||
const configServer = container.resolve<ConfigServer>("ConfigServer");
|
||||
const productionConfig: IHideoutConfig = configServer.getConfig<IHideoutConfig>(ConfigTypes.HIDEOUT);
|
||||
|
||||
const PK = db.traders[Traders.PEACEKEEPER].assort;
|
||||
const SKR = db.traders[Traders.SKIER].assort;
|
||||
// WEAPON LISTING AND ATTACHMENT
|
||||
|
||||
const china_Lake: NewItemFromCloneDetails = {
|
||||
itemTplToClone: ItemTpl.SHOTGUN_REMINGTON_MODEL_870_12GA_PUMPACTION,
|
||||
overrideProperties: {
|
||||
Prefab: {
|
||||
path: "china lake/weapon_china_lake_container.bundle",
|
||||
rcid: ""
|
||||
},
|
||||
AimPlane: 0.24,
|
||||
Name: "weapon_china_lake_gl",
|
||||
ShortName: "weapon_china_lake_gl",
|
||||
Description: "weapon_china_lake_gl",
|
||||
CenterOfImpact: 0.15,
|
||||
ReloadMode: "InternalMagazine",
|
||||
Width: 6,
|
||||
Height: 2,
|
||||
Ergonomics: 64,
|
||||
CanSellOnRagfair: false,
|
||||
CanRequireOnRagfair: true,
|
||||
ExaminedByDefault: false,
|
||||
ExamineExperience: 20,
|
||||
SightingRange: 100,
|
||||
IronSightRange: 50,
|
||||
LootExperience: 15,
|
||||
RecoilAngle: 94,
|
||||
RecoilCenter:
|
||||
{
|
||||
x: 0,
|
||||
y: -0.274,
|
||||
z: 0
|
||||
},
|
||||
RecoilForceUp: 563,
|
||||
RecoilForceBack: 311,
|
||||
RecoilPosZMult: 0.7,
|
||||
RecoilCamera: 0.04,
|
||||
RecoilReturnPathDampingHandRotation: 0.62,
|
||||
RecoilReturnSpeedHandRotation: 3.75,
|
||||
RecoilDampingHandRotation: 0.76,
|
||||
CameraToWeaponAngleStep: 0.2,
|
||||
CameraSnap: 3.2,
|
||||
CompactHandling: false,
|
||||
RotationCenter:
|
||||
{
|
||||
x: 0,
|
||||
y: 0.153,
|
||||
z: -0.075
|
||||
},
|
||||
RotationCenterNoStock:
|
||||
{
|
||||
x: 0,
|
||||
y: -0.188,
|
||||
z: -0.018
|
||||
},
|
||||
Chambers: [
|
||||
{
|
||||
"_name": "patron_in_weapon",
|
||||
"_id": "6745e12fa75bd8d525b95d43",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Filter": [
|
||||
"5ede474b0c226a66f5402622",
|
||||
"5ede475b549eed7c6d5c18fb",
|
||||
"5ede4739e0350d05467f73e8",
|
||||
"5f0c892565703e5c461894e9",
|
||||
"5ede47405b097655935d7d16",
|
||||
"5ede475339ee016e8c534742",
|
||||
"5ede47641cf3836a88318df1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_required": false,
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_proto": "55d4af244bdc2d962f8b4571"
|
||||
}
|
||||
],
|
||||
Slots: [
|
||||
{
|
||||
_id: "6745d38f0ea1dc7da36a9c6d",
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_name": "mod_magazine",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"AnimationIndex": 0,
|
||||
"Filter": [
|
||||
WeaponIds.CHLK_MAG
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_proto": "55d30c394bdc2dae468b4577",
|
||||
"_required": true
|
||||
},
|
||||
{
|
||||
"_name": "mod_scope",
|
||||
"_id": "6284bf82efa4bf770d31ea5f",
|
||||
"_parent": WeaponIds.CHLK,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Shift": 0,
|
||||
"Filter": [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_required": false,
|
||||
"_mergeSlotWithChildren": false,
|
||||
"_proto": "55d30c4c4bdc2db4468b457e"
|
||||
}
|
||||
],
|
||||
Weight: 3.72,
|
||||
ammoCaliber: "Caliber40x46",
|
||||
defAmmo: "5ede474b0c226a66f5402622",
|
||||
defMagType: WeaponIds.CHLK_MAG,
|
||||
durabSpawnMax: 100,
|
||||
durabSpawnMin: 35,
|
||||
AllowFeed: false,
|
||||
AllowJam: false,
|
||||
AllowMisfire: false,
|
||||
AllowSlide: false,
|
||||
AllowOverheat: false
|
||||
},
|
||||
parentId: "5447b6094bdc2dc3278b4567",
|
||||
newId: WeaponIds.CHLK,
|
||||
handbookParentId: "5b5f79eb86f77447ed5636b7",
|
||||
handbookPriceRoubles: 268334,
|
||||
fleaPriceRoubles: 388421,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake \"NATIC\" Pump-action 40mm Grenade Launcher",
|
||||
shortName: "China Lake",
|
||||
description: "A pump-action grenade launcher designed in the 1967. A rare prized commodity that only few existed, can be loaded up to 3 rounds (4 including in the chamber). The China Lake NATIC designation is also erroneous as the weapon was never known by that designation. Since it was made on an ad hoc basis for special operations forces, it was not formally adopted and has no official military designation. Thus the SEALs referred to the experimental weapon as the \"China Lake grenade launcher\" in reference to the facility which produced it."
|
||||
}
|
||||
}
|
||||
}
|
||||
customitem.createItemFromClone(china_Lake);
|
||||
|
||||
const china_Lake_tube: NewItemFromCloneDetails = {
|
||||
itemTplToClone: ItemTpl.MAGAZINE_12G_M870X10_10RND,
|
||||
overrideProperties: {
|
||||
Cartridges: [
|
||||
{
|
||||
"_id": "6745d900550a2919fa49a951",
|
||||
"_max_count": 3,
|
||||
"_name": "cartridges",
|
||||
"_parent": WeaponIds.CHLK_MAG,
|
||||
"_props": {
|
||||
"filters": [
|
||||
{
|
||||
"Filter": [
|
||||
"5ede474b0c226a66f5402622",
|
||||
"5ede475b549eed7c6d5c18fb",
|
||||
"5ede4739e0350d05467f73e8",
|
||||
"5f0c892565703e5c461894e9",
|
||||
"5ede47405b097655935d7d16",
|
||||
"5ede475339ee016e8c534742",
|
||||
"5ede47641cf3836a88318df1"
|
||||
]
|
||||
}
|
||||
]
|
||||
},
|
||||
"_proto": "5748538b2459770af276a261"
|
||||
}
|
||||
],
|
||||
Ergonomics: -24,
|
||||
Weight: 0.24,
|
||||
ExamineExperience: 7,
|
||||
ExaminedByDefault: false,
|
||||
Name: "mod_magazine_china_lake_tube",
|
||||
ShortName: "mod_magazine_china_lake_tube",
|
||||
Description: "mod_magazine_china_lake_tube",
|
||||
Width: 3,
|
||||
Height: 1,
|
||||
ExtraSizeLeft: 0,
|
||||
Prefab:
|
||||
{
|
||||
path: "china lake/mod_magazine_china_lake_3_rnd_tube.bundle",
|
||||
rcid: ""
|
||||
}
|
||||
|
||||
},
|
||||
parentId: "5448bc234bdc2d3c308b4569",
|
||||
newId: WeaponIds.CHLK_MAG,
|
||||
handbookParentId: "5b5f754a86f774094242f19b",
|
||||
handbookPriceRoubles: 5361,
|
||||
fleaPriceRoubles: 7433,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake 3-round magazine tube",
|
||||
shortName: "China Lake",
|
||||
description: "3-Round standard magazine tube for the China Lake pump-action grenade launcher."
|
||||
}
|
||||
}
|
||||
}
|
||||
customitem.createItemFromClone(china_Lake_tube);
|
||||
|
||||
const china_Lake_sight: NewItemFromCloneDetails = {
|
||||
itemTplToClone: ItemTpl.COLLIMATOR_MILKOR_M2A1_GRENADE_LAUNCHER_REFLEX_SIGHT,
|
||||
overrideProperties: {
|
||||
SightingRange: 100,
|
||||
CalibrationDistances: [
|
||||
[
|
||||
50
|
||||
]
|
||||
],
|
||||
Ergonomics: -10,
|
||||
Slots: [],
|
||||
Weight: 0.08,
|
||||
sightModType: "ironsight",
|
||||
ExamineExperience: 7,
|
||||
ExaminedByDefault: false,
|
||||
Name: "mod_scope_china_lake",
|
||||
ShortName: "mod_scope_china_lake",
|
||||
Description: "mod_scope_china_lake",
|
||||
Width: 1,
|
||||
Height: 1,
|
||||
ExtraSizeLeft: 0,
|
||||
IsAnimated: true,
|
||||
Prefab:
|
||||
{
|
||||
path: "china lake/mod_scope_leaf_sight.bundle",
|
||||
rcid: ""
|
||||
}
|
||||
|
||||
},
|
||||
parentId: "55818ad54bdc2ddc698b4569",
|
||||
newId: WeaponIds.CHLK_SIGHT,
|
||||
handbookParentId: "5b5f73ec86f774093e6cb4fd",
|
||||
handbookPriceRoubles: 876,
|
||||
fleaPriceRoubles: 932,
|
||||
locales: {
|
||||
"en": {
|
||||
name: "China Lake leaf iron sight",
|
||||
shortName: "China Lake",
|
||||
description: "Standard issue adjustable iron sight for the China Lake."
|
||||
}
|
||||
}
|
||||
}
|
||||
customitem.createItemFromClone(china_Lake_sight);
|
||||
|
||||
/* ["6275303a9f372d6ea97f9ec7"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["6357c98711fb55120211f7e1"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["62e7e7bbe6da9612f743f1e0"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5};
|
||||
["5e81ebcd8e146c7080625e15"] = {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5}; */
|
||||
|
||||
/* const cultist_Recipe: Record<string, IDirectRewardSettings> = {
|
||||
"6275303a9f372d6ea97f9ec7": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"6357c98711fb55120211f7e1": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"62e7e7bbe6da9612f743f1e0": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5},
|
||||
"5e81ebcd8e146c7080625e15": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 5}
|
||||
}
|
||||
|
||||
hideout.cultistCircle.directRewards.push(cultist_Recipe) */
|
||||
|
||||
const cultist_Recipes: Record<string, IDirectRewardSettings> = {
|
||||
"6275303a9f372d6ea97f9ec7": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960},
|
||||
"6357c98711fb55120211f7e1": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960},
|
||||
"62e7e7bbe6da9612f743f1e0": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960},
|
||||
"5e81ebcd8e146c7080625e15": {rewardTpls: [WeaponIds.CHLK], craftTimeSeconds: 39960}
|
||||
}
|
||||
|
||||
for (const recipeToAddKey in cultist_Recipes)
|
||||
{
|
||||
productionConfig.cultistCircle.directRewards[recipeToAddKey] = cultist_Recipes[recipeToAddKey];
|
||||
}
|
||||
|
||||
// MASTERY AND TRADER
|
||||
const Chlk_mastery = {
|
||||
"Name": "China Lake",
|
||||
"Templates": [
|
||||
WeaponIds.CHLK
|
||||
],
|
||||
"Level2": 350,
|
||||
"Level3": 700
|
||||
}
|
||||
globals.config.Mastering.push(Chlk_mastery)
|
||||
|
||||
for (const itemPreset in global_preset_file.ItemPresets)
|
||||
{
|
||||
globals.ItemPresets[itemPreset] = global_preset_file.ItemPresets[itemPreset];
|
||||
}
|
||||
|
||||
//trader push
|
||||
/* PK.items.push(...preset_file.items);
|
||||
|
||||
for (const bsc in preset_file.barter_scheme)
|
||||
{
|
||||
PK.barter_scheme[bsc] = preset_file.barter_scheme[bsc];
|
||||
}
|
||||
|
||||
for (const llv in preset_file.loyal_level_items)
|
||||
{
|
||||
PK.loyal_level_items[llv] = preset_file.loyal_level_items[llv];
|
||||
} */
|
||||
|
||||
//push loot
|
||||
/* const weaponcrateloot =
|
||||
{
|
||||
"tpl": WeaponIds.KSG12,
|
||||
"relativeProbability": 17
|
||||
} */
|
||||
|
||||
const locations = db.locations;
|
||||
/* locations.rezervbase.looseLoot.spawnpoints.push(...spawnPoints.spawnsRezerv);
|
||||
locations.woods.looseLoot.spawnpoints.push(...spawnPoints.spawnsWoods);
|
||||
locations.factory4_day.looseLoot.spawnpoints.push(...spawnPoints.spawnsFactory);
|
||||
locations.factory4_night.looseLoot.spawnpoints.push(...spawnPoints.spawnsFactory); */
|
||||
|
||||
/* for (const locationKey in locations)
|
||||
{
|
||||
const location: ILocation = locations[locationKey];
|
||||
if (!location || !location.staticLoot)
|
||||
{
|
||||
continue
|
||||
}
|
||||
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_5X5]?.itemDistribution.push(weaponcrateloot);
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_6X3]?.itemDistribution.push(weaponcrateloot);
|
||||
location.staticLoot[ItemTpl.LOOTCONTAINER_WEAPON_BOX_5X2]?.itemDistribution.push(weaponcrateloot);
|
||||
} */
|
||||
|
||||
const scav = db.bots.types["assault"];
|
||||
|
||||
scav.inventory.equipment.FirstPrimaryWeapon[WeaponIds.CHLK] = 83;
|
||||
scav.inventory.mods[WeaponIds.CHLK] =
|
||||
{
|
||||
mod_magazine: [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
],
|
||||
mod_scope: [
|
||||
WeaponIds.CHLK_SIGHT
|
||||
]
|
||||
}
|
||||
|
||||
customitem.addCustomWeaponToPMCs(WeaponIds.CHLK, 3, "SecondPrimaryWeapon")
|
||||
|
||||
//ON GOD WACKY AHH ID INVENTORY THING
|
||||
db.templates.items["55d7217a4bdc2d86028b456d"]._props.Slots[0]._props.filters[0].Filter.push(WeaponIds.CHLK);
|
||||
db.templates.items["55d7217a4bdc2d86028b456d"]._props.Slots[1]._props.filters[0].Filter.push(WeaponIds.CHLK);
|
||||
}
|
||||
}
|
||||
|
||||
export const mod = new Mod();
|
||||
Reference in New Issue
Block a user