Modding Tutorials: Asset-Injection

Discuss modding questions and implementation details.
Post Reply
User avatar
Interkarma
Posts: 5108
Joined: Sun Mar 22, 2015 1:51 am

Re: Mesh and Texture replacement - guide

Post by Interkarma » Sun Feb 05, 2017 11:00 pm

I can't say this enough, TheLacus. You're doing a singularly amazing job putting all of this together.

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

Re: Mesh and Texture replacement - guide

Post by TheLacus » Mon Feb 06, 2017 8:10 pm

Thank you. I'm happy to give my contribution to this project :)
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.

JustinS
Posts: 11
Joined: Fri Feb 03, 2017 5:40 am

Re: Mesh and Texture replacement - guide

Post by JustinS » Mon Feb 06, 2017 8:27 pm

Interkarma wrote:I can't say this enough, TheLacus. You're doing a singularly amazing job putting all of this together.
Seconded. This is fantastic work and is going to have the biggest impact on turning Daggerfall into a modern game

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

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus » Sun Mar 05, 2017 1:15 pm

tyhender wrote: Simply amazing.
Now I see why DaggerXL died. DaggerXL is closed-source, and there's no theLacus to do all that amazing stuff for DaggerXL.
Arl wrote: This is taking things to even more exiting stages, thank you TheLacus.
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
jman0war
Posts: 264
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war » Sun Mar 12, 2017 3:59 pm

i've had a tiny bit of success and some crashes.
1- To get anything in game it requires running Unity as administrator (Win10).
2- Replacing any of the other billboards or static tree placement with my tree results in a crash to desktop.

In Dragontail mnts i found 1 of my trees in town.
However the image is squished so evidently i have to maintain the height and width proportions?
But this would make it difficult to keep to the usual 128/256/512/1024 dimensions.
Image

Edit: can't reproduce results consitently.
One time the tree is in the game, next time it isn't.
Could this be a result of a 'dirty save'?

Fired up vanilla DF and visited the same town to confirm the vanilla trees really are the same ones i'm replacing.
some of my Daggerfall work can be found here: http://www.thehungryartist.com/games.html

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

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus » Sun Mar 12, 2017 8:29 pm

jman0war wrote:i've had a tiny bit of success and some crashes.
1- To get anything in game it requires running Unity as administrator (Win10).
2- Replacing any of the other billboards or static tree placement with my tree results in a crash to desktop.
Does it happens with both your build and the new version released by Intekarma? Can you check if you have something strange in the last part of DaggerfallUnity_Data\output_log.txt?
Also please tell me the name of the locations where you are testing.
jman0war wrote: In Dragontail mnts i found 1 of my trees in town.
However the image is squished so evidently i have to maintain the height and width proportions?
But this would make it difficult to keep to the usual 128/256/512/1024 dimensions.
Billboards have the same size as in the vanilla game, so yes, they need to have the same proportions.
Alternatively, you can change the size of the mesh like i wrote in the first post.
It is currently possible to replace billboards (sprites) textures only in interiors, dungeons and fixed locations (towns). Texture replacement for billboards support animations (you can have as many frames as you want, even more or less than vanilla) and emission maps.

For a simple texture swap, only texture files are needed. They will have the same size as vanilla, regardless of resolution.
If you want to customize the size, for example because your sprite has different proportions, you can do so with an xml file. All frames share the same file.

Archive_Record-0.xml

Code: Select all

<?xml version="1.0"?>
<info>
<scaleX>1</scaleX>
<scaleY>1</scaleY>
</info>
(1:1) means the same size as vanilla, (1:2) has a double height, (0.5:1) is half as wide.
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
jman0war
Posts: 264
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war » Mon Mar 13, 2017 12:43 am

Town is called Pythilaza in DragonTail Mnts.
In the very NE corner are about 5 or 6 of these 510_12 trees with a couple of cattle next to them.
I verified this by visiting the town in my vanilla DF game in dosbox.

What i find really bizarre now is the only way my tree shows up in Pythilaza, is if i name my tree: "504_12-0.png"

Why 504_12?
Well, i had thought of a place where i know there are some staticly placed trees : Wayrest along the walkway to the castle.
Those trees are 504_12.

So i copied my 510_12 tree into the StreamingAssets\Textures directory and named it "504_12-0.png"; i also have 510_12-0.png in the same dir though, but that really shouldn't be a problem.

I have no idea why the static trees in Pythilaza now only appear when i have them called "504_12-0.png" <-it's the wrong name of the trees.

When i take "504_12-0.png" out of the dir, only vanilla trees show up, despite that the correctly named tree is there: "510_12-0.png"
That probably sounds really confusing..

edit: should be NE corner of the town, not NW.
some of my Daggerfall work can be found here: http://www.thehungryartist.com/games.html

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

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by TheLacus » Mon Mar 13, 2017 4:16 pm

Thank you for reporting this strangeness, i'll look into this and report back.
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
jman0war
Posts: 264
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war » Tue Mar 14, 2017 1:26 am

some success!
This is a WIP tree btw, but this is exactly why i need to see them in game.
Image

Basically it's the 510_25 tree.
But there are duplicate trees and the possibilities are:
504_25-0
506_25-0
510_25-0

I put 2 copies of this tree into the StreamingAssets folder:
510_25-0, nothing
504_25-0, bingo!

In this case the devs must have used the 504_25-0.png in this particular town block.
Unfortunately when i try the same process with the earlier tree, (also tried some stones), and could not duplicate this result.
But it is promising.
some of my Daggerfall work can be found here: http://www.thehungryartist.com/games.html

User avatar
jman0war
Posts: 264
Joined: Fri Jan 22, 2016 2:41 am
Contact:

Re: [GUIDE] Mesh, Texture and Sound replacement

Post by jman0war » Tue Mar 14, 2017 10:21 pm

Here's a question, and maybe Interkarma knows.

In Daggerfall Modeling, one can see city blocks, and among those blocks are the flats.
But the flats are not select-able.
Would there be a way to determine what flats are being used in a given block?
some of my Daggerfall work can be found here: http://www.thehungryartist.com/games.html

Post Reply