Custom quest support

For all talk about quest development - creation, testing, and quest system.
Post Reply
imsobadatnicknames
Posts: 371
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: Custom quest support

Post by imsobadatnicknames »

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_
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

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

Re: Custom quest support

Post by Jay_H »

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.

imsobadatnicknames
Posts: 371
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: Custom quest support

Post by imsobadatnicknames »

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.
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

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

Re: Custom quest support

Post by Jay_H »

Excellent work. Yeah, you'll be outgrowing Aldingdale quite quickly :lol: But it's good to hear you found the problem.

imsobadatnicknames
Posts: 371
Joined: Sun Jun 02, 2019 4:28 pm
Location: Colombia

Re: Custom quest support

Post by imsobadatnicknames »

One last question, how do I make an item display some text when it's used from the inventory, like a letter? :D
Released mods: https://www.nexusmods.com/users/5141135 ... files&BH=0
Daggerfall isn't the only ridiculously intrincate fantasy world simulator with the initials DF that I make mods for: http://www.bay12forums.com/smf/index.php?topic=177071.0

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

Re: Custom quest support

Post by Jay_H »

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.

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

Re: Custom quest support

Post by Jay_H »

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

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

Re: Custom quest support

Post by Jay_H »

I looked in the code but couldn't find... Is there a list enumerating the item classes and subclasses for quest use?

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

Re: Custom quest support

Post by Interkarma »

This isn't made easy at all. I imagine the original devs had a table of some kind to refer to. Your best reference is the ItemEnums.cs file.

The ItemGroups enum is the "class" which each have an enum for items within that group.

So "item class 17 subclass 13" means ItemGroups.CreatureIngredients1 (which is 17). Then refer to CreatureIngredients1 enum and count down 13 items (starting from 0). That will be the target item index. You can ignore the value of the item enums, this one refers to template and isn't helpful.

Let me know if that helps!

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

Re: Custom quest support

Post by Jay_H »

Ah, that's fine. I can make an index. I just wanted to make sure I wouldn't duplicate work. Thanks Interkarma.

Future reference: https://github.com/Interkarma/daggerfal ... emEnums.cs

Post Reply