Archived
Adding Mods w/Symlink
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
[General]
|
||||
gameName=spt
|
||||
modid=0
|
||||
version=d2024.12.16.0
|
||||
newestVersion=
|
||||
category="1,"
|
||||
nexusFileStatus=1
|
||||
installationFile=acidphantasm-simpleworkoutqte.zip
|
||||
repository=Nexus
|
||||
ignoredVersion=
|
||||
comments=
|
||||
notes=
|
||||
nexusDescription=
|
||||
url=
|
||||
hasCustomURL=true
|
||||
lastNexusQuery=
|
||||
lastNexusUpdate=
|
||||
nexusLastModified=2024-12-16T06:17:17Z
|
||||
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,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2024 acidphantasm
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
@@ -0,0 +1,10 @@
|
||||
# Welcome to the SimpleHideoutQTE
|
||||
|
||||
### All this does is make the QTE for working out in the hideout easier.
|
||||
|
||||
Set "easyMode" to true to make the QTE much slower, much larger, and static (it doesn't shrink)
|
||||
|
||||
Set "easyMode" to false to use below values:
|
||||
"qteSpeed" is the modifier for how quickly the indicator moves. (0.5 = half speed)
|
||||
"qteSize" is the modifier for how large the success window is. (2 = double size success window)
|
||||
"preventVeryDifficultQTE" doesn't allow windows smaller than 0.07 (when it's a tiny sliver)
|
||||
@@ -0,0 +1,11 @@
|
||||
{
|
||||
"musclePainTime": 43200,
|
||||
|
||||
"easyMode": false,
|
||||
|
||||
"qteSpeed": 0.5,
|
||||
"qteSize": 2,
|
||||
"preventVeryDifficultQTE": true,
|
||||
|
||||
"debugLogging": false
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
{
|
||||
"name": "SimpleWorkoutQTE",
|
||||
"version": "1.2.0",
|
||||
"main": "src/mod.js",
|
||||
"license": "MIT",
|
||||
"author": "acidphantasm",
|
||||
"sptVersion": "~3.10",
|
||||
"loadBefore": [],
|
||||
"loadAfter": [],
|
||||
"incompatibilities": [],
|
||||
"contributors": [],
|
||||
"isBundleMod": false,
|
||||
"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",
|
||||
"os": "^0.1",
|
||||
"tsyringe": "4.8.0",
|
||||
"typescript": "5.4",
|
||||
"winston": "3.12"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,324 @@
|
||||
[
|
||||
{
|
||||
"id": "6390bc5b39fe6532b05e0257",
|
||||
"area": 23,
|
||||
"areaLevel": 1,
|
||||
"quickTimeEvents": [
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 2,
|
||||
"successRange": {
|
||||
"x": 0.45,
|
||||
"y": 0.1
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 2.5,
|
||||
"successRange": {
|
||||
"x": 0.4,
|
||||
"y": 0.095
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 2.5,
|
||||
"successRange": {
|
||||
"x": 0.35,
|
||||
"y": 0.085
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 2.5,
|
||||
"successRange": {
|
||||
"x": 0.3,
|
||||
"y": 0.08
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 2.5,
|
||||
"successRange": {
|
||||
"x": 0.25,
|
||||
"y": 0.075
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 3,
|
||||
"successRange": {
|
||||
"x": 0.2,
|
||||
"y": 0.07
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 3,
|
||||
"successRange": {
|
||||
"x": 0.15,
|
||||
"y": 0.065
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 3.5,
|
||||
"successRange": {
|
||||
"x": 0.12,
|
||||
"y": 0.06
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 3.5,
|
||||
"successRange": {
|
||||
"x": 0.12,
|
||||
"y": 0.05
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 4,
|
||||
"successRange": {
|
||||
"x": 0.1,
|
||||
"y": 0.045
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 4.5,
|
||||
"successRange": {
|
||||
"x": 0.1,
|
||||
"y": 0.04
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 5,
|
||||
"successRange": {
|
||||
"x": 0.1,
|
||||
"y": 0.035
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 5.5,
|
||||
"successRange": {
|
||||
"x": 0,
|
||||
"y": 0.03
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 6,
|
||||
"successRange": {
|
||||
"x": 0,
|
||||
"y": 0.02
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
},
|
||||
{
|
||||
"type": "ShrinkingCircle",
|
||||
"position": {
|
||||
"x": 0.5,
|
||||
"y": 0.25
|
||||
},
|
||||
"speed": 6,
|
||||
"successRange": {
|
||||
"x": 0,
|
||||
"y": 0.01
|
||||
},
|
||||
"key": "Mouse0",
|
||||
"startDelay": 0.8,
|
||||
"endDelay": 0.2
|
||||
}
|
||||
],
|
||||
"requirements": [
|
||||
{
|
||||
"energy": 30,
|
||||
"hydration": 30,
|
||||
"type": "Health"
|
||||
},
|
||||
{
|
||||
"bodyPart": "LeftArm",
|
||||
"effectName": "Fracture",
|
||||
"excluded": true,
|
||||
"type": "BodyPartBuff"
|
||||
},
|
||||
{
|
||||
"bodyPart": "RightArm",
|
||||
"effectName": "Fracture",
|
||||
"excluded": true,
|
||||
"type": "BodyPartBuff"
|
||||
}
|
||||
],
|
||||
"results": {
|
||||
"finishEffect": {
|
||||
"energy": 0,
|
||||
"hydration": 0,
|
||||
"rewardsRange": [
|
||||
{
|
||||
"weight": 1,
|
||||
"result": "Exit",
|
||||
"time": 86400,
|
||||
"type": "MusclePain"
|
||||
}
|
||||
]
|
||||
},
|
||||
"singleSuccessEffect": {
|
||||
"energy": -2,
|
||||
"hydration": -2,
|
||||
"rewardsRange": [
|
||||
{
|
||||
"weight": 1,
|
||||
"result": "None",
|
||||
"skillId": "Endurance",
|
||||
"levelMultipliers": [
|
||||
{
|
||||
"level": 0,
|
||||
"multiplier": 3
|
||||
},
|
||||
{
|
||||
"level": 10,
|
||||
"multiplier": 2.5
|
||||
},
|
||||
{
|
||||
"level": 25,
|
||||
"multiplier": 2
|
||||
}
|
||||
],
|
||||
"type": "Skill"
|
||||
},
|
||||
{
|
||||
"weight": 1,
|
||||
"result": "None",
|
||||
"skillId": "Strength",
|
||||
"levelMultipliers": [
|
||||
{
|
||||
"level": 0,
|
||||
"multiplier": 3
|
||||
},
|
||||
{
|
||||
"level": 10,
|
||||
"multiplier": 2.5
|
||||
},
|
||||
{
|
||||
"level": 25,
|
||||
"multiplier": 2
|
||||
}
|
||||
],
|
||||
"type": "Skill"
|
||||
}
|
||||
]
|
||||
},
|
||||
"singleFailEffect": {
|
||||
"energy": -4,
|
||||
"hydration": -4,
|
||||
"rewardsRange": [
|
||||
{
|
||||
"weight": 1,
|
||||
"result": "Exit",
|
||||
"type": "GymArmTrauma"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,105 @@
|
||||
import { DependencyContainer } from "tsyringe";
|
||||
|
||||
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 * as fs from "node:fs";
|
||||
import * as path from "node:path";
|
||||
|
||||
class SimpleWorkoutQTE implements IPostDBLoadMod
|
||||
{
|
||||
private mod: string
|
||||
private logger: ILogger
|
||||
private static config: Config;
|
||||
private static configPath = path.resolve(__dirname, "../config/config.json");
|
||||
|
||||
constructor()
|
||||
{
|
||||
this.mod = "acidphantasm-SimpleWorkoutQTE"; // Set name of mod so we can log it to console later
|
||||
}
|
||||
|
||||
public postDBLoad(container: DependencyContainer): void
|
||||
{
|
||||
// Stuff we're going to use
|
||||
SimpleWorkoutQTE.config = JSON.parse(fs.readFileSync(SimpleWorkoutQTE.configPath, "utf-8"));
|
||||
const databaseService: DatabaseService = container.resolve<DatabaseService>("DatabaseService");
|
||||
this.logger = container.resolve<ILogger>("WinstonLogger");
|
||||
|
||||
const tables: IDatabaseTables = databaseService.getTables();
|
||||
const hideoutTable = tables.hideout;
|
||||
const quickTimeEvents = hideoutTable.qte[0].quickTimeEvents;
|
||||
const results = hideoutTable.qte[0].results;
|
||||
|
||||
if (SimpleWorkoutQTE.config.easyMode)
|
||||
{
|
||||
for (const quickTimeEvent of quickTimeEvents)
|
||||
{
|
||||
quickTimeEvent.speed = 0.5;
|
||||
quickTimeEvent.successRange.x = 0;
|
||||
quickTimeEvent.successRange.y = 0.75;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const quickTimeEvents = hideoutTable.qte[0].quickTimeEvents;
|
||||
for (const quickTimeEvent of quickTimeEvents)
|
||||
{
|
||||
quickTimeEvent.speed = quickTimeEvent.speed * SimpleWorkoutQTE.config.qteSpeed;
|
||||
quickTimeEvent.successRange.y = quickTimeEvent.successRange.y * SimpleWorkoutQTE.config.qteSize;
|
||||
if (quickTimeEvent.successRange.y <= 0.07 && SimpleWorkoutQTE.config.preventVeryDifficultQTE)
|
||||
{
|
||||
quickTimeEvent.successRange.y = 0.07;
|
||||
}
|
||||
if (quickTimeEvent.successRange.y >= 1)
|
||||
{
|
||||
quickTimeEvent.successRange.y = 1;
|
||||
}
|
||||
if (SimpleWorkoutQTE.config.debugLogging){this.logger.log(`[${this.mod}] QTE Speed: ${quickTimeEvent.speed.toFixed(2)} || SizeX: ${quickTimeEvent.successRange.x.toFixed(2)} || SizeY: ${quickTimeEvent.successRange.y.toFixed(2)}`,"cyan");}
|
||||
}
|
||||
}
|
||||
|
||||
results.singleSuccessEffect.rewardsRange[0].levelMultipliers = [
|
||||
{
|
||||
"level": 0,
|
||||
"multiplier": 6
|
||||
},
|
||||
{
|
||||
"level": 10,
|
||||
"multiplier": 8
|
||||
},
|
||||
{
|
||||
"level": 25,
|
||||
"multiplier": 10
|
||||
}
|
||||
]
|
||||
results.singleSuccessEffect.rewardsRange[1].levelMultipliers = [
|
||||
{
|
||||
"level": 0,
|
||||
"multiplier": 6
|
||||
},
|
||||
{
|
||||
"level": 10,
|
||||
"multiplier": 8
|
||||
},
|
||||
{
|
||||
"level": 25,
|
||||
"multiplier": 10
|
||||
}
|
||||
]
|
||||
|
||||
results.finishEffect.rewardsRange[0].time = SimpleWorkoutQTE.config.musclePainTime
|
||||
}
|
||||
}
|
||||
|
||||
interface Config
|
||||
{
|
||||
musclePainTime: number,
|
||||
easyMode: boolean,
|
||||
qteSpeed: number,
|
||||
qteSize: number,
|
||||
preventVeryDifficultQTE: boolean,
|
||||
debugLogging: boolean,
|
||||
}
|
||||
|
||||
module.exports = { mod: new SimpleWorkoutQTE() }
|
||||
Reference in New Issue
Block a user