Double quest reward

Discuss Daggerfall Unity and Daggerfall Tools for Unity.
Post Reply
Ommamar
Posts: 541
Joined: Thu Jul 18, 2019 3:08 am

Double quest reward

Post by Ommamar »

During my play session tonight I got a quest from the fighters guild to kill a Spriggan, it was on a platform so I got to practice my archery without worrying about it smacking me around. When I hit it I got an offer to do a quest for it to stop the wood cutters from destroying it's sapplings. Unfortunately the strike I connected with killed it, I decide to continue to do what it asked me as the quest from it was still in the log as well as the kill quest. I went to the town and found the guy who agreed to not harvest anymore sapplings. When I went to turn the quest in I got a reward for both the kill and completing the Spriggan's quest. I didn't think much of it as both where listed in the log, the next quest was to recharge a item for the temple of Stendarr. After wandering in the dungeon the item charged like it has before but when I turned the quest in I got two text blocks with the completion text with each giving me a piece of clothing. This one made no sense to me as it was only one item and the quest only had the one part to it.

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

Re: Double quest reward

Post by Jay_H »

Yes, that's definitely an issue with the quest engine and not the quest. You properly identified that the temple quest has only one victory condition. The spriggan one does as well:

Code: Select all

_normalvict_ task:
                when _qgclicked_ and _S.01_
	say 1003
                start task _victory_

Code: Select all

_S.07_ task:
	clicked npc _woodsman_
                say 1023 
	change repute with _woodsman_ by +10 

_S.08_ task:
	when _qgclicked_ and _S.07_ 
	say 1025 
	start task _victory_

Code: Select all

_victory_ task:
	give pc _gold_ 
                start timer _end_
	end quest 
So "victory" can happen as a result of either or both paths, but it'll only happen once. DFU doesn't allow a task to repeat itself if two distinct events both trigger it.

The temple quest in reference, JHTP008, does something unique:

Code: Select all

_victory_ task:
    when _qgclicked_ and _finish_
    give pc _mclo_
    give pc _fclo_
    end quest
It does give you two items, one male clothing and one female, but the victory text should only appear once. Text boxes in DFU are hard-coded to only ever appear one time per quest.

Ommamar
Posts: 541
Joined: Thu Jul 18, 2019 3:08 am

Re: Double quest reward

Post by Ommamar »

I see what the code is saying, that wasn't the result that occurred. On both occasions there was two text boxes giving the reward both times. The one for the temple makes sense but the items given where sandals and a plain robe which I believe can be used by both male and female characters.

As for the spriggan quest it seemed triggered on a successful hit which in that case was a lethal one, maybe an adjustment for a flag to check if the target was alive before the quest fires as the quest text seemed to occur before the calculations for the hit results occurred.

I will try to replicate it but not sure if it will be possible. I am leaning more and more to recording my play session so when odd things happen we can at least see the result that occurred. Not as helpful as actual code in a save to step through but at least it will give an idea of what is occurring.

Post Reply