Custom quest support

For all talk about quests. Creating, testing, bugs, and development progress.
imsobadatnicknames
Posts: 9
Joined: Sun Jun 02, 2019 4:28 pm

Re: Custom quest support

Post by imsobadatnicknames » Wed Jun 05, 2019 2:39 am

I'm sorry that I'm asking for help so often but I'm having a problem with the painting quest :oops: . It just doesn't show up no matter how many times I press the "Get Quest" button (I made it a non-member quest at the fighters guild for the sake of testing) and sometimes I will get messages along the lines of "Yah, I had work, but the situation resolved itself, thanks anyway" or stuff like that which I guess it's where my quest was supposed to show up but something in the code is preventing it from being used?

Here's the code:

Code: Select all

Quest: QUEST3
DisplayName: Ye olde switcheroo
-- Message panels
QRC:

QuestorOffer:  [1000]
<ce>         _richdude_, some rich fellow, has just gotten 
<ce>         himself an expensive painting that would sell
<ce>         for a really juicy price in the black market.
<ce>		Do you want to help us get it? There's
<ce>		=reward_ gold in it for you if you accept.

RefuseQuest:  [1001]
<ce>		I could've sworn you were smarter than this.
<ce>		It was such easy money...  

AcceptQuest:  [1002]
<ce>	Very well, listen, %pcf. We don't want 		 
<ce> 	_richdude_ to notice his precious painting is missing.	
<ce>	I have commissioned _painter_ over at 
<ce>	___house2_ to create a copy.
<ce>	I will give you =timer_ days to pick up
<ce>	the copy and come back to %cn to 
<ce>	swap it with the original over at
<ce>	_house1_. Once you have swapped 
<ce>	the paintings, bring the original to me.	

QuestFail:  [1003]
<ce>               

QuestComplete:  [1004]
<ce> 	Beautiful, isn't it? 
<ce>	Here´s your =reward_ gold.

Message:  1030
%qdt:
 The Thieves Guild of
 ___questgiver_ has sent me to
steal a painting from _richdude_
at _house1_.
First I have to pick up a falsified copy
from _painter_ at ___house2_.
Then I should come back to
___questgiver_ and swap the original 
with the copy.
I should get back to the guild 
in =timer_ days with the original painting.

Message: 1020
<ce>	You're %pcf, right? Here is the painting 
<ce>	that_questgiver_ commissioned.     

Message: 1021
<ce>	You put the fake painting in place.       

QBN:

Item _reward_ gold
Item _fake_ painting
Item _real_ painting
Person _questgiver_ group Questor male
Person _richdude_ group Noble male
Person _painter_ group Resident1 male
Place _house1_ local house1
Place _house2_ remote house1
Clock _timer_ 00:00 0 flag 17 range 0 2


--	Quest start-up:
	start timer _timer_
	log 1030 step 0
	place npc _richdude_ at _house1_
	place npc _painter_ at _house2_
	have _fake_ set _havefake_
	have _real_ set _havereal_

_havefake_ task:

_havereal_ task:

_dropitem_ task:
	dropped _fake_ at _house1_
	say 1021

_painterclicked_ task:
	clicked npc _painter_
	say 1020
	get item _fake_
	
_qgclicked_ task:
	clicked npc _questgiver_
 
_victory_ task:
	when _dropitem_
	when _qgclicked_ and _havereal_
	give pc _reward_ 
	end quest

_timer_ task:
	end quest
 
_clearclick_ task:
	when _qgclicked_ and not _havereal_
	clear _qgclicked_ _clearclick_

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

Re: Custom quest support

Post by Jay_H » Wed Jun 05, 2019 2:55 am

Look in the DFU manual for the path to your Player Log. It'll log all the quest-related errors you're causing. There's also a quest log but it doesn't log all errors, so stick with the player log.

Search in the log for your quest's name (like M0B00X01) and find the context for any nearby errors. If you need help, let me know.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with more than 170 all-new quests.
Progress on fixing classic quests here.

imsobadatnicknames
Posts: 9
Joined: Sun Jun 02, 2019 4:28 pm

Re: Custom quest support

Post by imsobadatnicknames » Wed Jun 05, 2019 3:51 am

Jay_H wrote:
Wed Jun 05, 2019 2:55 am
Look in the DFU manual for the path to your Player Log. It'll log all the quest-related errors you're causing. There's also a quest log but it doesn't log all errors, so stick with the player log.

Search in the log for your quest's name (like M0B00X01) and find the context for any nearby errors. If you need help, let me know.
I finally solved the problem, the log was lots of help, thanks!
The problem was specific to Aldingdale, since I coded the real painting to be in a local house1 type building and Aldingdale doesn't have any of those, the game had nowhere to put the painting and refused to start the quest. I changed the code to put the painting in a local general store. I could have changed it to a remote house1 but I decided to keep it in the same town as the quest giver.

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

Re: Custom quest support

Post by Jay_H » Wed Jun 05, 2019 3:54 am

Excellent work. Yeah, you'll be outgrowing Aldingdale quite quickly :lol: But it's good to hear you found the problem.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with more than 170 all-new quests.
Progress on fixing classic quests here.

imsobadatnicknames
Posts: 9
Joined: Sun Jun 02, 2019 4:28 pm

Re: Custom quest support

Post by imsobadatnicknames » Wed Jun 05, 2019 6:36 pm

One last question, how do I make an item display some text when it's used from the inventory, like a letter? :D

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

Re: Custom quest support

Post by Jay_H » Wed Jun 05, 2019 9:08 pm

This is something you define in the item section:

Code: Select all

Item _letter1_ letter used 1022
Then go back up to the dialogue section:

Code: Select all

Message:  1022
<ce> The contents of this letter seem illegible to you.
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with more than 170 all-new quests.
Progress on fixing classic quests here.

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

Re: Custom quest support

Post by Jay_H » Thu Jul 11, 2019 8:02 pm

For some reason, a timer is showing 0 days in the AcceptQuest block but is fine in the quest log:

Image

It's a chaining quest timer, =2res_. I'm guessing the 2res calculation doesn't begin until after the quest initializes.

Code: Select all

Place _res_ remote house

Clock _2res_ 00:00 0 flag 2 range 0 2
Come join the Unofficial Daggerfall Unity Discord.
Try the first Daggerfall Unity Quest Pack with more than 170 all-new quests.
Progress on fixing classic quests here.

Post Reply