ModOrganizer2 / modorganizer

Mod manager for various PC games. Discord Server: https://discord.gg/ewUVAqyrQX if you would like to be more involved
http://www.nexusmods.com/skyrimspecialedition/mods/6194
GNU General Public License v3.0
2.17k stars 161 forks source link

Add a Dependency tag system between mods. #838

Open Al12rs opened 5 years ago

Al12rs commented 5 years ago

The Problem

There are many instances where some mods depend on others to work correctly, the easiest example is with patches of mods. There is currently no way for the user to express these relations and no way for Mo2 to inform the user of incorrect configuration of the modlist. In particular the problems we are looking to avoid are:

Proposed Solution

Allow users to define dependencies between mods, so that MO2 may use that information to inform the user of an incorrect handling of the mods. Mo2 should only inform the user, not enforce automatically the application of the rule.

Which Dependencies?

How to show rules between mods?

How to Add Rules to mods?

Proposed solutions:

  1. Right-click context menu (single mod) -> Dependencies... new Dependency dialog
  2. Right-click context menu (single mod) -> Dependencies... ModInfoDialog new Dependency tab
  3. Right-click context menu (single mod) -> Dependencies -> Add Rule... -> sub-menu with the 4 dependencies types -> Simple list dialog with all the mods and a search filter to select the target.
  4. Right-click context menu (two mods) -> Define Rule -> Dialog? I can't think of this working well.
  5. Dedicated drag and drop system like Vortex, probably quite problematic to implement and a little plagiaristic.

I prefer 2. ModinfoDialog Dependency tab. Seems more clean to implement, but might not be most user friendly.

The creation of a Require dependency should automatically set the IsRequiredBy of the other mod and the other way around, at least visually.

Whether load after/before should also generate complementary rules should be discussed 🔴 .

Attention! Load before/after rules can cause circular dependencies that would make the system always incorrect. So this brings a layer of complexity that is not present for simple Require relationships. A possible approach is to check the loadorder for circular dependencies when trying to add a new one and deny the operation in case it's destructive. As another option the Diagnose plugin mentioned later could also detect circular dependencies and inform the user of them.

How to Remove rules to mods?

Proposed:

  1. Right-click context menu (single mod) -> Dependencies -> Remove Rule - > Rule type (only list the active ones) -> List of target mods. (pressing on one would remove that target mod from that specific dependency).
  2. Right-click context menu (single mod) -> Dependencies... -> ModInfoDialog dependencies tab

