Closed Pathoschild closed 7 years ago
Proposed solution:
If the mods have the same UniqueID
in their manifest, load the one with the highest version; otherwise load the first one. For mods not loaded, show an error like this:
Skipped Trainer Mod in Mods/TrainerMod-copy because its assembly is already loaded from Mods/TrainerMod.
Would maybe an error in the console (similar to dependency problems) be better? I'm mainly thinking for if the user goes to edit a config file, and it ends up being the one that isn't loaded.
Yep, the error I mentioned would be shown in the console for the duplicates. The error would mention which one was loaded.
Sorry, I meant an error instead of either being loaded.
Yes, I might do that. The mods themselves might be the same, but as you said they may have configured them differently.
Every mod in SMAPI 2.0 must have a unique ID. After #323, SMAPI will refuse to load mods which share a unique ID. That pretty much implements this ticket too, since duplicate mods will have the same ID.
When the player has multiple copies of the same mod, SMAPI loads the first one and then shows an error like this for the second:
Improve how duplicate mods are handled.