Mod Discussion
Posted: Sun Apr 05, 2015 10:25 pm
This thread is for blue-skying ideas around modding with Daggerfall Tools for Unity. I already have some ideas for this, which fall into the following three categories:
1. Direct asset replacement. This is the simplest to implement and will provide easy short-term mod potential. Users will be able to drop in replacement assets such as textures, models, sound effects, etc. that are loaded in place of the native assets. This is just a matter of having an agreed-upon asset folder to load replacement assets at runtime (e.g. ./assets/textures or ./assets/models). The existing content loading classes are due for an upgrade in 1.4 and this simplistic target would neatly coincide with this.
2. Unity-level addons. This type of mod is already being created. Examples include Nystul's Terrain Extender, LypyL's jet, and Uncanny_Valley's real grass. In theory this has limitless potential as creator has full access to Unity and DFTFU source code. Several improvements here could improve compatibility between mods and simplify their creation. These improvements are:
-a) More modular code in a few key areas (particularly StreamingWorld, which is more monolithic that I like).
-b) Events for key moments in some classes lifetime.
-c) Interfaces to standardise communication with key classes.
-d) Prefab support to simplify certain changes and additions.
-e) Properties for stronger control over runtime.
-f) Virtualisation for some classes to encourage extension by inheritance.
* What I don't like about #2 is that each mod is basically a separate build, making it harder to run several mods together.
3. Full modding API with integrated runtime, similar to City Skylines or Skyrim. This would be awesome and avoid the main limitation of item #2, but it's definitely a long-range idea. This isn't even on my radar yet. This would likely be an outgrowth of item #2, using many of the same Events and Interfaces. So it makes sense to tackle that first.
In this thread, please free to throw in your ideas and wishes for modding. If you are an existing creator, let me know areas you would like to see receive code changes, Events, Interfaces, Prefabs, etc. to help you with your creations. If possible, I'd like to minimise changes required to core library for Unity-level addons to work. This will keep addons fairly easy to integrate by other creators and reduce risk of breaking changes.
Have at it.
1. Direct asset replacement. This is the simplest to implement and will provide easy short-term mod potential. Users will be able to drop in replacement assets such as textures, models, sound effects, etc. that are loaded in place of the native assets. This is just a matter of having an agreed-upon asset folder to load replacement assets at runtime (e.g. ./assets/textures or ./assets/models). The existing content loading classes are due for an upgrade in 1.4 and this simplistic target would neatly coincide with this.
2. Unity-level addons. This type of mod is already being created. Examples include Nystul's Terrain Extender, LypyL's jet, and Uncanny_Valley's real grass. In theory this has limitless potential as creator has full access to Unity and DFTFU source code. Several improvements here could improve compatibility between mods and simplify their creation. These improvements are:
-a) More modular code in a few key areas (particularly StreamingWorld, which is more monolithic that I like).
-b) Events for key moments in some classes lifetime.
-c) Interfaces to standardise communication with key classes.
-d) Prefab support to simplify certain changes and additions.
-e) Properties for stronger control over runtime.
-f) Virtualisation for some classes to encourage extension by inheritance.
* What I don't like about #2 is that each mod is basically a separate build, making it harder to run several mods together.
3. Full modding API with integrated runtime, similar to City Skylines or Skyrim. This would be awesome and avoid the main limitation of item #2, but it's definitely a long-range idea. This isn't even on my radar yet. This would likely be an outgrowth of item #2, using many of the same Events and Interfaces. So it makes sense to tackle that first.
In this thread, please free to throw in your ideas and wishes for modding. If you are an existing creator, let me know areas you would like to see receive code changes, Events, Interfaces, Prefabs, etc. to help you with your creations. If possible, I'd like to minimise changes required to core library for Unity-level addons to work. This will keep addons fairly easy to integrate by other creators and reduce risk of breaking changes.
Have at it.