Jump to content

[WIPz] TES5Edit


zilav

Recommended Posts

Hi everybody)

 

Please help with a script.

I need to filter all NPC with Health 0 for AI fix, game Oblivion.

 

Just filter, no more actions.

Link to comment
Share on other sites

Hi everybody)

 

Please help with a script.

I need to filter all NPC with Health 0 for AI fix, game Oblivion.

 

Just filter, no more actions.

Use "Apply custom scripted filter" script as a base.

 

function Filter(e: IInterface): Boolean;
begin
  if Signature(e) <> 'NPC_' then
    Exit;
  
  Result := GetElementNativeValues(e, 'DATA\Health') = 0;
end;
  • Like 1
Link to comment
Share on other sites

 

Use "Apply custom scripted filter" script as a base.

 

function Filter(e: IInterface): Boolean;
begin
  if Signature(e) <> 'NPC_' then
    Exit;
  
  Result := GetElementNativeValues(e, 'DATA\Health') = 0;
end;

Thanks man!

Link to comment
Share on other sites

How do I acquire Tes5Edit 3.1.2? (Yes from here:https://github.com/TES5Edit/TES5EditI know but which file?)

 

Just to let you know before you go and grab it - Its beta ( WIP = Work In Progress )

( though Zilavs WIPs are very reliable in my experience )

 

Its easier than going to github ..

First post of this topic, at the end of the post is a link for xedit [date]

Latest build Zilav needs testing is always at that link

 

First post also tells you what has changed ( since the latest official release which is currently 3.1.1 ) in this WIP

Link to comment
Share on other sites

Just to let you know before you go and grab it - Its beta ( WIP = Work In Progress )

( though Zilavs WIPs are very reliable in my experience )

 

Its easier than going to github ..

First post of this topic, at the end of the post is a link for xedit [date]

Latest build Zilav needs testing is always at that link

 

First post also tells you what has changed ( since the latest official release which is currently 3.1.1 ) in this WIP

Thank you.  

However I seem to be unable to right click on the files in TES5Edit. which makes it impossible for me to 'Apply script'

any idea why this might be?  

.p.s. using MO  

It suddenly started working.

Link to comment
Share on other sites

So this may be totally dumb but I have a small suggestion for the version naming. If you change around the date section just a little bit it becomes a lot easier to manage. The current format is ddmmyy. This isn't bad but you can do it better if you switch around the day and year numbers. Example: TES5Edit_151013. The reason this is better is that the number that changes the most is the day. This way it is much easier to automatically sort versions. For instance I just downloaded TES5Edit_131015, I previously had TES5Edit_180815. Because of the way the numbers are arranged the older version is actually a "bigger" number than the later one. It also makes it really easy to change numbers as all you have to do is change the last two digits. Just my two cents.

 

Also thank you guys so much for all of the work you have put into this tool. I have a crazy Skyrim build that would litterally be impossible with out your efforts! You guys rock!

Link to comment
Share on other sites

The HasMaster scripting function is bugged.

 

The source code for it is:

procedure IwbFile_HasMaster(var Value: Variant; Args: TJvInterpreterArgs);
var
  _File: IwbFile;
begin
  if Supports(IInterface(Args.Values[0]), IwbFile, _File) then
    Value := _File.HasMaster(StrToSignature(Args.Values[1]));
end;

Which is a copypaste error, because the filename is not a signature.

 

Correct code would be:

procedure IwbFile_HasMaster(var Value: Variant; Args: TJvInterpreterArgs);
var
  _File: IwbFile;
begin
  if Supports(IInterface(Args.Values[0]), IwbFile, _File) then
    Value := _File.HasMaster(Args.Values[1]);
end;
Link to comment
Share on other sites

Found another bug.

 

InsertElement uses the 2nd argument both for the element to be inserted and for the index to insert at.  It should use the 3rd argument for the element to insert.

 

procedure IwbContainer_InsertElement(var Value: Variant; Args: TJvInterpreterArgs);
var
  Container: IwbContainerElementRef;
  Element: IwbElement;
begin
  if Supports(IInterface(Args.Values[0]), IwbContainerElementRef, Container) then
    if Supports(IInterface(Args.Values[1]), IwbElement, Element) then
      Container.InsertElement(integer(Args.Values[1]), Element);
end;

 

Should be:

 

procedure IwbContainer_InsertElement(var Value: Variant; Args: TJvInterpreterArgs);
var
  Container: IwbContainerElementRef;
  Element: IwbElement;
begin
  if Supports(IInterface(Args.Values[0]), IwbContainerElementRef, Container) then
    if Supports(IInterface(Args.Values[2]), IwbElement, Element) then
      Container.InsertElement(Integer(Args.Values[1]), Element);
end;
Link to comment
Share on other sites

Found another bug.

InsertElement uses the 2nd argument both for the element to be inserted and for the index to insert at.  It should use the 3rd argument for the element to insert.

Fixed.

  • Like 1
Link to comment
Share on other sites

Got a small problem in need of a fix. If a mod has an unresolved form ID for a subrecord, a mod that comes along and restores the vanilla value will be counted as an ITM even though this is no longer true.

 

Example:

 

post-4-0-13779600-1447045883_thumb.jpg

 

Skyrim.esm and Hearthfires.esm are obviously masters to USLEEP. Yet if I run the cleaning the USLEEP correction gets removed. The unresolved form ID is then left behind as the winning record which is not desirable.

Link to comment
Share on other sites

Got a small problem in need of a fix. If a mod has an unresolved form ID for a subrecord, a mod that comes along and restores the vanilla value will be counted as an ITM even though this is no longer true.

Actually SNAM was marked as benign for conflict resolution for some reason I don't remember.

Uploaded new version.

Since this affects USLEEP which is live now, we probably should update nexus version too, but I first want to hear that it works as intended now.

  • Like 1
Link to comment
Share on other sites

Something I cannot exaplain is happening to me...

 

The EnthirRef (placed NPC 0001C1AA in WinterHoldCollegeHallOfAttainment, 000CAB91) is originially Temporary, but made persistent by Update.esm.

 

I have a mod (namely, Sounds Of Skyrim Cicilization), which also make this actor ref persistent. And this is the only change in the plugin for this record. And it reference Update.esm as Master... but yet, this ref isn't considered as an ITM.

 

 

Any insight ? Could version control info and form version cause this ?

Link to comment
Share on other sites

Actually SNAM was marked as benign for conflict resolution for some reason I don't remember.

Uploaded new version.

Since this affects USLEEP which is live now, we probably should update nexus version too, but I first want to hear that it works as intended now.

Your Google Drive is throwing 502 errors. I'll check this as soon as it lets me download.

Link to comment
Share on other sites

@Arthmoor : I managed to download it early this morning. Mirror here if you wish. Link will be removed as soon as you can confirm you're ok. EDIT : link removed

Link to comment
Share on other sites

Thanks Nico. Got the file. And I can confirm the fix is working as intended.

This version has been released on nexus as the final 3.1.2, all new versions will be Fallout4 related probably. We'll see.

  • Like 1
Link to comment
Share on other sites

Cool deal. Just don't forget about Skyrim because Fallout 4 exists :troll:

 

I did a test load of Fallout4.esm - there's lots of new top level record types as well as several changes to existing ones. Looks like it'll be interesting to try and decode. I'm up to try running that decoder thing if you want, assuming I can remember how :P

Link to comment
Share on other sites

Cool deal. Just don't forget about Skyrim because Fallout 4 exists :troll:

 

I did a test load of Fallout4.esm - there's lots of new top level record types as well as several changes to existing ones. Looks like it'll be interesting to try and decode. I'm up to try running that decoder thing if you want, assuming I can remember how :P

Hlp is taking a look at it right now (the runtime code in the absence of GECK), TES4 header has a huge TNAM subrecord with leftover 4 bytes, some strange stuff.

  • Like 1
Link to comment
Share on other sites

Thanks again Arthmoor but it's best to talk about things here on your site or in my experemental branch.  Utumno liks to keep topics seperate.

 

As far as FO4Edit I'm not too worried about it for the moment.  It's going to be a while before most of the records are fleshed out in the first place because it took Zilav and I a while to get TES5Dump to stop throwing errors.  However, that was just the first phase and basically the records were just a rough draft.  I got some of my eagerness out of my system today working on things.

 

Everything will be fine even if it doesn't happen as soon as everyone (myself included) would like.  This time our team has more records to work with and no CK because the GECK is not out and won't be for a while.  However, that's not really too much of an issue because not only do I have my original partner in crime, I have Hlp who is equally qualified to get FO4Edit up and running.  With his experence working on the script extenders I think it will help in ways Zilav and I didn't have for TES5Edit.  I may be blessed with a gift of a game from Hlp and I have extended my interest but I'm being respectfull of his offer and if it doesn't happen I'm just gonna have to get a copy at a later time.  Then again there is the fact that my LGA 775 Quad core isn't an i5 in the first place.

 

I saw a game comercial for Fallout 4 and yelled out, "Rub my face in it why don't you!" to the TV.  My son yelled down at me and said, "That's for Fallout 4 isn't it?"  There was a moment of silence but he knew the answer.

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