Jump to content

[WIPz] TES5Edit


zilav
 Share

Recommended Posts

  • 2 weeks later...

Question! (it's been a while since I asked any here... :P )

 

In landscape records, there is a bunch of layers mentioned. The UESP documentation say that ATXT subrecords are "Additional Texture", but the name displayed in xEdit is "Alpha Texture". Which one is it ? (as far as I understand what all of those mean, it seem that they're additional textures applied with a given transparency, so both names should be allright, but... you never know ^^)

Link to comment
Share on other sites

On 2017-04-11 at 11:47 AM, 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... 

What zilav said, Morrowind doesn't use FormID which later games are using and TES5Edit is designed to only use FormID.

 

However, almost 3 years ago AndalayBay started the TES3Gecko project at TAL and it had some activity for a year or so, but now the project is more or less abandoned for various reasons.

 

So if you know anything about Delphi and C++ then maybe the project could be revived, if you just visit and read the thread. :)

Link to comment
Share on other sites

Uploaded new build.

Fixed wrong FO4 precombined nifs path (non game master nifs are located in subfolder named after the plugin file). On it's own the fix does nothing for xEdit, but required for the upcoming precombination cleaner.

Link to comment
Share on other sites

What exactly do you mean by "cleaner"?  The only tool I can envision being useful for precombined is to generate precombined from multiple plugins into one directory belonging to a "Merged" plugin.   Needs to be that way for the timestamp so that the game actually loads them.  

If it's not that, then what?   In any case it would require fully decoding BSPackedCombinedSharedGeomDataExtra as there are several important fields I never decoded.   Particularly there are some kind of hashes that reference the objects in the cell but I never matched them up to any FormIDs.  If you're doing some BTS stuff with these blocks or have already decoded the different format,  I'd definitely like in on things. :) 

Also I literally just found out that the CK we were given doesn't even make precombined the same.  It comes out 5-10x larger and uses a different block:  BSPackedCombinedGeomDataExtra.  (So my "worst case scenario" where I point out an SMIM for FO4 would need to include 2GB+ of this data for all the cells just jumped up to 10GB+.....)

I take it "cleaner" might imply that you are updating the positions/bounds of the combined objects from the original refs, in which case that still means someone decoded how the ExtraData block references them.

Of course maybe I'm being too hopeful that eham or sheson or someone is making some kind of tool.   Maybe this is just about updating the precombined subrecords in the plugins in some way that I'm not able to envision. :P   That's definitely the simpler answer, as the former would require also decoding and regenerating the vis files since even in the simplest case of fixing object placement this could lead to blinking meshes and things since the vis hasn't been updated.

Link to comment
Share on other sites

Oh no, that's way more simple. After you regenerated precombination, xEdit script compares XCRI lists in master's and mod's CELL and modified REFRs to find precombined nifs that kept the same name and consist of the same unchanged references, and creates BAT file to delete them.

VIits experimented a lot with precombines and found out that CK generally keeps unique ID of meshes the same between different precombination regens (maybe CELL's FormID serves as initial seed for random numbers, idk) and those meshes can be safely removed, the game will revert to using vanilla ones. Considering x5-x10 size increase of new precombined nifs from CK as you discovered, this could save some space. He also discovered that you can safely delete entire nif from XCRI list to uncombine it's references, and asked me to create some sort of precombination editor for cells. Read more here.

This won't give any benefit for mesh changing mods like SMIM, more intended for ordinary mods that simply add new objects and modify existing ones in cells and regenerated precombination.

Link to comment
Share on other sites

I'm still a bit confused I guess.  This seems dangerous and I think way too many people see "cleaning" as some kind of safe, foolproof thing.  Maybe the mod page needs slightly bigger "Turn Away" signs.  Similar things happened with ousnius's converter as way too many people see it and say "Oh I may as well just run this on everything I own". 

If you regenerated precombined for a cell and then go and immediately take out everything you didn't edit or add yourself, you are effectively turning off precombined for the entire cell save for a few objects.  The NIFs are in a path under the plugin name as you know, so it can't be down to filepath resolution (the game finding the vanilla _OC where the referenced mod's _OC is now absent).  There's also only one timestamp for the cell precombined and your new ESP is going to reference all the newly regenerated files in the cell record.  So you remove those references to the now-absent files (?).  And now what happens?   I don't see any mention of it merging back in the vanilla subrecords in order to have a complete precombined list.  You say it will revert to using vanilla, but if the lists aren't merged can it really do that?  I guess since I don't see this part explicitly explained in the desc or articles my first thought is that nobody even realizes it's an issue, so maybe the documentation should be a bit better to reflect this. 

I guess the other explanation is that the engine does remove the plugin name from the path resolution and goes back through every plugin to find the first matching _OC NIF?  If that were the case, the _OC could be from another mod that edits the cell.  Or does it only go back and look at vanilla paths?  If it does go through other mods first this could lead to all kinds of problems depending on if this confuses the engine with what NIF to actually load. If it's not using the timestamp in the cell record since it can't, is it stopping at the plugin that has the matching _OC NIF and then figuring out what actual NIF file to load from that?  Because we know that this is roughly why replaced NIFs don't show up because their identity is hardcoded into the cell record and the _OC file.   Additionally, the Vis files from the top-most mod only know about Vanilla+Top-Most Mod's _OC files.  So if along the way it matches the _OC from another mod, that _OC might differ from vanilla in actual content (e.g. object size, placement, number) and there could be issues.  

Depending on the actual answer to all these questions this could do away with whole-cell incompatibility between mods which both have precombined if they both clean up their mods.  I'm most concerned about the _OC file resolution and if this allows for multiple mods' _OC in a cell and what this means for the Vis files (which presumably only get loaded from the top-most mod).

It's at least nice to know you can handpick things in a cell to uncombine.  I always assumed that was the case but I'm glad it's tested.  If certain things are really problematic to a cell (buggy, placement, whatever), then it's good that you can just remove them and then fix the NIF or the reference.

Also why wouldn't it work for something like SMIM?  You replace vanilla NIF files, you have the CK regenerate the precombined so that it references the new NIFs,  you remove all the precombined NIFs that don't contain SMIM files and fix the references in your plugin.  Isn't that about right?

----

Edit:  Also what about XPRI?  Is there ever any overlap/conflict between _OC and _Physics files and XCRI/XPRI? (Off hand I can't remember if _OC is always devoid of physics blocks)   What happens if you remove a reference from the XPRI?

Edit2: I asked about the filename resolution in a much simpler fashion here:  https://forums.nexusmods.com/index.php?/topic/5522717-fallout-4-optimization-and-performance-systems-explained/?p=49807002  ...  In case that's easier to answer. 

Link to comment
Share on other sites

You'd better speak with VIits, I don't know much about precombines myself and just implemented what he asked for based on his tests.

But from what he told me, I assume that CK uses the same names for precombined nifs for each cell, so after regenerating precombination you will end up with the same nifs in the same folder merged from the same references inside the cell. If all those factors match then there is no need to keep all nifs apart from new or changed ones (consisting of different REFRs or modified REFRs), the game will revert to using vanilla meshes. He confirned that precombination for a cell works fine in game when using precombined nifs from different precombinations.

That's what this scripts does - finds such meshes. It doesn't modify XPRI list of anything else, simply creates a bat file to clean up unchanged precombined nifs.

Link to comment
Share on other sites

6 hours ago, Leonardo said:

As I said here I have been thinking of updating my mod.   I wonder if there is a way to do that automatically in TES5Edit, perhaps via a script?

Update what and how? Nothing technical mentioned there, what is the problem exactly?

If you are talking about general Skyrim -> SSE conversion then there is thead here of afkmods with several pages of details on differences in SSE.

Link to comment
Share on other sites

I want to decrease the radious of a map marker detection in-game, let say something in between 50% to 80% of the value in vanilla.  Just to improve the immersion in-game when finding a new map marker for a loaction in-game.

Why I ask is that I'm not fond of going through 130+ map markers in the CK and change the same value over and over again until it is done then save my progress.

So that's why I ask if there is sort of a shortcut so to speak just to update my mod without spending a hour or two to go through all map markers in my mod.

And no this is not about converting my mod to SSE, my mod has already being converted.

Link to comment
Share on other sites

It definitively is doable by script

Launch a script at the root the worldspaces in your mod (I assume you don't have interior map marker);

in Process, test for reference to MapMarker, then modify the radius by 0.8.

 

try:

function Process(e: IInterface): integer;
var
  b: IInterface;
  r: IInterface;
begin
  Result := 0;
  if (Signature(e) = 'REFR') then begin
    b := RecordBySignature(e, 'NAME');
    if Assigned(b) and (FormID(b) = $10) then begin
      r := RecordBySignature(e, 'XRDS');
      if Assigned(r) then
        SetNativeValue(e, 0.8 * GetNativeValue(e));
    end;  
  end;
end;

It is untested and I did not check that the function names have the correct names.

 

Link to comment
Share on other sites

10 minutes ago, hlp said:

It definitively is doable by script

Launch a script at the root the worldspaces in your mod (I assume you don't have interior map marker);

in Process, test for reference to MapMarker, then modify the radius by 0.8.

 

try:


function Process(e: IInterface): integer;
var
  b: IInterface;
  r: IInterface;
begin
  Result := 0;
  if (Signature(e) = 'REFR') then begin
    b := RecordBySignature(e, 'NAME');
    if Assigned(b) and (FormID(b) = $10) then begin
      r := RecordBySignature(e, 'XRDS');
      if Assigned(r) then
        SetNativeValue(e, 0.8 * GetNativeValue(e));
    end;  
  end;
end;

It is untested and I did not check that the function names have the correct names.

I thought it would be possible, but wasn't sure hence my question.

That's correct, all map markers is placed in exterior cells.

 

Since the script isn't tested then I have a problem, because I don't know much about scripting.  But if you want to test the script then go ahead and test it yourself.

Link to comment
Share on other sites

17 hours ago, Leonardo said:

I thought it would be possible, but wasn't sure hence my question.

That's correct, all map markers is placed in exterior cells.

 

Since the script isn't tested then I have a problem, because I don't know much about scripting.  But if you want to test the script then go ahead and test it yourself.

@Leo: Sure you can test it yourself. Just make a dummy (test) copy of the esp and try this suggestion. :)

Link to comment
Share on other sites

9 hours ago, Nebulous112 said:

Lol you ask for help to make a script to update your mod. Someone takes the time to write a script for you to do what you need.

Then you tell the person to test it themselves because you are not familiar with scripting.


*Facepalm*

Look, I didn't ask for a script and what I asked about if I can use a script to do what I wanted to do.  That's different don't you think.

 

 

EDIT:  Nevermind, sorry for asking a dumb question.  I'll update my mod by using the CK, despite for not being fond of going through more than +130 map markers.

Edited by Leonardo
Link to comment
Share on other sites

On ‎05‎/‎06‎/‎2017 at 6:02 PM, Leonardo said:

Look, I didn't ask for a script and what I asked about if I can use a script to do what I wanted to do.  That's different don't you think.

 

 

EDIT:  Nevermind, sorry for asking a dumb question.  I'll update my mod by using the CK, despite for not being fond of going through more than +130 map markers.

You know there is the saying that there are no dump questions only dump answers orrrr dump comments.

Link to comment
Share on other sites

Hello. How to right way to handle with large reference in SSE? Do I need to forward it in last plugin in load order? I am try to use xEdit script to generate large references in USSEP (only one visible plugin in combobox of script), but game crashed after generation (for example at the start scene thief's dialogue). Screenshot RNAM after script full of errors. Why errors? Don't understand how the script work and when and how i should use it. Sorry for bad english

 

Link to comment
Share on other sites

Large References RNAM data is merged at runtime as you can clearly see when comparing overrides from DLCs, you don't need to forward it.

The script for RNAM generation is for new worldspaces to work in conjunction with SSELODGen and DynDoLOD. You should speak with Sheson anyway because he wrote it.

Link to comment
Share on other sites

  • 2 weeks later...

Can xEdit the break dialogues after renumbering formids (witb injection in master) of topic and copying in this master? I am merging plugins with manual changing formids, copying, renaming voice files with new id. XEdit don't find errors, but in game all dialogues with player not work. 

Link to comment
Share on other sites

2 hours ago, elderscrollerr said:

Can xEdit the break dialogues after renumbering formids (witb injection in master) of topic and copying in this master? I am merging plugins with manual changing formids, copying, renaming voice files with new id. XEdit don't find errors, but in game all dialogues with player not work. 

xEdit is a tool like a hammer for example, result depends on who uses it and how.

If you moved topics into another plugin you also need to change the path of voice files which depends on the plugin's name, changing FormID is not enough.

Link to comment
Share on other sites

I just want to confirm what I did is correct.

Downloaded the latest TES5Edit then unpack it into a new folder with the same name as the archive then copy the TES5Edit.exe into the same folder and rename TES5Edit.exe to this.  I hope I did it right.

  • TES5LODGen.exe
  • SSEEdit.exe
  • SSELODGen.exe

Thanks for the new TES5Edit zilav! :horkercookie:

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...