Jump to content

[WIPz] TES5Edit


zilav

Recommended Posts

5 hours ago, fireundubh said:

@zilav: When you click a form field and a dropdown list appears in its place, where is that dropdown list populated in the code?

TfrmMain.vstCreateEditor()

It uses IwbElement.EditInfo comma separated string for a list of values, which is get populated according to definitions. The code for EditInfo is in wbInterface.pas for each integer formatter interface: formid, flags, enum. The only exception is when custom ValueToStr and StrToValue integer convertion functions are defined for a field in definitions, then the populating code resides in definitions files for each game, for example CTDA code for ctEditInfo request type.

Link to comment
Share on other sites

On 7/20/2014 at 7:27 PM, Arthmoor said:

You should never perform cleaning with your entire load order loaded at once. The results will not come out the way you are hoping.

 

ALWAYS clean things one file at a time, starting from the top of the load list and moving toward the bottom.

 

Yes. It's tedious. It's no fun. It's going to take a lot of time for a big load order. It's also the only way the process can work correctly.

While I accept this to be the case and have always done things this way... What's the actual reason behind it?  I have no insight into the technical process behind how automated cleaning works and thus why it needs to be done this way...  I'm just curious and would appreciate an explanation or a link to one if you have time. :)

Link to comment
Share on other sites

52 minutes ago, jdsmith2816 said:

While I accept this to be the case and have always done things this way... What's the actual reason behind it?  I have no insight into the technical process behind how automated cleaning works and thus why it needs to be done this way...  I'm just curious and would appreciate an explanation or a link to one if you have time. :)

 

For a simple explanation http://www.creationkit.com/index.php?title=TES5Edit_Cleaning_Guide_-_TES5Edit#Loading_Plugins_Correctly

 

Quote

Loading Plugins Correctly

The terms explicit dependency and implicit dependency are used in this section. It is important that you understand these terms, so before continuing, here are their definitions:

An explicit dependency is a plugin that another plugin relies on, and which has its filename explicitly referenced within the latter plugin. Explicit dependencies are easily determined because they can be viewed in Wrye Bash, and if an explicit dependency is missing or loaded after the plugin that depends on it, the game will crash on startup. A plugin's explicit dependencies are also known as its masters.
An implicit dependency is a plugin that another plugin depends on, but which is not referenced by the latter plugin. Implicit dependencies must be determined by checking if the mod author has listed any required mods for their mod, and by considering the nature of the mod. For example, compatibility patch plugins are often implicitly dependent on the plugins of the mods they resolve compatibility issues for.

Having the correct load order set for your mod plugins is essential for them to be cleaned correctly. Load ordering is outside the scope of this guide, but the easiest way to get a load order that is likely to be correct is to use LOOT.

It is highly recommended that when cleaning a plugin, only the plugin itself and the plugins it depends on should be loaded. Having any other plugins loaded introduces the risk of their contents interfering with the cleaning process and leading to invalid results.

There are two absolute requirements to loading plugins for cleaning:

  1. The plugin to be cleaned must be the last loaded plugin in your load order.
  2. Any plugins upon which the plugin to be cleaned depends must be loaded. This includes both implicit and explicit dependencies.

Due to these rules, you cannot clean more than one mod in the same TES5Edit session. If you have multiple plugins to clean, then they must each be loaded into separate TES5Edit sessions and cleaned separately.

Example 3: Loading Explicit And Implicit Dependencies
Consider a plugin "VillageMod-QuestMod Patch.esp" that acts as a compatibility patch between VillageMod.esp and QuestMod.esp.
VillageMod.esp changes (among other things) some of the names of the NPCs in the village and changes the landscaping around it, but QuestMod.esp includes voice-acted dialogue that uses the original NPC names, and adds a wall around the village that is partially buried by the landscape changes of VillageMod.esp when the two are used together.
"VillageMod-QuestMod Patch.esp" reverts the names of the NPCs back to their originals to match with QuestMod.esp's voice acting and moves the walls added by QuestMod.esp so that they are no longer buried. As it changes the NPC names, it has Skyrim.esm as an explicit dependency, and as it changes the walls, it has QuestMod.esp as an explicit dependency. However, because it doesn't change anything added by VillageMod.esp, VillageMod.esp is an implicit dependency.
"VillageMod-QuestMod Patch.esp" will refuse to load without also loading Skyrim.esm and QuestMod.esp as they are explicit dependencies, but it is possible to load it without also loading VillageMod.esp. However, if this is done then the name changes in "VillageMod-QuestMod Patch.esp" will appear to be Identical To Master edits, as they will be identical to the names in Skyrim.esm and QuestMod.esp does not touch them, and so the name changes in the patch will be incorrectly removed. If all three plugins are loaded, then the name changes will not appear to be Identical To Master edits, as they are different to the names in VillageMod.esp.

See my bold in the quoted text.

If you need something more technical Zilav will be the one to advise

Link to comment
Share on other sites

Cleaning operates on the filter which resolves conflicts between records, and filter always operates on all loaded mods. When checking conflicts for a record, all record's overrides will be taken into account. It doesn't matter where you right click "Apply Filter" when want to clean some mod, all mods will be checked and contribute to the resulting conflict status for each record, that's why loaded mods other then the one to be cleaned will have influence and serve as implicit dependencies.

