Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
So what happens when we merge plugins? First we should look at the record structure of the mods. I will be using my mod Player Home Quickexit as an example as I released it as a seperate mod for each vanilla or as a single plugin with all the homes, I used mergeplugins to create the all in one so it is a good example. I will be referencing records by form id so if you want to download the mods and follow along in xedit here is the link... https://www.nexusmods.com/skyrimspecialedition/mods/14795
So, when you run mergeplugins to merge plugins it takes the mods apart record by record. Then reassembles them into a single mod. If in xedit we expand the Quickexit - Breezehome.esp > Cell > Block 0 > Sub-Block 6 > 0001658a > Persistant header we will see a record xx005905 which places a trap door inside of breezehome. Expand to the same record in Quickexit - Merged.esp and mergeplugins has redone the form id to be xx00aa91. This is to insure that it will have a unique id. Merge plugins will do this for all records within the mods being merged. Another way of looking at it is mergeplugins does change any conflicting records, it only melds all records together into a single esp. Mods being merged in this way can not have conflicting records within the mods being merged.
Before we look deeper into what this type of merge includes a quick explanation of references within the records may be helpful. When the game reads aa record that record may have references to other records. For example, the iron sword record will reference the record for the sound when you draw the sword. If this reference is not a vanilla reference but comes from one of the mods being merged then the game will have an invalid reference and will ctd (this is why undeleting and disabling references is so important when cleaning mods). So another mergeplugins does for us is to look for these references and make sure they point to the correct reference by changing the reference id to the new form id created during the merge. So to see this in action pull up record Quickexit - Breezehome.esp > Worldspace > 0000003c > Block 0,-1 > Sub-Block 0,-1 > 0000961a > Temporary > xx005905 then in right pane under the FormID header you will see
[REFR:05005905] (places TreePineShrub01 [TREE:0009DAA3] in GRUP Cell Temporary Children of WhiterunExterior02 [CELL:0000961A] (in Tamriel "Skyrim" [WRLD:0000003C] at 5,-3)).
Now if you expand the same record in Quickexit - Merged.esp you will the FormID header has change to
[REFR:0900AA8D] (places TreePineShrub01 [TREE:0009DAA3] in GRUP Cell Temporary Children of WhiterunExterior02 [CELL:0000961A] (in Tamriel "Skyrim" [WRLD:0000003C] at 5,-3))
So we see the reference have been changed to match the new form id of the reference in question.
There are other things that get adjusted during the merge, but beyond changing references from within a record, mergeplugins does not change any records themselves for conflict resolution, that is Wrye Smash or your job. So, to recap, mergeplugins takes the mods you tell to and makes a new esp out of the multiple ones changing any information that needs changing to insure the records can find the other records they need. For the average mod user mergeplugins is really not needed, it is really for when you begin to reach the plugin limit or you have a lot of small mods that it may be easier to handle them if they were a single mod. As well it can be useful for merging patches into a single mod, only downside to this is if one of the mods or patches updates the merge will need to be redone. In my opinion, leave this form of merging alone unless you are reaching the 255 limit.
More to follow eventually, maybe later tonight or tomorrow. I think tackling the bash patch next may be best. I am trying to do this in the order of use, i.e. mergeplugins then wrye bash then wrye smash then manually built patch.
So now let's move on to Wrye Bash and see how it handles records. The bashed patch does two kinds of merging, the first is the same as what merge plugins does,the second is conflict resolution of the leveled list. Wrye Bash can also make tweaks to game variables, i.e. arrow speed, I will not cover that here as it is pretty self explanatory.
When WB merges mods into itself it simply adds the records from the mods into itself in whole, renumbering form ids as needed and repointing any non-vanilla references to the correct record. This one is pretty simple. Usually there are no issues merging mods into the patch, but there are instances where merging the mod in can break parts of it, this is fairly rare and can be bypassed by not allowing WB to merge the mod in question.
Now on to the most important part of what WB does -- merging leveled lists. Mator Smash also does this. I see a lot of folks ask "What is a leveled list?" In the CK there are a full set of objects called dummy markers. There are ones for potions, weapons, armor, etc. When these dummy markers are placed in game an actual item must be attached to them, LItemPotionRestoreHMS, which when you enter the area the game will check your level and choose the item to give you from the leveled lists of that item type. So, why is a bash patch needed, well thanks to the game's Rule of One the last mod to change a leveled list will win and show up in game.
To this rule of one further, When the game loads it first loads all the records that Skyrim.esm has, then the game loads update.esm, any records that are also in skyrim.esm will be overwritten. The game will now move on down the load order adding new records and overwriting any records already loaded. So, only the last loaded record record will "win" and have only it's changes to that record show up in game.
Wrye Bash fixes this by looking at your mods that change the leveled list and will merge the lists together ending up with a single leveld list record containing the changes made by all mods. Now, we have moved from simple merging to conflict resolution (I will cover this in more detail on the mator smash explanation).
If anything needs further explanation, or ya'll would like me to expand on anything just ask. Next we will cover the type of conflict resolution that mator smash and manual patching takes care of. Again, may be awhile before it ready to post.
Last section, we are finally to the most important type of merging, conflict resolution. When a single record is altered by multiple mods the rule of one kicks in and last mod loaded wins. Mator Smash attempts to take all mods that alter the record and merge thier changes
into a single record. We will look at a single record to see what happens, if you wish to follow along the mods are;
USSEP Nexus id 266
Cutting Room Floor 276
ELFX (main file and enhancer) 2424
Open Cities Skyrim 281
Smashed patch
and my Master patch
The record we will look at is 00071ffe. First mod in the load order is USSEP, it actually makes no changes to the record from vanilla. Since this is a top cell record USSEP must change something on a subrecord of this one, in skyrim when you design a cell the cell is empty and it's record contains things like lighting, ambient sounds, etc. When you place, say the ground in the ck in this cell the record for the ground you used will be a subrecord of the main cell. If a mod changes something in the ground subrecord then the mod will also have a copy of the main cell record which will be identical to original record. Even this record is identical to the master it is considered an ITM for cleaning. An ITM for cleaning would be single record with no changes and no subrecords, for most mods this ITM is a mistake and can cause issues later when a mod that does have the same record with a change and the other mod changes it back to vanilla.
Now, back to the record we are looking at... Cutting Room Floor changes afew things within this record, DATA - Flags, XLCN - Location and Ownership. Next mod ELFX, changes nothing and is identical to master (but not an ITM). Next ELFX - Enhancer changes the XCLL - Lighting, but undoes the changes added by CRF, which was already overwritten by ELFX anyway. Next, Open Cities is an itm and undoes ELFX - Enhancer. So, without a smash patch CRF and ELFX changes will not be in game, for ELFX it is not a big deal just no lighting effects for that cell. CRF on the other hand has some keywords removed which could cause issues later.
So we run smash patch and let it do it's conflict resolution, it has left the Data - Flags vanilla, left the lighting vanilla and moved forward CRF changes from XLCN - Location and Ownership. If we were to leave it as is CRF should work correctly (I say should because Data - Flags did not get carried forward. I manually moved the missing things smash patch did not, the Flags and Lighting.
So to recap, Merge Plugins moves plugins in whole into a single plugin creating a larger mod. Wrye Bash moves some mods in whole into itself as well as merging leveled list records. Wrye Smash merges all records as needed, but not plugins, and will need to be checked behind as it is not perfect. My advice, merge plugins only if needed. Run Wrye Bash to merge in plugins and make any tweaks (do not use it's leveled list merge). Run Mator Smash and smash all automate conflict resolution. Finally, manually check behind the smash patch and resolve any conflicts it may have missed. This can be done directly into the smashed patch or into an esp of your making.
Now, is all this necessary for a stable game...no. But, in order for all aspects of all your mods to make thier way into the game and bypass the rule of one is through patching the records by either using the tools provided or manually doing so. The tools are to the point that using them is recommended then checking behind them and adjusting as needed.
As always, if any further explanation is needed just ask. Glad to expound further on this subject or any other that I know the answer to.
Added the following to the FAQ section:
"Can I merge .esl plugins with regular plugins?"
No, you can only merge plugins that are the same type. If you mix in lite plugins (those that are flagged as an esl, even if the extension says .esp) with non-lite plugins, the merge will fail.
there is also xedit scripts like rab smash splitter and zEdit UPF Plugin Loader Generator which makes zedit patchers and smashed patches be created while over the 254 plugin limit.
Anyway, this thread is not a place for discussion of the how or why or need of this. Those who need the info can find it here and ask pertinent questions, those who don't want to make use of it do not need to. This is NOT a thread for a debate about the issue. Especially since this thread will probably only be useful to less than 2% of the community - those who have the experience, knowledge, and ability to create builds of over 500 total mods.
When merging plugins you need to make sure that none of the plugins being merged are flagged as ESL.
While you mentioned in your post that "files need to be adjacent in the load order", apparently it goes beyond that to needing "Adjacent indexes". A light file listed as FE001 that loads immediately before a file listed as 07 is still not considered "adjacent" for the purposes of merging and will result in failure.
And while merging light plugins may seem redundant, example uses include merging a dozen or so weapon mods together into a single organized plugin.
And yes, though it would not be thought to merge. esl file together - the example you give is a good one - though, to be honest, I usually just unflag .esl files before merging.
Still, this is a case where those who have the experience would in all likelihood be able to figure these things out - and if they do not have the experience, and are unsure, then there is the fallback of "just don't." though, of course, sometimes the way to learn is by trying and making mistakes - and learning from them.
Thanks again, Quevik for posting - it is much apprieciated!
That's ultimately what i ended up doing, once i figured out what the problem was. Easy enough to fix. But back when i was merging plugins regularly, ESLs didn't exist, so i didn't know about this carve out. It's been a few years...lol.
To be honest, half the reason i posted this was in case i forget about it in the future.
But i figure somebody else will eventually need it too. Better to keep all merge info together.
And yes, sure while it's in bad taste to modify someone else's plugins to make a package deal and redistribute it as such, especially when they've specifically forbade it, doing it [i[locally[/i] on the other hand...
You'd think as you start to fill up some of the Vortex-esque type mod managers and load-order keeper frontends, those "Defenders of the Faith" for the ignorant and the lazy, those that cannot and will not manually do a damn thing, just expect things will "do it for me" ... it seems strange that Mator Smash[github.com] and his prequel Merge Plugins and MXPF, stand almost alone even today, for a more universal framework... strange. (I mean Drigger's SMC is a freakin' AutoIT3 script, but still somewhat useful for textures merging and easy to edit for end users who don't know pascal.)
I guess it's hard with the egos of mod makers to get them to colab much when there's no money involved and rent needs paying. Something EVERYONE should have on their mind as we go further and further down the IAPs/microtransactions hitting PC gaming rabbit hole... maybe if we pay the hackers we won't have to micropay or subscribe to the developers/distributors and have to be constantly online and checksummed against server-side data what we're allowed to do? Hmm. Again, keep that in the front of your mind as 2022 rolls by since Microsoft now "owns" everything you love. :-)
@Vlad 254: “‘Classic’ – a book which people praise and don’t read.” – Mark Twain
"There is only one good, knowledge, and one evil, ignorance." - Socrates
(pseudocode)
With the resources of something like the user base of nexusmods you'd think more would be interested, maybe it's just too advanced for the average gamer? I wouldn't think so but then again I always overestimate and think the best of people. :-)
I guess with the plethora of "ESL'ifying your mods" kind of articles out there, the more the merrier, because what one person doesn't explain well, another one might, and eventually it will "click" for someone when they see the big mod picture. (example: I really like Michael-wigontherun's approach to explaining the esk batch creator and it's parsing, as well as his pex decompiler. Whether it works well or not, he explains it well for my brain.)
Maybe it's better than only one or two persons do it, as long as he stays active he can become the entire repository of all mod consolidation knowledge, maybe even come up with guidelines for mod creators to adhere to ala .psc for papyrus when the compiler turns them into .pex... one merge syntax would be fantastic wouldn't it? You'd think Bethesda would have thought of this, but they probably just wanted some time off after every single ES project went to shipping.
Yeah I suspect if there's only ~50 people who care, it'll be an indefinite amount of time before enough data is collected to generate high-confidence merges without the need to manually double and triple check the results. Ah well, here's hoping!
Great post though, keep it rolling - sorry for the tangent.
Actually, what I was mainly referring to when stating an automatic program cannot make the necessary determinations of what records to forward is for a case (which often occurs) where, for example, let us say, 3 of the plug-ins may use different lighting, or different acoustics. Those are things where only an individual can determine which record should be forwarded and used, as it is something that only the individual editing the records can determine based upon their knowledge/experience of how things should appear, or how they would wish them to appear, in the game.
As to how many people may actually make use of this, yes, this is somewhat of a niche subject, but one which I have seen a number of people bring up in the forums, so having this available for those who may have questions is important - even if there are only ~50 people, as you say.
But thanks for posting! It is always great when people contribute constructively!