Filling a ReferenceAlias with many different actors?

Post » Tue Jun 19, 2012 10:27 pm

My quest script uses a referencealias frequently throughout the script. This referencealias has a custom script on it that is very important to the quests functionality. Currently, I have it set up as a property within the script. However, I fill this reference multiple times with many different references. That is to say, I'm constantly swapping out the alias for different actors. It wouldn't be uncommon for the user of my mod to repeat this over 100 times. I worry about the whole "property persistence" issue that the wiki mentions.
When a script property is pointed at a reference in the editor, the target reference will be flagged as "permanently persistent". In other words, nothing you do during runtime will unload the object. This means that, if possible, you should not use properties to point at references directly. If you can, pull references in from events or other locations to avoid permanently keeping them around. Even if you reassign a value to your property while the game is running, the original reference will stick around.
And then Later,
Avoid properties to references if possible
Now, because I'm working with a referencealias, I wonder if this is still an issue. If I'm interpreting the wording correctly, the "ReferenceAlias Reference" will be persistent forever. However, the referencealias, by default, is just a "reference" to the quest alias within the quest, is it not? It's also not automatically filled with a reference (if that matters). But I do end up filling it with multiple references. Does each reference I fill it with stay persistent? Or am I amble to keep my script as-is with no issues?

If this does make all of the references persistent, then I think I need to change my script. This would mean that I need to fill my referencealias with the associated quest alias. How would I do this? referencealias's are kind of weird and confusing to me to be honest. I don't know how I'd be able to "assign it" to the quest alias, and then fill it without messing that up.
User avatar
Rachel Cafferty
 
Posts: 3442
Joined: Thu Jun 22, 2006 1:48 am

Post » Tue Jun 19, 2012 10:36 am

From the quotes you've pulled from the wiki, I don't think what you're doing will be a problem. It's talking about if you set up a property that is manually set to point to a particular reference in the Creation Kit, which isn't something you've mentioned having done.

Cipscis
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Tue Jun 19, 2012 6:39 pm

From the quotes you've pulled from the wiki, I don't think what you're doing will be a problem. It's talking about if you set up a property that is manually set to point to a particular reference in the Creation Kit, which isn't something you've mentioned having done.

Cipscis
Well, I do, technically. The reference I point it to within the editor is my "Quest Alias".
User avatar
Brooks Hardison
 
Posts: 3410
Joined: Fri Sep 07, 2007 3:14 am

Post » Tue Jun 19, 2012 8:51 pm

An alias isn't a reference, though - it only points to a reference, and a pointer like that can't be persistent.

If this caused permanent persistence, I'd be incredibly surprised and I'd consider it a bug. If you like, you could test whether or not it does make them permanently persistent by calling http://www.creationkit.com/Delete_-_ObjectReference on them, which will delete them as soon as they're no longer persistent.

Cipscis
User avatar
Sebrina Johnstone
 
Posts: 3456
Joined: Sat Jun 24, 2006 12:58 pm

Post » Tue Jun 19, 2012 4:36 pm

An alias isn't a reference, though - it only points to a reference, and a pointer like that can't be persistent.

If this caused permanent persistence, I'd be incredibly surprised and I'd consider it a bug. If you like, you could test whether or not it does make them permanently persistent by calling http://www.creationkit.com/Delete_-_ObjectReference on them, which will delete them as soon as they're no longer persistent.

Cipscis
Hmm, alright then, thanks.
User avatar
Pat RiMsey
 
Posts: 3306
Joined: Fri Oct 19, 2007 1:22 am


Return to V - Skyrim