There is no way for a program to know if a mod is an implicit dependency or not, only users must decide whats mods to load in xEdit when cleaning: the mod itself, it's explicit masters defined in mod's header (though xEdit will load them automatically regardless the selection) and implicit masters if any.

Link to comment
Share on other sites

On 3/4/2017 at 2:11 AM, zilav said:

Cleaning operates on the filter which resolves conflicts between records, and filter always operates on all loaded mods. When checking conflicts for a record, all record's overrides will be taken into account. It doesn't matter where you right click "Apply Filter" when want to clean some mod, all mods will be checked and contribute to the resulting conflict status for each record, that's why loaded mods other then the one to be cleaned will have influence and serve as implicit dependencies.

There is no way for a program to know if a mod is an implicit dependency or not, only users must decide whats mods to load in xEdit when cleaning: the mod itself, it's explicit masters defined in mod's header (though xEdit will load them automatically regardless the selection) and implicit masters if any.

Thanks zilav & alt3rn1ty  that's what I was looking for.

Link to comment
Share on other sites

On 3/4/2017 at 0:11 AM, zilav said:

Cleaning operates on the filter which resolves conflicts between records, and filter always operates on all loaded mods. When checking conflicts for a record, all record's overrides will be taken into account. It doesn't matter where you right click "Apply Filter" when want to clean some mod, all mods will be checked and contribute to the resulting conflict status for each record, that's why loaded mods other then the one to be cleaned will have influence and serve as implicit dependencies.

There is no way for a program to know if a mod is an implicit dependency or not, only users must decide whats mods to load in xEdit when cleaning: the mod itself, it's explicit masters defined in mod's header (though xEdit will load them automatically regardless the selection) and implicit masters if any.

What is "cleaning" comprised of in your book?  To my knowledge cleaning comprised of maybe four things:

1. Fixing ITMs.
2. Fixing UDRs.
3. Fixing dirty edits.
4. Fixing other errors.

