Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2

Author Topic: Butchering results vs critter size (rabbit skulls issue)(research)  (Read 13834 times)

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile

Posting research results here since it requires modding experience to understand.

In order to solve the rabbit/cavy skull issue, I modded cows to be exactly certain sizes, and then butchered them. The results are nonlinear, but it appears that 3 effects are at work.

Some parts, like the skin or skull or spine nervous tissue, only appear in 1 piece.

There is some size cutoff, after which a body part becomes big enough to appear. A creature has to be over size 2000 when butchered to give anything other than a skull. It looks like goats are the most efficient grazer animal to farm for meat, in terms of minimizing grass usage while maximizing meat produced.

Dwarves have more meat than a cow of the same size because they have fingers, toes, and other features. The number or scale of body parts plays a role in the butchering returns. The cow results are typical for most quadrupedal animals.

Code: [Select]
SIZE            500 1000 1900 2000 5000 7000 10000 15000 20000 30000 50000 100000 200000 500000 1000000 25000000

SKULL             1    1    1    1    1    1     1     1     1     1     1      1      1      1       1        1
MEAT                        2    6    6    7     7     7     8     8     8      9      9     11      21      539
FAT                         2    6    6    7     7     7     8     8     8      8      8      8       8      151
SKIN                        1    1    1    1     1     1     1     1     1      1      1      1       1        1
BONE                             4    4    4     4     6    10    10    10     16     16     16      20      301
INTESTINES                            1    1     1     1     1     1     1      1      1      1       3       89
BRAIN                                            1     1     1     1     1      1      1      1       1       29
LUNG                                             2     2     2     2     2      2      2      2       2       58
LIVER                                            1     1     1     1     1      1      1      1       1       29
TRIPE                                            1     1     1     1     1      1      1      1       1       29
NERVOUS TISSUE                                         1     1     1     1      1      1      1       1        1
HOOF                                                   4     4     4     4      4      4      4       4       68
HEART                                                        1     1     1      1      1      1       1       14
SWEETBREAD                                                   1     1     1      1      1      1       1       14
SPLEEN                                                       1     1     1      1      1      1       1       14
KIDNEY                                                       2     2     2      2      2      2       2       28
HORN                                                         2     2     2      2      2      2       2       14
CARTILAGE                                                                              1      1       1        1
HAIR                                                                                   1      1       1        1
EYE                                                                                           2       2        2
TOOTH                                                                                                          1

Alkhemia

  • Bay Watcher
  • aka Deep Sea Diver Man
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #1 on: February 23, 2011, 05:45:57 am »

Your name truly fit you ability thanks for the info.... :)
Logged
"Hiken: Tsubame-Gaeshi" -Sasaki Kojirou (Grand Order}

"Please touch me. Without lying, wherever you want to touch. That is my wish." - Kiyohime (Grand Order)

"Tyranny, violation, genocide. Those are the things that I detest above all else." - Amakusa Shirou Tokisada (Grand Order)

Dwarfu

  • Bay Watcher
  • Dwarven Advisor
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #2 on: February 23, 2011, 05:53:36 am »

What do these returns look like with a skilled butcher?  Does it matter?  Wiki says it is only speed that is affected, but one whack with a legendary butcher on a 25000000 size creature should show a difference if there is any.
« Last Edit: February 23, 2011, 05:59:18 am by Dwarfu »
Logged

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #3 on: February 23, 2011, 09:24:57 am »

Excellent, this is very helpful.

I've been trying to write a script which actually works out the exact expected results from butchering any arbitrary animal from the raws, but I'm running into difficulty figuring out the exact methods and cutoffs that DF uses to decide what units of meat or other product come from each part of the body as it's butchered.  There seem to be a lot of arbitrary thresholds and special-case rules for things like skulls and individual organs.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #4 on: February 23, 2011, 09:35:31 am »

