Having trouble replacing certain textures (paperdoll clothing)

Discuss modding questions and implementation details.
Post Reply
SharkClub
Posts: 22
Joined: Tue Apr 16, 2019 11:49 pm

Having trouble replacing certain textures (paperdoll clothing)

Post by SharkClub »

Hello,

I've been having a hell of a time trying to replace a few of the standard inventory item/textures/paperdoll clothes with some alternate variants from the old AndyFall/AndyFallLite mod. I've been up and down this forum and through Daggerfall Imaging 2 multiple times and can't quite seem to wrap my ahead around it.

Quick explanation of my current setup:
I have one DaggerfallUnity install that I direct at either a base DaggerfallSetup install of the game or a version of DaggerfallSetup with the AndyFall clothes/faces/body files modded in. I also direct Daggerfall Imaging 2 at either of these to cross-reference what they are replacing. Playing Daggerfall Unity directed straight at the version with AndyFall's texture replacements works perfectly fine, just as it would in a vanilla Daggerfall game. The faces all work, the clothes & the bodies work - the problems arise when I try to pull apart these texture files and re-implement certain bits and pieces into DaggerfallUnity using the StreamingAssets folder for modding/asset injection while it's pointed at the vanilla DaggerfallSetup install.

From what I understand right now:
If I want to replace some of the default character faces, I can export the faces from AndyFall's version of the .CIF using Daggerfall Imaging 2 and grab one that I want to replace another with. I can then name this exported .PNG FACE14I0.CIF_7-0.png and place it in the StreamingAssets\Textures\CifRci folder, and then when I open the game it will replace the 7th paperdoll head for High Elf females. This all works as expected, pretty much - I did have to disable the Compress Modded Textures option in the Enhancements menu in the launcher otherwise the colors would go all funky, but with that box unchecked then this works as I would expect it to.

The trouble appears when I try to replace a piece of clothing. The one I'm trying to replace are the small brown sack shoes in TEXTURE.236 (High Elf Female Clothing). These shoes are Record10-Frame0 of this texture file. So far so good. So I pull the black shoes out of AndyFall and place them in the StreamingAssets\Textures folder... and this is as far/close as I can get to putting them in the game. From all the blogposts and tutorials I've read they all say that the loose files (remnants of textures) should just be placed in this folder - and this does work for some clothing items, but only ones where I can specify the color.

I've named the black shoes 236_10-0.PNG, to me this should replace the brown sack shoes located at TEXTURE.236_10-0, like it does in the vanilla game with them inside the texture file at that location using AndyFall's textures. I've also tried many variants of the naming structure (TEXTURE.236_10-0.PNG, 236_10.PNG, etc.) but no dice. So I moved on to a different item of clothing, a top that replaces the brassiere at 236_0-0. If I replace that as 236_0-0.PNG it does not work, but if I replace it as 236_0-0_Blue.PNG it will replace the Blue dyed variant in the game with it, but this only works for clothes that have dyes like this. I could theoretically recolor this top and replace each and every dye version of it this way, but I'd rather just replace the base version that the dye is applied over. This is also not even an option for things like the shoes or the pants which don't support the dyed colors in the texture file (as far as I know) because there are not multiple dyed versions of the shoes. Is it just not possible to replace clothing items that are of a "unique" variant (not one that accepts dyes)?

Here's some screenshots of what I'm talking about basically:
DFUnity directed @ DaggerfallSetup with AndyFall's textures/CIFs/IMGs installed:
https://i.imgur.com/lGkKFRj.png
As you can see the shirt / body shape / face / leather armor and shoes all have a different look to their vanilla counterparts.

DFUnity directed @ fresh DaggerfallSetup:
https://i.imgur.com/Da1oRcU.png
The shirt is actually that bra, the black shoes are actually the brown sack shoes.

DFUnity directed @ fresh DaggerfallSetup, after many "modding" attempts at trying to bring some AndyFall textures over:
https://i.imgur.com/LtXlw8R.png
As you can see I successfully managed to bring the face over. The top that replaces the bikini bra is a little bit of a strange one. If you look on the right you can see what it looks like originally when you port it over. The texture AndyFall uses is a lot taller than just the top itself, here's a picture of what they look like in my folder: https://i.imgur.com/vKfAxdi.png, 236_0-0 is currently going undetected, so I cropped 236_0-0_Blue.PNG to actually fit and ported the original over as the Green dyed variant so I could show both in one screenshot. But what this does indicate to me is that I'm in the correct folder when trying to replace all this stuff. The shoes still elude me however (as does porting over the original version of the top and having the game handle the dyes). I have not tried porting the body shape or the leather armor yet.

All I do know is that if I point DaggerfallUnity at a version of Daggerfall with this AndyFall stuff all still in their texture/CIF/IMG files it all works as you would expect, but there isn't really any ability to choose to replace or remove certain aspects.

Anyone have any ideas how to port over clothes from this mod without having to label them to a certain dye color etc., either for clothes which don't have dye colors or for clothes which will have the dyes applied in-game afterwards like the vanilla clothing (with the default being the blue one)?

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

