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.