Dwarf Fortress

Dwarf Fortress

Mammals of Gluttony & Greed - Core
Llamageddon  [developer] 16 Jan, 2023 @ 8:52am
Stats and technical details
Here, over time, I'll add specific details of what has been changed and added to vanilla milkable creatures, and the details and reasoning behind subjective values that have been altered.

* Due to discussion post character limits, this will probably need to be split into multiple posts, as parts of it will be quite information dense. I will also probably add to this in stages rather than all at once. This is partly for my own notes, and reference, as I have quite a few different mods now, and some of this could be easy to lose track of over time.

The description is already quite long-winded, but it did leave a few specifics unclear. For example, why do two-humped camels take almost 4x as many ticks to milk, than one-humped? What is a tick? What is a grazing requirement? I'll give spoiler tags to descriptive stuff that would normally be discovered over time in vanilla, just in case anyone who is reading would prefer to find that out through playing.

Milking Calculations

The following concerns fixing what I assume is just a placeholder in the creature raw files, and would mean that the main fix of this mod will one day be redundant.

Technical terms:

-Tick: One step in the DF calculations. It is the "clock" that everything in the simulation runs on, and for this reason is directly tied to the passage of time in the game.

-Grazer value/pasture requirements: This is how the game calculates the grazing requirements of animals in the game with the [GRAZER] tag. It is a value calculated using the animal size and it's grazer tag value.




So, the game actually uses a quite robust calculation to decide how much pasture an animal needs to graze, rather than just using a purely 1:1 size to grazing requirement ratio. I assume this was always intended to be also taken into account for milking times too, but right now every creature has the same number of ticks needed between milking defined as:
[MILKABLE:LOCAL_CREATURE_MAT:MILK:20000]
This means that, at 20000 ticks, every milkable creature needs 17 days between milkings. Because of this, I used the grazing calculation as a basis for calculating milk production per animal. It also can be applied to non-grazing milk producers (only pigs in MOGG-Core) to get the same result.

Although I am pretty good with numeracy, I am not very good at serious math(s). While I have confirmed my calculations are correct and working as intended in-game, I pretty much just rub my face across the keyboard in a spreadsheet entry field and go with what works. You can see the specific spreadsheet formulas in one of the images at the top of the mod's description. I will do my best to accurately explain things here. *If there are any mathematicians reading who notice something amiss, either in my understanding or calculations, do let me know.