Relative sizes of body organs may affect it too. So dwarves would net more liver if they were gigantic :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #5 on: February 23, 2011, 10:30:40 am »

What's with the sudden jump in meat from 1900 to 2000 size?
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #6 on: February 23, 2011, 10:40:32 am »

What's with the sudden jump in meat from 1900 to 2000 size?
From what testing I have done, the calculation of butchering yields seems to be broken down by body part.  Each animal's body is broken down into individual body parts during butchering.  The amount of meat/fat/bone/whatever on each part of the body is checked against some threshold, and if it exceeds that threshhold one or more units of meat are added to the tally.  At size 1900 a cow's upper body and lower body each add one unit of meat, but the other body parts are individually too small.  At 2000, the legs are each large enough to add a unit of meat as well, so the total meat jumps from 6 to 7.  Each leg is also large enough at that point to add one unit of bone.  There's a lot more than that going on - you always get one skull no matter what, and you get at most one skin, nervous tissue, cartilage, hair and tooth, and at most two eyes.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #7 on: February 23, 2011, 11:07:35 am »

So it doesn't even add together the muscles from different body parts into a single meal?  That seems... kinda buggy.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #8 on: February 23, 2011, 03:03:11 pm »

Based on Urist Da Vinci's excellent work above, and some testing of my own, I've worked out the basics of the algorithm that DF uses to calculate butchering results.

Dwarf Fortress starts by taking the size of the animal and from that determining the relative size of each body part.  In the body definition raws each body part has a RELSIZE number which determines how large it is in relation to the other body parts.  This is a relative number used to divide the total body size into per-bodypart sizes, not an absolute size.  DF seems to sum the total RELSIZE of every body part in a creature together, divides that into each body part's RELSIZE, then multiplies the resulting fraction

For example, in a cow the total RELSIZE of every body part is 9471.  The UPPERBODY part has a default RELSIZE of 1000.  Dividing that by the total gives a size fraction of about 0.1055.  In a size 600,000 cow, that body part has a size of 63351.

After determining the size of each body part, DF then checks each body part's size against a fixed threshold, which appears to be 185 (plus or minus five), from my testing.  If the body part's size is below this threshold, it yields nothing.  If the body part is above this size, DF adds one unit of product for every tissue type in that body part to the total.  The upper body of a cow is defined as containing hair, muscle, fat, and skin, so one unit of each of those is added to the total.  This is repeated for every body part in the animal.

Interestingly, DF does not seem to respect duplicated body parts of a single type during this.  Cows are defined in the raws as having twenty-four ribs:  seven true ribs on each side, three false ribs on each side, and two floating ribs on each side.  Butchering ignores the NUMBER tag in the bodypart definition and only treats cows as if they had six ribs, one of each type on each side.  This is also why you will only ever get at most one tooth from butchering a cow, no matter how large the cow is, despite the raws defining cows as having 30 teeth.

In very large animals, each body part may yield more than one unit of tissue.  This appears to be nonlinear - it doesn't start happening until you get to quite large creatures.  For a creature in the normal size range of a cow or most other domestic animals, each body part still gives at most one unit of meat/fat/bone/whatever.

Some tissue types - skin, hair, nervous tissue, cartilage - produce one object of variable size, rather than a stack of uniform-sized objects you get of meat and fat and bone.  If an animal has a skull, that is always produced as a result of butchering rather than being processed into a stack of bones.  Getting a skull happens no matter how small the animal is - so long as the animals is a slaughtered tame animal, anyway.  A butcher won't touch a wild animal corpse if all it would yield is a skull.

There's also some effect of variation of individual animal size, fat level, and meat level, on how much fat and meat you get back.  I am not at all certain how this effect works.

Small animals - rabbits, cavies, guinea fowl, ducks and buzzards - will never (or almost never) give anything on butchering because none of their individual body parts will ever be large enough to give one piece of meat.  Mid-sized animals give meat based not directly on their size, but on how many body parts they have which individually are over a certain size.  Only for very large animals is meat return directly proportional to size, and I'm not sure how linear that is yet.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #9 on: February 23, 2011, 06:52:06 pm »

