Regardless of what happens with that, I recommend adding all the energy weapons to the FLST "ExplodesGasTrapsOnHit", so that they cook off gas leak traps properly now that ElminsterEU has implemented easy FLST merging.
That's a good idea - I wasn't aware of that list.
The exact merging algorithm that's being used is described http://www.gamesas.com/bgsforums/index.php?s=&showtopic=915003&view=findpost&p=14027492. If you look closely you'll see "sorting" mentioned in some places. which is exactly why I need to distinguish between FLSTs that are Sets and Ordered Lists. Without sorting I can't merge in the fashion I do. Which is why I don't touch ordered form lists.
Now, as long as the modification of an ordered list the simple addition of new elements at the end, no reordering or removing of existing entries, I could easily merge that too. Which I think is exactly what you need.
Personally I would highly prefer using module merging over script adding because this makes it possible for someone to SEE how everything works together in FO3Edit. Any additions to lists in scripts are hidden away inside the game engine and any problems are extremely difficult to debug. (At least as long as no one fully decodes the savegame format and writes and editor/viewer for that, which till now hasn't even happened for TES4, much less FO3).
As for automating the creation of all these required records, the best would be if you could provide me with an example .esp that includes basically a single new weapon with all the changed and added records involved in that. Based on that template I can then probably write some code which automates the creation of all the required records and adding them to all required form lists.
I've had a couple of looks at that description, and so far it's pretty much gone over my head. I might have another go later on at bullying my brain into comprehension.
Merging things into the ordered lists in WMK by adding them onto the end sounds perfect - as long as the index numbers match up in the 'paired' lists, of course. I guess if it adds all the new entries from one add-on esp to the lists before going on to any other add-on esps? Like I said, I don't fully understand how it works/is planned to work yet.
Module merging sounds better to me too - for the reasons you describe. I was considering the scripted approach because - well, firstly because I wasn't aware of a 'Bashed-patch-esque' approach being in the works - but also out of concern for the 'average' user. For people who know a bit more about this sort of thing, module merging would probably be better - but if it worked, the script approach would just be 'plug and play'. That's the thing though: 'if it worked' - it does seem more prone to error.
You mentioned you were having a look around in the WMK esp - do you still want a stripped-down example esp? I'd pretty much be ripping stuff out of the WMK esp to achieve that. Also, a couple of things you probably already noticed, but anyway: There isn't a single example of a weapon with
all the mod kits applicable to it. There are five mod kits, but I don't go above four mod kits for any one weapon. There are also examples of weapon that can only have one, two or three kits applied to them.
With this automation process, were you thinking it would also calculate and make the appropriate changes to stats for the weapon variants? Eg: double clip capacity for extended magazines, spread reduced by 33% for laser sights, durability and value increased by 25% for each mod applied to the weapon, etc?
I've just looked through the WMK.esp a bit and I noticed that in many cases the index number of the same part is different between the SI and no-SI versions of the model. It would make auto generation of the records a lot easier if that wasn't the case. So for new models, if at all possible, the SI part should be last in the list so that it doesn't change the index number of the other parts.
I'll admit to not being a complete guru at Nifskope: I don't actually know how to affect what index number a particular part gets in the GECK/FO3Edit. It might be out of my control to some extent, if it depends on the internal structure of the nif file (if, say, the silencer has to be 'attached' to an animated section of the weapon, that might affect the index number it gets). Or it might not - it might be very simple, and I simply haven't come across how to do it. So were you thinking of automating the assigning of 'NullTextureSet' to parts that need to be invisible on a particular weapon?
Edit: Oh yeah - an update on how the... update is coming along, for anyone who's interested: The activation perk works perfectly - both by itself and alongside CRAFT - thanks again for the info on that, ElminsterEU. The custom workbenches are now all gone. I added 'OrderedList' to the end of the formlists that need it, and updated the main script accordingly. Now I'm making some mesh fixes to the laser rifle and laser pistol suggested by MadCat221 (to reflect what's in the unofficial FO3 patch), and I'll also add the appropriate weapons to that 'ExplodesGasTrapsOnHit' list. Maybe I should also add the modified weapons that do fire damage to the 'PerkPyromaniacWeapons' and 'MS10SetHaroldOnFireWeaponsList' lists while I'm at it...