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 "v0.31:Weight"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(→‎Weight Calculation: straight from the code, EVERY item type's size, plus adding an upfront division by 100,000 to get kilograms. Incidentally, all of the armor sizes are WRONG, being based on creature size and numerous other factors too)
m (scale volumes up by 10 so the weight formula makes sense, as I did earlier on the 0.34/later pages)
 
(9 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
==Weight Calculation==
 
==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.
+
The general form for calculating weight in DF is to take the material density (as found in the raws) multiplied by the item's volume.
  
:W = d * C / 100,000
+
:Weight (in Γ) = Density (in kg/m<sup>3</sup>) * Volume (in cm<sup>3</sup>) / 1,000,000 (cm<sup>3</sup>/m<sup>3</sup>)
  
The formula for C is [http://www.bay12games.com/dwarves/mantisbt/view.php?id=1386 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.
+
Internally, all custom volume/capacity numbers are rounded down to the nearest multiple of 10 - thus, if you define a weapon with [SIZE:15], it will actually behave as if you had specified [SIZE:10].  
 +
 
 +
Items also have a "bulk" which does not depend on the material and is used to determine [[clutter]] as well as how many items can fit into a container.
  
The following table lists all currently known formulas for finding the value of C.
 
 
{| {{prettytable}}
 
{| {{prettytable}}
 
|- bgcolor="#999999"
 
|- bgcolor="#999999"
! Category
+
! Item Type
! Formula
+
! Volume
 +
! Bulk
 +
! Capacity
 
! Notes
 
! Notes
  
 
|-
 
|-
 
| [[Bar]]s
 
| [[Bar]]s
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Cut [[gem]]s
 
| Cut [[gem]]s
| 20
+
| 200
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Block]]s
 
| [[Block]]s
| 250
+
| 2500
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Rough [[gem]]s
 
| Rough [[gem]]s
| 250
+
| 2500
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Mined [[stone]]
 
| Mined [[stone]]
| 7000
+
| 70000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Wood [[log]]s
 
| Wood [[log]]s
| 5000
+
| 50000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Door]]
 
| [[Door]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Floodgate]]
 
| [[Floodgate]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Bed]]
 
| [[Bed]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Chair]]
 
| [[Chair]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Chain]]
 
| [[Chain]]
| 500
+
| 5000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Flask]]
 
| [[Flask]]
| 100
+
| 1000
 +
| 3000
 +
| 1800
 
|
 
|
  
 
|-
 
|-
 
| [[Goblet]]
 
| [[Goblet]]
| 100
+
| 1000
 +
| 3000
 +
| 1800
 
|
 
|
  
 
|-
 
|-
 
| [[Instrument]]
 
| [[Instrument]]
| 400
+
| 4000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Toy]]
 
| [[Toy]]
| 100
+
| 1000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Window]]
 
| [[Window]]
| 2000
+
| 20000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Cage]]
 
| [[Cage]]
| 3000
+
| 30000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Barrel]]
 
| [[Barrel]]
| 2000
+
| 20000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Bucket]]
 
| [[Bucket]]
| 300
+
| 3000
 +
| 6000
 +
| 6000
 
|
 
|
  
 
|-
 
|-
 
| [[Animal trap]]
 
| [[Animal trap]]
| 300
+
| 3000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Table]]
 
| [[Table]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Coffin]]
 
| [[Coffin]]
| 3000
+
| 30000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Statue]]
 
| [[Statue]]
 +
| 60000
 
| 6000
 
| 6000
 +
|
 
|
 
|
  
Line 140: Line 189:
 
| [[Corpse]]
 
| [[Corpse]]
 
| Special
 
| Special
|  
+
| Special
 +
|
 +
| Based on the size of the corpse and what it's made of
  
 
|-
 
|-
 
| [[Weapon]]
 
| [[Weapon]]
| SIZE / 10
+
| SIZE
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
| item_armor
+
| Body [[armor]]
| <s>(layer size/ material size)/<br> 1 010</s>
+
| ?
 +
| 9000
 +
|
 
| Based on UBSTEP, LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 
| Based on UBSTEP, LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
| item_shoes
+
| [[Shoes]]
| <s>layer size/ 7 500</s>
+
| ?
 +
