I need to update the factions of 172 base actors entirely in Papyrus. I also need to update the relationships between 77 factions entirely in Papyrus, too. I don't like having 249 overriding records in the plugin because, obviously, that makes my plugin very, very prone to compatibility/interference issues, so I'm taking steps to move all of those changes out of the plugin.
Would something like this work for updating base actors?
Formlist Property BaseActors AutoFormlist Property FactionsToAdd AutoFunction AddFactionsToActors(Formlist FactionsToAdd, Formlist BaseActors) Int iIndex = 0 If BaseActors.GetSize() == FactionsToAdd.GetSize() ; Formlists must be set up as key-value pairs and the same size While (iIndex < BaseActors.GetSize() - 1) Actor currentActor = BaseActors.GetAt(iIndex) as Actor Faction currentFaction = FactionsToAdd.GetAt(iIndex) as Faction currentActor.AddToFaction(currentFaction) EndWhile EndIf iIndex += 1EndFunction
Or should I use quest aliases?