Swapping out existing Clothing with dyable versions?

Discuss modding questions and implementation details.
Post Reply
User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Swapping out existing Clothing with dyable versions?

Post by Ralzar »

So while creating "Paints and Dyes" I started digging a bit into the dye mechanics and what could, and could not be dyed. I discovered that you could make Dyed versions of existing clothes by simply making new files. For example, male breton casual pants is archive 241, record 17. So you can just add a loose texture file named "241_17-0_Red.png" to make a version of the pants for red dye.

I can, through a bit of stubborn photoshop use, make the different dye versions of these graphics. However that is quite a lot of boring work and it is not compatible with DREAM etc. So, I was wondering, is there some way to make a new item texture that uses the vanilla dye tech of swap-tables explained here?

https://www.dfworkshop.net/items-part-2-dyes/

So, for example I make one new casual pants named 241_17-0.png which then overrides the vanilla pants texture and gives it the ability to display dyes?

I am assuming there is no way to do this but I figured it was better to ask before I did a bunch of boring manual labour :D

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

Re: Swapping out existing Clothing with dyable versions?

Post by King of Worms »

Hi, I was naturally wondering how to make this DREAM compatible.

DREAM uses this exact process which you describe here, creating new files... it looks like this:
Spoiler!
dyes.jpg
dyes.jpg (712.64 KiB) Viewed 629 times
It allowed me to create a versions which never existed ingame, like the ones u can see at the top left corner for example.

So given all these color variants exist in the DREAM, I think it might be possible to make our mods compatible?

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Swapping out existing Clothing with dyable versions?

Post by Ralzar »

Oh yeah, I suspected DREAM already did the same. Just no one has done it for classic textures. I ended up trying my hand at it but uploaded it as a separate file.

I think I could include the files directly in Paints And Dyes, but then DREAM would need a bit of compatibility code in its dfmod.json file to make sure it loads after Paints And Dyes:

Code: Select all

 {
            "Name": "Paints And Dyes",
            "IsOptional": false,
            "IsPeer": false
 },
Edit: allthough this would not stop vanilla items appearing for dyes you do not include in dream.

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

Re: Swapping out existing Clothing with dyable versions?

Post by King of Worms »

I can try to add that code to the paperdoll.dfmod json. Never did that be4 but seems easy. I think DREAM has color variants for almost everything but that hide tshirt 😂

There will be some differences but that will sort itself out when we can test it ingame

User avatar
Ralzar
Posts: 2211
Joined: Mon Oct 07, 2019 4:11 pm
Location: Norway

Re: Swapping out existing Clothing with dyable versions?

Post by Ralzar »

Yeah, just do it like I did it here:

https://github.com/Ralzar81/Ironman-Opt ... dfmod.json

Post Reply