Reference Alias - "To force or not to force" - that'

Post » Sun Nov 18, 2012 12:49 pm

Hi fellow modders

For some time I'm having this dilema, should I force some references or not? In the wiki it states that:

http://www.creationkit.com/Reference_Alias

A specific reference is assigned to this alias. Note that this makes that reference permanently persistent (always loaded in memory), even when this quest is not running. This can eventually cause performance issues, particularly with actors.

But when you look to Bethesda quests, plenty of them use this forced system, another problem are all things not actors, like for example triggers boxes. In order to use Location Alias Reference one should create plenty of Location Ref Type's because if for example one have 2 trigger boxes in the same location, both need different Location Ref Types or else alias fill is going to fail.

So, should one use forced reference for other things that aren't actors or does it consume too much memory? Or should everything be done with Location Ref type?

To force or not to force, that is the question.
User avatar
mishionary
 
Posts: 3414
Joined: Tue Feb 20, 2007 6:19 am

Post » Sun Nov 18, 2012 11:02 pm

Sometimes I think all of this sort of stuff just adds more complexity to modding, when the effects of "not doing it right" are not as bad as it might appear they are.

I guess, technically, you should only use a persistant reference when you are going to make lots and lots of (future) use of that character/alias. If it is just a brief walk-on-part you should probably use Properties, instead of aliases

... but, like I said, it will probably make so little difference to saved-game sizes - and compatability with other mods/vanilla - that it isn't really worth all of the worry (in my opinion). Especially if it prevents people releasing their stuff.
User avatar
Rebekah Rebekah Nicole
 
Posts: 3477
Joined: Fri Oct 13, 2006 8:47 pm

Post » Sun Nov 18, 2012 8:30 pm

I never thought about that to be honest. I always use ref alias and link to a specific actor or specific reference.

Not sure if it matter but I've started actually stopping Stop() my quests when they're complete. So that aliases are cleared. Whether it makes a difference I don't know lol.
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Sun Nov 18, 2012 10:51 pm

I guess, technically, you should only use a persistant reference when you are going to make lots and lots of (future) use of that character/alias. If it is just a brief walk-on-part you should probably use Properties, instead of aliases

Don't properties for actors also make them persistent?
User avatar
Kira! :)))
 
Posts: 3496
Joined: Fri Mar 02, 2007 1:07 pm

Post » Sun Nov 18, 2012 2:59 pm

I never thought about that to be honest. I always use ref alias and link to a specific actor or specific reference.

Not sure if it matter but I've started actually stopping Stop() my quests when they're complete. So that aliases are cleared. Whether it makes a difference I don't know lol.
From everything I've been able to tell, this is what you should be doing - calling stop(). A forced reference the way that wiki page describes is only persistent while the quest is running. I've verified this countless times during the work on Open Cities. As soon as the quest is shut down, you can make all the changes you want to a reference and they'll show up as expected. Not before.

Don't properties for actors also make them persistent?
Yes. Setting something as a property in a quest makes it eternally persistent, even beyond the conclusion of a quest. So I think the wiki page may have this backward. You can't move any records that are used as properties in ANY script, the changes simply won't take.
User avatar
Isabella X
 
Posts: 3373
Joined: Sat Dec 02, 2006 3:44 am

Post » Mon Nov 19, 2012 1:27 am

Not exactly true -- you can edit properties, but you have to change them as though you were changing a script's variables.

(SomeQuest as SomeQuestScript).ThisProperty = ThisOtherProperty

You can do that for pretty much any script attached to anything (quest, reference, alias, etc.), but it'll be really tedious if you intend to make a bunch of changes to vanilla properties.

Now, if you mean changing the properties by editing the quest, alias, or whatever itself, those changes won't take effect if the quest's been started.
User avatar
Alexandra Louise Taylor
 
Posts: 3449
Joined: Mon Aug 07, 2006 1:48 pm

Post » Sun Nov 18, 2012 11:37 pm

Not exactly true -- you can edit properties, but you have to change them as though you were changing a script's variables.

(SomeQuest as SomeQuestScript).ThisProperty = ThisOtherProperty

You can do that for pretty much any script attached to anything (quest, reference, alias, etc.), but it'll be really tedious if you intend to make a bunch of changes to vanilla properties.

Now, if you mean changing the properties by editing the quest, alias, or whatever itself, those changes won't take effect if the quest's been started.

Arthmoor is not talking about properties in the script, he's referring to the world objects the properties point to. You can't edit any of them because of the persistence flag being set, so any changes made to them simply won't happen.
User avatar
Catharine Krupinski
 
Posts: 3377
Joined: Sun Aug 12, 2007 3:39 pm

Post » Sun Nov 18, 2012 4:38 pm

What Thomas said. I was referring to actually moving the object reference the property points to. Anything assigned as a property in a script is permanently persistent for the life of the game, whether or not the quest was started.

A forced reference alias only asserts the persistent status while the quest is active. It's a MAJOR difference, and most likely the reason Bethesda violated their own advice, because once the alias is emptied, you can move the target around freely. Which means the persistence is lost, and therefore NOT consuming the memory they say it is.
User avatar
Talitha Kukk
 
Posts: 3477
Joined: Sun Oct 08, 2006 1:14 am

Post » Sun Nov 18, 2012 7:02 pm

Just for the sake of my poor old brain ...
  • An actor assigned to a property in a quest makes (the reference to) that actor persistant "forever"
  • An actor assigned as a alias (forced only???) makes (the reference to) that actor persistant only while that Quest is running