I am not familiar with the correct notation to express my formulas in text, but here is the one used for grazing requirements, which is the starting point for my milking formula.
GRAZER = 20000 × G × (max size)-3/4
(even this doesn't translate well to text format, the "-3/4" is to the power of -3/4). G = 100 as set in the game .ini file. I think it's quite a neat solution to not just having a 1:1 ratio for size to grazing, which would mean either rabbits effectively never eat, or elephants wouldn't have enough grazing on a 8x8 embark grasslands biome; and also why I chose it as a basis for milking times.

I will stop here for now, part 2 will cover per-creature milking times, and the multipliers I gave to different creatures (e.g. why and how two-humped camels produce significantly less milk than one-humped).
Last edited by Llamageddon; 16 Jan, 2023 @ 11:19am
< >
Showing 1-3 of 3 comments
Llamageddon  [developer] 16 Jan, 2023 @ 8:54am 
Per-Creature Milking Values

Data for Modders/DF Geeks

The easiest solution for covering the details for this, is to share a more readable version of my main spreadsheet, that you can look at here[docs.google.com].

I partly made this just in case any other modders were interested in making any mods complimentary to this one, or simply wanted to make a mod based off of similar value calculations. I've also included a second sheet called blackboard, for anyone who might be interested in testing or experimenting with the dairy calculation without needing to make a new sheet.



Specifics and Subjective Values

One of the oddities about the milking system in dwarf fortress, other than the current blanket default milking time for all creatures, is that it is restricted by how often rather than how much you can milk a creature. Using my values works out pretty well, but does lead to some odd results, such as smaller creatures not living long enough to be milked more than once. However, in the end it amounts to about the same thing in terms of balance, so achieves its goal.

I decided to use the cow as the baseline reference for the ticks-to-milking value for all other creatures. This was on the assumption that cows, being the most obvious and commonly used dairy animal, were what the default 20000 ticks was based upon. This was just an assumption, but seems pretty balanced to vanilla, and seems to even make sense with some of the expansion mods to this one that add things like giant elephants and weasels as milkable.



Specific Creature Calculations

One of the key things I've added, for balance to all of this, is a multiplier to the value for each creature, based upon how plausible or well documented they are for use as dairy animals.

The cow gets 1 for an unadjusted, vanilla, value (17 days), by comparison, a two-humped (bactrian) camel gets 0.2, meaning it produces milk 5x less often for it's size. Oddly enough, a one-humped camel (dromedary) gets only a 0.75 multiplier decrease. I was surprised to learn that they have been bred for a very long time as dairy animals, and unlike bactrians can often produce nearly as much milk as some dairy cows.

I've chosen 1 to be the 'normal' multiplier for common dairy animals, and 0.2 to be the guideline number for animals with no data backing up their use or notability as milk producers.

Only a few of these multipliers were based on a 'best guess' criteria, as there is data and research out there about the milk production of a surprisingly large number of non-dairy mammals - dogs, cats and pigs for instance - and that data led me to the settings for dromedaries, as mentioned above, but also for some surprising ones.



Values and Reasoning for Specific Creatures

Goats and sheep (1) (4 months) are the only other mammals that get the same multiplier as cows.

Pigs (0.5) (8 months) produce a surprising amount of milk, and there is a niche artisanal pig's cheese industry out there in the real world, but apparently it is very labour-intensive (apparently, partly due to the unusually large number of teats a pig has) so has never really caught on.

Llamas and alpacas (0.3) (4 months, 10 months) despite being milkable in vanilla DF, have been given a much lower multiplier as it turns out they produce very little milk, even by general mammal standards, and have never really been bred or used as dairy animals.

Horses (0.5) (1 month) have been, surprisingly, widely and regularly used for their milk throughout history, but that has always been a secondary role to being domesticated as beasts of burden. Their setting is based on them not being nearly as productive for dairy as Cows, Sheep, Goats etc.

Donkeys (0.5) (2 months) get the same as horses.

Water buffalo (0.9) (12 days) get almost the same multiplier as cows, they are a major contributary to the dairy industry around the world. Probably the most well-known buffalo dairy is in the form of mozzarella cheese.

Reindeer and yaks (0.75) (2.5 months, 19 days) have also been bred for dairy, but not to the same extent as more common domesticated dairy animals such as cows.

Vanilla DF reasons I don't consider my more unusual dairy mods to be 'meme' mods:

Tapirs (0.2) (7 months). What? Why? If you thought cat milking was weird, then I don't know how you can handle vanilla DF. This almost seems like it might be a typo when copying in a new creature file in the game. I could find no evidence that literally anyone has ever convincingly domesticated a tapir species, let alone actually milked one.

Kangaroo (0.2) (1 year). They are a marsupial, so the mechanics alone of trying to obtain kangaroo's milk, boggles the mind. However, they are native to Australia, so I hesitate to claim that no one has ever actually milked one.



And that concludes the explanations for the new milking values for specific animals. Hopefully, at least one person other than me might find this vaguely interesting, but either way, if you made it this far, well done, and I hope you enjoy the mod.

Last edited by Llamageddon; 16 Jan, 2023 @ 11:32am
Llamageddon  [developer] 16 Jan, 2023 @ 8:55am 
(reserved for part 3)

Creature Names and Preferences
Llamageddon  [developer] 16 Jan, 2023 @ 8:57am 
(reserved for part 4 and future update info)

Non-Creature and Non-Vanilla Changes
< >
Showing 1-3 of 3 comments
Per page: 1530 50