iquercorb / OpenModMan

Open Mod Manager - Open source and generic Mod ("Modifications") manager.
GNU General Public License v3.0
88 stars 5 forks source link

[Suggestion] Fully replace mods of crossfiles instead of patching #88

Closed lmiol closed 1 month ago

lmiol commented 2 months ago

Currently, when I toggle between two mods that share some common files, the newer mod seems to overwrite the older one, but the cross icon remains. It appears that the system is behaving like patching, where mods are applied on top of each other instead of switching completely.

Example:

  1. Mod 1 Installed: Both image1.jpg and head2.jpg are installed, and Mod 1 gets a green checkmark.
  2. Then Mod 2 Installing: When I click "Continue" in the prompt, head2.jpg from Mod 1 remains, and image1.jpg from Mod 2 overwrites the previous one. Mod 1 shows a cross icon.

This seems like patching, but if you think about it, I'm enabling a completely different mod with different textures. Why are the old textures still there? This behavior wouldn't make sense for most situations. If these are truly two different mods, it would create a confusing mix.

I can only imagine this logic working for two mods that need to be installed consecutively (like old-school patches). But I haven't found any instances online where mods aren't standalone ZIP archives.

Proposed Solution

I believe the current "patching" logic is incorrect, or at least not the most intuitive behavior when installing mods with overlapping textures. Replacing one mod with another is more appropriate for everyday use.

Suggested Implementation:

  1. Mod 1 Installed: Green checkmark (already implemented).
  2. Mod 2 Double Click/Install: A message appears: "Selected Mods contains cross over files..."
  3. Continue: Mod 1 is removed, its checkmark disappears, Mod 2 is installed, and only its checkmark remains. This is a full replacement instead of patching. image

Understanding the Current Logic

I understand there might be a specific use case for the current patching behavior that I'm not aware of. To maintain the old behavior, I suggest adding an "Overlap" option to the dropdown menu. This would act exactly like the current behavior when double-clicking or clicking "Install." image

Alternative Solution: If a dropdown menu seems inappropriate, consider implementing the checkbox in settings.

This feature would give users more control over how mods are installed.

Last version i tested is 1.2.7

Regards

iquercorb commented 2 months ago

The current behaviour was requested by users in a context where they cumulates several mods patching the previous one sequentially, and this is indeed a kind of legacy from and "antic age of mods". So the software is designed to handle mods overlapping, including specific backup mechanism to ensure proper reversibility.

I follow you on the main principle, however this may require more internal changes than it appear, I have to look at the code to see how this can be done and if this can be done without too much code rewrite.

lmiol commented 1 month ago

I hope it would be realised because we want to easily switch between mods insted of patching (all my friends stuck on user scenarios of this overlaping) i think it could be work like: I do install of new mod -- app starts searching for same files (you already implemented this), then deletes previous mod and restore backupfiles (checkmark disappeares), then installs new mod and do backupfiles (checkmark appeares on new mod). So its seems there need to combine these already worked processes one by one. Idk how hard it to implement, but it seems clear, without surprises

iquercorb commented 1 month ago

Allowing Mods overlaps with proper recursive backup management is way more complex to achieve than simply uninstall conflicting Mods. But, paradoxically, since the application was entirely designed toward this objective, doing the other way imply some tricky changes.

Anyway modified the code with an alternative implementation to make "allowed Mods overlap" optional. Default behaviour is now to uninstall conflicting mods prior to install the new one(s). Feature will be available in the next release.