Writing a QuestPack: The Common People

My first steps into the world of Daggerfall Unity modding came when I realised that making quests was as a form of interactive fiction. As those of you who have noticed the wealth of novels, short stories and screenplays that I haven’t published here over the years, I’m not great at finishing things. The short nature of quest-writing appealed to me, despite having numerous unfinished D&D quest modules on my HD going back almost 30 years.


Daggerfall is an epic game, much more epic than it’s initial directives of “See what that ghost wants” and “Oh, BTW… I sent a letter to a married woman. Can you intercept it before it causes some awkwardness in court”. However, I always liked the quests that involved the sometimes quirky problems of day to day folk.

Inspired by the great QuestPacks of established modders like Jay H, I set out to make a QuestPack that allows you into the lives of the common people. I decided to call it The Common People. Yes, there may be a Pulp reference there.

Writing a quest is a bit like writing a movie script, if the movie cast is all six year olds with ADHD. While you can control the supporting cast and set up the scenes, the lead actor will do whatever the hell they want and you have to keep that in mind. You can try to subtly steer them in certain directions, but be too forceful and they will throw a strop on the set, walk out and ensure that you never eat lunch in that town again. Ultimately it’s about building a story that engages the player. You set the scene, lay out the logical options and then create scenarios for all possible paths they might choose. Because of this, most quests are small, short and simple. If you offer the player too many paths, then you’ll find yourself writing a multiverse of endless possibilities which ultimately lead to stress, broken homes, drug dependence and hair loss. Give them too few paths and it’ll break their immersion and you’ll be labelled a mediocre quest writer.

The History of the Daggerfall Quest System

The quest system for Daggerfall was originally opened up about 20 years ago by Donald Timpton with the Template Quest compiler/decompiler, that enabled you to open the qbn/qrc files in the Daggerfall DOS directory and create new ones from quest src files. With Daggerfall Unity this is no longer necessary as the quest scripts are now plaintext .txt files that are easily read and created using any basic text editor, with no need for compiling or dedicated editing software. These tools are all still available for those who want to edit quests for the original DOS Daggerfall or historical interest on The Unofficial Elder Scrolls Pages.

However, the documentation for Template v1.11, which is now hosted on dfworkshop.net, is still valid for the large part due to it’s breakdown of the markup used in Daggerfall quests. It’s good to have on hand like a bible when scripting.


For a more modern an up-to-date guide on writing quests for Daggerfall Unity, Jay H has written an excellent and comprehensive tutorial on the forums at https://forums.dfworkshop.net/viewtopic.php?t=622 which has become a go-to for people starting to write quests for DFU. And what I used to write my first ever quest, which was called…

The Finger of Doom

In this epic saga our brave hero ventures forth to the local hostelry where he is tasked by the questgiver to grasp and pull upon his finger, whereupon a foul beast erupts from the interlocutor’s posterior. A battle ensues in which the player must slay the beast and save the dignity of his patron.

Ok, it was a test quest and took me about fifteen minutes. It’s about the level of quality expected from most first quests. There is no shame in it. You are feeling your way through the system. Like any initial forays into modes of creativity, these first faltering steps are not meant to be published to the world at large.

By the way, The Finger of Doom has been published to the world at large on https://github.com/PRAEst-76/DF-Quests-CP/blob/main/QuestPacks/PRA-CP/PRA1001.txt. It’s relatively short and using Timpton’s template guide you can see what the various script entries do.

Creating and Editing Quests

While I said you can use any old text-editor to write quests, I do strongly recommend using Visual Studio Code along with the VS extension by TheLacus based on Timpton’s template scripting language. This will give you syntax highlighting, along with snippets for tags and symbols for the script which make it easier to write and see what you are doing. After you are familiar with the quest system you can switch to NotePad++, Nano, Vim, Emacs or whatever hardcore masochistic nerd editor you prefer to tap at in the dark at 3am.

For Daggerfall Unity the quest files are found in daggerfall-unity-x.xx.x\Assets\StreamingAssets\Quests\ and daggerfall-unity-x.xx.x\Assets\StreamingAssets\QuestPacks\. Use the latter folder for custom questpacks as the first is usually reserved for vanilla game quests.

