Modding System

Play with Mods


Introduction

In a similar way to other TES games, Daggerfall Unity supports two kind of mods: bundles and loose files.

A bundle has .dfmod extension and it can include different varieties of assets, including scripts. This make them a powerful tool as mods can interact directly with the core game and affects game behaviour, as well as add new features on top of the solid base provided by Unity and DTFU.

In addition, bundles benefit of an integrated replacement system which provide artists a code-free platform for graphic improvements of the original Daggerfall; this avoid any incompatibility and make use of the load order to smoothly handle duplicates. Other assets, such as textures, ui images, sounds and music and even new quest files, are imported directly from their folders on disk.

Finally, several mods created for the dos game are still functional with Daggerfall Unity since the original assets are accessed; other mods may be not compatible or simply obsolete.

Installation

Bundles can be placed inside StreamingAssets/Mods or any subfolder inside this one. Loose files are placed inside StreamingAssets/Textures, StreamingAssets/Sound and StreamingAssets/Quests; always refers to ReadMe and developers for any additional indication.

Configuration

Load Order

The load order defines the orders in which mods are executed; if two (or more) mods contain the same asset, the one in the lower position will be used. If multiple mods provides the same features, the load order may help to prevent incompatibilities but you should always referes to mod developers.

Settings

More advanced mods may provide support for user configuration, as well as presets with predefined values for all or some options. Settings are configurable from an in game UI; additionally new presets can be automatically created from current settings to be shared with the community or simply to store and retrieve a configuration locally.

Note: when upgrading, local settings are reverted to default values if incompatible with the new version.

Released Mods

 

Develop new Mods


Scripting

Daggerfall Unity support real-time injection of C# code; this allow modders to develop scripts for the Unity Engine and benefit of all the possibilities offered by this combination. A mod can change the game behaviour and create endless possible gameplay revisions and enhancement, as well as importing new assets to create something entirely new.

Principles and Patterns

A Daggerfall Unity mod consists of a package with .dfmod extension. This is a Unity AssetBundle with C# text files, compiled when the game starts, and game assets which can be retrieved at run time. The typical mod behaviour is to subscribe to some of the many events provided to add new features to the game, or alter it with the implementation of interfaces and callbacks. A standard integration with settings and saves is provided, while a message layer can be used to locate and communicate with other mods and implement compatibility patches only when required.

Features

Import Assets

The Asset-Injection framework allows to replace different kinds of assets used in game and provides artists the support to put their creativity into revising the original Daggerfall to create their own vision and graphic style.

Principles and Patterns

When mods aim to swap meshes, textures and other resources, a common issue is that asset usage is often a core part of the game which is not or should not be accessible to mods; additionally multiple mods with similar purposes can create a variety of incompatibilities. The Asset-Injection framework answers with a single implementation within the core game, while mods are given the role of providers. Specifically there are two ways for a mod to provide asset contributions:

  • Asset Bundle: a single optimized package created with the Unity Editor; allows improved optimization and customization and can be added or removed individually with a load order.
  • Loose Files: raw assets imported directly from disk with default format; easier for the mod developer at the cost of missing features, but also harder to manage for the user.

Features

Additional Resources

Additional resources usable in game can also be provided via loose files.

Write Quests

Quests for Daggerfall Unity are written in a simple scripting language, based on Donald Tipton’s TEMPLATE v1.11, which is compiled Just In Time and so can be written and tested even while the game is running. A quest debugger is also available to test the script and immediately find the target locations.

Extensions

Daggerfall Unity modding system can be used to create frameworks that can expose to mod developers more features in addition to the core mod support. This is a list of some of the most intriguing tools created by the community.