Dwarf Fortress

Dwarf Fortress

Tanning - Redux
20 Comments
Moonwarden64 Feb 2 @ 3:28am 
Ok I think I did, just added the pearl token to the template
Moonwarden64 Feb 2 @ 2:46am 
So im using a mod that adds a new tipe of leather to new types of dragons that is a "leather equivalent" of steel, if I wanted to make so this new dragon skin make an amount of leather that scales (heh) with the dragon size while preserving it's properties, should I modify the dragon skin itself or would it be better to create a new tanning reaction just for it?
Llamageddon  [author] Mar 19, 2023 @ 4:26am 
Yeah, the fact that pearl is the only material that lets this mod work is quite strange. I'd love to know what is going on in the background. Along with all the other material tokens; I tried amber and coral too, and they don't have the same secret ingredient that converts skin volume to units. I'd love to know what is going on. It is a bit perplexing, knowing that it seems to be some undefined material property token, that otherwise could just be applied to a custom material to make this mod work.

Beggars can't be choosers though. I'm just happy to have found this solution for now. I'd do a major update to this mod, if the object tokens get some TLC from Toady at some point, negating the pearl solution. Regardless, with a bit of luck, this mod will be made redundant in a future update to tissues, butchering, and bodyparts.

Re: Parchment - Haven't forgotten, just need the time*

*"Time is relative".
AceEquinox Mar 5, 2023 @ 4:53pm 
Yeah none of it is a big deal, I could just see someone less familiar with Dwarf Fortress being confused when they make a bunch of random craft tasks and later notice a bunch of skin earrings and manacing skin spikes all over, though it is a nice way to use leftover skin after you are done tanning when you have like 3 or whatever. If any mods add in pearls or if an update to the core game does though I could see this being something to pay attention to. Decorating with skin and making the same crafts as anything else seems to be what you can do with it, I believe strange moods are hard coded but that would be the most interesting thing that could happen with it probably. Pearls aren't good for armor or clothes or anything.
Llamageddon  [author] Mar 4, 2023 @ 6:22am 
Thanks for the feedback, parchment update sounds doable and a good idea. As for pearl; rings don't sound too bad, but I'd be interested to hear if there are any particularly strange things you can make from skin because of this, though crafts are hard-coded workshop recipes so it will be a "feature" rather than a bug :brownllama: .

RL has got in the way of DF lately so it might be a little while before I can look into the parchment issue, but I will make it a priority for an update.
AceEquinox Mar 2, 2023 @ 1:04am 
Also potentially a bug? since you set skin as pearls you can use skin as pearls in the craft shop. I just made a -cow skin ring- to test and it doesn't seem to cause any issues but figured I'd mention it.
AceEquinox Mar 2, 2023 @ 12:57am 
I went to make parchment for the first time just because I hadn't done it yet. It consumes a stack of skin to make 1 parchment which is about the same as how it would work before when skin didn't stack. Was wondering if you would be interested in updating this reaction to allow parchment production to use the 6 skin instead of a full stack. I'm not sure if you would consider that beyond scope but it feels like it is a sensible change for consistency.
Llamageddon  [author] Jan 26, 2023 @ 3:13pm 
And just to add, don't panic! As I mentioned in the description, I am unaware of any bug reports related to this, despite it having been used in some mods for a pretty long time; but if you think you have identified something relevant, do let me know, as at the very least, it would be very useful to the modding community if there was anything to concrete to report.
Llamageddon  [author] Jan 26, 2023 @ 3:09pm 
Just updating to say, (partly coincidentally) I've been doing some pretty thorough testing, looking out for bugs related to just duplicating the skin material and it's come up clean so far. I might have found an interesting oddity of the raw formatting that could make this even less of a worry and will update if that seems like it might actually help to negate developer anxiety over doing this in the first place.
Llamageddon  [author] Jan 25, 2023 @ 4:03am 
Glad you like it. I was very happy to discover this, despite quite reasonable expectations that it was impossible.

I did a run through and got a list up of rough yields for anyone who is interested. I was way off on estimates because I forgot about the step-up for skin to leather you get at certain size thresholds. Though was surprised by a few results still, and possibly missed some candidates that might still drop just a few skin pieces.

