Dye (an idea that might help) as a costless modifier
Thunder-Nova opened this issue ยท 9 comments
Details
I still see that you "might" have trouble with dyes. And even searched to see if any suggestions reguarding what I am about to say. It is possible I miss one since I did a quick search, though which I can explain got no Internet currently at home.
I don't want to push it, so you can close this if you wish. I don't actually know how to make mods yet. So can't help in coding, I wish though.
Idea(s)
Costless since it's simply dyes.
Leather or Paper Armor Piece + Dye to simplify perhaps just Dye in certain slot of the table to affect various parts.
If possible, it make it a priority where adding modifiers won't overlap the Dye. Or perhaps add flint or sponge to remove other modifier's visual add-ons.
Other possibilities
Crafting Leather Armor Piece + Dye only
As armor replacement, it will just make Leather Armor Piece as just a part replacement. So it's simply (by standard value) just as adding new parts.
The problem with dyeing isn't related to the idea, but the coding. It's been a while since I messed with this so I may have lost some of the details, but essentially the armor item models lose the necessary information to delineate the different parts during the baking process. This means you can only color the entire item rather than by parts.
Which is why I also put "other possibilities"
I was thinking as making individual parts could help perhaps.
Since every material has a color and design, I though you could also try at least new colored leather material not as modifier but as individual colored design.
Exemple: craft yellow dye + 8 or 1 leather will make 8 or 1 yellow leather. So afterwards then make parts.
@Thunder-Nova
Do you realize how many new (duplicated) materials that would add??? That method is absurd.
Vanilla leather armor color is an interpolated value, not just a single value for each of the 16 dyes. There are a possible combination of 12,326,391 different colors... aka 12 million new materials.
Even if you stuck to just the 16 base dyes, that is still 16 additional items and additional materials that are all just copies of leather. This is just unnecessary bloat for a feature that would only be half-ass implemented.
@TehSeph Hmm... I wasn't thinking of color blend at all like the actual dye of vanilla leather armor. I meant to stick it to just the basic and NOT overthinking it, Keeping it simple.
And I am aware it is what you call "Half Ass". But for now if it's the only way to make dyed armor then this should be easier.
16 dyes for if I recall 7 part types. 112 new parts.
If it were possible to simply just make just the base code and simply copy and paste the rest, then there shouldn't be any problem.
But if every design is individually made... I could take my time to make it. I got no internet at home except during the weekends I visit friends. @TheIllusiveC4 can send me an image file and tell me what to do. And I will do it gladly. (Plus I make double design, to make a blend or slightly textured)
The implementation would have to include the interpolated color values, if nothing else than to just keep it consistent with the behavior of actual leather armor.
In addition, it would be trivial to simply hard-code new materials for each of the 16 dye colors. However, this is an extremely clunky way of implementing this feature and I would never deign to go this route. Not to mention the amount of overhead to implement the necessary workarounds for something like that. It's just more trouble than it's worth.
It all comes down to the fact that it is possible to implement a dyeing feature, but not in a satisfactory way. Like I said before, the main obstacle is on the coding side and dyeing is at a dead end until I can figure out a way around the current limitations that still maintains consistency with both the vanilla dyeing feature and the Tinker's system.
Well I do wish I knew how to code an implications. I would gladly help... I imagined before in a moment just like other modifier they give a design over the figure of the model. Such as for the helm the googles give googles, and the Reinforced modifier gives a purple overlay to the visor of the armor.
The only thing I didn't, or might not have specifically seen from Tinker is a modifier remover. Which might be the actual limit, that I can imagine. If I can speculate, if you manage to make something of a specific NBT remover type modifier, most towards Accessories (exemple 2 flint will cut it off) and Dye modifiers (wet sponge will remove all dyed parts), this might help...
Something I discovered with certain modpacks recently are the NBT data, thanks to a Waila and JEI. Hovering a mouse over certain items and hold CTRL+SHIFT shows at the bottom the very core of certain items... And man looking at those armor it does end up a long read. I might check it up on actual leather dyed to see what I can figure up myself.
But kinda wish to see the results of your attempts. Just out of curiosity. But not obligated.
I took look into leather NBT I saw blue dyed leather with the NBT
{display:{color:3949738}}
And added 3 black dye to make
{display:{color:2369091}}
Looking on how part of the leather armor isn't dyed, seems like there is something to it, yet got no clue how.
I've been looking on a raw armour NBT, and can see a simplified material of just 3 words. The only 2 things that pops in mind, is to seperate the materials and add each with their own color exemple: Materials:[{"leather",display:{color: # }},{"ardite",display:{color: # }},{"bone",display:{color: # }}] or make a modifier that changes the color from the outside.
But little of what I know of programming, or what you already done, this is pretty much all I can think.
seperate the materials and add each with their own color
This already occurs under the hood. If it didn't, then the item wouldn't know what color the material is to begin with. Everything would just be white. The problem is grabbing dynamic color information from the leather material and baking that into the item per applicable part, since the relevant modeling code was made only with static colors in mind.
make a modifier that changes the color from the outside
There's a possibility that I could hack this sort of solution in, but it'd be very sub-optimal in the end so I am not willing to experiment with that route.