Modding Tutorials: Asset-Injection

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

Re: Modding Tutorials: Asset-Injection

Post by TheLacus » Fri Sep 06, 2019 9:02 pm

MasonFace wrote:
Mon Sep 02, 2019 3:03 pm
Sorry to dig this back up, but I just had someone post on the Nexusmods page for PVE that the ghosts are showing full black instead of transparency like in this screenshot from before.

I have confirmed that it is working as expected in Unity, but it doesn't work correctly in DFU on my computer. I've double checked that I have a dummy material packaged in the DFMOD file with the standard shader and fade rendering mode. I named the material "Fade_Dummy".

Can you double check and see if the previous package that you got working in DFTFU also works in the final build on your machine?
No, it doesn't; i think the issue is that material is created at runtime and required standard shader variant is apparently not available if provided by an assetbundle. Sorry for giving a false hope. I'll need to include fade variant with core game, which is also a requirement to support loose files anyway.
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
MasonFace
Posts: 355
Joined: Tue Nov 27, 2018 7:28 pm
Contact:

Re: Modding Tutorials: Asset-Injection

Post by MasonFace » Fri Sep 06, 2019 9:07 pm

Sorry for giving a false hope.
Sorry I gave you false hope earlier when I thought it was working! lol

And that's okay, I know you'll get it working once you get it integrated into the core game.

You're still the man, TheLacus!

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

Re: Modding Tutorials: Asset-Injection

Post by TheLacus » Tue Sep 10, 2019 3:15 pm

Ok, Fade rendermode should now work for both mods and loose files. :)
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
MasonFace
Posts: 355
Joined: Tue Nov 27, 2018 7:28 pm
Contact:

Re: Modding Tutorials: Asset-Injection

Post by MasonFace » Tue Sep 10, 2019 3:32 pm

Awesome! Will this take effect with the next DFU release?

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

Re: Modding Tutorials: Asset-Injection

Post by TheLacus » Tue Sep 10, 2019 6:58 pm

MasonFace wrote:
Tue Sep 10, 2019 3:32 pm
Awesome! Will this take effect with the next DFU release?
Yes ;)
Thank you for reporting the issue, feedback from mod authors is very useful!
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
MasonFace
Posts: 355
Joined: Tue Nov 27, 2018 7:28 pm
Contact:

Re: Modding Tutorials: Asset-Injection

Post by MasonFace » Sun Sep 22, 2019 12:24 am

Hey TheLacus!

I was wanting to take a crack at making a mod that extends the behaviors of doors, but first I need a little help understanding how DFU handles placing particular doors in interiors and how a modder would inject a new prefab for specific doors.

I've had some success with replacing static props with a new prefab. I made a new fireplace with a slightly higher polycount mesh, a light source, PBR material, and a particle system. I just named the prefab "41116", included it in my dfmod and it worked! But now I'm getting confused on how to do the same with doors...

It looks like all the doors inherit from the base mesh 55000. From there, I'm guessing it relies on the tag system to assign it a specific material based on Climate and Season, but I'm having difficulty understanding how DFU maps "55000" to material 374_0-0, for instance in Privateer's hold. I'm guessing it's done with DaggerfallMesh.cs, but I'm not seeing how it all works together.

Anyhow, long story short, I've tried overriding the base 55000 mesh with a custom mesh expecting that all interior doors would fallback to this new mesh since I didn't include any climate or season tags, but I'm not seeing any results or errors in console.

How should I proceed with trying to create unique door prefabs that get injected properly?

Thanks!

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

Re: Modding Tutorials: Asset-Injection

Post by TheLacus » Sat Sep 28, 2019 12:51 pm

MasonFace wrote:
Sun Sep 22, 2019 12:24 am
Hey TheLacus!

I was wanting to take a crack at making a mod that extends the behaviors of doors, but first I need a little help understanding how DFU handles placing particular doors in interiors and how a modder would inject a new prefab for specific doors.

I've had some success with replacing static props with a new prefab. I made a new fireplace with a slightly higher polycount mesh, a light source, PBR material, and a particle system. I just named the prefab "41116", included it in my dfmod and it worked! But now I'm getting confused on how to do the same with doors...

It looks like all the doors inherit from the base mesh 55000. From there, I'm guessing it relies on the tag system to assign it a specific material based on Climate and Season, but I'm having difficulty understanding how DFU maps "55000" to material 374_0-0, for instance in Privateer's hold. I'm guessing it's done with DaggerfallMesh.cs, but I'm not seeing how it all works together.

Anyhow, long story short, I've tried overriding the base 55000 mesh with a custom mesh expecting that all interior doors would fallback to this new mesh since I didn't include any climate or season tags, but I'm not seeing any results or errors in console.

How should I proceed with trying to create unique door prefabs that get injected properly?

Thanks!
If you look inside Assets/Prefabs/Scene you can find prefabs for interior doors. When they are loaded a DaggerfallMesh component is added directly and climate is set without seeking injected models, so unfortunately it's not possible to replace them right now. I opened an issue on Github.
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.

Alth
Posts: 5
Joined: Wed Feb 20, 2019 9:59 pm

Re: Modding Tutorials: Asset-Injection

Post by Alth » Tue Nov 05, 2019 5:05 am

I don't know what I'm doing wrong but I can't get models to replace the ones in the game. I followed all the tutorials and read all the posts people made.

When this tutorial says "unity will import it and create a folder called Materials, containing one .mat file for every material included in the fbx." There is no materials folder being created and even if I create one the model doesn't change in game.

I make the model into a prefab and add it to the modbuilder, build it and then put the dfmod in streamingassets/mods (doesn't work), I put it in streamingassets itself (nope), I try putting the prefab in to no avail. The startup sees the mod but nothing changes in the game. I have tried everything but none of it works.

I must be missing something fundamental to the process.

Post Reply