Re: Having trouble replacing certain textures (paperdoll clothing)

Post by Hazelnut »

FYI all clothing items are given a dye colour even though some vanilla graphics do not get recolours because they don't use those parts of the palette.

The mod system allows all of these dyes to be replaced individually so you could provide different colour shoes or just duplicate the black image for each dye.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

User avatar
King of Worms
Posts: 4753
Joined: Mon Oct 17, 2016 11:18 pm
Location: Scourg Barrow (CZ)
Contact:

Re: Having trouble replacing certain textures (paperdoll clothing)

Post by King of Worms »

Yes.. so u have to have like 10 variants for one piece of clothing.

Heres a screen with correct naming for example
Untitled-2.jpg
Untitled-2.jpg (230.37 KiB) Viewed 1993 times

SharkClub
Posts: 22
Joined: Tue Apr 16, 2019 11:49 pm

Re: Having trouble replacing certain textures (paperdoll clothing)

Post by SharkClub »

That seems extremely excessive compared to the vanilla Daggerfall implementation of this mod. So there's no way to have it work with just the base pre-dye file and then have the game do the rest like the vanilla files do? Thanks for letting me know how this acts in any case, I was really confused by it.

Though I suppose in a way this is an improvement if I think about it, it allows you to replace half of the colors of some item with an entirely different item and have them both appear alongside eachother in the game because they take up different slots? So all of these clothing pieces which don't use the palette for dyes originally are just free slots to add custom items?

Well, my next question would be, if I'm to be manually replacing each piece of clothing for each dye color, what's the easiest way to apply Daggerfall's dye colors 1:1 to the standard Blue .PNG that I've ripped out of the TEXTURE file? If I need the full list of Daggerfall dye colors for that is there a way to apply them to the blue one, or would it be a manual recolor job outwith the Daggerfall dye system's outputs?

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

Re: Having trouble replacing certain textures (paperdoll clothing)

Post by Hazelnut »

I found using the tool detailed in this thread about SLADE worked really well for the armor re-colours to generate all the png's for the new items. If you want to simulate the vanilla dyes in mod textures it's perfect. I posted the conversion configs for all the materials, but you'll need to create those for the clothing dyes.
See my mod code for examples of how to change various aspects of DFU: https://github.com/ajrb/dfunity-mods

SharkClub
Posts: 22
Joined: Tue Apr 16, 2019 11:49 pm

Re: Having trouble replacing certain textures (paperdoll clothing)

Post by SharkClub »

Ok, so I've been fiddling around with this stuff a bit. Managed to get armor recolors and stuff working with SLADE & the color palette coords you provided in that thread, haven't taken the time to figure out the color palette coords for clothing dyes and such yet.

What I was trying to do with the armor ones is recolor one of the helmets from AndyFall for different armor types, as it does originally, and I was able to do that but there's some weird stuff with the helmet scaling of certain things that doesn't exist in vanilla Daggerfall as far as I know. I realize in DFU this stuff is done in an XML file (though I haven't tried fiddling with it yet), but maybe this is just an issue with how certain things were ported over from vanilla. Note that even if original Daggerfall does do the scaling via an external file like an XML, in AndyFallLite there isn't anything provided that would handle this, just TEXTURE files.

But anyway, this is what I'm experiencing: https://i.imgur.com/2fsTflm.png

All three pictures are in DFUnity.
1. On the left is the original Daggerfall helmet. This is DaggerfallUnity pointed at a fresh DaggerfallSetup install of the game.

2. In the middle is the AndyFall version of the helmet, as it is supposed to look (at the same scale it is in the file itself). This is DaggerfallUnity pointed at a version of Daggerfall with the AndyFallLite textures modded in.

3. On the right is what happens when I export that helmet using Daggerfal lImaging 2, put it in the streamingassets textures folder (with a _Mask variant as well), and it comes out all squished unlike the middle one.

The interesting thing is that the original file for the leftmost helmet in that picture is 44x43 pixels, and the one for the middle/right helmet is much different at 47x38. Is this just how you're meant to replace helmets in classic Daggerfall if you want to scale them slightly differently and is that why there's a discrepancy here? Something I've actually already tried was replacing grabbing the helmet from inside the 47x38 file and putting it into a 44x43 size file, and the scaling is still squished and way off.

I'm wondering: Does this mean that the original assets from Daggerfall don't have XML files tied to them behind the scenes, and the default one that takes affect when you start replacing helmets has incorrect default values for those helmets? Is that intended or an accident that creates more busywork for people looking to mod assets in and out? It seems to happen with most (default) helmets by the way, not just this one.

I'm asking all this because now I'm genuinely kinda interested in getting to grips with this stuff and creating a modular version of AndyFallLite's textures that you can just drop into the StreamingAssets folder, for people wanting to experience that without having to overwrite their original game's textures. It's nice to keep the OG Daggerfall install as clean as possible (which is why I have two for testing things).

Post Reply