Having Trouble getting started making mods

Discuss modding questions and implementation details.
lil_doll404
Posts: 1
Joined: Sat Jul 18, 2020 12:38 pm

Having Trouble getting started making mods

Post by lil_doll404 »

Hi, everyone.

I am not completely new to coding. Ive worked with python and multiple web languages but I am having trouble getting into Daggerfall Unity. I started off downloading Unity Hub and downloading the Daggerfall Unity Package from the github. I saw someone say that you need to use the 2018 version of unity. Then I checked this website and one of the posts said that Daggerfall Unity was going to start using a 2019 version of unity. My first question is "Which version do I install?"

I downloaded Unity hub and went through with the installation of it. Then I went to the "Installs" tab in Unity Hub. I had downloaded versions from 2019 and 2018. Then I went up to projects, named the project "Daggerfall" then I clicked submit. Then I was brought to the page where you have a "scene" window and under that window you have an assets window and an option to access the console. The next thing I read I was supposed to do was import Daggerfall unity assets. I couldnt do it the way the documentation said I was supposed to because when I went to assets, then import package or add new asset, no matter how much I clicked on the daggerfall unity package, it wouldnt import. So took the Daggerfall package and dragged it into the asset window and dropped it. Will that work?

What is the most up to date guide on modding daggerfall unity, The pdf I was following doesnt seem up to date and neither does this guide I found on the website. Picture of guide I am referring to: https://imgur.com/a/1Zb5X6j . How do I access such a unity editor and where would I get the option to click on Daggerfall Tools? Where do I get the option to create new mods?

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Having Trouble getting started making mods

Post by Ralzar »

Well, first you need Unity. We just changed to a new version that will be used from DFU v0.10.25+

Download Unity 2019.4.2f1

Then, clone/download the 0.10.25a code using the tagged release for that build.

Start Unity, and open the code above in it.


To actually build mods, here's a quick-and-dirty step by step to build a mod:

1: Open the master files in Unity.
2: Create a new folder with the name of your intended mod in Assets/Game/Mods.
3: Create a script file containing your mod script. Put this in the folder you just made.
4: Click "Daggerfall Tools"->"Mod Builder"
5: Click "Create A New Mod". Do not change folders, simply write the name of your mod and click "Save".
6: Fill in the name, version etc fields in the Mod Builder window.
7: Select the script file you made in step 3. Click "Add selected assets"
8: Click "Save Mod settings to file"
10: Click “Build Mod”. Select a folder outside the project folders.
11: Give Unity about 5 minutes to build the mod.

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Having Trouble getting started making mods

Post by l3lessed »

I use unity hub for this reason. Allows as many unity projects as you wish and allows you to predefine the unity version the project uses.

Download the zip, extract the folder, add it to unity hub as a unity project, select the proper unity version (it will download it if you dont have it), then click launch. It should launch unity with the project all set up. Just have to load the startup scene and click the play button.

Still need to get a 10.25 setup in unity hub myself, but this is how I always have done it without issue.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

Caffinator
Posts: 11
Joined: Wed Aug 11, 2021 9:34 pm

Re: Having Trouble getting started making mods

Post by Caffinator »

I've read the setup guides https://www.dfworkshop.net/projects/dag ... y/modding/ and https://www.dfworkshop.net/static_files ... tarted.pdf, but still having issues getting Unity set up with the DFU source code. I've Google searched the issue and browsed through the last couple of years of posts in the modding part of the forum and didn't see any helpful references to this issue. I'm hoping someone can tell me what I'm missing or doing wrong here.
I'm using Unity 2019.4.28f1 (64-bit) which I saw is used for the build of DFU I'm trying to use (0.12.2)
The issue is that after adding all of the source folders into Assets in Unity, all of the objects in the Localization folder fail to import properly.
There are several console errors about "The type or namespace name 'Localization' does not exist in the namespace 'UnityEngine'"
Selecting any object in the Localization subfolders shows "The associated script can not be loaded. Please fix any compile errors and assign a valid script"
I checked the API compatibility level and there are only 2 options there: ".NET 4.x" and ".NET Standard". I think the 4.x option is the one needed, but I've tried both.

