Starbound

Starbound

Supper's Combat Overhaul
Azure Fang 18 Jul, 2019 @ 7:39pm
Issues with .treasurepools.patch structure and mod compatibility
Hey, I'm the guy from RPG Growth that created most of the patch setup for the EXP drops. I was just made aware of this mod: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1647595641
With how our patches are coded it's really hard to break the drops, so I took a look at how you're working your patches. While the method you use works, it's pretty heavy-handed in replacing entire arrays to often change one weight and add one pool draw. For example, from your monster.treasurepools.patch:
{ "op":"replace", "path": "/motherpoptopTreasure", "value": [ [1, { "fill" : [ {"item" : [ "corefragmentore", 20]}, {"pool" : "goodWeapon"}, {"pool" : "adultpoptopTreasure"} ] }] ] },
This works. However, by replacing the entire array this breaks every mod that alters motherpoptopTreasure if said mods are loaded before yours in the load order. Look at this codeblock:
{ "op": "add", "path": "/motherpoptopTreasure/0/1/fill/-", "value": { "pool": "goodWeapon" } }
This operation appends goodWeapon to the end of the motherpoptopTreasure fill, achieving the same result as your replace operation, but without harming other mods edits in the process (only failing if another mod uses unnecessarily heavy-handed edits that strip the fill entirely, which is something that should then be brought to the attention of that mod author), thus improving overall compatibility with all mods.

As a further example, here is a recoded version of your monster.treasurepools.patch which preserves all intended changes yet dramatically improves compatibility with other mods.
[ { "op": "add", "path": "/supMinibossTreasure", "value": [ [ 1, { "fill": [ { "pool": "goodWeapon" }, { "pool": "goodWeapon" } ] } ] ] }, { "op": "replace", "path": "/basicMonsterTreasure/0/1/pool/0/weight", "value": 0.9 }, { "op": "replace", "path": "/basicMonsterTreasure/0/1/pool/1/weight", "value": 0.08 }, { "op": "add", "path": "/basicMonsterTreasure/0/1/pool/-", "value": { "weight": 0.01, "pool": "weapon" } }, { "op": "replace", "path": "/flyingMonsterTreasure/0/1/pool/0/weight", "value": 0.9 }, { "op": "replace", "path": "/flyingMonsterTreasure/0/1/pool/1/weight", "value": 0.08 }, { "op": "add", "path": "/flyingMonsterTreasure/0/1/pool/-", "value": { "weight": 0.01, "pool": "weapon" } }, { "op": "replace", "path": "/robotTreasure/0/1/pool/0/weight", "value": 0.58 }, { "op": "add", "path": "/robotTreasure/0/1/pool/-", "value": { "weight": 0.01, "pool": "weapon" } }, { "op": "replace", "path": "/noMeatMonsterTreasure/0/1/pool/0/weight", "value": 0.98 }, { "op": "add", "path": "/noMeatMonsterTreasure/0/1/pool/-", "value": { "weight": 0.01, "pool": "weapon" } }, { "op": "add", "path": "/motherpoptopTreasure/0/1/fill/-", "value": { "pool": "goodWeapon" } } ]
If you'd like to know how I set up this version of this patch and/or would like a hand recoding anything else, feel free to send me a friend request. The more we strive for compatibility, the less we all have to deal with "why isn't this working?" no-log comments :happypug:
Last edited by Azure Fang; 18 Jul, 2019 @ 7:51pm
< >
Showing 1-1 of 1 comments
SentientSupper  [developer] 19 Jul, 2019 @ 12:57am 
While I would like to fix those faults in my mod, I no longer have any interest in modding Starbound. That being said, I will take another look at the way I patched the treasure pool files and make amendments.
< >
Showing 1-1 of 1 comments
Per page: 1530 50