If I could be bothered, I'm pretty sure the values run in parallel to the way the game calculates grazing value for animals, it would just need the right starting value to calculate. Similar to my milking tick calculations on MOGG. Just a hunch at this point though.
Tamren Jan 25, 2023 @ 3:47am 
I don't think the tanning/leatherworking system can get much more realistic than this unless they change the way leather is turned into items. Currently it takes the same amount of leather to make an entire suit of armour, or a fully enclosing cloak: just one piece, which is also the same amount you need to make a pair of gloves. But when you think about it you can always sew smaller pieces of leather together, so it would make more sense if leather was measured in smaller pieces to begin with and crafting consumes different amounts depending on the size of the product.
GLITTERLICH Jan 25, 2023 @ 3:41am 
thank you, interesting write up :D
Tamren Jan 25, 2023 @ 3:27am 
I just ran a quick test by loading up an embark on a pocket world and butchering one of each creature. These numbers aren't exact because my dwarves tanned all of the leftover scraps into additional leather, but as a rough estimate chicken/geese/dogs/cats give 1 leather. Sheep/pigs/goats give 2. Donkeys/llamas/reindeer give 3. Horses/alpacas give 4. Mules/cows/yaks give 6. Water buffalo give 12. This seems pretty realistic to me, more so than the vanilla tanning mechanics and definitely more realistic than the linearly scaling glob based mods.
Llamageddon  [author] Jan 25, 2023 @ 3:02am 
@Tamren I have it loaded up now. I'll see if I can whip something up from you. Though I suspect the answer will be, 2 leather for cows, yaks and buffalo, and 1 leather for everything else. With a few strips left over in most cases. I was roughly going for what I imagined vanilla having, based on 6 skin being the drop of the smallest skin dropping creature (cat, to my knowledge).

I could always lower the skins to leather ratio if people think this is too miserly, as I do tend to err towards that more than an abundance of resources in my games. I am happy to go with the consensus if a more generous quantity seems to be preferred.
Llamageddon  [author] Jan 25, 2023 @ 2:52am 
LOL, will it ever end? (pt. 4):

While it is not perfect, (but in my personal opinion, preferable to the glob method), it tricks the game into deciding that skin should be dropped similarly to a normal body part after all; in stacks, like most other body part tissue materials. It is surprising enough, even to me, that I have reported this to someone working internally on DF, and though it is clearly confirmed that it is working, it has caused some bafflement as to why. I am in no position to promise anything, certainly not claiming to be some DF tech guru (see pigheadedness and trial and error), and none of the following has any official confirmation or recognition; but there is a slim chance that in the future this could be corrected in vanilla, as it very slightly possible this is how it was meant to work all along.
Llamageddon  [author] Jan 25, 2023 @ 2:51am 
OMG, character limit, but you did ask:

Finally, even if you get to the tanned skin object stage, somehow sidestepping the previous skin issues, that is also hard-coded and not open to editing by conventional means at the moment. It also carries its own set of fixed and sometimes seemingly arbitrary properties, including how skin to tanned leather is calculated in the tanning process and, to an extent, what it can then react with itself (though admittedly most of that is irrelevant to this mod, and one of the reasons why I limited it in scope to the purely tanning stage).

All of these reasons are why the conventional approach (and until now the only practical known one from previous DF versions) was to get the skin *material* to drop as part of a "glob" item, using BUTCHER_SPECIAL. For reasons I covered in the description, I was looking for something more satisfying, and pretty much by pigheadedness and exhaustive trial and error I stumbled upon something new.

Pt.4 ahoy...
Llamageddon  [author] Jan 25, 2023 @ 2:50am 
Pt. 2: With that struck off the list of possible approaches. The first thing is probably to explain that, for as long as I am aware, skin has always had some very unusual properties in comparison to most other body parts dropped when butchered. The most relevant to your question, is that skin doesn't drop in the same way as other body parts like meat or bones, but is always one conceptually abstract "sheet" of skin; it never drops as more than one item on normal vanilla creatures, but could theoretically be infinitely large, (or at least until that integer causes DF to crash or hits a limit implemented to stop just that).

In the same vein (no pun intended), unlike meat/bones etc. it is hard-coded as an item, and actually crashes the game in most cases if you try to reference it directly, to get it to drop with related tokens such as BUTCHER_SPECIAL or EXTRA_BUTCHERABLE_ITEM, which would work for things like meat. Crucially, this also applies to attempts to reference it in reactions.
Llamageddon  [author] Jan 25, 2023 @ 2:50am 
@GlitterLich: Fair question, and I hope I am understanding you right, but not a simple answer depending upon your knowledge of DF object tokens, so I will work on the assumption you are unfamiliar with these. I may even need to split this into two comments, though I will try and go for a balance between brevity and comprehensiveness.

To cover the main concern, in this case, although you can select inputs for reactions, I am not aware of a way you can make this particular reaction reference material from a specific creature, in a way that would work, without individually editing every creature and making a custom material template for every single one, and then also making a custom reaction for each one. I may be overlooking a shortcut here, but at best you would need to manually edit hundreds of entries and probably also have a similar number of specific tanning processes to choose from. Even if that is possible to pull off in theory, it may not be, for reasons covered below.
Tamren Jan 25, 2023 @ 2:29am 
It would be helpful for people looking at mods to list how much leather you get on average from embarkable animals like cows and pigs, that would let us more easily compare this leather mod to the other ones. I didn't like the default yield of 1-4 but at the same time the linearly scaling glob based mods also seemed a little overpowered. This mod might fit the bill for me.
GLITTERLICH Jan 25, 2023 @ 1:05am 
I'm not sure I understand why you went with the approach of making skin drop in stacks (and so creating shenanigans like mixed leathers) instead of just multiplying the leather yields depending on which animal the skin belongs to; was it really a necessary component?