» Mon Nov 19, 2012 10:39 am
Adding all those NPCs to a faction woldn't suppose any problem related to making them friendly each other, as members of the same faction aren't friendly by default. The faction need to be friendly to itself for that. The problem is that you'll need to edit too many NPCs to finally not cover any mod added NPC.
B1gBadDaddy Idea is interesting. Formlists are generally quite slow, but checking if an element is inside one of them is really fast. But for using it, you would need to obtain the membership of a NPC to a faciton without asking for that faction specifically, which is not possible.
I think you'll need to stick to trying to optimize the check for those factions. If you put all the conditions on the same if, they will be checked everitime, while if you use a if, elseif, elseif... structure, once you found a fitting result the structure won't continue executing.
I would recommend you to check in the first if for three of the factions, then for other three on the first elseif and in the third one for the last three. In my opinion is the most efficient way to do it.