Page 6 of 26

Re: Custom quest support

Posted: Sat Oct 21, 2017 1:32 am
by Interkarma
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 3668 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.

Re: Custom quest support

Posted: Sat Oct 21, 2017 1:36 am
by Jay_H
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!

Re: Custom quest support

Posted: Sat Oct 21, 2017 1:43 am
by Interkarma
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.

Re: Custom quest support

Posted: Sat Oct 21, 2017 5:39 am
by Jay_H
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

Re: Custom quest support

Posted: Sat Oct 21, 2017 5:59 am
by Interkarma
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.

Re: Custom quest support

Posted: Thu Oct 26, 2017 2:52 am
by Interkarma
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. :)

Re: Custom quest support

Posted: Thu Oct 26, 2017 3:00 am
by Jay_H
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.

Re: Custom quest support

Posted: Thu Oct 26, 2017 9:53 pm
by Jay_H
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.

Re: Custom quest support

Posted: Thu Oct 26, 2017 10:15 pm
by Interkarma
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.

Re: Custom quest support

Posted: Fri Nov 03, 2017 9:16 pm
by Jay_H
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.