Page 13 of 15

Re: Modding Tutorials

Posted: Wed May 06, 2020 1:03 pm
by TheLacus
I edited the post to include a link to updated documentation and information on required namespace. :)

Re: Modding Tutorials

Posted: Wed May 13, 2020 8:08 pm
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.

Re: Modding Tutorials

Posted: Mon Jul 06, 2020 9:01 pm
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

Re: Modding Tutorials

Posted: Fri Jul 17, 2020 4:33 pm
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.

Re: Modding Tutorials

Posted: Fri Jul 17, 2020 4:38 pm
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).

Re: Modding Tutorials

Posted: Fri Jul 17, 2020 5:07 pm
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.

Re: Modding Tutorials

Posted: Fri Jul 17, 2020 5:46 pm
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?

Re: Modding Tutorials

Posted: Fri Jul 17, 2020 7:03 pm
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.

Re: Modding Tutorials

Posted: Mon Jul 20, 2020 9:27 pm
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?

Re: Modding Tutorials

Posted: Mon Jul 20, 2020 10:25 pm
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.