- 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.
Difference between revisions of "v0.34 Talk:Weight"
UristDaVinci (talk | contribs) (Clothing/armor weight formula/method) |
|||
Line 1: | Line 1: | ||
− | |||
== Clothing/armor weights == | == Clothing/armor weights == | ||
Line 22: | Line 21: | ||
This calculation has been verified for several creature sizes and several worn clothing items. | This calculation has been verified for several creature sizes and several worn clothing items. | ||
--[[User:UristDaVinci|UristDaVinci]] 07:40, 22 September 2012 (UTC) | --[[User:UristDaVinci|UristDaVinci]] 07:40, 22 September 2012 (UTC) | ||
+ | :I've just checked a disassembly and I came up with the following formula : BASE_SIZE * COVERAGE/100 * LAYER_SIZE/100. BASE_SIZE is calculated from some undetermined values within the caste raws (chosen by whatever race made the armor) using the whatever STEP values are available (in DFHack, they're all in caste_raw.unknown2.unk26[...], currently defined as a single int32[33] array though it's actually divided into 6 seconds, one per armor type), using the number 1000 if the "maker race" wasn't available. The notable exceptions to this formula are shields (no coverage or layer_size) and helms (no step factors). --[[User:Quietust|Quietust]] 15:07, 22 September 2012 (UTC) |
Revision as of 15:07, 22 September 2012
Clothing/armor weights
I crunched some numbers and came up with a calculation for the weight of armor or clothing:
Clothing weight = [BODY_SIZE]*(percentage)*[COVERAGE]*[LAYER_SIZE]*[SOLID_DENSITY]*(step factor)/10000000000
Where:
[BODY_SIZE] is of the creature that the clothing was created for (i.e. dwarf adult is 60000)
(percentage) is the relative size of the body part the clothing was created for, divided by the sum of relative sizes of the creature's body parts. See [BODY_DETAIL_PLAN:HUMANOID_RELSIZES] for reference. On most humanoids the head is 0.051 (i.e. 5.51%), the upper body and lower body are each 0.1836 (18.36%), each hand is 0.0147 (1.47%) and each foot is 0.022 (2.2%).
[COVERAGE] and [LAYER_SIZE] are clothing properties. [SOLID_DENSITY] is of the clothing material.
The (step factor) is for the clothing [UBSTEP] [LBSTEP] [UPSTEP]. Start with 1.00, and add 0.25 for each unit of step on the clothing. Possible step factors are 1.0, 1.25, 1.5, 1.75, 2.0, 2.25, and 2.5. Robes, with MAX UBSTEP and MAX LBSTEP have a step factor of 2.5. Breastplates have 0 step, so they use a factor of 1.0. Mail shirts have UBSTEP 1 and LBSTEP 1, so they use a step factor of 1.5. Gauntlets have UPSTEP 1, so the step factor is 1.25.
Therefore we calculate the weight of a dwarf-sized iron greaves to be: 60000*0.1836*100*15*7850/10000000000*1.75=22.7
This calculation has been verified for several creature sizes and several worn clothing items. --UristDaVinci 07:40, 22 September 2012 (UTC)
- I've just checked a disassembly and I came up with the following formula : BASE_SIZE * COVERAGE/100 * LAYER_SIZE/100. BASE_SIZE is calculated from some undetermined values within the caste raws (chosen by whatever race made the armor) using the whatever STEP values are available (in DFHack, they're all in caste_raw.unknown2.unk26[...], currently defined as a single int32[33] array though it's actually divided into 6 seconds, one per armor type), using the number 1000 if the "maker race" wasn't available. The notable exceptions to this formula are shields (no coverage or layer_size) and helms (no step factors). --Quietust 15:07, 22 September 2012 (UTC)