unity-mod-manager icon indicating copy to clipboard operation
unity-mod-manager copied to clipboard

Support for incompatible mods in Info.json

Open andreamatt opened this issue 4 years ago • 5 comments

I think it would be useful to have a list of incompatible mods after the required ones in the Info.json

andreamatt avatar Jun 17 '20 09:06 andreamatt

This can add problems to users if another mod author adds compatibility.

newman55 avatar Jun 17 '20 09:06 newman55

Maybe just show a warning, not an error?

andreamatt avatar Jun 17 '20 10:06 andreamatt

The ModEntry object has the CustomRequirements field, so you can write various comments in it. Example.

var mod = UnityModManager.FindMod("incompatiblemod");
if (mod != null)
{
    modEntry.CustomRequirements = $"Mod {mod.Info.DisplayName} incompatible";
}

newman55 avatar Jun 17 '20 10:06 newman55

Your variant is of course better, I will add it someday.

newman55 avatar Jun 17 '20 11:06 newman55

This can add problems to users if another mod author adds compatibility.

The compatibility patch mod would need to list the mods it makes compatible as requirements. Meaning incompatibility notes should be ignored if a mod is being loaded that requires both incompatible mods, since it can be presumed that the mod addresses the incompatibility in some way shape or form. But this method of resolving stuff requires one mod to be aware of other mods' requirements.

Megacrafter127 avatar Feb 05 '21 20:02 Megacrafter127