Modding Tutorials

Discuss modding questions and implementation details.
Post Reply
User avatar
TheLacus
Posts: 1305
Joined: Wed Sep 14, 2016 6:22 pm

Re: Modding Tutorials

Post by TheLacus »

I edited the post to include a link to updated documentation and information on required namespace. :)

User avatar
herman2000
Posts: 18
Joined: Sun May 10, 2020 2:08 pm
Location: Dresden, Saxony, Germany
Contact:

Re: Modding Tutorials

Post by herman2000 »

Small addition I figured out. What to do if you are adding a new civilized location to the WorldData (see here) but have about 20 or more named locations, all requiring a NameSeed?

Easy, if you got VS Code.

What you'll need is this: https://marketplace.visualstudio.com/it ... ode-random

Once that is set up and running, you click one of the "NameSeed" entries, select "Change all Occurrences", press the right arrow key till you are past the colon and first empty space, press CTRL+Shift+Right Arrow key to select everything from your cursor position up to the comma (but not including it), and use the Random: Short function. That way, you should be getting every NameSeed filled out at once within a range that the game will recognize as valid.

User avatar
Levethian
Posts: 30
Joined: Sun Jul 15, 2018 9:21 pm
Contact:

Re: Modding Tutorials

Post by Levethian »

Stuck in a similar place to septua77. I've cloned DFU from GitHub Desktop into Unity 2019.4.2f1, and downloaded the 'Daggerfall Tools for Unity' package, and opened DFU in Unity (7 compile errors upon loading, if that's worthy of note), and imported the tools package. Restarted & repeated, but the 'Daggerfall Tools' toolbar isn't showing yet. Not sure what I'm missing. Any advice very much appreciated.

Just looking to inject an upscaled title sequence (vid shows original followed by upscale):


TheLacus wrote: Sat Nov 09, 2019 1:08 pm
septua77 wrote: 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.
Daggerfall Tools for Unity is what connects the game to classic data. You need to clone Daggerfall Unity to have all the modding tools inside the Unity Editor.

Image

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

Re: Modding Tutorials

Post by TheLacus »

Levethian wrote: Mon Jul 06, 2020 9:01 pm Stuck in a similar place to septua77. I've cloned DFU from GitHub Desktop into Unity 2019.4.2f1, and downloaded the 'Daggerfall Tools for Unity' package, and opened DFU in Unity (7 compile errors upon loading, if that's worthy of note), and imported the tools package. Restarted & repeated, but the 'Daggerfall Tools' toolbar isn't showing yet. Not sure what I'm missing. Any advice very much appreciated.
Somehow missed this message, sorry for the delay. If you still face this issue, you need to open a clean download of Daggerfall Unity from Github; it includes most recent version of Daggerfall Tools for Unity so you don't need to download and import it separately. 2019.4.2f1 is now the right version of Unity to use.

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

Re: Modding Tutorials

Post by TheLacus »

Found a new limitation of portable compiler. Unity Editor doesn't show any issue with declaration expressions and Visual Studio 2019 even suggests the refactoring:

Code: Select all

int value;
if (dict.TryGetValue(value, out value))

Code: Select all

if (dict.TryGetValue(value, out int value))
The portable compiler, however, states that this feature is not available in C# 6 (which is actually true).

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

Re: Modding Tutorials

Post by TheLacus »

Now, that's a bad one: enum arguments with default value worked before engine upgrade, now the compiler simply produces an error pointing to line and character of method name.

User avatar
Magicono43
Posts: 1139
Joined: Tue Nov 06, 2018 7:06 am

Re: Modding Tutorials

Post by Magicono43 »

Huh, so does that mean that methods inside the code-base that have arguments with default values don't work either? Or is this just for added mods?

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

Re: Modding Tutorials

Post by TheLacus »

Magicono43 wrote: Fri Jul 17, 2020 5:46 pm Huh, so does that mean that methods inside the code-base that have arguments with default values don't work either? Or is this just for added mods?
Only for mods.

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

Re: Modding Tutorials

Post by Hazelnut »

I'm experimenting with replacing billboard textures and having some issues. I want to replace an NPC billboard sprite but I can't figure out how to set the new size / aspect ratio - it always seems to be based on the original texture record I am replacing causing the replacement to be stretched.

Do I need to figure out the scaling to convert original aspect ratio to new replacement... is there no other easy to do this like just provide the new size in pixels?
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

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

Re: Modding Tutorials

Post by l3lessed »

This connects to the discussion I was just having earlier about npc dialogues on click.

viewtopic.php?f=22&t=3941

You can find the code and related discussion here. Scroll down to the post with the second block of code. This one specifically covers how engine entities are setup, including their billboards, and then rendered. This is where it pulls the billboard height information and assigns it when it is created the entity to render.

The billboard height information is hard coded into the engine it seems.

The specific script that handles all this is called SetupDemoEnemy.cs. It appears it was meant as a class for modders to use to setup custom enemies. It seems it has access to the class and object properties you would need to set the billboard height.
Last edited by l3lessed on Mon Jul 20, 2020 10:34 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.

Post Reply