newman55/unity-mod-manager

Support for incompatible mods in Info.json

andreamatt opened this issue · 5 comments

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

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

Maybe just show a warning, not an error?

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";
}

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

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.