Filling aliases with a script?

Post » Fri Jan 09, 2015 2:01 am

Hi there! I posted this on my previous thread, but since it was about something else, I though it'd be better to simply make a different thread.

So, to keep things short, I'm trying to create a mod that clones a dead NPC into a new follower. Since I can't just make a copy of all NPCs in the game to have a mod-ready one to swap, what I'm doing is to pop a clone using the base actor of the NPC and then tweak it accordingly to make it follower-ready.

For now, the idea would be to use a spell to clone the NPC, and then add it to the mod's quest aliases to give all the required tweaks (for example, make it non-aggressive, keep track of it, give the proper dialogue, etc). So, since I'm really noob at this, I'm probably making a very silly mistake, but my problem is that the alias is getting reset everytime I reload the save.

All I got for now is a quest with nothing else on it except an alias, which was also left with default settings except for packages to disable aggro. On the spell script, I simply use a "ForceRefTo()" function to said alias to set the creature to it. I know that the function is working, because the creature acts as it's supposed to given the new package. I also know that the creature persists, it always has the same id, but even so, when I reload the game the alias is empty. I know it's not just that the alias is pointing to the wrong ID, it's basically pointing to "None", and all I did was to reload.

So what should I do to keep the alias filled? I know I could make an aditional list of IDs to keep track of them, but I'm assuming here that the aliases shouldn't just reset on reload even if they were set externally. Am I mistaken?

User avatar
Jeff Tingler
 
Posts: 3609
Joined: Sat Oct 13, 2007 7:55 pm

Return to V - Skyrim