Jay_H's quest writing tutorial

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

Re: Jay_H's quest writing tutorial: Vengeance build

Post by Interkarma » Wed Aug 30, 2017 12:51 pm

Yep, totally possible to add an action like this.

It's not necessary to add everything to the default action setup either, mods can add custom actions alongside custom quests. I feel like we've barely scratched the surface of what's possible. :)

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

Re: Jay_H's quest writing tutorial: Vengeance build

Post by Jay_H » Thu Aug 31, 2017 2:44 am

Interkarma wrote:If you haven't seen it already, check the Quest System Status page.
I can't find an entry on restrain foe. Is that implemented or on the way?
**INDEFINITE HIATUS** Current priority list: 1. Writing Archaeologist content; 2. Revamping classic DF quests; 3. Writing new DFU quests. Only in free time, no guarantees made.

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

Re: Jay_H's quest writing tutorial: Vengeance build

Post by Interkarma » Thu Aug 31, 2017 2:55 am

Not implemented yet - should be on the roadmap though, I'll fix that.

One of the inactive Fighters quests requires this action, and it's used in the main quest as well. Definitely coming in the near future.

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

Re: Jay_H's quest writing tutorial: Vengeance build

Post by Jay_H » Tue Sep 05, 2017 4:47 am

Part Six: hide npc; add/drop npc face; yes/no prompt; gold range x to y
Image
Image
Image
Image
Image
Image
Image
This compact little quest is going to introduce four new mechanics which add more versatility to Daggerfall quests.

Code: Select all

Quest: TESTING5
DisplayName: No More Puns
-- Message panels
QRC:

QuestorOffer:  [1000]
<ce>          Go find _kid_.

RefuseQuest:  [1001]
<ce>           This quest is over.

AcceptQuest:  [1002]
<ce>             _kid_'s in _somewhere_.

QuestFail:  [1003]
<ce>              ???

QuestComplete:  [1004]
<ce>             All right.

Message:  1020
<ce>             "My vision is augmented."
<ce>             
<ce>             Will you take _kid_ with you?

Message:  1021
<ce>             What a shame. You were a good
<ce>               %ra. What a rotten way to die.

Message:  1022
<ce>             You may have copper wiring to re-route your
<ce>              fear of pain, but I've got nerves of steel.
This is our ordinary dialogue section. The 102X section is all dialogue we're putting in which will be interactive, used in the prompting section.

Code: Select all

QBN:
Item _reward_ gold range 10 to 15

Person _questgiver_ group Questor male
Person _kid_ faction Children

Clock _timer_ 01:00

Place _somewhere_ local random
Among the usual commands, we've defined:

A gold sum, which will be randomly chosen between 10 and 15. By changing those two numbers, you can alter the amount of gold a quest uses. You can also make it a precise amount by choosing the same number twice (for example, range 350 to 350).

A person named _kid_. We've defined _kid_'s identity with the use of the "faction" trait which follows it, and the faction this time is "Children." Other kinds of traits are "group" and "factiontype." The methods of customizing a person can eventually become very complex.

A place within our city, _somewhere_, which is a local random. "Local" means within the same city, "random" means it could be nearly any quest location within the city.

Code: Select all

--	Quest start-up:
	start timer _timer_
	place npc _kid_ at _somewhere_
Now we've placed _kid_ at the randomly chosen location. Thankfully, the questgiver tells us where that'll be.

Code: Select all

_take_ task:
          clicked npc _kid_
          prompt 1020 yes _accompany_ no _stay_
          clear task _take_
First we have a quest condition:

"When the player clicks the mouse on the NPC called _kid_,"

The actions that follow are:

1. "Set up a yes/no prompt which will use message 1020 as its text. If the player chooses 'yes,' we'll start the _accompany_ task. If the player chooses 'no,' we'll start the task _stay_."

2. "Reset the task _take_ so it can be repeated."

The resetting matter allows us to repeat quest actions. The intention is that this yes/no prompt would repeat in case we choose "no." If we don't do this, we'll get locked out of this interaction after choosing "no," which would make the quest unbeatable.

Changes made to the Say and Prompt commands prevent them from repeating during quests, but this is still important to know for other quest actions.

Code: Select all

_accompany_ task:
	say 1021
           hide npc _kid_
           add _kid_ face
The "yes" choice, _accompany_, will make _kid_ disappear from our view. It will also add _kid_'s head onto our screen to represent, in narrative terms, that he/she is now "traveling with us." In reality it doesn't strictly mean that; the task itself just adds that face onto our screen, and doesn't mean anything more.

You'll notice the face added to your screen is very, very different from the _kid_ you talked to. Daggerfall only has so many faces to choose from, and they're all adults. These are just limitations that we work with. If someone decides to mod in more NPC faces, we can use them.

Code: Select all

_stay_ task:
          say 1022
          clear task _stay_
This is what happens if you choose "no." You'll get a text message, and nothing else will happen. The "clear" task is once more used to ensure this task is repeatable. This matters much less than resetting the "prompt" action since it's just a text box and won't determine quest completion.

Code: Select all

_qgclicked_ task:
	clicked npc _questgiver_

