Closed erri120 closed 1 year ago
This is also a case for Bannerlord. Huge overhauls like Game Of Thrones themed ones have a single archive with multiple game mods that are separated by whether they are pure content or script mods. They also contain each a manifest.json
like file for distinction
For now I think we solve this by updating the IModInstaller API to allow multiple mods to be returned, the LoadoutManager can then tie these into a group via the mod metadata, once we have the metadata setup it becomes a visualization problem in the UI to express how this works to the user. I don't think this is too strange though, the user will select one archive and get multiple entries in the UI.
The implementation for this is then:
AModMetadata
base class for this data, this should not be an entitywith {}
then update ModId, set the files, and return it.AddMod
to return a IEnumerable of mods
Most of our mod installation code assumes that there is one mod in one archive. The concept of a "mod" is defined by the game support code. I will use #42 as an example:
A SMAPI mod for Stardew Valley is defined by having a
manifest.json
file which points to either an entry DLL, if it's a C# mod, or references some content pack framework, if it's a content pack mod. Regardless of the type of mod, they all have themanifest.json
file in common. Most archives will have a single manifest file: Example, which the installer will find and correctly process.It is however possible that a mod author puts multiple SMAPI mods, within one archive: Example. In this case, the Nexus Mod Stardew Valley Expanded comes with multiple SMAPI Mods, a single C# mod and some content pack mods.
Stardew Valley Expanded requires all of those SMAPI Mods, however it is possible that some Nexus Mod has multiple optional Game Mods. Maestros of Synth by @halgari contains multiple Cyberpunk Mods within one archive that the user can mix and match.
We have to consider the following:
Instead of having an implementation of
IModInstaller
which looks at the entire archive and returns a list of files to be extracted, we could return a list of Game Mods and their associated files:A collection of Game Mods returned by the mod installer can then be presented to the user, if the collection has more than 1 item in it.