Question on Quest Script methods Start() and Stop()

Post » Wed Jun 20, 2012 8:17 pm

Does calling Stop() release all currently assigned Reference Aliases associated with the quest? Does calling Start() flag the manager to start filling these references?


Also, what is the proper way of dealing with Alias References i.e practices that keep your game from crashing saves due to invalid or bad 'dangling' Alias References (if that's even possible). I ask this because a lot of the time my Alias Reference slots are empty and never get filled, and some are filled. I do not know why they never get filled? Does calling clear() stop the alias reference from ever getting refilled?
User avatar
Kayleigh Williams
 
Posts: 3397
Joined: Wed Aug 23, 2006 10:41 am

Post » Wed Jun 20, 2012 3:47 pm

Yes, and yes. This is how you can reload aliases, by making a "Reload aliases" quest, an starting and stopping it whenever you need to get your aliases refilled.
User avatar
darnell waddington
 
Posts: 3448
Joined: Wed Oct 17, 2007 10:43 pm

Post » Wed Jun 20, 2012 7:13 pm

I've had some odd behavior with calling Start() on a quest that I've called Stop() on that Redwood Elf is kind of hinting at, because technically the story manager SHOULD fill the aliases, and if it did so...properly... you wouldn't have to create a Reload Aliases quest. If I call START() on my quest, it does not reload the aliases automatically, even the PlayerRef alias. Additionally, if I have a function in my update that FILLS the aliases, they get filled, but are not reloaded when the game is saved. Alternatively, if I instead drop down to a console and STOP and START the quest, my function(s) fill the aliases and persist in my save game when reloading. I don't know why that is, and would love to get to the bottom of it.
User avatar
Kelly Osbourne Kelly
 
Posts: 3426
Joined: Sun Nov 05, 2006 6:56 pm

Post » Wed Jun 20, 2012 6:03 pm

The Reload Alias quest is to refill aliases WITHOUT stopping the main quest. Aliases will never "Auto-refill" on a running quest (I needed to refill aliases in my http://www.creationkit.com/Creating_Custom_Couriersimplementation, but the courier quest was designed to always be running)

be sure your Refill Aliases quest has "Run once" unchecked. And "Allow repeated stages" couldn't hurt.
User avatar
Bee Baby
 
Posts: 3450
Joined: Sun Jun 18, 2006 4:47 am

Post » Wed Jun 20, 2012 7:05 pm

The Reload Alias quest is to refill aliases WITHOUT stopping the main quest. Aliases will never "Auto-refill" on a running quest (I needed to refill aliases in my http://www.creationkit.com/Creating_Custom_Couriersimplementation, but the courier quest was designed to always be running)

be sure your Refill Aliases quest has "Run once" unchecked. And "Allow repeated stages" couldn't hurt.

What does your refill aliases quest most likely resemble in http://www.gamesas.com/topic/1349649-dynamically-attaching-scripts-to-actors-near-the-player/page__p__20466522__hl__oncombatstatechanged__fromsearch__1#entry20466522 thread? I have an Update quest and a Alias quest like in the guide. Is the Update quest in that guide the Refill quest you use? What are the differences?
User avatar
Rowena
 
Posts: 3471
Joined: Sun Nov 05, 2006 11:40 am

Post » Thu Jun 21, 2012 12:27 am

Also this isn't 100% reliable. Some Actors do not get selected by the quest manager at all. No idea why but I have done numerous tests and certain Actors (conditions are IsActor and IsPlayableRace) simply to not get selected.

Yes, 100% sure not all the slots were filled, again, numerous tests on the same case
Yes, the Actor (Crazed Adventuer) filled all the criteria, I even did runtime checks on the conditions, he passed them all

Works most the time but this technique will fail in certain cases apparently unless someone can enlighten as to why.
User avatar
W E I R D
 
Posts: 3496
Joined: Tue Mar 20, 2007 10:08 am

Post » Wed Jun 20, 2012 9:13 pm

Don't suppose that actor is Reserved by another quest?

Assuming he's a character you made and are accessing, and he fits all the criteria, make sure you have a clean save. Start the game with the mod disabled, make a savegame, then restart the game with the mod turned back on and see if that has any effect.
User avatar
Timara White
 
Posts: 3464
Joined: Mon Aug 27, 2007 7:39 am

Post » Wed Jun 20, 2012 12:24 pm

What does your refill aliases quest most likely resemble in http://www.gamesas.com/topic/1349649-dynamically-attaching-scripts-to-actors-near-the-player/page__p__20466522__hl__oncombatstatechanged__fromsearch__1#entry20466522 thread? I have an Update quest and a Alias quest like in the guide. Is the Update quest in that guide the Refill quest you use? What are the differences?

Well no Refill quest is going to be the same as any other, since the aliases will be different, most likely. Borgut is reloading the aliases constantly, which is probably unnecessary.

Similar method though...except mine stores the alias references in properties once they're loaded for easy access.
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm

Post » Wed Jun 20, 2012 5:26 pm

Don't suppose that actor is Reserved by another quest?

More than likely that would be why. No workarounds I assume?

My mod I am working on used this method of script attachment to Actors around the player, and some (probably reserved NPCs) failed to become an Alias. So I have a backup script that is slower but will handle this case. I am going to make a post in my thread about this, actually in a minute lol
User avatar
Terry
 
Posts: 3368
Joined: Mon Jul 09, 2007 1:21 am

Post » Wed Jun 20, 2012 10:20 am

More than likely that would be why. No workarounds I assume?

The workaround would be to check "Allow Reserved" on the quest you're having trouble with.
User avatar
Jack
 
Posts: 3483
Joined: Sat Oct 20, 2007 8:08 am

Post » Wed Jun 20, 2012 10:23 am

The Reload Alias quest is to refill aliases WITHOUT stopping the main quest. Aliases will never "Auto-refill" on a running quest (I needed to refill aliases in my http://www.creationkit.com/Creating_Custom_Couriersimplementation, but the courier quest was designed to always be running)

be sure your Refill Aliases quest has "Run once" unchecked. And "Allow repeated stages" couldn't hurt.

Understood. My point, not very well made, is that even using a method to auto-refill the aliases isn't fool proof unless you take the action you later suggested. I have had a method to auto-refill my aliases since nearly day one, but if the quest is stopped and started via script, even though the aliases are refilled, they are not persisted on save afterwards. However, if you stop and restart the quest via console, they are. Just to mention the workaround that you suggested to me in another thread (and should work but I haven't had a chance to try...and looks like you suggested it here too) was to store the .... object references/actor references etc,. that needed to be restored in the aliases in script properties which should be persisted on save and then make sure your auto-refill kicks off and refills the aliases with those. I just personally think it's interesting that there's a distinct difference in the way aliases are persisted through saves if the quest is STOPPED and STARTED via papyrus script vs. the console. Ultimately I guess it's moot, but it does seem odd that we have to handle it this way. And in case the above is taken out of context, I thoroughly appreciate the help you've provided on this!!!

-MM
User avatar
Rach B
 
Posts: 3419
Joined: Thu Mar 08, 2007 11:30 am


Return to V - Skyrim