SANDBOX — this is a test environment. No servers are actually deployed and no real payments are charged.
Source-checkedLibraries & compatibility

JSON Patches lib

by VSCustodian · for Vintage Story

Implements more convinient syntax and more functionality for patching JSON assets.

264KDownloads
1.21.6Latest game version
Vintage Story ModDBSource

About JSON Patches lib

From Vintage Story ModDB

Implements more convinient syntax and more functionality for patching JSON assets.

Implements new syntax features for JSON patches.

 

No idea if someone else will want to use it, but I for sure will use it to reduce the amount of time and effort I spend on JSON patches.

Feel free to provide feedback and feature requests. If the lib will be popular, it will have a good change to be integrated into vanilla in 1.23.

 

Documentation:

Patch
<pre class="language-javascript">[ { "enabled": true, // same as vanilla, if not enabled patch is ignored "priority": 0, // all json patches are applied in the order from highest to lowest priority, default is 0, use it to patch other patches by setting higher priority "op": "add", // operation, not case-sensitive, same as vanilla json patches, possible values: "Add", "AddEach", "AddMerge", "Replace", "Remove", "Copy", "Move", "Expression" "file": "game:itemtypes/snowball", // asset location of json file you want to patch, supports wildcard and regexes, to use wildcards add @ in the beginning of the path, to use regexes add @@, the path is matched as whole with domain in these cases "path": "attributes/shelvable", // path inside json, like vanilla, but with additional features: // - wildcard support: "texturesByType/@@snowball-/normal2" // - regex support: "texturesByType/@@@snowball-(snow|beenade)/normal2" // - property matching: "variantgroups/code=rock/states" // - range matching: "variantgroups/0-2/states/0-1" // - index matching: "variantgroups/0/states/1" // - all indexes matching: "variantgroups/-/states/-" // Each type of matching is applied inside a single path element (path between two closest '/') "fromPath": "attributes/shelvable", // same as 'path' "side": "universal", // same as vanilla, side where patch will be applied, possible values: "client", "server", "universal" "value": 0, // same as vanilla, used to add or replace a value, unlike vanilla can be used with 'remove' operation to match and element to remove (supports wildcards and regexes via '@@' and '@@@' prefixes) "dependsOn": [{"modId": "game", "invert": false}], // same as vanilla, used to enable/disable patch based on which mods are loaded } // unlike vanilla patches do not support 'conditions', that are meant to be used with world config ]</pre>

Put patches into 'jsonpatches' folder, same as vanilla patches are put into 'patches' folder. Patches from this library are applied before vanilla patches, so you can patch vanilla patches. Patches from this lib can have priority specified, that allows to patch them (just specify priority higher than of the patch you want to patch).

&nbsp;

Examples:

#1
<pre class="language-javascript">[ {"enabled": true, "file": "game:config/traits", "op": "replace", "path": "/code=soldier/attributes/armorWalkSpeedAffectedness", "value": -0.5}, {"enabled": true, "file": "game:config/traits", "op": "addmerge", "path": "/code=soldier/attributes", "value": {"armorManipulationSpeedAffectedness": -0.5}}, {"enabled": true, "file": "game:config/traits", "op": "addmerge", "path": "/code=soldier/attributes", "value": {"armorHungerRateAffectedness": -0.5}}, {"enabled": true, "file": "game:config/traits", "op": "remove", "path": "/code=soldier/attributes/meleeWeaponsDamage"}, {"enabled": true, "file": "game:config/characterclasses", "op": "remove", "path": "/code=blackguard/traits/-", "value": "nearsighted"}, { "enabled": true, "file": "game:config/characterclasses", "op": "addeach", "path": "/code=blackguard/traits/-", "value": ["meleeExpert", "oneHandedSwordsProficiency", "twoHandedSwordsProficiency", "poleaxeProficiency", "tremblingAim", "clumsyHands", "canParryProjectiles", "legDay"] } ]</pre>
#2
<pre class="language-javascript">[ { "enabled": true, "side": "server", "op": "add", "file": "@game:itemtypes/toolhead/.json", "path": "creativeinventory/jsonpatches", "value": [] }, { "enabled": true, "side": "server", "op": "addeach", "file": "@@game:itemtypes/toolhead/.+.json", "path": "creativeinventory/jsonpatches/-", "value": ["-gold", "-silver"] }, { "enabled": true, "side": "server", "op": "addmerge", "file": "@game:itemtypes//arrowhead.json", "path": "creativeinventory/jsonpatches", "value": ["-copper", "-iron", "-steel"] }, { "enabled": true, "side": "server", "op": "add", "file": "game:itemtypes/toolhead/arrowhead.json", "path": "creativeinventory/temp", "value": [] }, { "enabled": true, "side": "server", "op": "copy", "file": "game:itemtypes/toolhead/arrowhead.json", "frompath": "creativeinventory/jsonpatches/4", "path": "creativeinventory/temp/-" }, { "enabled": true, "side": "server", "op": "move", "file": "game:itemtypes/toolhead/arrowhead.json", "frompath": "creativeinventory/jsonpatches/3", "path": "creativeinventory/temp/-" }, { "enabled": true, "side": "server", "op": "move", "file": "game:itemtypes/toolhead/arrowhead.json", "frompath": "creativeinventory/jsonpatches/2", "path": "creativeinventory/temp/-" }, { "enabled": true, "side": "server", "op": "move",

Read the full description on Vintage Story ModDB →

Highlights

From source data

Game versions

Supports 23 Vintage Story versions, the newest being 1.21.6.

Footprint

Rated a light load on a server.

JSON Patches lib on Nxeon

From our catalogue
One-click install
Supported on Nxeon Vintage Story servers. We download it from Vintage Story ModDB, place it, and restart the server.
Server side
Required on the server
Server load
light
Smallest plan we suggest
Vintage Story — 1 GB (1 GB RAM). This follows our own load rating above, not a benchmark.

Run JSON Patches lib on a Vintage Story server

Pick a server or deploy a new one above; it is installed in one click.

What kind of mod it is

From the catalog
Listed on Vintage Story ModDB as “Mod”

Libraries & compatibility

Foundations and fixes other mods build on. Usually installed because something else needs it.

Runs on your server

From source side support

Vintage Story ModDB lists JSON Patches lib as required on the server. Check its Vintage Story ModDB page to see whether players need it too.

Compatibility

Game
Vintage Story
Runs on
Serverrequired on the server
Game versions
1.21.6 and 22 earlier

Verified at the source

  • ✓Vintage Story ModDBOfficial listing, checked 2026-09-24Open ↗
  • ✓AuthorVSCustodian, as published on Vintage Story ModDB
  • ✓LicenseNot published by the sourceFree

JSON Patches lib, answered

Generated from the mod’s own source data.

Do my players need to install JSON Patches lib?

Vintage Story ModDB lists JSON Patches lib as required on the server. Check its Vintage Story ModDB page to see whether players need it too.

Is it free?

Yes. JSON Patches lib is free to download from Vintage Story ModDB.

How do I add it to my Nxeon server?

Use “Add to a server” on this page, or open NxLabs from your dashboard. We install it, restart your server and switch it on.

NxLabs

Run JSON Patches lib on a Vintage Story server.

Deploy in about a minute from $4.00 a month, then add JSON Patches lib in one click.