The great thing about the .txt based quest system in Daggerfall Unity is that you can test quests on the fly. They are loaded as they are issued within the game, so you can edit the quest text, use the console to start the quest and when you find a bit is broken, kill it again from the console and edit the file. All while DFU is running. Quests are usually started in-game when talking to a questgiver, but as these are usually random in the case of commoners and it would take ages to stumble upon a serf offering you the exact quest you are after. By default the console is activated by pressing the tilde or ` key (below Esc usually on most keyboards) although this can be changed in the Advanced section in DFU’s configure controls page.

You can then type help to see all the various options available in the console. There is also a list of console commands on https://en.uesp.net/wiki/Daggerfall_Mod:Daggerfall_Unity/Console. While they all have their uses, we are currently most interested in the command startquest.

For this quest I’ve found a plausible candidate in the local tavern that looks like he might have Daedric bowel issues. We just need to click on him to make sure he’s selected. This will open a dialogue window. I can have a little chatette and get the usual passive aggressive pushback. This is not necessary of course. I just want to select him. Then we close the dialogue window and without leaving him, open the console and type…

startquest PRA1001
Give him the finger

Unfortunately by doing it this way we miss the initial quest offer, but as I wrote the quest we know what it was.

QuestorOffer:  [1000]
_questgiver_ holds out %g3 hand with %g3 index digit
"Hey %pcf. Pull my finger! Go on. Pull it!"

_questgiver_ is the symbol for the person giving the quest (the Questor) and in the dialogue window would be substituted with the name of the NPC. The macros, i.e. the codes with the % infront of them, pull information from the game and substitute the appropriate words. In this case the gender of _questgiver_ (%g3) and your characters first-name (%pcf). Clicking the Yes button in the dialogue window would then yield…

AcceptQuest:  [1002]
You reach out and gingerly pull _questgiver_'s
finger. Upon doing so %g3's face becomes strained and
%g emits a loud trump from %g3 posterior. Then %g
smiles and winks at you.
"Ahhhh... Heh heh, I needed that." he chuckles to himself.

The quest then continues…

So now we have our monster

I defined the the enemy under the QBN section. It’s 1 Imp. I also defined the reward, the letter you get if you leg it and the section containing the contents of the letter, the guy who gives you the quest, and how long you need to delay before you are deemed a coward and the letter is delivered to you.

Item _letter_ letter used 1023

Item _reward_ gold range 10 to 20

Person _questgiver_ group Questor male

Clock _coward_ 03:00
Clock _note_ 21:00

Foe _enemy_ is 1 Imp

I call the _enemy_ after the initial quest acceptance in the start-up section. He comes 1 time and with 100% probability. This section also adds the information to your quest log. It also starts the timers after which you will fail the quest.

--  Quest start-up:
    start timer _coward_
    start timer _note_
    log 1030 step 0
    create foe _enemy_ every 0 minutes 1 times with 100% success

Quests have two main sections under which everything is set up. QRC and QBN. QRC is where you put text references that QBN refers to, like quest info, dialogue, notes etc. QBN is where the data goes; definitions, quest actions, outcome, setup

Sadly as I stopped to take screenshots he got a couple of hits in.

We don’t really have time to check the log now as there is a demonic butt-monkey on the loose. He’ll appear nearby and attack on sight. Imps are more difficult to kill than rats, but a couple of taps with a decent weapon will bring it down.

In the screenshot you may notice some quest info in the top left of the screen. This is the quest debugger. Naturally it’s hidden by default. Pressing Ctrl, Shift, D will enable it. It will tell you how many quests the quest engine is running, what number the current one is, the DisplayName (The Finger of Doom) and the QuestID (PRA1001). It will also show the various tasks defined in the quest, and highlight those that are complete and active, as well as any timers specified. Ctrl, Shift and the left/right keys on your keypad will skip through the quests currently in the quest engine. Again, this is another crucial tool in the quest writers toolbox. More information about the Quest Debugger can be found on https://forums.dfworkshop.net/viewtopic.php?p=5252#p5252.

He ded

Upon the death of our enemy the quest script pops up a window telling me something. In this case it’s reminding me that I’ve killed the quest target and should go back Chuffy McAngryArse to get some kind of reward.

This is also added to the quest log. When writing quests it’s good to do either or even both. When players have a lot of quests on the go it’s easy to forget what you are doing. Getting notification of quest stage completion and regular log updates is crucial. Quests with minimal player feedback are frustrating. In this case it just involves regular log symbols after major steps in the quest script.

_slain_ task:
    killed 1 _enemy_ saying 1020
    log 1031 step 1

When the enemy is killed this calls the appropriate entries from the QRC section.

Message:  1020
You have dealt with _questgiver_'s accidental nether
summons. You should go back and see if %g's ok.

Again, macros are used to get the gender of the Questor.

Message:  1031
I've dealt with _questgiver_'s expulsion.
I should go back and give %g2 the good news.

The %qdt adds the date to the log entry. Upon clicking on the Questor he thanks us and doles out a pittance of gold. The _reward_ was set in the QBN section to between 10-20 gold.

My QuestPack is still a work in progress and I plan to keep updating this as I go. Current version can be found on my GitHub repository.

Something to say?