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.22k stars 161 forks source link

Support mods with "modules" #1233

Closed Danjb1 closed 4 years ago

Danjb1 commented 4 years ago

Sorry if this has already been requested. I did search the issues, but I couldn't find one that matched.

Up until now I have been manually installing mods for OpenMW. Many of these mods come with optional "modules" (subfolders). This allows each module to be essentially treated as a separate mod, as far as OpenMW is concerned; they can be enabled, disabled, and reordered just like other mods.

Example OpenMW config:

data="C:\mw-mods\Patch for Purists 4.0.2"
data="C:\mw-mods\UMOPP 3.0.4\Core"
data="C:\mw-mods\UMOPP 3.0.4\UMOPP Compatibility Merged"
data="C:\mw-mods\Correct Meshes 4.4"
data="C:\mw-mods\Correct UV Rocks 1.5"
data="C:\mw-mods\Morrowind Optimization Patch 9.1b\00 Core"
data="C:\mw-mods\Morrowind Optimization Patch 9.1b\01 Fixed Vanilla Textures"
data="C:\mw-mods\Morrowind Optimization Patch 9.1b\02 Lake Fjalding Anti-Suck"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\00 Core"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\01 Hi Res Window Texture Replacer"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\02 Interior Sunrays"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\03 Nord Glass Windows Interior Sunrays"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\04 Telvanni Dormers on Vvardenfell"
data="C:\mw-mods\Glow in the Dahrk 2.9.1\05 Raven Rock Glass Windows Interior Sunrays"
data="C:\mw-mods\Graphic Herbalism - OpenMW Edition 1.04\00 Core + Vanilla Meshes"
data="C:\mw-mods\Graphic Herbalism - OpenMW Edition 1.04\01 Optional - Smoothed Meshes"
data="C:\mw-mods\Project Atlas 0.6.5\00 Core"
data="C:\mw-mods\Project Atlas 0.6.5\10 Glow in the Dahrk Patch - Interior Sunrays"
data="C:\mw-mods\Project Atlas 0.6.5\20 BC Mushrooms - Smoothed"
data="C:\mw-mods\Project Atlas 0.6.5\30 Redware - Smoothed"
data="C:\mw-mods\Project Atlas 0.6.5\40 Urns - Smoothed"
data="C:\mw-mods\Project Atlas 0.6.5\50 Wood Poles - Hi-Res Texture"
data="C:\mw-mods\Graphic Herbalism - OpenMW Edition 1.04\Patches 1.02\12 Atlas - Smoothed BC Mushrooms"
data="C:\mw-mods\Intelligent Textures 2.1b\00 Core"
data="C:\mw-mods\Intelligent Textures 2.1b\01 Atlas Textures"
data="C:\mw-mods\Intelligent Textures 2.1b\Wood Fix 2.1b"
data="C:\mw-mods\TrueType Fonts 1.0"
data="C:\mw-mods\Title Screen Reworked 1.0"
data="C:\mw-mods\Widescreen Splash Replacer 2.0"
data="C:\mw-mods\Additional Splash Screens 1.1"
data="C:\mw-mods\Alaisiagae Splash Screens 1.0"
data="C:\mw-mods\HD Intro Cinematic 1.0"
data="C:\mw-mods\OpenMW Containers Animated 1.2.2\Containers Animated"
data="C:\mw-mods\OpenMW Containers Animated 1.2.2\Optional\kollops"
data="C:\mw-mods\Expansion Delay 1.1"

Configuring ModOrganiser to use C:\mw-mods as its mod directory results in many mods being flagged as having "No game data" due to the presence of these subfolders:

image

I would like to be able to use my OpenMW mod folder with ModOrganizer as-is, without needing to flatten this directory structure.

Holt59 commented 4 years ago

If you're talking about these folders starting with 00, 10, etc., these comes from Wyre Bash installers (BAIN), not from OpenMW (maybe OpenMW has a custom handling for these @AnyOldName3).

