Json Data Modifier 3.2.0

Please do not ask when mod authors will update their mods to 3.10 or if they can upload older versions of their mods.
Bothering mod authors will lead to warnings and repeat offenses will lead to eventual bans.

Edit SPT_Data files indirectly to keep track of changes and save them through updates.

WARNING: 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:


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

Code
{
    "core": {
        "allowProfileWipe": false,
        "fixes": {
            "removeModItemsFromProfile": true
        }
    }
}


configs/core/profileFixes.json

Code
{
    "allowProfileWipe": false,
    "fixes": {
        "removeModItemsFromProfile": true
    }
}

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).


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.json will 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.

  • Would it be possible to add support for other Mods to persist updates ?

    • If you mean mod-specific configs that would be overwritten when you update the mod, I don't think that's something a separate mod could solve.

  • Bro, all this json files easily opens with notepad++ They're just text files with *.json extension.

  • Можете сказать какие конфиги нужно править что бы был спавн ЧВК? У меня почему то на Резерве нет чвк совсем-чистая версия без модов то же самое....Может как то можно через конфиги отредактировать

  • For users who want to change http.json->"ip" and "backendIp" to be a different value, like a VPN IP or "0.0.0.0", but also want those changes to persist through SPT version updates:


    Make a file in user/mods/JsonDataModifier/configs/ named ip_address.json

    JSON: ip_address.json
    {
      "http": {
        "ip": "0.0.0.0",
        "port": 6969,
        "backendIp": "0.0.0.0",
        "backendPort": 6969
      }
    }



    If you want to modify how long your arm stamina lasts while ADS:


    Make a file in  user/mods/JsonDataModifier/database/ named AimDrainRate.json

    (x is prone, y is crouched, z is standing. All values are default.)