Need help with modifying TES5 Script (Easy)

Post » Sat Feb 15, 2014 6:50 pm

I recently started using a mod called PC Exclusive Armor Path. Sometime mid-2013 it was redesigned so that NPCs use custom armor that changes into original armor when it enters the player's inventory. This helps improve compatibility, but the problem is the leveled lists need to be modified so they use the custom armor.

Luckily the mod comes with a TES5 script that will create compatibility with mods that do stuff with the leveled lists, replacing the original armor entries with the custom armor entries.

However there's a problem! I have a few mods that modify leveled lists that need to be combined, which means a Bashed Patch. And no matter what way you cut it, a bashed patch is gonna take the original armor entries from the vanilla ESM files.

So I need to modify this script so instead of replacing the entries, it flat out deletes them. Otherwise I'll end up with two sets of the custom armor entries (because they've already been merged).

The full script can be located here in the Miscellaneous section of Files of the mod. The Nexus mod ID is 16815

However the part that actually performs the replace is just this:

//Start replace the itemif (iFormID = GetNativeValue(ElementByIndex(IListSourceVanilla,iMin))) then beginAddMessage('Match found, replacing with ' + GetElementNativeValues(LinksTo(ElementByIndex(IListSourceCustom,iMin)),'EDID'));AddRequiredElementMasters(LinksTo(ElementByIndex(IListSourceCustom,iMin)),ITargetPluginFile,false); //Add the required mastersSetEditValue(ElementByIndex(IOutfitGroupItemContents,0),GetEditValue(ElementByIndex(IListSourceCustom,iMin)));end; //end replace the item

Anyone familiar with TES5 scripting, please take a moment to help me out, thanks.

User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Sat Feb 15, 2014 3:50 pm

Might it be easier to just merge in the changes you want to keep manually?

User avatar
Thomas LEON
 
Posts: 3420
Joined: Mon Nov 26, 2007 8:01 am

Post » Sat Feb 15, 2014 10:00 am

Bashed patches always take the vanilla entries, so getting the vanilla armors in the leveled lists is unavoidable.

User avatar
Kate Norris
 
Posts: 3373
Joined: Mon Nov 27, 2006 6:12 pm

Post » Sat Feb 15, 2014 7:23 pm

I meant with TES5Edit, you could just merge the records into a patch yourself.

User avatar
Melly Angelic
 
Posts: 3461
Joined: Wed Aug 15, 2007 7:58 am

Post » Sat Feb 15, 2014 3:19 pm

That would be mega time-consuming compared just editing one part of a script.

User avatar
luke trodden
 
Posts: 3445
Joined: Sun Jun 24, 2007 12:48 am

Post » Sat Feb 15, 2014 8:03 am

You could try replacing the last SetEditValue(...) line with this instead

RemoveElement(IOutfitGroupItemContents, ElementByIndex(IOutfitGroupItemContents, 0));

But I'm no TESEdit script expert, and hard to tell what's going on without seeing the rest.

User avatar
Fanny Rouyé
 
Posts: 3316
Joined: Sun Mar 25, 2007 9:47 am

Post » Sat Feb 15, 2014 7:18 pm

Alrighty, I'll try it out, thanks.

Wish I could do it now but it's Friday night and I'm heading out. x3

User avatar
Joanne
 
Posts: 3357
Joined: Fri Oct 27, 2006 1:25 pm


Return to V - Skyrim