Questing Part 1 – Source

With items and loot more or less finished, it’s time to place my sights on the next big feature group. I had originally planned to work on spells and effects in the 0.4 cycle, but also had quests in mind as an equally important feature. So back in July, I used a Twitter poll to sample what the community wanted priority on. The answer came firmly in preference for quests over spells.

Fast forward a couple months: 0.3 stable is now tagged on Live Builds page and I’ve started work on the quest system in earnest. This post is the first in a series documenting the journey from raw bytes to a working feature.

When adding a big new feature, there’s always a technical planning stage before commencement. I need to understand which of Daggerfall’s binary files are involved in the feature, learn how much is already known about those files (sometimes a lot, sometimes almost nothing), map out the additional details I need to know before I can re-implement that feature, and finally start cutting some code.

Sometimes it takes a few iterations, as writing code to pull apart the binaries is itself a journey where new information is learned. I don’t know what I don’t know, and often that new information results in a new iteration with better understanding. There’s basically a research-implement-compare loop going at all times throughout development of Daggerfall Unity. It can be a bit draining.

Items for example needed considerable research to bridge the gap between “enough knowledge to make an item editor” and “enough knowledge to fully implement items in a new engine”. Believe me, there’s a huge amount of work needed between having a file spec with lots of unknowns and building a completely functional equivalent. Most of my time is spent somewhere in that gap.

So when starting quests, I set out to learn everything I could about the binary formats and the work others had done before me. I was pleasantly surprised to learn:

  • Quests are among the most well-understood formats, thanks to the work of several early Daggerfall hackers (notably Donald Tipton and Dave Humphrey).
  • Tools exist to edit live quests, but more importantly decompile the QRC and QBN files to a human-readable source file (thanks to Template v1.11 by Tipton).
  • Early Daggerfall modders already had a good understanding of creating quests for Daggerfall – there’s an established process.
  • Quest files are one of the few cleanly decoupled things in Daggerfall. Unlike items which have template data hard-coded in the executable, quests are nicely self-contained.

With the above in mind, it was no longer necessary for me write a quest decompiler from scratch, design a new file format, decouple quest data, or chase half a dozen other time sinks. I can almost go directly to implementation. Almost. But first I need quest data in a usable form.

For the first step, I’m using Template v1.11, which you can find on UESP. This tool can decompile all the QRC (quest text) and QBN (quest programming) files to a single easy-to-read text file. So the information goes from raw binary data to the following (snippet from starting quest _BRISIEN).

Item _letter1_ letter used 1020
Item _letter2_ letter used 1021
Item stopMainQuest letter used 1022

Person ladyBrisienna face 1 named Lady_Brisienna anyInfo 1012 rumors 1013

Place PiratesHold permanent PirateerHold1
Place _dirtypit_ remote tavern

Clock _invitepc_ 7.00:00 14.00:00
Clock _remindpc_ 30.00:00 0 flag 1 range 0 1
Clock _pcfailed_ 14.00:00 0 flag 1 range 0 1
Clock _oneday_ 1.00:00 0 flag 1 range 0 1
Clock _nowwhat_ 29.09:00 0 flag 1 range 0 1

-- Quest start-up:
 log 1010 step 0 
 pc at PiratesHold set _exitstarter_ 
 say 1025

That can still look a bit daunting if you’re not comfortable with programming concepts, but the source format generated by Template v1.11 is generally very easy to read and understand – more like a complex INI file than a real programming language. It’s so good that I’ve decided to adopt Template’s output as the source data for quests in Daggerfall Unity. You won’t need to recompile quest source back to QBN/QRC, rather you will use the source directly in Daggerfall Unity where it will be compiled at runtime by the quest system.

This means the de facto standard for creating Daggerfall quests will remain essentially the same in Daggerfall Unity (with some minor differences I’ll discuss later). If you’ve ever created a quest for Daggerfall, or even seriously looked into it, then you already have the skills to create quests in Daggerfall Unity. If you’re new to Daggerfall quests then you can learn from existing quests and read Template’s excellent documentation. Just as I don’t need to start from scratch, neither do you.

I will need to change the format slightly for unique needs on my side, but I aim to keep my input format as close as possible to Template’s output format. There’s also the need to emulate support for every single condition and action in Daggerfall Unity to behave similarly to Daggerfall given the same quest source. That will probably be an ongoing process all the way through to 1.0. But we need to start somewhere, and this is a great starting point.

The next article in series will look at parsing quest source files and how quests will be executed inside Daggerfall Unity.


For more frequent updates on Daggerfall Unity, follow me on Twitter @gav_clayton.

Tutorial – Getting Started