| 1800
 +
|
 
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
| item_shield
+
| [[Shield]]s
| <s>1/ 100 000</s>
+
| ?
 +
| 6000
 +
|
 
| Based on UPSTEP and the race that crafted it
 
| Based on UPSTEP and the race that crafted it
  
 
|-
 
|-
| item_helm
+
| [[Helm]]s
| <s>layer size/ 60 000</s>
+
| ?
 +
| 3000
 +
|
 
| Based on COVERAGE, LAYER_SIZE, and the race that crafted it
 
| Based on COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
| item_gloves
+
| [[Gloves]]
| <s>1/ 100 000</s>
+
| ?
 +
| 1200
 +
|
 
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
 
| [[Box]]
 
| [[Box]]
| 2000 or 100
+
| 20000 or 1000
 +
| 6000
 +
| 60000
 
| Bags weigh 100, boxes/chests/coffers weigh 2000
 
| Bags weigh 100, boxes/chests/coffers weigh 2000
  
 
|-
 
|-
 
| [[Bin]]
 
| [[Bin]]
| 1500
+
| 15000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Armor stand]]
 
| [[Armor stand]]
| 1000
+
| 10000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Weapon rack]]
 
| [[Weapon rack]]
| 1000
+
| 10000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Cabinet]]
 
| [[Cabinet]]
| 3000
+
| 30000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Figurine]]
 
| [[Figurine]]
| 100
+
| 1000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Amulet]]
 
| [[Amulet]]
| 50
+
| 500
 +
| 1200
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Scepter]]
 
| [[Scepter]]
| 300
+
| 3000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Ammo]]
 
| [[Ammo]]
| SIZE / 10
+
| SIZE
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Crown]]
 
| [[Crown]]
| 100
+
| 1000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Ring]]
 
| [[Ring]]
| 5
+
| 50
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Earring]]
 
| [[Earring]]
| 3
+
| 30
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Bracelet]]
 
| [[Bracelet]]
| 20
+
| 200
 +
| 1200
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Large gem]]
 
| [[Large gem]]
| 5
+
| 50
 +
| 1800
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Anvil]]
 
| [[Anvil]]
| 1000
+
| 10000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Body part]]
 
| [[Body part]]
 +
| Special
 
| Special
 
| Special
 
|
 
|
 +
| Based on the size of the body part and what it's made of
  
 
|-
 
|-
 
| [[Remains]]
 
| [[Remains]]
| 200
+
| 2000
 +
| 1200
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Meat]]
 
| [[Meat]]
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Fish]]
 
| [[Fish]]
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Unprepared [[fish]]
 
| Unprepared [[fish]]
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Live [[vermin]]
 
| Live [[vermin]]
 +
| Special
 
| Special
 
| Special
 
|
 
|
 +
| Based on creature's adult size
  
 
|-
 
|-
 
| Tame [[vermin]]
 
| Tame [[vermin]]
 +
| Special
 
| Special
 
| Special
 
|
 
|
 +
| Based on creature's adult size
  
 
|-
 
|-
 
| [[Seed]]s
 
| [[Seed]]s
| 10
+
| 100
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Plant]]
 
| [[Plant]]
| 100
+
| 1000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Leather]]
 
| [[Leather]]
| 500
+
| 5000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Leaves]]
 
| [[Leaves]]
| 5
+
| 50
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Thread]]
 
| [[Thread]]
| ceil(Dimension/500)
+
| ceil(Dimension/50)
| 20 for freshly extracted/gathered thread
+
| 6000
 +
|
 +
| 300 for freshly extracted/gathered thread
  
 
|-
 
|-
 
| [[Cloth]]
 
| [[Cloth]]
| ceil(Dimension/500)
+
| ceil(Dimension/50)
| 30 for freshly woven cloth
+
| 6000
 +
|
 +
| 200 for freshly woven cloth
  
 
|-
 
|-
 
| [[Totem]]
 
| [[Totem]]
| 500
+
| 5000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
| item_pants
+
| [[Pants]]
| <s>layer size/ 5 190</s>
+
| ?
 +
| 1800
 +
|
 