Same table as before, but I have additional data for large size creatures, as well as some vague examples of creatures in that size range. I gather data by drowning the cows in arena mode, and then using the 'k-a' butcher command, so no butcher skill was involved. Bodies that were killed by soldiers or hunters are often missing parts.

Code: [Select]
SIZE            500 1000 1900 2000 5000 7000 10000 15000 20000 30000 50000 100000 200000 500000 750000 1000000 1500000 1750000 2000000 3000000 5000000 10000000 25000000

i.e.            rabbit        chicken        marmot      gazelle     goat  warthog       horse  yak    w.buffalo                       rhino   elephnt     whales dragon

SKULL             1    1    1    1    1    1     1     1     1     1     1      1      1      1      1       1       1       1       1       1       1        1        1
MEAT                        2    6    6    7     7     7     8     8     8      9      9     11     13      21      30      38      41      64     105      214      539
FAT                         2    6    6    7     7     7     8     8     8      8      8      8      8       8       8       8      10      16      28       60      151
SKIN                        1    1    1    1     1     1     1     1     1      1      1      1      1       1       1       1       1       1       1        1        1
BONE                             4    4    4     4     6    10    10    10     16     16     16     16      20      24      28      28      40      58      114      301
INTESTINES      ___ ___  ___  ___     1    1     1     1     1     1     1      1      1      1      2       3       5       6       7      10      17       35       89
BRAIN                                            1     1     1     1     1      1      1      1      1       1       1       2       2       3       5       11       29
LUNG                                             2     2     2     2     2      2      2      2      2       2       2       4       4       6      10       22       58
LIVER                                            1     1     1     1     1      1      1      1      1       1       1       2       2       3       5       11       29
TRIPE                                            1     1     1     1     1      1      1      1      1       1       1       2       2       3       5       11       29
NERVOUS TISSUE  ___ ___  ___  ___  ___  ___  ___       1     1     1     1      1      1      1      1       1       1       1       1       1       1        1        1
HOOF                                                   4     4     4     4      4      4      4      4       4       4       4       4       8      12       28       68
HEART                                                        1     1     1      1      1      1      1       1       1       1       1       1       2        5       14
SWEETBREAD                                                   1     1     1      1      1      1      1       1       1       1       1       1       2        5       14
SPLEEN                                                       1     1     1      1      1      1      1       1       1       1       1       1       2        5       14
KIDNEY          ___ ___  ___  ___  ___  ___  ___   ___       2     2     2      2      2      2      2       2       2       2       2       2       4       10       28
HORN                                                         2     2     2      2      2      2      2       2       2       2       2       2       2        4       14
CARTILAGE                                                                              1      1      1       1       1       1       1       1       1        1        1
HAIR                                                                                   1      1      1       1       1       1       1       1       1        1        1
EYE                                                                                           2      2       2       2       2       2       2       2        2        2
TOOTH           ___ ___  ___  ___  ___  ___  ___   ___   ___   ___   ___   ___    ___    ___    ___    ___     ___           1       1       1       1        1        1


...
In very large animals, each body part may yield more than one unit of tissue.  This appears to be nonlinear - it doesn't start happening until you get to quite large creatures.  For a creature in the normal size range of a cow or most other domestic animals, each body part still gives at most one unit of meat/fat/bone/whatever.
...

I used your RELSIZE method on the new data. Similar to how the appearance threshold is 185, the large creature threshold for getting things like brain[2] is 50000 (fifty thousand or 50,000).

Unrelated:
Funny how a dwarf butcher will divide an animal's meat into pieces ranging from 185g to 50kg each, but the resulting stack of meat weighs 2.1 kg per piece. The stack of meat from an adult groundhog weighs more than the groundhog does alive.