The latest version of Daggerfall Tools for Unity is now available. You can either clone the full project from GitHub or download the standalone asset package from the Daggerfall Tools for Unity project page.

This version of DFTFU might need to be updated a few times as tutorials are rolled out. The current version is 1.6.1, please grab later version if available.

I have also posted the updated Getting Started tutorial to the DFTFU Tutorials page. Image link below will take you straight to tutorial.


Click image to open tutorial

Tutorial – Cloning from GitHub

If you’re interested in developing mods or contributing to Daggerfall Unity, you’ll first need to clone the project from GitHub. This light tutorial goes through the basic process of cloning Daggerfall Unity using GitHub for Desktop and opening with a fresh Unity install. There are many other ways to clone from git, but this is probably the simplest if you’re new to Unity or open source repositories.

After cloning the project, I go for a quick run through Privateer’s Hold to check everything is working normally.

Standalone Builds Update

After launching Live Builds a week ago, I’ve been very happy with the ability to push out small incremental changes. Besides the streamlined build process and less of a wait time, it also means I’m not overwhelmed with bugs every release. I can now tackle large problems fast and keep track of smaller problems for when I have the time.

This ability to turnaround builds so quickly has lead me to rethink the standalone builds (for now) and continue with the leaner, more agile cloud build process. I will revisit the standalone builds later in Daggerfall Unity’s life cycle. Here’s a summary of how to get Daggerfall Unity moving forwards:

  • GitHub always has the most recent code for developers.
  • The Live Builds page always has the most recent builds, and links for getting Daggerfall.
  • I will start to tag specific live builds as “Stable”. This means that everything implemented so far is generally working as expected.
  • I will restore the Daggerfall Tools for Unity pages as soon as possible, including updated tutorials.

If you were waiting for the convenience of a standalone build, I apologise for changing my plans. Daggerfall Unity is very much a living thing, both in terms of development and community, and can take up a large amount of my personal time. Anything that saves me time I can put back into gameplay, or spend with my family, is extremely valuable to me.

The good news is that pointing Daggerfall Unity to your game files has never been easier. The setup helper introduced with version 0.2 makes it very easy to get up and running, and you only need to download the game files once.

The first 0.3 stable build will be tagged soon. Lootable monsters just went into the latest live build and is with testers now. I only have the Rest and Keybind UIs to go and I’ve hit all the feature milestones planned for this release.

Live Builds Now Available


Get Up To Date

Live builds based on latest code are now available to testers, as described in this blog post.

Check the forum topic State of 0.3 for information on 0.3 at time of writing.


Get The Latest Test Build

You can download latest builds from the all new Live Builds page.


Provide Feedback

Use the Bug Reports forum to log bugs. Please read the Bug Report Guidelines topic first.


Stable Builds

The latest stable build is still version 0.2.9 from 09-Apr-16. This version will be updated to 0.3.x in a few weeks once the majority of bugs have been found and eliminated.

Quick Update – 1 August

Short Delay

The 0.3 test cycle has been delayed slightly due to changing from Unity 5.3 to Unity 5.4 and less than typical free time on my end. Things are back on track for now and I estimate first 0.3 test build should be ready in approximately 7-10 days. I will update you in the case of any further delays.


More Information On Test Builds

I’ve had a few queries via email and Twitter about how test builds will work from 0.3. I’ll try to clarify this now. If you need more details please don’t hesitate to ask.

The short answer is that not much is really changing from your side. If you’ve tested with 0.2 or earlier the process for you is basically the same. The key difference is how builds are generated and how frequently I’m able to put a new build into your hands.

In 0.2 and earlier, I had to manually create a build for each platform, package to a zip file, upload to my host, then configure new download in WordPress and update related pages. This isn’t difficult, but it can be time consuming when rapidly turning over bugs. In many cases a bug could be fixed much faster than I could work through the manual build process. So I tended not to generate new builds until a larger block of work was completed. This ultimately means you had to wait weeks or a even a few months to see fixes.


Automatic Cloud Builds

Enter Unity Cloud Build. This service allows me to setup an automated build process for Daggerfall Unity’s target platforms. Cloud build works by periodically checking the git repository for changes and automatically spits out a complete new build for each platform. The download is also hosted by the cloud build servers. All I have to do is share the build and give you a download link. Here’s how it looks from the back-end:



One a build is ready, I can either download a zip to test for myself, or share out a link to the public. The public link is what I’ll give to you, which takes you to a page like below. This is your front-end to the cloud build process.



To make this process even easier for you, I will setup a permalink page from that always points to the latest shared builds. I plan to update this page frequently. If the code on git changes, you’ll have a new test build not long afterwards. More information for this will be available with 0.3.


Rolling Builds

