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.09k stars 158 forks source link

Feature: Create blank ESL flagged ESPs to force load archives #238

Open AnyOldName3 opened 6 years ago

AnyOldName3 commented 6 years ago

The problem

As discussed in the Discord chat, there's no longer a way for MO to force-load BSA/BA2 archives. A proposed solution that seemed to stand up to scrutiny was to provide a context menu option in the archives tab which would create a blank ESL file with the appropriate name to force the archive to load and put it in the same mod folder as the archive.

Environment

Details

ESL files are a good choice because it should be possible to load huge numbers of them if they don't actually contain any data. This avoids the issues present with traditional dummy plugins wasting precious load order indices.

The other alternative method for force-loading archives would be to edit the profile .ini files to include the names of archives to be loaded, but in Discord, this was decided to be worse.

Force-loading archives is useful in a few situations, including:

A related feature request that is probably best discussed at the same time

In the second case, it may also be nice to have a context menu option for mods in the left pane to auto-convert them to archived format available as a sister-feature. In BSA games, this would create a BSA archive <mod name>.bsa containing all the files in the mod which can be loaded by the engine in this way (so it would leave out plugin files, for example). In BA2 games, the textures would go into a new <mod name> - Textures.ba2 and the other archivable files into a new <mod name> - Main.ba2. There are a couple of possible options for deciding the names:

Link to Mod Organizer logs

USVFS

N/A

MO Interface

N/A

This falls under the list of things I'd do myself if I had infinite time to work on open-source stuff, but I don't. Maybe this will attract someone with some time looking to get their feet wet and get them addicted to MO programming, forcing them to move to harder tasks like debugging UVFS on Windows Insider Builds.

Al12rs commented 5 years ago

Instead of ESLs that are always loaded as if they were masters, it would be better to instead use ESPs flagged as ESLs to load archives, since those can be loaded wherever and thus give the user more freedom as to solve conflicts between archives. Quotes from ElministerAU on this:

.esm and .esl are always ESM, no matter what the header says. Esl is always ESL no matter what the header says. Files are loaded in 3 blocks: a) all hardcoded files (game master, dlc, CC) in a fixed order b) all ESM in plugins.txt order c) all non-ESM in plugins.txt order with the additional tweak that if, while trying to load the modules in that order, on loading of a module a required master is not yet loaded, it's loaded first (which can end up pulling non-ESMs into the ESM block)

Quote from Wrinklyninja:

.esp's with the ESL flag set can be positioned amongst other .esp's and can have other .esp files as masters. I remember this wasn't initially the case but it got patched in at some point, I had to update my code. In terms of FormID mapping, the records in the .esp with the ESL flag that override others lose to overrides in later-loading .esp's, and new records appear at FE like normal for ESL files.

Al12rs commented 4 years ago

This could be implemented as a Mo2 plugin if plugin context menu expansions are implemented. See #1016

AnyOldName3 commented 4 years ago

I'm still most keen on a loadableArchives optional game feature so we can have proper solutions as first-class features when possible and have most of the old BSA tab back (without the reordering hacks). Morrowind lets you load as many as you want via a series of ini options (and can't load archives any other way), several games support ESLs, several support the load a plugin that doesn't actually exist trick, and in the future, maybe we could check for the presence of a script extender plugin for any that aren't covered natively by one of these options.

Morrowind needs BSA management, and the OpenMW Export plugin needs to be able to access the list to export them.