sgtlaggy added a new file:
QuoteDisplay MoreWARNING: Using this mod, like SVM and editing SPT_Data files directly, can have unexpected results, potentially broken profiles, and you are less likely to receive help through official support channels.
Json Data Modifier
This will let you edit config values without touching the actual config/database files, letting you quickly revert to default values.
Regular Json, JSON5, and JSONC are all accepted with the proper file extension, and examples can be found in the source code.
Any Json files stored within this mod can be renamed with an underscore _ at the beginning to disable them.
This mod is rather "dumb" and doesn't have any fancy features like selectors, iteration, or referencing current values.
For example, to change the weight of every item you'd need to list out the item ID and full path to the weight property for all 4000+ items. This would be better done with Server Value Modifier (SVM) or another mod.
Keep in mind this does not necessarily apply directly to the original values if other mods change them first.
In configs/configs.json (filenames don't matter) the keys take the name of the Json files in SPT_Data/Server/configs, so a key might be "inraid" or "seasonalevents". The values of those keys should be objects further mapping values in those configs to new values.
Example:
CodeDisplay More{ "inventory": { "newItemsMarkedFound": true }, "core": { "allowProfileWipe": false, "fixes": { "removeModItemsFromProfile": true } } }
The same functionality applies to database modifications through the "database" folder.
Nested Folder Structure
Json files can also be nested for a more modular, tree-style layout, each folder replaces a key in the Json.
Using the "core" config section from above, you can use either of the following files:
configs/configs.json or configs/profileFixes.json, name doesn't matter
configs/core/profileFixes.json
Further, you could nest "removeModItemsFromProfile" in a file in configs/core/fixes/.
Deleting Entries
Config and database entries can be deleted by setting its value to null.
The following example will remove Jaeger's dehydration quest and set the starting requirement of the next quest (Wounded Beast) to the previous (Thrifty).
CodeDisplay More{ "templates" : { "quests": { "5d25bfd086f77442734d3007": null, "5d25c81b86f77443e625dd71": { "conditions": { "AvailableForStart": { "0": { "target": "5d25b6be86f77444001e1b89" } } } } } } }
Debugging
Debugging dumps are made immediately after all changes applied by this mod. Mod load order could affect how true dumps are relative to in-game observations. You will likely need to load this mod last by using a load order editor or renaming it with
"z"
at the front of the folder name.Depending on the database sections you want, the dump can be rather large. For example, Lighthouse's loose loot is nearly 90MB. Some editors may have trouble reading such files.
Specific sections of the config or database can be dumped to inspect their values at runtime. Edit the debug.json file and add a dot-separated path to the data you want in the
dump
array. Each path should start with"configs"
or"database"
. For example, the following debug.jsonwill dump the settings for the Christmas event and Prapor's assort table.
Code{ "dump": [ "configs.seasonalevents.events.1", "database.traders.54cb50c76803fa8b248b4571.assort" ] }
This will create a dumps
folder and a timestamped folder inside it. The timestamped folder will have a file for each path in the array.