Max White

  • Bay Watcher
  • Still not hollowed!
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #10 on: February 23, 2011, 07:03:01 pm »

Hmm, this is most interesting. I guess if somebody with the mathimatical know how were to run this against the body size ratios, they could figure out just how big something has to be to make it count.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #11 on: February 24, 2011, 08:39:57 am »

Hmm, this is most interesting. I guess if somebody with the mathimatical know how were to run this against the body size ratios, they could figure out just how big something has to be to make it count.
Minimum size to return any meat varies with creature type, because it depends partly on how many body parts the creature has and what size they are in relation to each other.  It looks like from my math that most quadrupeds have a minimum size around 1730 before they will give anything other than a skull.  Birds have a minimum size of 1587 due to having a different body plan, and fish have a minimum body size of 871, 945, or 982, depending on body plan, due to having fewer large body parts.  Creatures with very simple body plans, like cave blobs or hungry heads, have a much lower minimum size, but that's largely irrelevant since they are typically much larger than that.  Cave blobs only have a single body part, so in theory they're butcherable at size 185, but I don't think you actually can get any meat off them anyway.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #12 on: February 24, 2011, 02:54:44 pm »

Quote from: creature_standard.txt
   
These body modifiers give individual dwarves different characteristics.  In the case of HEIGHT, BROADNESS and LENGTH, the modifier is also a percentage change to the BODY_SIZE of the individual creature.  The seven numbers afterward give a distribution of ranges.  Each interval has an equal chance of occurring.

   [BODY_APPEARANCE_MODIFIER:HEIGHT:75:95:98:100:102:105:125]
      [APP_MOD_IMPORTANCE:500]
   [BODY_APPEARANCE_MODIFIER:BROADNESS:75:95:98:100:102:105:125]
      [APP_MOD_IMPORTANCE:500]

Since a cow has:
Quote from: creature_domestic.txt
   [BODY_APPEARANCE_MODIFIER:LENGTH:90:95:98:100:102:105:110]
   [BODY_APPEARANCE_MODIFIER:HEIGHT:90:95:98:100:102:105:110]
   [BODY_APPEARANCE_MODIFIER:BROADNESS:90:95:98:100:102:105:110]

Statistics tells me that 68% of all cattle are between 0.90 and 1.10 times their base size, and that 95% of all cattle are between 0.80 and 1.20 times the base size. The maximum and minimum size multipliers are 0.73 and 1.33.

Its worth noting that the biggest possible rabbit or cavy is still too small to yield more than a skull.

Fat has the [THICKENS_ON_ENERGY_STORAGE] token, and muscle has the [THICKENS_ON_STRENGTH] token, but there is no info that I can find on how that all works. "...with great muscles and copious amounts of lard
" descriptions should mean more fat/meat, but how much more?

veok

  • Bay Watcher
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #13 on: March 26, 2011, 10:11:16 pm »

I would like to bump this thread so that it might be determined which of the animal descriptions (i.e., gigantic, but scrawny vs. gigantic and bulging with muscles) leads to which numbers.

I *thought* there was a string dump of all the possible descriptors somewhere, but I couldn't locate it in my preliminary searching so far.
Logged

Urist Imiknorris

  • Bay Watcher
  • In the flesh, on the phone and in your account...
    • View Profile
Re: Butchering results vs critter size (rabbit skulls issue)(research)
« Reply #14 on: March 26, 2011, 10:18:46 pm »

Check the string dump on the wiki.
Logged
Quote from: LordSlowpoke
I don't know how it works. It does.
Quote from: Jim Groovester
YOU CANT NOT HAVE SUSPECTS IN A GAME OF MAFIA

ITS THE WHOLE POINT OF THE GAME
Quote from: Cheeetar
If Tiruin redirected the lynch, then this means that, and... the Illuminati! Of course!
Pages: [1] 2