Allow ESPs and multiple ESMs
Requires addressing issue #28 first.
#11 Updated by Mark Siewert about 4 years ago
Basic code for loading and merging multiple plugins has been added to the branch "multiple_esm_esp", which will be pushed to the repository ASAP. Data merging/overwriting that can be done automatically is in place. However, there are a few individual subsystems that need to be made aware separately of multiple plugin support, as they may use a special merging process (i.e. anything that can not be summarized with "replace existing data"). Right now, I am seeing 7 different subsystems that need a special treatment (and I hope that no more will emerge):
- GMST fixing
- landscape textures
- object references
- save files
#12 Updated by Mark Siewert about 4 years ago
Morrowind dialogue is, essentially, the bastard child of a C++ map and a double linked list. Each INFO entry has a unique ID, plus two links pointing to the previous/next IDs. When a plugin modifies a parent dialogue tree, by adding/removing/editing stuff, the Construction Kit writes the equivalent of a patch/diff file. As everybody knows, merging this kind of data structures can become very nontrivial.
Say we have a dialogue list of the form
(1) <-> (2) <-> (3) <-> (4) <-> (5)
and a plugin places a new entry, called (a), between (3) and (4). The new list will look like this:
(1) <-> (2) <-> (3* <-> * a * <-> *4) <-> (5)
where the asterisk denotes stuff included/modified in the plugin file. The plugin file will include the sublist
which must be merged correctly with the existing dialogue lines.
I have seen some lines of code aiming to address the well known GMST bug introduced by using different versions of the Construction Kit, but it must be tested whether it already works as expected or not.
Tribunal and Bloodmoon introduce new script commands which the engine does not support yet. So far, I have seen "PlayBink" and "BecomeWerewolf", but there are more (e.g. interior water level functions, used by one puzzle in Tribunal, and some weird command that turns the moon red in Bloodmoon). Currently, the engine rightfully complains about these unknown commands (e.g. in the cell "Skaal Village, The Greathall").
Bloodmoon is using some texture blending features currently unsupported by the nif loader (which actually complains about this). One missing point that comes to one's eye is transparency on most of Bloodmoon trees and foilage.
5) Landscape textures:
Each plugin introduces its own terrain texture list. For example, Bloodmoon uses something like 30 terrain textures, while the plugin "White Wolf of Lokken Mountain" (which borders Solstheim) has something like 75. The texture loader does not take this into account yet (I just did some quick hack to prevent crashes/assertions), but getting everything right requires some more work. In a nutshell: Bloodmoon has something like 30 terrain textures. A neighboring cell uses texture 70 of it's own, bigger texture list. The seam fixing code looks into the wrong (30-ish) texture list and complains (rightfully). Plus, Lokken texture 70 might actually be Bloodmoon texture 12.
These are the easy points where extra work is required; references and saves are more difficult and will be addressed separately.
#13 Updated by Marc Zinnschlag about 4 years ago
Actually, 3 and 4 are not related to this issue in any way (they also can show up in single ESM file scenarios, when a different ESM is used than Morrowind.esm; e.g. a TC). There are plenty of unsupported script instructions and there are also some unsupported NIF features (probably more than Bloodmoon is using). We already have issues for these in the tracker.