How to repeat quest stages?

Post » Tue Jun 19, 2012 9:34 pm

I have this script
Event OnInit()	Counter_Property1 = 0	RegisterForUpdate(3)EndEventEvent OnUpdate()	If (Quest_Property.GetStage() == 15)		Counter_Property1 += 3	EndIf	    If (Counter_Property1 == 30)		if(Quest_Property.SetStage(5))			;Actor_OwningScript_Property.EvaluatePackage()			Counter_Property1 = 0			Debug.MessageBox(Quest_Property.GetStage())		else			Debug.MessageBox("Failure")		endif	EndIfEndEvent

All properties have good settings. "Allow repeated stages" is checked.
I have quest stages from 0 to 130 (every 10 and also stage = 5 and stage = 15).
After choosing one topic quest stage is setting from 10 to 15, then starts AI Package with duration = 1h and Condition: GetStage == 15. Then above script count up to 30. If I get Counter_Property1 == 30, script must set quest stage from 15 to 5. Unfortunately script doesn't do it.
It:
if(Quest_Property.SetStage(5))
passes, but this:
Debug.MessageBox(Quest_Property.GetStage())
shows me still 15.
If I set for example 120 instead 5, I get correct quest stage, but I want quest stage less than 15 (in Oblivion I had no problem with repeated quest stages).
How to do it?
User avatar
JeSsy ArEllano
 
Posts: 3369
Joined: Fri Oct 20, 2006 10:51 am

Post » Tue Jun 19, 2012 10:26 am

Because its multithreaded the quest stage may not have changed by the time the next line that checks it runs.

Try putting utility.wait (1) between the set and check.

Also remember to unregistor for updates once your script no longer needs them.
User avatar
Amiee Kent
 
Posts: 3447
Joined: Thu Jun 15, 2006 2:25 pm

Post » Tue Jun 19, 2012 11:32 am

Also you can to put a tick on the quest in the first tab "Repeat Stage"
User avatar
Breautiful
 
Posts: 3539
Joined: Tue Jan 16, 2007 6:51 am

Post » Tue Jun 19, 2012 4:41 pm

It's not working. Still I have 15 instead 5 or 10. Also AI Package of this NPC is not changing (even after 3 hours in game) to another one what confirms that is not working.
Besides as I wrote quest stages higher than 15 (for example 15 to 30, 15 to 120) are working, less than 15 (for example 15 to 10, 15 to 5) - are not.
User avatar
Yonah
 
Posts: 3462
Joined: Thu Aug 02, 2007 4:42 am

Post » Wed Jun 20, 2012 12:47 am

If I'm not mistaken you simply can't go back to previous quest stages.
User avatar
Deon Knight
 
Posts: 3363
Joined: Thu Sep 13, 2007 1:44 am

Post » Tue Jun 19, 2012 7:12 pm

If I'm not mistaken you simply can't go back to previous quest stages.

you can. i have a quest that stays open indefinitely. it only has 2 stages. 0 and 10. 0 is the "active" stage, and 10 is the "idle"


i use multiple quests, that all call on each other, they even read off of each other's scripts. every time one of these other quests calls the first one to go back to 0, it will re-fire the 0 stage and check through the conditions i have on it. after it's done it idles on stage 10 waiting for another quest to reactivate it back to stage 0
User avatar
Mark Hepworth
 
Posts: 3490
Joined: Wed Jul 11, 2007 1:51 pm

Post » Wed Jun 20, 2012 12:36 am

you can. i have a quest that stays open indefinitely. it only has 2 stages. 0 and 10. 0 is the "active" stage, and 10 is the "idle"


i use multiple quests, that all call on each other, they even read off of each other's scripts. every time one of these other quests calls the first one to go back to 0, it will re-fire the 0 stage and check through the conditions i have on it. after it's done it idles on stage 10 waiting for another quest to reactivate it back to stage 0
That's good news :)
User avatar
Javaun Thompson
 
Posts: 3397
Joined: Fri Sep 21, 2007 10:28 am

Post » Tue Jun 19, 2012 12:37 pm

i find that the quests tend to run much smoother if it is broken up into chunks of quests, rather than one huge one. the downside is it becomes a pain to keep track of what is doing what.

for that, i actually use a dry erase board and physically draw out the paths of the quest and all the braches so i can reference it very quickly by looking over.

also keep a pen and note pad handy, and jot all your quick reference notes in it.


relying 100% on the CK or computer in general is asking for trouble
User avatar
Ronald
 
Posts: 3319
Joined: Sun Aug 05, 2007 12:16 am

Post » Tue Jun 19, 2012 8:46 am

I tried to setstage(5) in Fragment Papyrus in stage = 15, but no result.
So for what is "Allow repeated stages"?
If not checked, this
if(Quest_Property.SetStage(5))
doesn't pass and I get Debug.MessageBox("Failure") .
If checked - passes, but I get wrong quest stage (what I see also in AI Package of this NPC).

In Oblivion I had whole quest with repeated stages and I had no problems, and here... I have many.
User avatar
Megan Stabler
 
Posts: 3420
Joined: Mon Sep 18, 2006 2:03 pm


Return to V - Skyrim