| Based on LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 
| Based on LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
 
| [[Backpack]]
 
| [[Backpack]]
| 500
+
| 5000
 +
| 6000
 +
| 60000
 
|
 
|
  
 
|-
 
|-
 
| [[Quiver]]
 
| [[Quiver]]
| 300
+
| 3000
 +
| 6000
 +
| 12000
 
|
 
|
  
 
|-
 
|-
 
| [[Catapult parts]]
 
| [[Catapult parts]]
| 2000
+
| 20000
 +
| 12000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Ballista parts]]
 
| [[Ballista parts]]
| 2000
+
| 20000
 +
| 12000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Siege ammo]]
 
| [[Siege ammo]]
| 3000
+
| 30000
 +
| 30000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Ballista arrow head]]
 
| [[Ballista arrow head]]
| 1000
+
| 10000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Mechanism]]s
 
| [[Mechanism]]s
| 2000
+
| 20000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Trap component]]
 
| [[Trap component]]
| SIZE/10
+
| SIZE
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Alcohol|Drink]]
 
| [[Alcohol|Drink]]
| 200
+
| 2000
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Mill|Powder]]
 
| [[Mill|Powder]]
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Cheese]]
 
| [[Cheese]]
| 100
+
| 1000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Prepared meal]]
 
| [[Prepared meal]]
| 100
+
| 1000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Extract|Misc. liquid]]
 
| [[Extract|Misc. liquid]]
| 200
+
| 2000
 +
| 600
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Coin]]
 
| [[Coin]]
| 1
+
| 10/16
| Seemingly divided further
+
| 35
 +
|
 +
| Stacks smaller than 16 are weightless and can be placed inside any item regardless of its available capacity. {{bug|6218}}
  
 
|-
 
|-
 
| [[Fat|Glob]]
 
| [[Fat|Glob]]
| 200
+
| 2000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Small [[rock]]
 
| Small [[rock]]
| 200
+
| 2000
 +
| 600
 +
|
 
| As [[Thrower|thrown]] by adventurers
 
| As [[Thrower|thrown]] by adventurers
  
 
|-
 
|-
 
| [[Pipe section]]
 
| [[Pipe section]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Hatch cover]]
 
| [[Hatch cover]]
| 1000
+
| 10000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Grate]]
 
| [[Grate]]
| 1000
+
| 10000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Quern]]
 
| [[Quern]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Millstone]]
 
| [[Millstone]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Splint]]
 
| [[Splint]]
| 200
+
| 2000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Crutch]]
 
| [[Crutch]]
| 200
+
| 2000
 +
| 18000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Traction bench]]
 
| [[Traction bench]]
| 3000
+
| 30000
 +
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| Orthopedic [[cast]]
 
| Orthopedic [[cast]]
| 200
+
| 2000
 +
| 3000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Tool]]
 
| [[Tool]]
| 100
+
| 1000*
| Should be SIZE/10{{bug|4979}}
+
| 3000
 +
| CAPACITY
 +
| Broken - supposed to be SIZE{{bug|4979}}
  
 
|-
 
|-
 
| [[Slab]]
 
| [[Slab]]
 +
| 60000
 
| 6000
 
| 6000
 +
|
 
|
 
|
  
 
|-
 
|-
 
| [[Egg]]
 
| [[Egg]]
 +
| Special
 
| Special
 
| Special
 
|
 
|
 
+
| Presumably the caste's EGG_SIZE
 
|}
 
|}
  
These values are up to date as of version 0.31.25.
+
{{Category|Items}}
 
 
Other examples: stack of cheap stones, or stone statue, 161-167 Γ. Steel chainmail 19 Γ. Steel or bronze bars, 15-16 Γ. Iron flask, 12 Γ.
 
The heaviest metal is [[Main:Platinum|Platinum]], and the lightest metal is [[Main:Adamantine|Adamantine]].
 

Latest revision as of 16:24, 11 June 2022

This article is about an older version of DF.

Weight is an item property, and is measured in units Γ, also known as urists - one unit urist is equivalent to one real kilogram.

