v50 Steam/Premium information for editors
  • v50 information can now be added to pages in the main namespace. v0.47 information can still be found in the DF2014 namespace. See here for more details on the new versioning policy.
  • Use this page to report any issues related to the migration.
This notice may be cached—the current version can be found here.

Difference between revisions of "Category talk:DF2012:Incomplete butchering returns"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Created page with "I think it's possible to calculate butchering returns from the raws, rather than observing it empirically. Here's how the calculation works, as far as I can tell: First, go...")
 
(rsp)
Line 11: Line 11:
 
Sum this up for all body parts. For example, in the case of a sperm whale, we get 200 for brain, 2384 for meat, 518 for fat, etc. (for simplicity's sake and to make calculation easier, I multiplied all of them by the sum of relsizes). You can see that the ratios here are very close to the observed ratios. The absolute number is proportional to the size of the animal when alive (you can see this by comparing the returns from giant and normal varieties of a given animal -- the yield is always directly multiplied by the same amount that body size is). I haven't worked out the constant of proportionality, though -- if it's done by volume rather than mass, it'll be different for different body plans.
 
Sum this up for all body parts. For example, in the case of a sperm whale, we get 200 for brain, 2384 for meat, 518 for fat, etc. (for simplicity's sake and to make calculation easier, I multiplied all of them by the sum of relsizes). You can see that the ratios here are very close to the observed ratios. The absolute number is proportional to the size of the animal when alive (you can see this by comparing the returns from giant and normal varieties of a given animal -- the yield is always directly multiplied by the same amount that body size is). I haven't worked out the constant of proportionality, though -- if it's done by volume rather than mass, it'll be different for different body plans.
 
--[[User:Zzedar|Zzedar]] ([[User talk:Zzedar|talk]]) 22:11, 15 April 2013 (UTC)
 
--[[User:Zzedar|Zzedar]] ([[User talk:Zzedar|talk]]) 22:11, 15 April 2013 (UTC)
 +
 +
:Such a calculation has been on my list of things to consider implementing for quite a while. If you can generalize this for any creature then it would certainly prove beneficial. However, the complexity could grow quite quickly if different body structures introduce different constants, etc. Still, it doesn't really matter if the code is ugly, as long as the results are accurate. Give it a shot if you want the challenge; if not, I might get to it eventually. --[[User:Loci|Loci]] ([[User talk:Loci|talk]]) 19:41, 17 April 2013 (UTC)

Revision as of 19:41, 17 April 2013

I think it's possible to calculate butchering returns from the raws, rather than observing it empirically.

Here's how the calculation works, as far as I can tell:

First, go through each body part the creature has. Using the BODY_DETAIL_PLAN, figure out how much of that body part is muscle, fat, etc. For instance, a sperm whale's flipper is 50/56 muscle, 5/56 fat, and 1/56 skin.

Second, multiply that number by a constant depending on the material concerned. For fat, the constant is 2; for every edible product except fat (meat, brain, etc.), it's 1. I'm not sure of the constant for other materials.

Third, figure out what portion of the creature is in that body part -- this is just the relsize of that body part divided by the sum of the relsizes of all body parts. Scale the result from step 2 by this number.

Sum this up for all body parts. For example, in the case of a sperm whale, we get 200 for brain, 2384 for meat, 518 for fat, etc. (for simplicity's sake and to make calculation easier, I multiplied all of them by the sum of relsizes). You can see that the ratios here are very close to the observed ratios. The absolute number is proportional to the size of the animal when alive (you can see this by comparing the returns from giant and normal varieties of a given animal -- the yield is always directly multiplied by the same amount that body size is). I haven't worked out the constant of proportionality, though -- if it's done by volume rather than mass, it'll be different for different body plans. --Zzedar (talk) 22:11, 15 April 2013 (UTC)

Such a calculation has been on my list of things to consider implementing for quite a while. If you can generalize this for any creature then it would certainly prove beneficial. However, the complexity could grow quite quickly if different body structures introduce different constants, etc. Still, it doesn't really matter if the code is ugly, as long as the results are accurate. Give it a shot if you want the challenge; if not, I might get to it eventually. --Loci (talk) 19:41, 17 April 2013 (UTC)