Category talk:Story Manager

From the CreationKit Wiki
Jump to navigation Jump to search

I was having a great deal of trouble getting a quest to repeat. That quest was flagged for Skill Increase. The event node was set up properly and the Story Manager would start the quest on the first skill increase only. Subsequent skill incrrease did not cause the quest to repeat. I tried all kinds of different permutations of settings, none of them worked.

After looking at several vanilla quests and scripts, I discovered something that needs confirmation.

It seems that if you use a repeatable event in a quest script, in order to have the Story Manager actually start the quest again, you must stop the quest. In the script or in the last quest stage be sure you include:

stop()

I was able to reproduce this behavior by changing WIChangeLocation01 (normally not repeatable) to be repeatable in xEdit. The quest repeats for a while, but after an indeterminate number of repetitions bugs out in the same way as described by the previous commenter. Stopping the quest in the console via stopquest immediately allowed the quest to resume normal behavior on the next location change.
I fixed the issue for this quest by adding an OnStoryChangeLocation event to WIChangeLocation01Script, and calling Utility.Wait(10.0) followed by Stop() within that event (without the wait, the quest stops before it can actually do anything). The exact trigger for this bug remains unknown: the quest DOES repeat correctly for a while, but then mysteriously breaks.