Custom quest support

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

Re: Custom quest support

Post by Interkarma » Sat Oct 21, 2017 1:32 am

That's perfect thank you! :)

The good news is the player was absolutely transferred to a normal quest marker (marker 0 in the dungeon). My implementation of the teleport action also transports player to marker 0. So all else being equal, if this same quest selects this same dungeon, player would have ended up in exact same spot. This means the teleport action works at least as well as classic.
marker.jpg
marker.jpg (64.48 KiB) Viewed 992 times
As for starting inside a cage, still not sure how Daggerfall handles this - if at all. It could be explicit (some unknown flag in the flat data), or implicit (marker is never a trapped position by design), or just not handled at all (probable knowing DF).

The only way to really know is spin the quest start over and over in both classic and DFUnity and see if neither, either, or both can trap the player on teleport.

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

Re: Custom quest support

Post by Jay_H » Sat Oct 21, 2017 1:36 am

That sounds like my kind of fun! :D As soon as I roll some very bad situation I'll bring it here.

Just as a side note: that is so awful. Daggerfall teleports you to the bottom of a closed chute? Really!
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

User avatar
Interkarma
Posts: 2959
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma » Sat Oct 21, 2017 1:43 am

Daggerfall can be a horrible friend sometimes :lol:

I literally have no idea how player is supposed to escape that situation in classic either. It makes me think the cage thing might not be handled either.

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

Re: Custom quest support

Post by Jay_H » Sat Oct 21, 2017 5:39 am

I made the teleport cage happen in classic and in DFU.

Classic
DFU

It looks like in some cases they contemplated it (in another dungeon I managed to move two hanging tapestries out of my way to come free, which I didn't know could happen), but the cages are truly a blind spot. Would making the PC thin enough to pass through metal bars be a meaningful solution? It wouldn't resolve the chute problem we saw above, but it would help this one. Or another is to just make the bars intangible, period.

My testing with the teleport command suggests there is one teleport marker in each dungeon you can be sent to in DFU, whereas in classic it's randomly chosen. I can't duplicate the above DF teleport cage in DFU because in DFU, Ruins of Caact's Guard (Kairou) won't trap the PC in the cage, as far as I tested.

Teleport test quest
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

User avatar
Interkarma
Posts: 2959
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma » Sat Oct 21, 2017 5:59 am

Thank you for taking the time to test. Good to know the problem exists in both classic and DFU.

I'd rather not make player capsule any thinner. It's already quite thin and capable of fitting through some bars already. Any thinner and player can become trapped behind objects placed too far out from wall (tapestries and the like).

In regards to marker selection, I'm just using marker 0 for now. Will change this to select a random quest marker.

I don't have a good general solution right now. At least player can workaround by pointing crosshair at floor outside of cage and using "teleport" console command. It's not perfect, but better than classic at least.

User avatar
Interkarma
Posts: 2959
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma » Thu Oct 26, 2017 2:52 am

Jay, I'm about to merge changes to support quest condition "dropped anItem at aPlace". This condition will trigger parent task when player drops item at the correct location. Here's a high-level overview:
  • Normally DaggerfallUnity will disallow dropping of quest items.
  • However, the "drop anItem at aPlace" condition will allow item to be dropped only when player in correct location. This should limit ability for player to lose an important quest item, which I don't see as a feature.
  • Limitation: dropped quest items show as a normal loot container, not as "themselves" like injected quest items.
  • Experimental: the owning task should switch back off if player picks up item again.
That last point should allow for both classic behaviours and some extended quest support. For example, an urn which acts as an "undead beacon" summoning skeletons while placed upon the ground in a holy site. The player must kill their quota of skeletons to prove themselves worthy, then return beacon at end of quest.

I still need to test this action across a few quests. It will be in next build, but consider this condition very beta for now. Let me know how you go once you have a chance to play with it. :)

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

Re: Custom quest support

Post by Jay_H » Thu Oct 26, 2017 3:00 am

Yay! :) I have one already in mind for when that comes around.

I'm writing a quest that uses the chaining quest timers, so soon we'll get to see how that works too. I hope to plow through some of the initial roadblocks so it's all clear when more writers come along.
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

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

Re: Custom quest support

Post by Jay_H » Thu Oct 26, 2017 9:53 pm

Once we're much closer to 1.0, what would you think about creating a system, like the main quest, where quests can alter variables among one another? DF main quest can judge conditions among various quests as roadblocks and permission points. I'd make a minor suggestion for that once all other priorities are out of the way.
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

User avatar
Interkarma
Posts: 2959
Joined: Sun Mar 22, 2015 1:51 am

Re: Custom quest support

Post by Interkarma » Thu Oct 26, 2017 10:15 pm

Quests can only change values amongst each other using links to global variables. It should be reasonably simple to extend this to allow script author to register their own unique globals. It has implications with execution order (as current globals are pre-defined), but can design around that.

In the interim, there are several unused globals you could snag. But this always opens up the chance of conflict with another custom quest script using the same globals.

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

Re: Custom quest support

Post by Jay_H » Fri Nov 03, 2017 9:16 pm

For some reason I can't get item use triggers to function. I'm trying one now:
_tele1a_ task:
_mark1_ used do _tele1b_

_tele1b_ task:
say 1040
teleport pc to _res1_
take _mark1_ from pc
get item _mark2_
Neither using nor equipping the item makes the task happen.
**INDEFINITE HIATUS** Check out the Daggerfall Unity mod page on ModDB.

Post Reply