Jump to content

[WIPz] TES5Edit


zilav

Recommended Posts

So I have found a minor issue that prevents some work I am doing. In the creation kit you can set an enchantment value for a hazard entry and it does work fine in game but xedit freaks out whenever it sees a ench value there. Is there any way to fix this?

 

[00:08] SUM_Weapon_Des_Hazard_FireHazard "Fire" [HAZD:0611A248]
[00:08]     HAZD \ DATA - Data \ Spell -> Found a ENCH reference, expected: NULL,SPEL
[00:08] SUM_Weapon_Des_Hazard_ShockHazard "Shock" [HAZD:0611A249]
[00:08]     HAZD \ DATA - Data \ Spell -> Found a ENCH reference, expected: NULL,SPEL
[00:08] SUM_Weapon_Des_Hazard_FrostHazard "Frost" [HAZD:0611A24A]
[00:08]     HAZD \ DATA - Data \ Spell -> Found a ENCH reference, expected: NULL,SPEL

Link to comment
Share on other sites

1 hour ago, Kelsenellenelvian said:

So I have found a minor issue that prevents some work I am doing. In the creation kit you can set an enchantment value for a hazard entry and it does work fine in game but xedit freaks out whenever it sees a ench value there. Is there any way to fix this?

I'll fix that, it is just none of vanilla files use enchantment in hazard and that's where we get default allowed record types for fields.

Link to comment
Share on other sites

9 hours ago, zilav said:

I'll fix that, it is just none of vanilla files use enchantment in hazard and that's where we get default allowed record types for fields.

Awesome! Thank you so very much. That one is a huge pain in my ass. Every time I work with those entries I have to go into the creation kit and reset them. 

Link to comment
Share on other sites

  • 2 weeks later...

I'm using TES5Edit 3.2.1 (revision 3da194b). When loading "Unofficial Skyrim Legendary Edition Patch.esp" by itself and using "Check for Errors" nothing comes up and everything is fine. If I load my entire load order and then use Check for Errors on USLEEP the following will be logged:

[00:00] Checking for Errors in [05] Unofficial Skyrim Legendary Edition Patch.esp
[00:04] IronbindExitDoorExt [REFR:000643E6] (places NorWoodDoorLoad01 "Wooden Door" [DOOR:0002C157] in GRUP Cell Persistent Children of [CELL:00000D74] (in Tamriel "Skyrim" [WRLD:0000003C]) at 19,15)
[00:04]     REFR \ XNDP - Navigation Door Link \ Teleport Marker Triangle -> <Warning: Navmesh triangle not found in "[NAVM:001058E0] (in GRUP Cell Temporary Children of IronbindBarrowExterior03BackDoor [CELL:00008FDF] (in Tamriel "Skyrim" [WRLD:0000003C] at 19,15))">
[00:05] DLC2WindhelmToSolstheim [REFR:04016FE0] (places ShipTrapdoor01 "Door" [DOOR:0002834E] in GRUP Cell Persistent Children of [CELL:00000D74] (in Tamriel "Skyrim" [WRLD:0000003C]) at 45,16)
[00:05]     REFR \ XNDP - Navigation Door Link \ Teleport Marker Triangle -> <Warning: Navmesh triangle not found in "[NAVM:000FC127] (in GRUP Cell Temporary Children of WindhelmDocksExterior01 [CELL:0000B4B9] (in Tamriel "Skyrim" [WRLD:0000003C] at 34,8))">
[00:19] All Done!

