Jump to content

[WIPz] TES5Edit


zilav
 Share

Recommended Posts

12 minutes ago, Nukenin said:

Place both of those "Dragonbone ?.esl" files above USSEP in Plugins.txt and you'll find that USSEP's override for Dragonbane wins out and your Dragonbane will be "Dragonbane".

What a double mess :) So the order of plugins in saves doesn't correspond to the real overriding...

Can you make the similar checks with any CC mod, for example survival? A good test record is FlameCloakScroll "Scroll of Flame Cloak" [SCRL:000A44AB], it has changed description about swimming in cold water. Or just add your own one right into ccqdrsse001-survivalmode.esl

Link to comment
Share on other sites

Ensuring that I disabled the unofficial Survival Mode USSEP compatibility patch first (as this is the sort of thing it's meant to resolve), I manually placed ccqdrsse001-survivalmode.esl below USSEP in Plugins.txt.  (First test all the way at the bottom, second test immediately beneath USSEP.)

Both times USSEP won with its Scroll of Flame Cloak not mentioning anything about swimming in cold water, indicating that Survival Mode's ESL (and presumably the other CC ESLs as well) is indeed always loading before USSEP.

After these tests, I entered the in-game Mod UI from the main menu.  Sorting load order, ccqdrsse001-survivalmode.esl was nowhere to be found (and indeed was nowhere to be seen on the subsequent game-generated Plugins.txt).  I reenabled the unofficial Survival Mode USSEP compatibility patch, went back in the game, procured a Scroll of Flame Cloak, and it indeed had the text regarding swimming in cold water (nice to see someone's taken up the mantle of providing such a compatibility patch!).

So the aberrant behavior appears to be strictly for user-generated ESLs (or likely rather ESLs not hardcoded in the game?).  Honestly, I suspect the game just outright ignores any CC files appearing in Plugins.txt, as it will have already loaded them by the time Plugins.txt starts to be parsed.  (I imagine this is also true of the official ESMs?)  I normally and routinely run LOOT to do any sorting after adding mods in-game from Bethesda.net (I'm one of those types who manually mixes Nexus mods with stuff from Bethesda.net, I've never touched a mod manager to my recollection).

Why anyone would feel the need to load their ESL before USSEP is one of life's unwanted little mysteries.  But they can.  I guess some people like losing.  :)

Link to comment
Share on other sites

On 06/10/2017 at 10:24 PM, pStyl3 said:

Expanding on hlp's idea ..

.. is there any possibility that such a file, a (text)file containing the hardcoded CC-.esl-filenames, could be used by all of the important third party tools (maybe even for both games: FO4 and SSE)? To be precise, I'm thinking of xEdit, LOOT, Wrye Bash as well as Vortex (and possibly other tools as well, if they so desire). New impending rules for load order put aside for a moment, the reality of the Creation Club is, that all the tools (and as such their creators) need to account for these new hardcoded files, and as has been discussed, it isn't very reasonable to expect that even one dev of said tools will happily add them and update his/her tool accordingly forever.

Given that it seems to me that such a "community supported" file containing CC .esl filenames would be in the best interest of everyone.

Edit: IF this would be a possibility, the question would be, of course, how such a file could be distributed between the tools.

I'd have much preferred Bethesda had an "officialplugins.txt" (or whatever) either somewhere in the game directory or even that got written out when you ran the game, that listed such files instead of hardcoding them. If it's left up to us, we need to agree on such a file, agree to use it, and then also have fallback steps in case the file doesn't exist, which would probably involve hardcoding stuff anyway.

On 07/10/2017 at 7:07 AM, zilav said:

I'm still leaning towards autodetection of CC mods. The presence of Localized flag itself already filters out almost all custom mods because absense of strings files for some language crashes the game and hence custom mods very rarely use that feature, and doing additional regular expression check on plugin name (starts with "cc", has "-" char in between) pretty much guarantees no false positives unless someone decides to trick that on purpose.

If such hardcoded names file is ever going to be used, it'll be optional I think.

For libloadorder I'm leaning towards simply filename matching, looking for anything matching "cc.+\.esl" case sensitively, with a possible hardcoded list of known CC plugins if that helps performance.

A search of all LOOT's masterlists and BOSS's Skyrim masterlist shows that of 30,000+ plugins (not exhaustive, but significant and the best dataset we have), only three plugins start with "cc": "ccImmseriveDiseases.esp", "ccDifferentStones.esp" and "ccNightEye.esp" (all for original Skyrim), so I'm not too concerned about false positives here.

Link to comment
Share on other sites

I uploaded a F4SE plugin that provides the DumpModInfoList console command. Results go into  My Documents\my games\Fallout4\F4SE\f4se_ModInfoDump_plugin.log

This will dump the order the plugins were loaded into memory and then the two arrays present into the save.

 

The plugin is here : https://github.com/TES5Edit/TES5Edit/tree/sharlikran-fo4dump/plugin_modInfoDump

 

Link to comment
Share on other sites

10 hours ago, hlp said:

I uploaded a F4SE plugin that provides the DumpModInfoList console command. Results go into  My Documents\my games\Fallout4\F4SE\f4se_ModInfoDump_plugin.log

This will dump the order the plugins were loaded into memory and then the two arrays present into the save.

 

The plugin is here : https://github.com/TES5Edit/TES5Edit/tree/sharlikran-fo4dump/plugin_modInfoDump

 

Thanks, using that I've verified @Nukenin's findings and retested my own, so:

  • Plugins are treated as light masters purely by their file extension, the 0x200 TES4 header flag has no effect on load order
  • The master flag (0x01) has no effect on how a light master loads, light masters without it can load before light masters with it depending on their plugins.txt order
  • Light masters load before non-master plugins
  • Light masters load amongst masters according to their plugins.txt order
  • Hardcoded light masters (Creation Club plugins) load before all non-hardcoded plugins

Claims on the wiki I haven't yet seen verified are:

  • That ESLs can only hold 2048 records (it was 4096 when I looked a month back)
  • "A maximum of 4096 .esl files can be loaded by the engine at once, but more Form IDs in an .esl file means that less .esl files can be loaded." - I don't understand why this is the case and what the relation is.
  • The 4096 max is also new to me, I found that you could get up to 8192 but they'd overflow into the FF index, but maybe they patched that.

I also previously found that a normal plugin and a light master can share the FE slot, with the light master's records being used in case of object index conflict, but I'm not sure if that's still the case.

Link to comment
Share on other sites

Due to the formula used to calculate the in memory formID in the plugins loader, reference to "ESL forms" whose ID is greater than 4096 should be rounded down to a value below 4096 (unless this changed since F4 1.10.20).

But in F4SE there is also another array (tArray<UInt32> formMapping;) I haven't tried to dump yet. And that array is not present in SKSE64.

 

 

 

Link to comment
Share on other sites

From a post by CDCooley https://forums.nexusmods.com/index.php?/topic/6043958-unofficial-skyrim-creation-club-content-patches/page-15#entry54334023

Charlie breaks it down to 4 groups ..

Quote

There's absolutely nothing magical happening here, but people have gotten too comfortable with the idea that those first two digits of a formId you see in the game's console represent load order. They used to but now they don't thanks to ESL files. It's time to adapt folks. I'm seeing various people testing how things load by looking that the formID numbers in-game. 

Load order is controlled by the game's hard-coded list of official content and then things listed in the plugins.txt file. The numbers assigned as the first two digits of formID values in-game have nothing to do with load order when ESL files are involved. 

From my testing there appear to be only four groups of files that the game considers when loading files. 

First are the official files that are hard-coded into the game itself. Those used to be just Skyrim.esm, Update.esm, Dawnguard.esm, HearthFires.esm, and Dragonborn.esm but now include all of the new Creation Club ESL files too. That means the survival ESL will always load before any traditional mods including USSEP. If they exist in your Data folder they will be loaded and any entries in the plugins.txt file for them are ignored. 

Second are files listed in plugins.txt that are internally tagged as masters and marked as active. It doesn't matter what file extension they use (ESM, ESP, or ESL). They get loaded in the order they appear in the plugins.txt file (but only their order in relation to each other matters). 

Third are any other mods as listed in plugins.txt that are marked as active. The are the regular mods that we used to call ESPs but can technically include files with the extensions ESM and ESL too. 

And finally, the fourth group consists of only one file. It's the save file (ESS) being loaded (or a blank file if you're starting a new game).

Hopefully various mod managers (and LOOT) can be updated soon before too much chaos results from people thinking there's something more complicated and confusing happening. 

 

Edit : My bold in yellow

Link to comment
Share on other sites

On 10/10/2017 at 9:39 AM, WrinklyNinja said:

Thanks, using that I've verified @Nukenin's findings and retested my own, so:

  • Plugins are treated as light masters purely by their file extension, the 0x200 TES4 header flag has no effect on load order
  • The master flag (0x01) has no effect on how a light master loads, light masters without it can load before light masters with it depending on their plugins.txt order
  • Light masters load before non-master plugins
  • Light masters load amongst masters according to their plugins.txt order
  • Hardcoded light masters (Creation Club plugins) load before all non-hardcoded plugins

This boils down to "treat files with esl extension as esm (or esps with the master flag set)" ? That is, disallow/warn the user to place them among regular esps but not enforce order amongst es[ml]. What about the "Hardcoded light masters (Creation Club plugins)" ? We should place them just after main hardcoded masters ? Is there a list of them somewhere ? But my understanding is that they come out often - maybe add an ini entry for users to add them manually ?

Link to comment
Share on other sites

7 hours ago, Utumno said:

This boils down to "treat files with esl extension as esm (or esps with the master flag set)" ? That is, disallow/warn the user to place them among regular esps but not enforce order amongst es[ml]. What about the "Hardcoded light masters (Creation Club plugins)" ? We should place them just after main hardcoded masters ? Is there a list of them somewhere ? But my understanding is that they come out often - maybe add an ini entry for users to add them manually ?

Yes, I've found that plugins with the .esl extension always act as if they were .esm or .esp files with the master flag set. Others (Arthmoor and CDCooley) have found that the master flag value is respected for ESLs, so there's some confusion - it might be that Fallout 4 acts former way and Skyrim SE acts the latter way.

As for CC plugins, they're hardcoded to load in lexicographical order immediately after the official Bethesda masters. The list of CC plugins will presumably grow over time, so it would be useful if the CC plugins a utility recognises isn't static, to save having to release an update every time Bethesda does. I'm currently considering treating any plugin that matches "cc[a-z]{6}\d{3}-.+\.esl" as a CC plugin for libloadorder, but I've yet to risk-assess false positives (I don't want to prevent a valid load order from being set in case the detection is wrong, for example).

EDIT: The only lists of hardcoded plugins I know are those in libloadorder (I should really add comments giving the game versions they're valid for...).

Link to comment
Share on other sites

I am currently tinkering around with GitHub Themes.  I just started trying to learn about everything so no idea when it will be done.  When finished it will be the official xEdit site with links to things related to the program.  Currently the only two buttons are to the downloads and the fopdoc that @WrinklyNinja so generously created.

Also I have my own GitHub site that I'm working on with links to my projects.

Link to comment
Share on other sites

Just imagine that sometimes I'm a one year old child at Thanksgiving.  Mom has worked on dinner all day and it's perfect. Turkey, mashed potatoes, stuffing, corn, green beans, candied yams with marshmallows, and cranberry sauce.  Everyone has gathered to take a quick family portrait in the living room when they suddenly hear a loud crash coming from the kitchen.  Upon entering they see their one year old sitting on the floor holding a cookie.  As they enter he holds out the cookie to show his accomplishment of obtaining it.  Only to be scolded for pulling on the tablecloth and ruining the family dinner.

@WrinklyNinja Sometimes I am not always aware of the proper protocol for everything.  So just in case there is one, may I have permission to add the same theme I am working with to the fopdoc site for continuity.  I would like to add it once I figure out more about the theme and have had a few more days to play around with it.

 

Link to comment
Share on other sites

Just now, Sharlikran said:

Just imagine that sometimes I'm a one year old child at Thanksgiving.  Mom has worked on dinner all day and it's perfect. Turkey, mashed potatoes, stuffing, corn, green beans, candied yams with marshmallows, and cranberry sauce.  Everyone has gathered to take a quick family portrait in the living room when they suddenly hear a loud crash coming from the kitchen.  Upon entering they see their one year old sitting on the floor holding a cookie.  As they enter he holds out the cookie to show his accomplishment of obtaining it.  Only to be scolded for pulling on the tablecloth and ruining the family dinner.

@WrinklyNinja Sometimes I am not always aware of the proper protocol for everything.  So just in case there is one, may I have permission to add the same theme I am working with to the fopdoc site for continuity.  I would like to add it once I figure out more about the theme and have had a few more days to play around with it.

 

Yeah, sure.

Link to comment
Share on other sites

On 10/18/2017 at 2:58 AM, Kelsenellenelvian said:

I know there is the script to add to editor ids but does anyone know of or have a script to remove parts from editor ids? (just from the begging or the end)

The Editor ID is a string, so use Delphi's string functions to manipulate the string and Regular Expressions (RegEx) to match your pattern.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...