BradyThe/Sandbox

From Vintage Story Wiki
This page contains changes which are not marked for translation.

This page was last verified for Vintage Story version 1.19.8.

A simple embeded library for Vintage Story that makes it easy to add compatibility with other mods for assets.

Easy way (overwriting assets)

REWRITE/CLARIFICATION Bug fix needed? Overwriting asset currently (1.20.x) doesn't seem to work.

You just need to add your asset to assets/<yourmodid>/compatibility/<othermodid>/<path-to-asset>. They will only be loaded if <othermodid> is loaded.

If assets/<yourmodid>/<vanilla-path> and assets/<yourmodid>/compatibility/<othermodid>/<vanilla-path> exists then if <othermodid> is loaded, the first asset will be rewritten.

ADD: Patches in Compat folders will be applied after <othermodid>. Makes dependency in modinfo unnecessary. Useful for mods which are not meant to be pure addons.

Usage example

NEW EXAMPLE WITH UP-TO-DATE MODS? Potentially in file format on github, to be less theoretical?

I have a More Variants mod (morevariants), I want to add a patch to support Carry Capacity (carrycapacity) and add recipes for Better Chests (betterchests). As a result, the assets will look like this:

 - assets
   - morevariants
     - blocktypes
     - patches
     - recipes
     - compatibility
       - carrycapacity
         - patches
           - carryable.json
       - betterchests
         - recipes
           - grid
             - copperchest.json
             - copperlabeledchest.json

Mod-dependent json-patch

......