Modding Tutorials

Discuss modding questions and implementation details.
Post Reply
User avatar
Yagiza
Posts: 107
Joined: Wed Jul 31, 2019 5:16 pm

DFU class info and actual examples

Post by Yagiza » Tue Oct 15, 2019 5:54 pm

Are there actual examples of mods for DFU. Those in the first messages of this topic are obsolete and mostly do not work with actual DFU.
Also, I wonder if any documentation of classes from DaggerfallWorkshop namespace exist. Docs from this page describe some aspects of DFU modding, but most classes are not described there.

User avatar
TheLacus
Posts: 983
Joined: Wed Sep 14, 2016 6:22 pm
Contact:

Re: DFU class info and actual examples

Post by TheLacus » Tue Oct 15, 2019 6:44 pm

Yagiza wrote:
Tue Oct 15, 2019 5:54 pm
Are there actual examples of mods for DFU. Those in the first messages of this topic are obsolete and mostly do not work with actual DFU.
Are they? I'll check when I have some time but everything except example of ini settings should still be valid.
Yagiza wrote:
Tue Oct 15, 2019 5:54 pm
Also, I wonder if any documentation of classes from DaggerfallWorkshop namespace exist. Docs from this page describe some aspects of DFU modding, but most classes are not described there.
API documentation is typically written directly with xml code docs and exported to html. This is mostly useful for closed source projects; you can read xml docs directly with code for Daggerfall Unity.

I think exporting them for more readibility, for example to Github pages, could have value, but is an addition that would have to be maintained and updated regularly.
Mod System documentation - Learn how to create mods for Daggerfall Unity.
Modder Discussion - General help and discussion for the mod system.
Github Issues - Submit a bug report for the game, including the mod system.

User avatar
Yagiza
Posts: 107
Joined: Wed Jul 31, 2019 5:16 pm

Re: DFU class info and actual examples

Post by Yagiza » Tue Oct 15, 2019 8:08 pm

TheLacus wrote:
Tue Oct 15, 2019 6:44 pm
API documentation is typically written directly with xml code docs and exported to html. This is mostly useful for closed source projects; you can read xml docs directly with code for Daggerfall Unity.
Sorry, I can't understand where these docs are and how can I read them directly with code for Daggerfall Unity. :shock: :?:

User avatar
Hazelnut
Posts: 1697
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials

Post by Hazelnut » Tue Oct 15, 2019 8:08 pm

https://github.com/Interkarma/daggerfall-unity

download or clone the repo and look at the .cs files in Assets/Scripts & Assets/Game

User avatar
Yagiza
Posts: 107
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials

Post by Yagiza » Tue Oct 15, 2019 9:00 pm

Hazelnut wrote:
Tue Oct 15, 2019 8:08 pm
https://github.com/Interkarma/daggerfall-unity

download or clone the repo and look at the .cs files in Assets/Scripts & Assets/Game
Yes, that's what I've done in the first place. But seeing the code, I can't figure oout, how I should use these classes in my mod.

User avatar
Yagiza
Posts: 107
Joined: Wed Jul 31, 2019 5:16 pm

Re: DFU class info and actual examples

Post by Yagiza » Tue Oct 15, 2019 9:03 pm

TheLacus wrote:
Tue Oct 15, 2019 6:44 pm
Yagiza wrote:
Tue Oct 15, 2019 5:54 pm
Are there actual examples of mods for DFU. Those in the first messages of this topic are obsolete and mostly do not work with actual DFU.
Are they? I'll check when I have some time but everything except example of ini settings should still be valid.
Example 3 also do not work for me. Maybe I did something wrong, but this code:

Code: Select all

if (audioSource == null)
    audioSource = this.GetComponent<AudioSource>();
Leaves audioSource = null.

User avatar
Hazelnut
Posts: 1697
Joined: Sat Aug 26, 2017 2:46 pm
Contact:

Re: Modding Tutorials

Post by Hazelnut » Tue Oct 15, 2019 9:51 pm

Yagiza wrote:
Tue Oct 15, 2019 9:00 pm
Hazelnut wrote:
Tue Oct 15, 2019 8:08 pm
https://github.com/Interkarma/daggerfall-unity

download or clone the repo and look at the .cs files in Assets/Scripts & Assets/Game
Yes, that's what I've done in the first place. But seeing the code, I can't figure oout, how I should use these classes in my mod.
My suggestion is to grab a mod from github and get it working as a virtual mod in Unity, then dissect it to see how it works and what it does etc. Nystuls' mods really helped me get started, as I found figuring out what to do at first was quite hard. The mod documentation is much better now, but some of it is old and may be out of date. (check the posting dates)

User avatar
Yagiza
Posts: 107
Joined: Wed Jul 31, 2019 5:16 pm

Re: Modding Tutorials

Post by Yagiza » Wed Oct 16, 2019 3:46 am

Hazelnut wrote:
Tue Oct 15, 2019 9:51 pm
My suggestion is to grab a mod from github and get it working as a virtual mod in Unity, then dissect it to see how it works and what it does etc. Nystuls' mods really helped me get started, as I found figuring out what to do at first was quite hard. The mod documentation is much better now, but some of it is old and may be out of date. (check the posting dates)
Thanx, I'll try.

septua77
Posts: 3
Joined: Thu Oct 31, 2019 7:47 am

Re: Modding Tutorials

Post by septua77 » Sun Nov 03, 2019 10:51 pm

I'm sorry, I'm kinda slow. I can't even figure out how to open the Mod Builder interface.

My Daggerfall Workshop folder does not have that and I can't figure out how to open that window inside the Unity editor.

I was also confused if I need to clone the whole DFU project or just the Daggerfall tools for Unity project, but tried both and still not sure how to even open Mod Builder. <-- Main thing I'm confused about. Thanks for any help.

IAmTheClayman
Posts: 9
Joined: Fri Dec 07, 2018 7:31 am

Re: Modding Tutorials

Post by IAmTheClayman » Fri Nov 08, 2019 12:44 am

How would you go about making changes to an existing script in DFU? For example, right now HUDVitals.cs has the following code:

Code: Select all

public HUDVitals()
            :base()
{
	playerEntity = GameManager.Instance.PlayerEntity;
	LoadAssets();

	BackgroundColor = Color.clear;
	HorizontalAlignment = HorizontalAlignment.Left;
	VerticalAlignment = VerticalAlignment.Bottom;
	SetMargins(Margins.All, borderSize);
	...
I want to, as a test, have the vitals display horizontally centered. Would the way to do this as a distributable mod be to make the edits directly to HUDVitals.cs and include it in the list under Files in the Mod Builder window?

Post Reply