This is where things get interesting. Instead of waiting months for next test cycle, testers will now have a direct pipeline to code updates as they are generated. If you’ve ever played an Early Access game on Steam that gives you an “experimental/unstable” option for rapid updates, my rolling test builds are fundamentally the same concept. You will now get to play with new code as it’s being developed.

The main downside to this style of rolling build is that you will be playing with live code. Usually things will work as expected, but sometimes things that were working will break. For example, quicksave was briefly broken while I was overhauling the save interface a few weeks back.

The key is for testers to understand what is a bug and what might just be broken because it’s in the middle of changes.


Watching Git

To this end, I highly recommend testers keep an eye on the commits page on git. These commits tell a story of what is being worked on and what has been recently fixed. If you see that I’m working on a big system (like saves or looting), then you can bet something will be broken in that system until work is complete. I try to keep my commits exclusive to a specific update and provide good descriptions. I’ll continue to work on improving the quality of my checkins as time goes on.


Providing Feedback

As before, the Daggerfall Workshop Forums are the correct place to log bugs or ask questions about a feature. Specifically the Issues & Support forum. If you aren’t sure if a feature has been implemented yet (e.g. quests), please ask before logging the absence of this feature as a bug. Daggerfall Unity is a live work in progress and some features are much further down the pipeline than others.

At every major milestone, I will post some information on things that need the most attention from testers. For example, the loot and inventory system was the major component of 0.2.


Stable Builds

If you don’t feel up to watching git, downloading test builds, testing features, and providing feedback – that’s OK! I will occasionally release a “stable build” at major milestones where everything is more or less running as expected. Not everyone has the time or interest to be a full-on tester, and that’s all good. Just grab the stable builds when they’re available and let people know about Daggerfall Unity.

The first 0.3 stable build will be available a couple of weeks after the first test build. This gives me a chance to nail any show-stopping bugs before putting the stable build into your hands. I’ll post an update on this when available.



I hope that clarifies the new build process more thoroughly. In summary:

  • You’ll get new builds almost as quickly as code changes. The latest build might be awesome or it might not even run.
  • I will provide a permalink page on that always points to latest several builds.
  • Keep an eye on git commits to see what’s being worked on.
  • Post feedback, bug reports, and questions to the Issues & Support forum.

Thank you for reading. I look forward to you joining me for the next big step in Daggerfall Unity’s development process.


For more frequent updates on Daggerfall Unity, follow me on Twitter @gav_clayton.

New Options For Downloading Builds

The 0.3 release should be wrapped up in the next week or so, provided nothing comes up in testing to cause delays. Along with 0.3 there will be more options for downloading builds to better cater to various groups in the community. Read on to see what’s coming up.





If you just want to take a quick look at Daggerfall Unity, and avoid the hassles of a test setup, then 0.3 might encourage you to try it out.

  • New standalone builds will be made available for each platform (Windows/Mac/Linux).
  • Standalone builds are self contained and do not require you to provide Daggerfall game files.
  • Standalone builds will be updated less frequently but will generally be more stable.





If you’re an existing tester, or would like to help catch bugs, then I have some good news.

  • Test builds are now automated using Unity Cloud build and will be updated approximately weekly, or daily during heavy development.
  • However, test builds are based on live code and will not be as stable as standalone builds.
  • Test builds are cut-down for smallest download and will require you to provide your own Daggerfall game files (just like previous test builds).





The biggest feature in 0.3 is Lypyl’s mod system, which he introduced a few posts back. The mod system allows you create asset bundles containing code, textures, sound, etc. that can change how Daggerfall Unity works.

  • Modders will need a copy of Unity3D 5.3 Personal/Plus/Pro and a copy of game files.
  • Modders are encouraged to clone from git (tutorial coming soon), but just downloading a zip of current project should be adequate.
  • New forum areas will be opened to help modders find each other and collaborate on projects.





If you would like to contribute to Daggerfall Unity, and have a good understanding of both Daggerfall’s inner workings and Unity3D, it will become easier to contribute from 0.3.

  • Full Daggerfall Unity project is now on git. Contributors should create their own fork of project.
  • Contributors will need a copy of Unity3D 5.3 Personal/Plus/Pro and a copy of game files.
  • Contributors will also get new forum areas for discussion.
  • A Trello page is in the works to help contributors find tasks they may be able to help with.


That all for now. Hopefully 0.3 will represent a new stage in the development of Daggerfall Unity, with even more options for gamers, testers, modders, and contributors.


For more frequent updates on Daggerfall Unity, follow me on Twitter @gav_clayton.

Upcoming Release 0.3

The 0.3 point release is coming together and should be available sometime late in July. Here’s a quick summary of upcoming features.


Modding Support