Weight is largely used by the game to determine how fast someone or something should move, due to encumbrance effects and carry weight restrictions; to calculate damage, since object mass factors into impact momentum; and to some extent to make temperature calculations, as mass factors into heat capacity. Note that, for DF, weight and mass are currently indistinguishable because as it stands DF gravity is uniform both across the whole universe and from world to world and buoyancy isn't implemented.

Weight is displayed as a quantity associated with an item. Weight calculation is not entirely straightforward, since each item category - or sometimes even individual items - have their own formula for determining weight.

Weight Calculation[edit]

The general form for calculating weight in DF is to take the material density (as found in the raws) multiplied by the item's volume.

Weight (in Γ) = Density (in kg/m3) * Volume (in cm3) / 1,000,000 (cm3/m3)

Internally, all custom volume/capacity numbers are rounded down to the nearest multiple of 10 - thus, if you define a weapon with [SIZE:15], it will actually behave as if you had specified [SIZE:10].

Items also have a "bulk" which does not depend on the material and is used to determine clutter as well as how many items can fit into a container.

Item Type Volume Bulk Capacity Notes
Bars 2000 6000
Cut gems 200 6000
Blocks 2500 6000
Rough gems 2500 6000
Mined stone 70000 6000
Wood logs 50000 6000
Door 30000 6000
Floodgate 30000 6000
Bed 30000 6000
Chair 30000 6000
Chain 5000 6000
Flask 1000 3000 1800
Goblet 1000 3000 1800
Instrument 4000 3000
Toy 1000 3000
Window 20000 6000
Cage 30000 6000 60000
Barrel 20000 6000 60000
Bucket 3000 6000 6000
Animal trap 3000 6000 60000
Table 30000 6000
Coffin 30000 6000 60000
Statue 60000 6000
Corpse Special Special Based on the size of the corpse and what it's made of
Weapon SIZE 6000
Body armor ? 9000 Based on UBSTEP, LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Shoes ? 1800 Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Shields ? 6000 Based on UPSTEP and the race that crafted it
Helms ? 3000 Based on COVERAGE, LAYER_SIZE, and the race that crafted it
Gloves ? 1200 Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Box 20000 or 1000 6000 60000 Bags weigh 100, boxes/chests/coffers weigh 2000
Bin 15000 6000 60000
Armor stand 10000 6000 60000
Weapon rack 10000 6000 60000
Cabinet 30000 6000 60000
Figurine 1000 3000
Amulet 500 1200
Scepter 3000 3000
Ammo SIZE 600
Crown 1000 3000
Ring 50 600
Earring 30 600
Bracelet 200 1200
Large gem 50 1800
Anvil 10000 6000
Body part Special Special Based on the size of the body part and what it's made of
Remains 2000 1200
Meat 2000 6000
Fish 2000 6000
Unprepared fish 2000 6000
Live vermin Special Special Based on creature's adult size
Tame vermin Special Special Based on creature's adult size
Seeds 100 600
Plant 1000 6000
Leather 5000 6000
Leaves 50 3000
Thread ceil(Dimension/50) 6000 300 for freshly extracted/gathered thread
Cloth ceil(Dimension/50) 6000 200 for freshly woven cloth
Totem 5000 3000
Pants ? 1800 Based on LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Backpack 5000 6000 60000
Quiver 3000 6000 12000
Catapult parts 20000 12000
Ballista parts 20000 12000
Siege ammo 30000 30000
Ballista arrow head 10000 6000
Mechanisms 20000 6000
Trap component SIZE 6000
Drink 2000 600
Powder 2000 6000
Cheese 1000 6000
Prepared meal 1000 6000
Misc. liquid 2000 600
Coin 10/16 35 Stacks smaller than 16 are weightless and can be placed inside any item regardless of its available capacity. Bug:6218
Glob 2000 6000
Small rock 2000 600 As thrown by adventurers
Pipe section 30000 6000
Hatch cover 10000 6000
Grate 10000 6000
Quern 30000 6000
Millstone 30000 6000
Splint 2000 3000
Crutch 2000 18000
Traction bench 30000 6000
Orthopedic cast 2000 3000
Tool 1000* 3000 CAPACITY Broken - supposed to be SIZEBug:4979
Slab 60000 6000
Egg Special Special Presumably the caste's EGG_SIZE