Is this a general problem of xEdit (maybe because it's a dev version)? Or a problem of USLEEP? @Arthmoor Or is it simply a case of "don't use this function if you load your entire load order in xEdit at once"?

Link to comment
Share on other sites

36 minutes ago, pStyl3 said:

Or is it simply a case of "don't use this function if you load your entire load order in xEdit at once"?

What mods override those navmeshes? It means that the triangle REFR\XNDP is pointing to doesn't exist in the current winning override of a navmesh. I added this check because such errors crash Fallout 3 and New Vegas, but not Skyrim afaik.

Link to comment
Share on other sites

If I load only USLEEP and HoamaiiClearskyHideout.esp from Clearsky Hideout and then use Check for Errors on USLEEP, this is the result:

[00:00] Checking for Errors in [05] Unofficial Skyrim Legendary Edition Patch.esp
[00:04] IronbindExitDoorExt [REFR:000643E6] (places NorWoodDoorLoad01 "Wooden Door" [DOOR:0002C157] in GRUP Cell Persistent Children of [CELL:00000D74] (in Tamriel "Skyrim" [WRLD:0000003C]) at 19,15)
[00:04]     REFR \ XNDP - Navigation Door Link \ Teleport Marker Triangle -> <Warning: Navmesh triangle not found in "[NAVM:001058E0] (in GRUP Cell Temporary Children of IronbindBarrowExterior03BackDoor [CELL:00008FDF] (in Tamriel "Skyrim" [WRLD:0000003C] at 19,15))">
[00:19] All Done!

 

USLEEP + 3DNPC.esp from Interesting NPCs has the other result:

[00:00] Checking for Errors in [05] Unofficial Skyrim Legendary Edition Patch.esp
[00:04] DLC2WindhelmToSolstheim [REFR:04016FE0] (places ShipTrapdoor01 "Door" [DOOR:0002834E] in GRUP Cell Persistent Children of [CELL:00000D74] (in Tamriel "Skyrim" [WRLD:0000003C]) at 45,16)
[00:04]     REFR \ XNDP - Navigation Door Link \ Teleport Marker Triangle -> <Warning: Navmesh triangle not found in "[NAVM:000FC127] (in GRUP Cell Temporary Children of WindhelmDocksExterior01 [CELL:0000B4B9] (in Tamriel "Skyrim" [WRLD:0000003C] at 34,8))">
[00:16] All Done!

To mention is, with 3DNPC.esp it's with version 3.41. The latest version is 3.42, I'm currently downloading that one aswell and will see if it's the same with the new version.

Link to comment
Share on other sites

Basically it's what zilav already said. Those mods are overriding navmeshes that USLEEP fixed, probably for good reason I'd imagine since both of them are likely to need to change the navmesh data themselves. It's more or less impossible to know if either of them included the navmesh fix before proceeding to edit them though.

Link to comment
Share on other sites

I am about to start working on what should be a fairly simple script and can use any help I can get. 

1. The Script will identify a Record with a particular script ( I have already learned how to do this thanks to Zilav).

2. Remove that Script.

3. Replace it with another script.  

The question I would have would be will the properties on the exiting script be removed with the script name?  

 

Link to comment
Share on other sites

You can't remove the script name, you can only remove the Script entry itself in the Scripts array. And since Properties are located in individual Script entries, they will be removed altogether.

Link to comment
Share on other sites

2 hours ago, zilav said:

You can't remove the script name, you can only remove the Script entry itself in the Scripts array. And since Properties are located in individual Script entries, they will be removed altogether.

This is what I have so far.  I am running it on an esp that have have turned into a Esm. 

Alright!   

1. The Script will identify a Record with a particular script ( I have already learned how to do this thanks to Zilav).

2. Remove that Script.

3. Replace it with another script.

4. Add ownership to some of them.

I simply can not get this right. Nothing I have attempted has worked.  I have also been attempting to set the ownership of some of the REFRs, but can not get it to work.  

{
  Replace Sripts.
}
unit ReplaceScripts;

var
  plugin: IInterface;

function Process(e: IInterface): Integer;
var
  p, r: IInterface;
begin
  // process only references
  if Signature(e) <> 'REFR' then
    Exit;
    
  // only master references
 // if Not IsMaster(e) then
 // Exit;
  
  // but work with the current winning override
 e := WinningOverride(e);
  

  // check the presense of script
if GetElementEditValues(e,'VMAD\Scripts\Script\scriptName') <> 'A1_orTreeFood' then
   Exit;

    
  
  // create a new plugin if not created yet or use the last loaded
  if not Assigned(plugin) then begin
    if MessageDlg('Create a new plugin [YES] or append to the last loaded one [NO]?', mtConfirmation, [mbYes, mbNo], 0) = mrYes then
      plugin := AddNewFile
    else
      plugin := FileByIndex(Pred(FileCount));
    if not Assigned(plugin) then begin
      Result := 1;
      Exit;
    end;
  end;

  // add masters before copying as override for parent CELL
  AddRequiredElementMasters(LinksTo(ElementByIndex(e, 0)), plugin, False);
  // and REFR itself
  AddRequiredElementMasters(e, plugin, False);

  try
    // copy reference as override
    r := wbCopyElementToFile(e, plugin, False, True);
    
    // Remove the Element

 RemoveElement(r,'VMAD\Scripts\Script');

/////////////////////////////////////////////////////////////////////////
// Dose Not Work.  I do not know what I am doing wrong and there are no error messages.
  if ElementExists(r, 'VMAD\Scripts\Script') then
    AddMessage('Parent already exists on ' + Name(r))
  else begin
    Add(r, 'VMAD\Scripts\Script', True);
    SetElementEditValues(r,'VMAD\Scripts\Script\scriptName', 'A1_orTreeFood');
  end;
// Dose Not Work.  I do not know what I am doing wrong and there are no error messages.

  if ElementExists(r, 'Ownership') then
    AddMessage('Parent already exists on ' + Name(r))
  else begin
    Add(r, 'Ownership\XOWN - Owner', True);
    SetElementEditValues(r,'Ownership\XOWN - Owner', 'TitusMedeII "Emperor Titus Mede II" [NPC_:0001D4B9]');
  end;

//////////////////////////////////////////////////////////////////////////////

  except
    on Ex: Exception do begin
      AddMessage('Failed to copy: ' + FullPath(e));
      AddMessage('    reason: ' + Ex.Message);
    end;
  end;
end;

function Finalize: integer;
begin
  if Assigned(plugin) then
    SortMasters(plugin);
end;

end.

 

Link to comment
Share on other sites

Add() is used to add new records in groups or new elements in main record. You must use ElementAssing() to add a new element in a list. There are plenty of demo scripts using it.

Link to comment
Share on other sites

11 hours ago, zilav said:

Add() is used to add new records in groups or new elements in main record. You must use ElementAssing() to add a new element in a list. There are plenty of demo scripts using it.

Ok,  I am now able to set the ownership of the REFR

Using ElementAssing() does not work. The problem was this  'Ownership\XOWN' .  It needed to be just 'Ownership'

if ElementExists(r, 'Ownership') then
  AddMessage('Parent already exists on ' + Name(r))
else begin
  Add(r, 'Ownership', True);
end;
SetElementEditValues(r,'Ownership\XOWN','TitusMedeII "Emperor Titus Mede II" [NPC_:0001D4B9]');

All I am able to do regarding the script is Remove.   I can not add anything to it.  

RemoveElement(r,'VMAD\Scripts\Script');
ElementAssign(ElementByPath(r,'VMAD\Scripts\Script'), LowInteger, nil, false);
SetElementEditValues(r,'VMAD\Scripts\Script\scriptName', 'A1_orTreeFood');

 

Link to comment
Share on other sites

16 hours ago, Dragonblood said:
RemoveElement(r,'VMAD\Scripts\Script');
ElementAssign(ElementByPath(r,'VMAD\Scripts\Script'), LowInteger, nil, false);
SetElementEditValues(r,'VMAD\Scripts\Script\scriptName', 'A1_orTreeFood');

The first argument for ElementAssign() is a list element itself, so it should be 'VMAD\Scripts'. Second is a list index to assign to (LowInteger - add a new element and prepend at the start of a list, HighInteger - append new element at the end). It returns the added element, so use it instead of writing a full path again.

entry := ElementAssign(...);
SetElementEditValues(entry, 'scriptName', 'aaa');

 

Link to comment
Share on other sites

48 minutes ago, zilav said:

The first argument for ElementAssign() is a list element itself, so it should be 'VMAD\Scripts'. Second is a list index to assign to (LowInteger - add a new element and prepend at the start of a list, HighInteger - append new element at the end). It returns the added element, so use it instead of writing a full path again.


entry := ElementAssign(...);
SetElementEditValues(entry, 'scriptName', 'aaa');

 

Thanks!  Works Great.  With the information available online this would have been hard to do without your assistance.

r := ElementAssign(ElementByPath(r,'VMAD\Scripts'),HighInteger, nil, false);
SetElementEditValues(r,'scriptName', 'A1_orTreeFood');

 

Link to comment
Share on other sites

On 28/12/2017 at 3:13 PM, Dragonblood said:

With the information available online this would have been hard to do without your assistance.

As far as I know, xEdit scripting informations are centralized here: https://www.creationkit.com/index.php?title=TES5Edit_Scripting_Functions

 

Anything you know know / learned that's not here, feel free to add it there (at least in the discussion page). 

 

Also tagging @Mator, he had a WIP tutorial at some point, (more like an actual guide, less like a reference). Not sure where it's at now, lot of things happened since then.

  • Like 1
Link to comment
Share on other sites

Potential candidate for "check for errors" :

Unique NPCs for which the actor reference have a "Boss" location reference type will fail to fill quest aliases through "Unique Actor" filling type, on start enabled quest.

 

That's just the raw report, the fact that the quest is start game enabled or not, or the fact that the locreftype is "Boss" is likely unrelevant.

I'm not 100% sure this should go under "check for errors". I mean, it definitely is an error, but not a technical problem like a null formid or the other thing usually checked through this functionality. Maybe I should just write a custom checker for this kind of things ? (there is a few other errors related to aliases, most of them reported properly by the CK, that xEdit have no clue about). Thoughts ?

Link to comment
Share on other sites

Thanks. I'll check for extended cases (other loc ref type, start game enabled, and eventually some other relevant filling type) and send it along the 3 other issues I'd wish to see reported.

Link to comment
Share on other sites

I'd be curious to see this test esp as well since I've never heard of such a problem and I'd imagine that vanilla quests could break because of this too.

Link to comment
Share on other sites

So... turns out I jumped into conclusion a bit to quickly. Aliases filling doesn't seem to care much about the loc ref type of a unique actor. 

There was indeed a bug that prevented the alias to fill properly. But it wasn't the loc ref type, even though that's when I removed it that the quest suddenly started working.
After some trimming of all the edits I had here and there, here is a view of the plugin that solved the bug:

image.thumb.png.c9aa05642e39c22de040b303ae14f805.png

 

Now, if you'll excuse me, I think I'm just going to cry in that corner over there. The "just_achr.esp" allow the alias filled by the base NPC to fill, and the parent quest to work properly. Disabling this plugin end up in the quest not filling its aliases, and thus not working.  :wallbash:

Link to comment
Share on other sites

@Kesta No idea what to say. I can speculate that having an esp overriding esm maybe gives some priority in initialization for those records which could affect quest alias filling... but it is highly unlikely. Are you really sure there are nothing else interfering which could affect the outcome?

Link to comment
Share on other sites

3 hours ago, zilav said:

@Kesta  Are you really sure there are nothing else interfering which could affect the outcome?

Nothing as far as the current knowledge of the engine go. That's a dev load order, so it just have skyrim + DLCs, ussep, memory patches, UI / tools mods, and the two beyond skyrim plugin, plus that one for testing. So no interference at this level.

The same NPC is also used in an other alias from an other quest, which fail to start as well without the ITM, but work properly with it. But that still wouldn't explain why the ITM solve it :/

I'll probably have an other pass of test on the issue later on. Like disabling memory patches (who knows...), but right now I'm a bit worn out by this kind of cr*p.

Link to comment
Share on other sites

Hi Guys

Been  trying to generate my own LOD using fo4lodgen and the autumn overhaul mod on a fresh install. Have no experience with tes5 but comfortable modding with fallout, last install i had was running a few hundred mods no issues, and are somewhat comfortable using n xedit for basic functions like clearing conflicts and cleaning dirty edits, but when it comes to generating LOD's i cant get something look reasonable no matter what i try. The stock LOD's that come with the autumn overhaul addon arent the best and have really obvious pop-in which is a pet hate of mine, tried ini tweaks to push back tree gen as far as possible as im running a 1080 so have some room to move, but aside from ugridstoload=9 (which runs fine but reluctant to leave it like that) nothing seems to be able to mask the difference in the actual trees vs LODs that were generated with the mod.  Any of my own attempts in fo4lodgen using the few instructions ive found usually end up with a some trees looking great, but a bunch that are just twigs until you get close or cardboard blocks, which are usually worse than the originals overall. Fiddled with alphas and other settings but its becoming obvious the biggest issue is user noobery. Searched for ages but havent been able to find a guide to walk through the first time or problem solve issues for fo4lodgen.

Is anyone able to point me some sort of guide related to fo4lodgen to help me problem solve whatever im doing wrong, or i give me a hand to generate something thats half reasonable?  Easiest option is to just drop the mod but this playthrough i wanted something different so id rather try work out something with this if possible. Happy to paste screenshots, logs, load lists, whatever if that helps, just not sure what would be helpful for/if anyones willing to give me a hand. Any help would be appreciated.

Vex

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