Lypyl’s mod framework is undoubtedly the star of 0.3. You can read his post about it and check out a few work-in-progress tutorials on the forums. While still early days, I couldn’t be happier with this feature and the potential it brings to Daggerfall Unity.

  • Mods can be created using Unity Personal (free version) and Daggerfall Tools for Unity.
  • Completed mods are packaged to a standalone .dfmod file (asset bundle) for distribution.
  • Integrated mod loader at startup with ability to change load order.
  • Fully integrated run-time C# compiler.
  • Total access to inner workings of Daggerfall Unity.
  • Catch events, display UI windows, spawn world objects, drive game logic.

The mod system is already powerful enough to handle the current round of mods, which will eventually be migrated into .dfmod format. As mod creators grow in experience and the underlying code is expanded to provide more options almost anything will be possible down the road.


Treasure & Loot

Random treasure piles and corpse markers will now be lootable, providing gold and new items to you during testing.

  • Player will now find gold and items in random treasure piles and on the bodies of slain foes.
  • Generated items will not have magical powers until the spells & effects features are live.
  • It will be possible to drop items to the ground, but like Daggerfall dropped items will disappear when you leave the area. Non-volatile player storage will be implemented much later as part of housing.

As shops are not implemented yet, I’m going to ignore weight limits on the player and the wagon so you can carry as much as you want. Proper encumbrance tracking will be added in the future after shops come online.


New UI Windows

A few UI windows are in the works for 0.3, although not all of them will be ready for initial release. They will come online over the 0.3 cycle.

  • Control mapping UI.
  • Rest UI.
  • Save/Load UI.

As part of updating save/load UI, the way games are saved will be expanded during 0.3 to accommodate the growing amount of data needed to support saving game state.


Standalone Builds

From 0.3, I’m going to provide a standalone build of Daggerfall Unity with game files bundled. This will be in addition to the smaller builds where you must provide your own game files. This change is to help users who just wish to quickly try out Daggerfall Unity or have trouble installing a compatible version for any reason.

  • Standalone builds will be substantially larger and updated less often than the trimmed-down test builds.
  • Test builds will be smaller and require you to provide your own set of compatible game files. This is still the best download for dedicated testers.


Bug Fixes & Small Improvements

Last but by no means least will be the usual round of small fixes and improvements to features already added. There’s also a bit going on behind the scenes to support future systems like spells & effects, NPCs, factions, shops, and questing. These additions will be slowly rolled out as more features come online post 0.3.

For more frequent micro updates and news, follow me on Twitter @gav_clayton.

Daggerfall Unity 0.2 Video Roundup

Below are a couple of let’s-play videos based on the 0.2 build of Daggerfall Unity. While I tweeted these a while back, I somehow forgot to post them to the main development blog for everyone else to enjoy.

A big thanks to the creators for taking the time to make these videos. I learned by lot watching you play, and your enthusiasm helps keep me motivated. If I’ve missed any other current videos or similar creator content, please contact me and I would be happy to add it to this post.

First video is from ZetaPlays.


Next is from Lingering Trees.


And while not a video, the following storybook-styled journey from redditor SpotNL was too good not to link.

The Elder Strolls: Daggerfall (Unity) from ElderScrolls

Modding Support

Interkarma has asked me to write a quick overview about the upcoming modding feature that will be in version 0.3 that I’ve been working on.

Currently mods need to be built into a Daggerfall Unity project to work, which is an obvious limitation.  Interkarma has gone out of his way to support a bunch of different mods, even including them into Daggerfall Unity releases, but this takes up a lot of his time and has always been a temporary solution.

The new modding system takes advantage of Unity’s asset bundles, and allows mod creators to export the assets that make up their mods (textures, models, c# scripts, prefabs and so on) from Unity to a single file which is then loaded at runtime.

Exporting to a mod file is easy and done with a simple window inside the Unity editor:



The mod files are detected and loaded during the Startup Scene:


This means that going forward, modders will no longer have to rely on their mods being part of Daggerfall Unity to work.  Modders will be able to create, share, and release updates for their mods all on their own.  And using mods will require little more than the player placing the mod file in a directory.

We’ll be providing more details on how it works, including examples and tutorials in the near future.  Stay tuned!

Faction Support

Just a quick post today. I have implemented the faction back-end for Daggerfall Unity, which is a key pillar of quests and NPC dialog. Here’s the data shown as a flat list in the Unity editor. All parent-child relationships are actually in place, list is just drawn flat for debugging.


Starting faction data is parsed from FACTION.TXT and your save games are supported too! Importing a classic save will now also import your standing with all factions.

While there isn’t much happening with factions yet in Daggerfall Unity, it’s impossible to implement many gameplay systems without them. I look forward to doing much more with this data in a future build.