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.

v0.31:Weight

From Dwarf Fortress Wiki
Revision as of 10:12, 7 November 2010 by 75.70.82.96 (talk) (This page needs a lot of cleanup. Edit by Aescula, forgot to log in.)
Jump to navigation Jump to search
This article is about an older version of DF.

Weight(Γ) is a strange quality. Most of time DF can largely ignore weight as it is unimportant. However, it is critical in determining how fast someone or something moves (due to carry weight restrictions), in damage calculations, and to some degree in temperature calculations.

In DF2010, weight is displayed as a fundamental figure associated with an item, along with value if you have a broker with appraisal. Additionally, how weight is calculated is now more complicated than it once was, as each item category -- sometimes even individual items -- have their own formula for determining weight.

Note that, for DF, weight and mass are synonymous because in DF gravity--at least currently--is always the same both across the whole universe and from world to world and buoyancy isn't currently modeled.
Starting with DF2010, Toady retooled the weight system so that one urist(Γ) is the same as one kilogram.

Weight Calculation

The general form for calculating weight in DF is to take the material density 'd' as found in the raws multiplied by an item constant C.
W = d*C

The formula for C is almost always the same for all items in the same raw file(such as item_helm or item_pants). These variations are thought to be caused by bugs, though confirmation is needed. Note that the displayed weight value is truncated and not rounded after the calculation is done, it is thought that the exact weight is maintained internally.

The following table lists all currently known formulas for finding the value of C.

Category Formula Notes
item_armor (layer size/ material size)/
1 010
The divisor may be slightly higher but is consistent with other values.
item_helm layer size/ 60 000 The formula for helms specifically appears to be 1/ 1 010, this is thought to be a bug.
item_gloves 1/ 100 000 Divisor is approximate.
item_pants layer size/ 5 190
item_shoes layer size/ 7 500 The formula for high boots specifically appears to be 1/ 100 000, this is thought to be a bug.
item_shield 1/ 100 000 Divisor is approximate.
item_ammo size/ 1 000 000
item_weapon size/ 1 000 000

These values are up to date as of this writing v0.31.03.

Other examples: stack of cheap stones, or stone statue, 161-167 Γ. Steel chainmail 19 Γ. Steel or bronze bars, 15-16 Γ. Iron flask, 12 Γ.