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.

Editing Category talk:DF2012:Incomplete butchering returns

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.


The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 34: Line 34:
 
for k, part in pairs (parts) do
 
for k, part in pairs (parts) do
 
for k2, layer in pairs (part.layers) do
 
for k2, layer in pairs (part.layers) do
layerHold[layer.layer_name] = (layerHold[layer.layer_name] or 0) + (layer.unk2*part.relsize*part.number/part.unk2)
+
layerHold[layer.layer_name] = (layerHold[layer.layer_name] or 0) + (layer.unk2*part.relsize/part.unk2)
 
end
 
end
 
end
 
end
Line 56: Line 56:
 
for k, part in pairs (parts) do
 
for k, part in pairs (parts) do
 
for k2, layer in pairs (part.layers) do
 
for k2, layer in pairs (part.layers) do
layerHold[layer.layer_name] = (layerHold[layer.layer_name] or 0) + (layer.unk2*part.relsize*part.number/part.unk2)
+
layerHold[layer.layer_name] = (layerHold[layer.layer_name] or 0) + (layer.unk2*part.relsize/part.unk2)
 
end
 
end
 
end
 
end
Line 67: Line 67:
 
:Just curious, what language is that?
 
:Just curious, what language is that?
 
:Also, I think there's probably a minimum and maximum size for creatures (well, ''adult'' creatures - children are obviously small). Focusing on calculating those might solve the problem with varying sizes (then again, it could make it more confusing). Memory hacking might be an alternative – I don't know much about that either, but Quietust might be able to help. --{{User:Lethosor/sig}} 20:04, 29 April 2013 (UTC)
 
:Also, I think there's probably a minimum and maximum size for creatures (well, ''adult'' creatures - children are obviously small). Focusing on calculating those might solve the problem with varying sizes (then again, it could make it more confusing). Memory hacking might be an alternative – I don't know much about that either, but Quietust might be able to help. --{{User:Lethosor/sig}} 20:04, 29 April 2013 (UTC)
 
::Whoops, there was a major bug in these (now corrected)! (Also, I was wrong about something else, but I haven't corrected it because it isn't important). The language is Lua; these are intended as Lua scripts to be run by DfHack. There is a minimum and maximum size, as you say. That's a good point. Here's what I've learned: for very large creatures, and for most tissues, you can just take the value yielded by this and multiply it by a constant to get the expected yield. That constant will be the same for most organs and for muscle (which yields meat); if the tissue in question is fat, you multiply it by a further factor of 2 afterwards, and if the tissue is bone, you divide it by 2. There are also certain materials that have "butcher_special_type" set, which seems to influence the return in some way I haven't quite figured out yet.
 
For instance, these scripts will yield the following values for a sperm whale: Muscle 2297.357, Fat 249.699, Bone 1123.447, Intestine 600. That works out very well with the ranges given on the sperm whale's page. I haven't yet figured out how it works for smaller creatures -- whether each body part is counted separately or whether they're summed or what.--[[User:Zzedar|Zzedar]] ([[User talk:Zzedar|talk]]) 03:19, 8 May 2013 (UTC)
 

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Please sign comments with ~~~~

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)

Template used on this page: