Tractor Mod

Tractor Mod

130k Downloads

[Content Patcher] support overwriting other mods' changes explicitly for compatibility purposes

Nanogamer7 opened this issue ยท 2 comments

commented

Since Content Patcher currently can't edit maps, it would be cool to allow overwriting other mods. Why would that fix compatibility you may ask: well, with SMAPI 2.9 conditional maps will be possible and I already prepared my mod to load some compatible files depending on other installed packs, but the user still needs to remove some files from other mods to get them fully compatible, so an overwrite function would just overwrite the other mods assets without any further enduser input.

Example:
My mod patches the greenhouse, but warps from if2 warp the player to the wrong position. With overwrite I'd include the if2 farm map with changed warps and it would just overwrite the original if2 map.

How it could look in .json

"overwrite": {
   "UniqueID": "<author.modname>"
}
commented

After some brainstroming I came up with a new idea on how to let modders provide compatibility files (That's what I was intending to use this feature for, if it gets implimented)
How it could work I
How it could work II
I hope my handwriting is somewhat readable and my thought process is somewhat understandable

commented

Thanks for the suggestion! I don't currently plan to allow overriding mod assets directly. That adds troubleshooting and compatibility issues (e.g. your mod might have an outdated version of the IF2 map), and in many cases introduces licensing issues (e.g. a mod might not allow reusing its assets in your mod).

Instead recent versions of Content Patcher let you edit maps after they're loaded (optionally with a HasMod:id condition), and there's a planned feature to edit map properties like warps too.