If you install such mods with MO2, you should see a custom installer (the BAIN installer) that asks you to select which of the subfolders you want to use, and once you select them, these will be merged into a single mod that is a perfectly valid mod. If you don't see the installer when installing such archive through MO2, this is a different issue...

If you want to keep each "module" as a separate mod, you can go Manual and install each module separately.

AnyOldName3 commented 4 years ago

OpenMW doesn't have any particular handling for mod installers of any kind. Our launcher isn't a mod manager. Apart from that, everything Holt said is right. You can either run the BAIN installer as a BAIN installer, and get a menu to install the options you want as a single mod, install it manually as a single mod as if you'd run the BAIN installer, or install it manually to several different mods so you can enable an disable options at will. Personally I'd go with the BAIN installer as I don't think any of the Morrowind mods that take a long time to install actually have optional features, so it's a minor issue to just run the installer again.

Danjb1 commented 4 years ago

Thank for your responses.

If you're talking about these folders starting with 00, 10, etc., these comes from Wyre Bash installers (BAIN), not from OpenMW

This is just how the mods were packaged when I downloaded them, or in some cases I have created these subfolders myself because it is useful to be able to configure mods in a more fine-grained way.

Since OpenMW basically treats each subfolder as a separate mod, manual installation of these "modules" is a breeze. With MO2, it seems I would have to move each subfolder to the root directory in order for them to be recognised. Although if I'm understanding your posts correctly, then MO2 would recognise these modules - much like Wrye Mash does - had I installed them from the archive in the first place, rather than extracting them manually? In which case I could just zip them up again and install them through MO2.

Al12rs commented 4 years ago

So I guess I can close this? Please reopen it if the matter wasn't resolved

AnyOldName3 commented 4 years ago

Although if I'm understanding your posts correctly, then MO2 would recognise these modules - much like Wrye Mash does - had I installed them from the archive in the first place, rather than extracting them manually? In which case I could just zip them up again and install them through MO2.

Yep

Danjb1 commented 4 years ago

So I guess I can close this? Please reopen it if the matter wasn't resolved

It's resolved in the sense that modules ARE supported - just not in the way I expected.

It's actually a really neat mechanism. There are a few downsides over the manual approach, but I expect the benefits will outweigh the disadvantages in the long-run:

  1. When installing a multi-module mod via a BAIN installer, the files are extracted into a single, flat directory. This means that the archive file must be kept on the filesystem - or the mod must be redownloaded - if the mod ever needs to be reinstalled.

  2. Switching over from a manual installation that relies on subdirectories is laborious.

I'm happy for this to be closed anyway, thank you all for your help.

AnyOldName3 commented 4 years ago

Regarding 1, it makes more sense for me for uninstalled options to be kept zipped rather than extracted.

Danjb1 commented 4 years ago

That's fair enough, but the downside is more that any installed content is basically stored twice - zipped and unzipped.

Holt59 commented 4 years ago

That's fair enough, but the downside is more that any installed content is basically stored twice - zipped and unzipped.

You can store downloads on a slow drive with huge capacity. I doubt zip Morrowind BAIN mods take a lots of space.

BAIN archives are the only one for which this could be used since they basically contains a list of valid data folders. Other installers are not so nice, so you have to keep the installer nearby anyway.

Danjb1 commented 4 years ago

Other installers are not so nice, so you have to keep the installer nearby anyway.

I'm not sure what you mean by this. If a mod doesn't use modules, why do you need to keep the archive once the files have been extracted?

One more thing - is it possible to see which modules were installed (or were NOT installed) in the MO2 GUI?

Holt59 commented 4 years ago

Other installers are not so nice, so you have to keep the installer nearby anyway.

I'm not sure what you mean by this. If a mod doesn't use modules, why do you need to keep the archive once the files have been extracted?

Other installers, e.g. FOMOD or OMOD.

