#Mod Compatability, trying using one mod rather than 4

8 messages · Page 1 of 1 (latest)

minor shoal
#

Heya, so I've been getting back into starbound modding recently, and I've made a mod that replaces the hud and inventory with a reskin. But say for example bk3k's inventory, it's not going to work since his mod will override the playerinventory.config.patch (which is all good), so I make a seperate mod to patch his mod so that it has the proper textures.

The problem arises as with my example, bk3k (who is cool btw) has 3 patches for his mod for 40, 60, and 180 slots. I would have to create 3 more patches for a single texture change, so I was wondering if there was way to use lua to detect a mod and then rewrite my playerinventory.config.patch to change what the patch patches?

(I've only every used patches, I havn't used any lua for as it wasn't really needed till now woe )

ripe spear
#

you can use test ops in patches

#
[
  [{
      "op": "test",
      "path": "/learnBlueprintsOnPickup",
      "inverse": true
    }, {
      "op": "add",
      "path": "/learnBlueprintsOnPickup",
      "value": []
    }
  ],
  [{
      "op": "add",
      "path": "/learnBlueprintsOnPickup/-",
      "value": "sb_aegisalt_repair"
    }
  ]
]

the 'inverse' allows this patch to check if learnBlueprintsOnPickup exists, and if it doesn't, add it as an empty array. regardless of the outcome (notice the square brackets), add a value to learnBlueprintsOnPickup

#
[
  [{
      "op": "test",
      "path": "/description",
      "value": "Invisible"
    }, {
      "op": "replace",
      "path": "/description",
      "value": "An empty backpack or such."
    }
  ]
]

you can also check for specific values

#

you can have multiple test ops in a patch, and as long as they're separated with square brackets, they will run separately and independantly from each other

minor shoal
minor shoal
#

Poggers