None of these are influenced by other plugins being loaded in xEdit except ITPOs (which most people don't clean, and should be calculated relative to the previous override in an explicit master) and ITMs in the case of injected records (which should be ignored by the ITM detection algorithm).

Why is applying a filter even a required step when cleaning?  Based on the code there is absolutely no reason for a filter to be used, and there is no reason why loading your entire load order should affect any automatic cleaning algorithms.  If it does then there's a problem with the algorithm.

Link to comment
Share on other sites

12 hours ago, Mator said:

What is "cleaning" comprised of in your book?
Why is applying a filter even a required step when cleaning?

If it does then there's a problem with the algorithm.

I don't have any book.

Filter gives visual feedback of conflicts and what is going to be removed.

There are no problems with the algorithm.

PS. I don't want to talk about cleaning anymore, it works as intended without any known bugs. Nothing to discuss.

Link to comment
Share on other sites

It seems that the checkbox for "Has Holotape" and possibly also the referred holotape (note?) form is not known to FO4Edit. Simply checking the "Holds Holotape" on the Terminal form and leaving the holotapeblank results in the terminal having an empty holodrive in-game, allowing one to insert things like the arcade games, or text/audio data holotape, or, more importantly for security control terminals, the Total Hack holotapes allowing you to hijack spotlights, turrets, and protectrons linked to the terminals.  I've discovered two security controller terminals so far in my new UFO4P adventures and am expecting more. Can the next version of xEdit have these?

It seems that "COCT - Count" is the subrecord in question that is the governor for this. It doesn't have an apt descriptor for it though, and doesn't register as an overridden subrecord when "hide no conflict rows" is enabled.

Link to comment
Share on other sites

1 hour ago, MadCat221 said:

It seems that "COCT - Count" is the subrecord in question that is the governor for this. It doesn't have an apt descriptor for it though, and doesn't register as an overridden subrecord when "hide no conflict rows" is enabled.

The flag "Has Holotape" doesn't exist, terminal works as a container for holotapes using common COCT and CNTO subrecords similar to chests and inventory of NPCs. COCT is a counter service field that indicates the number of items (CNTO subrecords). It can't be the only conflict in a record - when COCT is different, the Items array with CNTO subrecords should be different either. No COCT and COCT=0 is the same in other records, that's why it is marked as benign for conflicts.

If you are really sure that in TERM COCT=0 and missing COCT are different and actually means "Has Holotape" flag, I can mark it for conflicts.

Link to comment
Share on other sites

I am really sure. Here's some screenshots:

In the CK, it is clearly a checkbox. Leaving the dropdown blank results in an empty holodrive (as opposed to no holodrive)  I analyzed other terminals to make sure that's how it's supposed to be. The screenshot reflects my alteration to that terminal to enable the Total Hack tapes to be used on the turrets and protectrons attached to it.

 

 

TwBFtdT.png


In FO4Edit, it goes from null to 0. On computers with a drive and a holotape in it, it is a 1 and has the item ref info listed below it.

 

 

B5P19ii.png

 

Additionally, Unknown 4 and Unknown 13 were flagged in the override record's header subrecord. The second terminal I altered already had those flagged in Fallout4.esm.

Link to comment
Share on other sites

@zilav It looks to me like that COCT field for Terminals should actually be a form ID field since that drop down menu in the CK will not let you specify more than one holotape. So "counting" them doesn't seem right.

@MadCat221 What does that COCT field look like with a tape set?

Link to comment
Share on other sites

The COCT field is actually an item entry count.  The grayed out subrecord right beneath it is "Item", and gives a form record reference and item count to a holotape when the COCT reads 1.

Here's the Vault 111 rec terminal that I used as a "has loaded holodrive" reference:

5rPJP7V.png

It too has Unknown 4 and Unknown 13 tagged in the header subrecord. I randomly clicked around, however, and found a terminal that has COCT = 0 (and not null) and it did not have Unknown header flags 4 and 13 tagged. I'll check in-game to see if it has a holodrive.

Link to comment
Share on other sites

It appears that those two unknown flags are ultimately irrelevant to the holodrive. I unflagged those two on the Curator terminal in the Boston Public Library while still leaving that COCT at 0 (not null) and it still accepted holotapes.  The Total Hack Turret holotape still functioned on its attached turrets too; scrambling the turrets' targeting parameters causes them to shoot each other. The existing unaltered terminal in Sanctuary Hills that had COCT = non-null 0 and never had Unk 4 and 13 ticked also accepted holotapes. No turrets to test since it's just a chem dealer's log, but the game holotapes work in it. The CK tagging those flags could just be extraneous stuff.

Link to comment
Share on other sites

I just found a third security controller terminal without a holodrive; the sergeant's in the BADTFL office. This time, I corrected it via de-nulling that COCT subrecord to 0 in FO4Edit, going around the CK entirely. Its attached turret was responsive to alterations made with the Total Hack turret tape.

Link to comment
Share on other sites

3 hours ago, MadCat221 said:

I just found a third security controller terminal without a holodrive; the sergeant's in the BADTFL office. This time, I corrected it via de-nulling that COCT subrecord to 0 in FO4Edit, going around the CK entirely. Its attached turret was responsive to alterations made with the Total Hack turret tape.

Uploaded new build, updated the first post.

Left both flags as unknowns and holotapes as an array even if you can set only a single one in CK. Looks like Bethesda originally intended to hold several holotapes (since they used inventory subrecords COCT and CNTO) and maybe the code for that is still in executable and we'll get F4SE plugin to unlock that in future, who knows.

Link to comment
Share on other sites

Uploaded new build.

Small change in filter (by request). If 8-digits hexadecimal FormID number is provided in "Base Record EditorID contains" field, then FormID will be checked instead. For example 00000010 will search for map markers.

Link to comment
Share on other sites

Could I ask a favor? This commit: https://github.com/TES5Edit/TES5Edit/commit/2fe076ae03b8576f94b48285a0bc24ccea3faabc

Can we get that reversed please? I find being able to load a single mod to generate selective LOD for its quads to be a highly useful feature and have been juggling a crude workaround to get past it.

Link to comment
Share on other sites

10 hours ago, Arthmoor said:

Could I ask a favor? This commit: https://github.com/TES5Edit/TES5Edit/commit/2fe076ae03b8576f94b48285a0bc24ccea3faabc

Can we get that reversed please? I find being able to load a single mod to generate selective LOD for its quads to be a highly useful feature and have been juggling a crude workaround to get past it.

xEdit removes Large References information from Skyrim.esm automatically to ease the browsing, without it LOD generation won't work correctly for SSE.

xLODGen does not, that's why you need to use it instead.

If you want to load only specific plugins into xLODGen, you can provide a custom plugins.txt in command line -P:"C:\My\Custom\plugins.txt"

Link to comment
Share on other sites

Actually the LOD generation has worked perfectly fine for SSE. No problems with it at all, I've just been having to keep 3.1.2 around to be able to generate it for a single quad instead of the entire worldspace. I have no use case for wanting to do LOD over an entire worldspace when I'm making BTO and BTT files for a mod.

Link to comment
Share on other sites

10 hours ago, Arthmoor said:

Actually the LOD generation has worked perfectly fine for SSE. No problems with it at all, I've just been having to keep 3.1.2 around to be able to generate it for a single quad instead of the entire worldspace. I have no use case for wanting to do LOD over an entire worldspace when I'm making BTO and BTT files for a mod.

It will work without large refs information, but generated LOD files won't use that feature in this case leading to worse visual quality than vanilla. As I said there is an option to generate specific LOD level and quad in xLODGen, you don't have to generate for entire worldspace.

Link to comment
Share on other sites

  • 2 weeks later...

Hello. How I can compile TES3Edit (for Morrowind) in Delphi 10.1 Berlin or other ide? I get errors about nondefined types etc... 

Link to comment
Share on other sites

27 minutes ago, elderscrollerr said:

Hello. How I can compile TES3Edit (for Morrowind) in Delphi 10.1 Berlin or other ide? I get errors about nondefined types etc... 

xEdit does not support Morrowind, only Oblivion and later games.

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
×
×
  • Create New...