xforce / anno1800-mod-loader

The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.
MIT License
366 stars 92 forks source link

Installing pack of modes can lead to mods duplications #38

Open GrumpyCatastrophe opened 4 years ago

GrumpyCatastrophe commented 4 years ago

Because enabling/disabling mods is based on directory name, it can cause mods duplications while updating mods, if default state of the mod is different from the one already installed. This is especially the problem when installing new version of mod packs (like Spice It Up) because it is much harder to find out which mods are duplicated, as package contains almost 70 modifications.

Example: if I install mod "[Gameplay] Commuter pier for New World", that is enabled by default, and I already have previous version installed but disabled, instead of updating already installed version there will be created duplication of that mod which will result in having to folders mods directory: "[Gameplay] Commuter pier for New World" and "-[Gameplay] Commuter pier for New World". Same situation occurs when updating enabled mod that is disabled by default.

Proposed solution would be to change a way how it is determined if mod is disabled or enabled. I think best way to make it work would be to determine state of the mod by the config file in the main directory of the mod. For backward compatibility modloader on launch could on launch inform about detecting mods that are using unsupported way of enabling the mod, maybe with exporting list of found unsupported mods in the main anno directory, with quick instruction how to update them manually.

xforce commented 4 years ago

Hey, this is actually something I wanted to figure out nicer way back many months ago, but due to various reasons I didn't (and still kind of don't) have the time available to actually do what I initially wanted to do. I had at some point the idea that I create a website where people can browser mods and mod packs, and the modloader would have a UI where people can see popular mods, install mods and all the things associated with this. The loader would then auto update them etc....

Anyways, this is a great suggestion and I should have done a better job with this whole what a mod actually is. I will come up with something nicer for disable/enable and a way to for mod creators to describe what a mod actually is after Christmas. That would then also be the base for #39