One more thing - is it possible to see which modules were installed (or were NOT installed) in the MO2 GUI?

You can probably check the meta.ini and see if there is a installationFile or something similar in it. You can also try Right Click > Reinstall... MO2 should not be able to reinstall mod that have not been installed using MO2.

Danjb1 commented 4 years ago

You can probably check the meta.ini and see if there is a installationFile or something similar in it. You can also try Right Click > Reinstall... MO2 should not be able to reinstall mod that have not been installed using MO2.

meta.ini does not seem to reference modules:

[General]
gameName=Morrowind
modid=0
ignoredVersion=
version=d2020.9.15.0
newestVersion=
category="-1,"
nexusFileStatus=1
installationFile=C:/mw-mods/Glow in the Dahrk 2.9.1.7z
repository=Nexus
comments=
url=
notes=
nexusDescription=
hasCustomURL=false
lastNexusQuery=
lastNexusUpdate=
nexusLastModified=2020-09-15T14:50:19Z
converted=false
validated=false
color=@Variant(\0\0\0\x43\0\xff\xff\0\0\0\0\0\0\0\0)
tracked=0

[installedFiles]
size=0

The Reinstall option lets you see which modules are available and change them if desired, but it might be nice to be able to see which ones are currently installed.

Holt59 commented 4 years ago

The Reinstall option lets you see which modules are available and change them if desired, but it might be nice to be able to see which ones are currently installed.

Yes, unfortunately that's not the case currently. You can use the "Note" fields. There is an open-issue for this (and other installers), but this require some changes to the meta information handling for mods before.

Sorry, I misunderstood your question, I thought you wanted to know which mods where install using the MO2 GUI (not which modules).

AnyOldName3 commented 4 years ago

What you're calling modules is probably better described as optional features. BAIN expresses optional features by having a separate directory for each. Other formats do more complicated things. For example, (normal) FOMODs have an XML file describing a series of questions to ask the user and a list of files that need installing with each answer. There's no particular restriction on which files go with which answer. OMODs are even less predictable, as they contain a script and can do things like edit files from other mods, edit their own files, and generate new ones. It's an uncomputable problem to determine which files are and aren't used with which options without actually executing the script again, so we have to keep everything around in case of a reinstall.

Also, there are other reasons to keep mod installers around even if you don't think you're going to need to change options. Being able to recreate the mod if you accidentally break one of its files is a nice example, and everyone's done that at least once (if they don't think they have, they've just not discovered it yet).

Danjb1 commented 4 years ago

What you're calling modules is probably better described as optional features. BAIN expresses optional features by having a separate directory for each. Other formats do more complicated things. For example, (normal) FOMODs have an XML file describing a series of questions to ask the user and a list of files that need installing with each answer. There's no particular restriction on which files go with which answer. OMODs are even less predictable, as they contain a script and can do things like edit files from other mods, edit their own files, and generate new ones. It's an uncomputable problem to determine which files are and aren't used with which options without actually executing the script again, so we have to keep everything around in case of a reinstall.

Yeesh, sounds nasty, I've not come across those other installers before. It even seems strange to me to refer to these multi-feature archives as "BAIN installers", because to me they're just archives that happen to conform to a certain format.

Also, there are other reasons to keep mod installers around even if you don't think you're going to need to change options. Being able to recreate the mod if you accidentally break one of its files is a nice example, and everyone's done that at least once (if they don't think they have, they've just not discovered it yet).

Yeah, that makes sense.

After using Wrye Mash for many years, I was delighted when I discovered the simplicity of OpenMW mod installation: just extract the mods, whack them in a list, and you're done. Just a directory full of mods and a single text file to maintain and backup. So now I'm just a little gutted at the introduction of any extra complexity 😅

I know that GUIs are intended to reduce complexity but, coming from a programming background, having everything in plain-text appeals to me somehow.

I appreciate that all of MO's metadata is plain-text though 👍