_pcgetsgold_ task:
	when _qgclicked_ and _accompany_
   drop _kid_ face
	give pc _reward_
	end quest 

_clearclick_ task:
	when _qgclicked_ and not _accompany_ 
	clear _qgclicked_ _clearclick_ 

_timer_ task:
	end quest
The main new action here is "drop _kid_ face," which is the way to remove the face from your screen. It actually won't make a difference at this precise point since the end of the quest also wipes the face away, but it's still important to learn.

If this quest turns out differently from what's in the screenshots above, write about it and we'll see what went wrong.
Last edited by Jay_H on Wed Nov 08, 2017 10:34 pm, edited 2 times in total.
**INDEFINITE HIATUS** Current priority list: 1. Writing Archaeologist content; 2. Revamping classic DF quests; 3. Writing new DFU quests. Only in free time, no guarantees made.

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

Re: Jay_H's quest writing tutorial

Post by Interkarma » Wed Nov 08, 2017 9:45 pm

This thread is an awesome resource. Thank you again for taking the time to put all of this together. :)

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

Re: Jay_H's quest writing tutorial

Post by Jay_H » Wed Nov 08, 2017 10:01 pm

You're welcome :) It's not done though, I'll take requests on things to introduce once people get involved. I'll write as many parts as there are for quest conditions if people need them.
**INDEFINITE HIATUS** Current priority list: 1. Writing Archaeologist content; 2. Revamping classic DF quests; 3. Writing new DFU quests. Only in free time, no guarantees made.

ameriveaux
Posts: 1
Joined: Mon Feb 26, 2018 4:43 pm

Re: Jay_H's quest writing tutorial

Post by ameriveaux » Mon Feb 26, 2018 5:19 pm

Hello.

I would like to contribute to grinding and cranking out quests.

Are the quests being worked on the original quests that were present in the original Daggerfall? Or are these new ones being written from scratch ?

Is there a database of quests down or need to be done that we can pull from to work on?

Is there any sort of number of quests that the team wishes to have done before marked complete?

Are the quests being done based from the guilds/temples? Also how about the normal "go get work quests"?

I did a bit of digging but could not discern clearly the answers.

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

Re: Jay_H's quest writing tutorial

Post by Jay_H » Mon Feb 26, 2018 6:29 pm

Welcome to the forums! :)

All classic quests have been converted from Daggerfall. There are a few that are simply incompatible with Daggerfall Unity or for other mechanical reasons didn't convert properly, so they don't reproduce correctly in DFU. I've planned to take to myself the assignment of rewriting these quests so they work better. And still others cannot function because they require spells or other things not yet implemented.

The Fighters Guild quests that don't work yet are:

M0B21Y19 (Standard Protection) (fixable)
M0B11Y18 (Lord K'avar) (fixable)
M0B00Y17 (pet tiger) (fixable)

The Mages Guild quests that can't work yet are:

N0B21Y14, GetCurrentRegionFaction() needed
N0B30Y15, lacks spells on imp (minor issue, quest can be completed)
N0B40Y07, Banish Daedra needed
N0C00Y01, Banish Daedra needed
N0C00Y10, foe needs to carry book (fixable? can't remember)

The Mages Guild is a working list, since I haven't gone through them all yet. But most of the ones on this list can't possibly be implemented since DFU doesn't have the triggers for them yet.

I recommend starting with your own quests, simple ones, to get the sense of how DFU quests are written. A lot of the classic Daggerfall quests were written in fairly hard-to-read script, so it would be hard to get into it unless you have some previous Daggerfall quest-writing experience.

If you were to help, the three Fighters Guild quests above would be the prime targets. But I don't recommend doing so until you have experience with it. I'm not touching any of them immediately, and I'll post an update if I decide to work on any of them.

Right now DFU is initially wired so you can only get Fighters Guild quests. You can alter that by going into your installation and finding /DaggerfallUnity_Data/StreamingAssets/Tables/Temp-FightersQuests.txt, and adding them there. You can then attempt to get any quest from any Fighters Guild; the quests in that file are offered at random, so you can put as few or as many as you want for testing purposes.
**INDEFINITE HIATUS** Current priority list: 1. Writing Archaeologist content; 2. Revamping classic DF quests; 3. Writing new DFU quests. Only in free time, no guarantees made.

User avatar
Nystul
Posts: 904
Joined: Mon Mar 23, 2015 8:31 am

Re: Jay_H's quest writing tutorial

Post by Nystul » Mon Feb 26, 2018 10:18 pm

I am planning to provide a sample quest to show usage of dialog link command and add dialog command as well as rumor mill command . Since it has not been tested much yet but should work in principle.
Just have to find the time to do so since real life is taking most of my time lately

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

Re: Jay_H's quest writing tutorial

Post by Jay_H » Mon Feb 26, 2018 10:22 pm

If I find time for it in the next week or two and you haven't done it, I can write it. It'll just be a matter of reading through existing quests and copying content :) No guarantees but I might do it.
**INDEFINITE HIATUS** Current priority list: 1. Writing Archaeologist content; 2. Revamping classic DF quests; 3. Writing new DFU quests. Only in free time, no guarantees made.

Post Reply