(Which is backwards to what the dear old wiki says, as noted by Arth and others, up above).





If this is true, the wiki needs an edit ... because world+dog will almost certainly be getting it backwards
User avatar
Rude Gurl
 
Posts: 3425
Joined: Wed Aug 08, 2007 9:17 am

Post » Sun Nov 18, 2012 5:22 pm

Just for the sake of my poor old brain ...
  • An actor assigned to a property in a quest makes (the reference to) that actor persistant "forever"
  • An actor assigned as a alias (forced only???) makes (the reference to) that actor persistant only while that Quest is running
(Which is backwards to what the dear old wiki says, as noted by Arth and others, up above).
Correct, and it doesn't actually matter what kind of alias it is. An alias is, at least as far as I've seen, always temporary unless the quest is one that never shuts down.
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Sun Nov 18, 2012 6:00 pm

Thanks for all the replies.

Tell me something then, when a quest is completed should I stop it anyways?
User avatar
Brandi Norton
 
Posts: 3334
Joined: Fri Feb 09, 2007 9:24 pm

Post » Sun Nov 18, 2012 10:54 pm

Thanks for all the replies.

Tell me something then, when a quest is completed should I stop it anyways?

A completed quest will still show as Running if you use an SQV command.
User avatar
krystal sowten
 
Posts: 3367
Joined: Fri Mar 09, 2007 6:25 pm

Post » Sun Nov 18, 2012 3:17 pm

A completed quest will still show as Running if you use an SQV command.

Wow, that is some important news. So, in order to not mess with player notifications (quest completed, etc), when is the best moment to stop the quest? In the quest stage tab? Won't this mess with notifications and stuff?

Thanks.
User avatar
Heather Stewart
 
Posts: 3525
Joined: Thu Aug 10, 2006 11:04 pm

Post » Sun Nov 18, 2012 11:56 pm

Wow, that is some important news. So, in order to not mess with player notifications (quest completed, etc), when is the best moment to stop the quest? In the quest stage tab? Won't this mess with notifications and stuff?

Thanks.

I just thought of stopping because I've started using quests that run a script on the Player as an alias, and also started using GetQuestRunning conditions. In the final stage for the completed quest, after all my scripts, I just use Stop()

This then stops the quest, and removes any aliases and stuff. That's what I've found anyway.
User avatar
Claire Jackson
 
Posts: 3422
Joined: Thu Jul 20, 2006 11:38 pm

Post » Sun Nov 18, 2012 1:33 pm

Ok thanks, I have to do some tests so I find the perfect time to stop a quest.
User avatar
matt
 
Posts: 3267
Joined: Wed May 30, 2007 10:17 am

Post » Sun Nov 18, 2012 4:27 pm

That's the best way mate just play around with it :)
User avatar
Brentleah Jeffs
 
Posts: 3341
Joined: Tue Feb 13, 2007 12:21 am

Post » Sun Nov 18, 2012 3:55 pm

Usually the best place to call stop() is in your final stage where you notify the player that everything is over and done with. Something not even Bethesda did in all cases.
User avatar
dean Cutler
 
Posts: 3411
Joined: Wed Jul 18, 2007 7:29 am

Post » Sun Nov 18, 2012 8:38 pm

Does stopping a quest in the same quest itself do anything odd? That just makes me think there would be some odd conflict...
User avatar
SiLa
 
Posts: 3447
Joined: Tue Jun 13, 2006 7:52 am

Post » Sun Nov 18, 2012 7:58 pm

Usually the best place to call stop() is in your final stage where you notify the player that everything is over and done with. Something not even Bethesda did in all cases.

I see, but will the player receive the end notifcation anyways? Thanks.
User avatar
x a million...
 
Posts: 3464
Joined: Tue Jun 13, 2006 2:59 pm

Post » Sun Nov 18, 2012 3:30 pm

The very last, last, last line of script in your Quest should be a Stop()

(note: depending on your quest design - multiple paths through it - you may need more than one Stop() ... )

You can set a stage as the Completed Stage, which is where your player gets his final "thanks for playing" notifications. So the Stop() goes in that stage (at the end of any other scripting in that stage)
User avatar
Jodie Bardgett
 
Posts: 3491
Joined: Sat Jul 29, 2006 9:38 pm

Post » Sun Nov 18, 2012 11:39 pm

I see, but will the player receive the end notifcation anyways? Thanks.
Yes, so long as you have the "complete quest" box checked it will notify them that it's been completed and mark is as such in their journal.

A lot of the ones Bethesda left open don't need to be either and as they're found I'm closing them off in the USKP. Saves memory that way.
User avatar
Christine
 
Posts: 3442
Joined: Thu Dec 14, 2006 12:52 am

Post » Sun Nov 18, 2012 3:51 pm

The very last, last, last line of script in your Quest should be a Stop()

(note: depending on your quest design - multiple paths through it - you may need more than one Stop() ... )

You can set a stage as the Completed Stage, which is where your player gets his final "thanks for playing" notifications. So the Stop() goes in that stage (at the end of any other scripting in that stage)
Yes, so long as you have the "complete quest" box checked it will notify them that it's been completed and mark is as such in their journal.

A lot of the ones Bethesda left open don't need to be either and as they're found I'm closing them off in the USKP. Saves memory that way.

Thanks for the info guys, I appreciate it.
User avatar
Hussnein Amin
 
Posts: 3557
Joined: Sun Aug 05, 2007 2:15 am


Return to V - Skyrim