Code Serpent Posted November 4, 2020 Posted November 4, 2020 So, dealing with non-unique npcs is currently a massive hassle for mod-makers. AI-packages, faction relations, outfits, aggressiveness, and so on all need to be adjusted in a very heavy-handed way, making it incredibly hard to make use of all the pretty bandits roaming about. A lot of the hassle is that most non-unique npcs aren't designed to be used outside of a combat scenario. The simplest way to get around this would be to edit the npcs ActorBase form, but because they aren't unique, any edits to one instance of a bandit will change a lot of other bandits as well. However, I think I've come across a way to circumvent this. Instead of trying to edit the hostile actorbase found in Skyrim, we can take a copy of their appearance and abilities, and make a new instance of them. The way to do this is very involved, so I've included a test mod that has the basic scripting to show what I mean. If a modder wants to copy a non-unique npc, they call "GetLeveledActorBase" on the npc, and use the "AddForm" function to add that base to a LeveledActor form. That LeveledActor form is set as the template of another ActorBase form. This new ActorBase can then be placed using a quest alias or the "PlaceAtMe" function. The template flags can be set such that this new actorbase has all the abilities and the appearances of the original, but with different faction relations and ai behavior. Also, this copy can be modified without changing any of the originals. I haven't done extensive testing, so I'd like others to try to expand on what can be done with this system, and if there are any major issues with it. I've already discovered attempting to place the copy when the original is no longer in memory causes a crash, but I imagine that's not the only thing that could go wrong here. copy actor test.rar
Recommended Posts
Archived
This topic is now archived and is closed to further replies.