Chaining Quest Timers

For all talk about quests. Creating, testing, bugs, and development progress.
Post Reply
User avatar
Interkarma
Posts: 3193
Joined: Sun Mar 22, 2015 1:51 am

Chaining Quest Timers

Post by Interkarma » Thu Oct 05, 2017 3:33 am

This is a new bit of script support I had to build for Sx012. It allows quest author to set a one-way clock timer based on distance to target from wherever player is at the time clock is started.

To use this, create a Place resource and Clock resource like so:

Code: Select all

Place _palace_ remote palace
Clock _2palace_ 00:00 0 flag 1 range 0 2
Note how the inner part of both symbols is just "palace". When creating a Clock resource with a 00:00 time value and the _2 prefix, the actual time is calculated as a one-way cautious trip to destination from wherever player is when clock is started.

If there is any text associated with the Clock, be sure to start the timer running before emitting any text:

Code: Select all

_S.03_ task:
	clicked npc _dispatcher_ 
	start timer _2palace_ 
	log 1011 step 1 
	say 1020
This would allow quest author to chain together timers from A -> B -> C and set appropriate travel time from point-to-point, even with random locations, as the travel time is only computed when the Clock is started.

It might also be a good idea to give player an extra bit of time at the other end. Sx012 does this by first starting the _2palace_ timer. When _2palace_ runs out, its target task starts another 2-day (fixed) timer and creates an NPC. When the fixed timer runs out, quest will end. This gives player another 2 days on top of their travel time to complete task at that location.

Code: Select all

_2palace_ task:
	start timer _S.07_ 
	place npc _messenger_ at _palace_ 

User avatar
Jay_H
Posts: 1437
Joined: Tue Aug 25, 2015 1:54 am

Re: Chaining Quest Timers

Post by Jay_H » Thu Oct 05, 2017 3:36 am

This is awesome! This'll be a great improvement on what I've been doing! Thank you! :D
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

User avatar
Midknightprince
Posts: 677
Joined: Fri Aug 11, 2017 6:51 am
Location: San Antonio TX
Contact:

Re: Chaining Quest Timers

Post by Midknightprince » Thu Oct 05, 2017 4:53 am

The man is a genius :D
Check out my YouTube Channel!

User avatar
Jay_H
Posts: 1437
Joined: Tue Aug 25, 2015 1:54 am

Re: Chaining Quest Timers

Post by Jay_H » Fri Mar 23, 2018 7:11 pm

By the way, is there any existing explanation on how the timer variable works? I've just been copying and pasting up until now, but sometimes the time limits are really strict and other times more lenient. I don't know what the flag and range factors are.
Check out the Daggerfall Unity mod page on ModDB.

I rarely read instructions well the first time. Tell me to re-read them. I'll do it.

Post Reply