Any help would be appreciated.

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Having Trouble getting started making mods

Post by Ralzar »

Are you using Unity Hub?

When a new version of the source code is out I just unpack that into a new folder. Then I open unity hub and click "ADD". I select the new folder and it appears as a new project. Then I just open that project.

Caffinator
Posts: 11
Joined: Wed Aug 11, 2021 9:34 pm

Re: Having Trouble getting started making mods

Post by Caffinator »

I'm not using Unity Hub, but I don't see how that makes a difference. The source should be read into unity either way.

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Having Trouble getting started making mods

Post by l3lessed »

Why don't you want to use it?

It is simple as extra the DFU folder, open unity hub, click add, select folder, and then launch unity editor; the first time you run it, it will need to find the original Daggerfall game files.

If you don't use the hub, I can't really help that much.

Also, what do you mean you add the source folder to the unity assets folder? There is no reason to be dumping the DFU source files anywhere in the unity editor/unity engine directory. They should be able to be loaded using their own directory path. This is I think your first problem. It probably is confusing the unity editor and engine trying to compile with the DFU assets dumped into its assets folder.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

l3lessed
Posts: 1400
Joined: Mon Aug 12, 2019 4:32 pm
Contact:

Re: Having Trouble getting started making mods

Post by l3lessed »

Well, I decided to figure this out for you real quick. Here is how I got it setup on my first attempt not using the hub and only the editor.

Try this. Do a fresh install of unity and open the editor. Then click the file button on the top left, then click new project. This should bring up a new projects window.

Name the project and then for the directory select the parent directory you want your DFU files in; don't forget, it will create the the project folder using your project name, so just select the main directory you want the project in, and name the project whatever you want.

Now, once unity sets up, it should create the project and its folder in the directory you selected. Finally, close unity and extract all the DFU zip into the project folder unity just created for you.

*IMPORTANT: Also, make sure to tell it to overwrite all the duplicate files, so the DFU's project files take priority over the ones the editor created and added when setting up the project. If you don't you will get tons of errors, including name space.*

You're unity build is now ready. Just open it again, it should load everything properly, and then go to scenes and make sure to load up the startup scene

I just tried this, and it worked fine.


I will be honest. It is not good etiquette to come to a forum and ask for help, get a response, and then refuse to try the method recommended by multiple developers you're wanting help from and demand another answer. I teach, so I am use to this, but please next time try the method recommended before you come back with the problem. I can't guarantee I or others will have the time to figure out your specific issue if you don't try our recommendations.
Last edited by l3lessed on Fri Sep 03, 2021 8:04 pm, edited 1 time in total.
My Daggerfall Mod Github: l3lessed DFU Mod Github

My Beth Mods: l3lessed Nexus Page

Daggerfall Unity mods: Combat Overhaul Mod

Enjoy the free work I'm doing? Consider lending your support.

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

Re: Having Trouble getting started making mods

Post by TheLacus »

Caffinator wrote: Fri Sep 03, 2021 3:50 pm The issue is that after adding all of the source folders into Assets in Unity, all of the objects in the Localization folder fail to import properly.
There are several console errors about "The type or namespace name 'Localization' does not exist in the namespace 'UnityEngine'"
Selecting any object in the Localization subfolders shows "The associated script can not be loaded. Please fix any compile errors and assign a valid script"
The repository on Github is a full Unity project, you can open it directly from Hub or inside the Unity Editor (File > Open Project). The Localization package should be downloaded automatically when you open the project for the first time, but you can check it's installed from Window > Package Manager (required packages are listed in the file manifest.json).

Caffinator
Posts: 11
Joined: Wed Aug 11, 2021 9:34 pm

Re: Having Trouble getting started making mods

Post by Caffinator »

I never refused to try it. If you think it may make a difference, I'll give it a shot. I'll also try the steps you gave.
Just to clarify further, the files in the Localization folder aren't missing, but it seems like Unity can't parse them for some reason.
I'll come back with on update once I've tried the steps laid out here including a clean reinstall of Unity.

Post Reply