What to do when rules are broken?

  1. Show warning as a flag on the mods that have a broken rule
  2. Use a diagnostic plugin to check the rules and report problems
  3. Warning dialog (with don't show this again) when disabling dependent mods?
  4. Automatically enforce rules? In which cases? I don't like this one since you can still get in inconsistent states.

Actions that can break rules:

Mod Infodialog Dependency tab

Here is a proposition mockup: image

For the target selection dialog it might be a good idea to change the "Rule" to be a combobox, so that from that dialog the user can create any rule for a particular mod. User selects the rule type and then the target mods. The mock is missing the "Can't load with" rule. Might be a good idea to check how Vortex does this.

Implementing the feature: Where should the dependency info be stored? Inside the Mod meta.ini? This would make dependencies be global (not profile specific) and could require information duplication for complementary rules, with the risk of inconsistencies. Alternative is to use a separate location to store this information, a dedicated file in the profile folder or in the base directory if it needs to be profile independent. Advantage of dedicated file is that there is no worry of duplicated info, disadvantage is that the info isn't readily available in the modInfo itself and would instead need to be injected in there or a new class needs to be made to load and query existing dependencies. So more work but possibly easier to change later to adapt.

This feature could be implemented in stages.

Additional Context: Vortex makes use of a dependency system, that was the inspiration of this feature suggestion, the main difference stays in the fact that Vortex tries to automatically enforce the rules set be the user, while Mo2 would instead leave the current ordering system intact and only inform the user of a possible discrepancy.

mrudat commented 5 years ago

Much of this is available on nexus mods already, presumably in a computer-readable format, in addition to the information stored in the .esps themselves. It is what is used to sort mods. Some of this information is returned if you attempt to sort mods where explicit dependencies are missing.

Possibly the most comprehensive catalogue is used/maintained on behalf of LOOT.

Al12rs commented 5 years ago

@mrudat I think you are misunderstanding, this would be for Mods priorities, not Plugins priorities. This would be for file overwriting conflicts between mods on the left pane, not plugins and record conflicts between those.

selsie commented 4 years ago

Loot does a pretty good job of that already, warning if a patch is missing. But Modgroups would be cool. Color coding for mods with multiple parts.

Kruziikrel13 commented 2 months ago

I think even a user managed form of this would have some incredible utility. Of course we've got LOOT for plugin management, but this kind of utility would be brilliant for management of mesh and texture mods for example. As these don't have any manner of detection for LOOT (naturally) We as user's would be able to set our own rules for our mods panel so that mod ordering can be handled in a more effective manner.

twizz0r commented 1 month ago

I'm not sure I see the utility here. MO already provides an elegant, intuitive way to see asset conflicts and an equally easy method to resolve them without having to reorder mods.

LOOT is a great tool for plugins, but relies on human-generated information to do a lot of its work (and that information isn't always correct).

Are you proposing a similar human-based information to manage left pane mod ordering?

I'm all for making modding easier for users, but the more rules you put in place, the more you obfuscate utility and also impose fences around what users can do.

Kruziikrel13 commented 1 month ago

As the complexity of modlists grows it can be difficult for users to keep track of why their overwrite order is the way it is, or if it's even correct! Of course, we can make notes but that can also become somewhat verbose.

I think similar to loot, where when reading a mod's description if an overwrite order between two mods is explicitly described by a mod's description. Users could then create a rule for this in their modlist. It could even be possible for MO2 to read a downloaded mod's requirements as they are specified in Nexus and automate setting or notifying users of a dependency or order!?

Some file overwrites in MO2 can be meaningless as some mod authors incorporate the same files / meshes / scripts etc. in multiple of their mods which would of course then get flagged by MO2 as an overwrite.

Currently mod overwrite orders are implicitly correct... i.e. there is room for ambiguity in regards to whether an overwrite matters or not. The dependency system would allow us to explicitly specify our overwrites.

Additionally, the dependency system would allow users to better keep track of what mods depend on what... I.e. mods that require Open Animation Replacer for Skyrim often don't include plugins that LOOT can raise issues about and exist purely as loose files. So setting these mods as dependent on OAR as it exists in MO2 would be useful as, for example if OAR is then disabled the mods requiring it would then be able to notify the user one of their dependencies is missing immediately from MO2 rather than the user discovering this later when the mods don't work in game.

It could even just be an additional optional utility that users of MO2 can decide if they want to use or not.

twizz0r commented 1 month ago

I'm half-joking, but you should see if you could train an 'ai" to do this. If it could crawl the web pages associated with URLs in meta files, conglomerate any install instructions (load after, hide files, etc.), look at established mod packs, point out incorrectly packed files, and then make suggestions, that would do the trick.

Fixing Skyrim 's meshes is a maze. Lots of mods overwriting the same files with some files needing to be hidden so that assets lower in priority can win. If there was a tool to help put them in order, tell me what I'm missing and what I need to hide, that would be aces.

Kruziikrel13 commented 1 month ago

Not sure I subscribe to the whole AI trend haha, It's far better at confidently lying than it is at actually providing information... User mesh management even with this system may still remain hell... but I think it may make it burn less? There are also of course other uses... a case I can think of off the top of my head would be TK Dodge and it's many derivatives updating it to 1.6.640 or NG'ing it or adding onto it etc. Though I honestly think even just a loot style meta data list (i.e. notifying users of mod dependencies) would be tremendously useful even disregarding the mod order management side.