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
(Fixing links within namespace (2696/2808))
(→‎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)
Line 10: Line 10:
  
 
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 'd' as found in the raws multiplied by an item constant C.
<br> W = d*C
+
 
 +
:W = d * C / 100,000
  
 
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.
 
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.
Line 20: Line 21:
 
! Formula
 
! Formula
 
! Notes
 
! Notes
 +
 +
|-
 +
| [[Bar]]s
 +
| 200
 +
|
 +
 +
|-
 +
| Cut [[gem]]s
 +
| 20
 +
|
 +
 +
|-
 +
| [[Block]]s
 +
| 250
 +
|
 +
 +
|-
 +
| Rough [[gem]]s
 +
| 250
 +
|
 +
 +
|-
 +
| Mined [[stone]]
 +
| 7000
 +
|
 +
 +
|-
 +
| Wood [[log]]s
 +
| 5000
 +
|
 +
 +
|-
 +
| [[Door]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Floodgate]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Bed]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Chair]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Chain]]
 +
| 500
 +
|
 +
 +
|-
 +
| [[Flask]]
 +
| 100
 +
|
 +
 +
|-
 +
| [[Goblet]]
 +
| 100
 +
|
 +
 +
|-
 +
| [[Instrument]]
 +
| 400
 +
|
 +
 +
|-
 +
| [[Toy]]
 +
| 100
 +
|
 +
 +
|-
 +
| [[Window]]
 +
| 2000
 +
|
 +
 +
|-
 +
| [[Cage]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Barrel]]
 +
| 2000
 +
|
 +
 +
|-
 +
| [[Bucket]]
 +
| 300
 +
|
 +
 +
|-
 +
| [[Animal trap]]
 +
| 300
 +
|
 +
 +
|-
 +
| [[Table]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Coffin]]
 +
| 3000
 +
|
 +
 +
|-
 +
| [[Statue]]
 +
| 6000
 +
|
 +
 +
|-
 +
| [[Corpse]]
 +
| Special
 +
|
 +
 +
|-
 +
| [[Weapon]]
 +
| SIZE / 10
 +
|
  
 
|-
 
|-
 
| item_armor
 
| item_armor
| (layer size/ material size)/<br> 1 010
+
| <s>(layer size/ material size)/<br> 1 010</s>
| The divisor may be slightly higher but is consistent with other values.
+
| Based on UBSTEP, LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 +
 
 +
|-
 +
| item_shoes
 +
| <s>layer size/ 7 500</s>
 +
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 +
 
 +
|-
 +
| item_shield
 +
| <s>1/ 100 000</s>
 +
| Based on UPSTEP and the race that crafted it
  
 
|-
 
|-
 
| item_helm
 
| item_helm
| layer size/ 60 000
+
| <s>layer size/ 60 000</s>
| The formula for helms specifically appears to be 1/ 1 010, this is thought to be a bug.
+
| Based on COVERAGE, LAYER_SIZE, and the race that crafted it
  
 
|-
 
|-
 
| item_gloves
 
| item_gloves
| 1/ 100 000
+
| <s>1/ 100 000</s>
| Divisor is approximate.
+
| Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 +
 
 +
|-
 +
| [[Box]]
 +
| 2000 or 100
 +
| Bags weigh 100, boxes/chests/coffers weigh 2000
 +
 
 +
|-
 +
| [[Bin]]
 +
| 1500
 +
|
 +
 
 +
|-
 +
| [[Armor stand]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Weapon rack]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Cabinet]]
 +
| 3000
 +
|
 +
 
 +
|-
 +
| [[Figurine]]
 +
| 100
 +
|
 +
 
 +
|-
 +
| [[Amulet]]
 +
| 50
 +
|
 +
 
 +
|-
 +
| [[Scepter]]
 +
| 300
 +
|
 +
 
 +
|-
 +
| [[Ammo]]
 +
| SIZE / 10
 +
|
 +
 
 +
|-
 +
| [[Crown]]
 +
| 100
 +
|
 +
 
 +
|-
 +
| [[Ring]]
 +
| 5
 +
|
 +
 
 +
|-
 +
| [[Earring]]
 +
| 3
 +
|
 +
 
 +
|-
 +
| [[Bracelet]]
 +
| 20
 +
|
 +
 
 +
|-
 +
| [[Large gem]]
 +
| 5
 +
|
 +
 
 +
|-
 +
| [[Anvil]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Body part]]
 +
| Special
 +
|
 +
 
 +
|-
 +
| [[Remains]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Meat]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Fish]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| Unprepared [[fish]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| Live [[vermin]]
 +
| Special
 +
|
 +
 
 +
|-
 +
| Tame [[vermin]]
 +
| Special
 +
|
 +
 
 +
|-
 +
| [[Seed]]s
 +
| 10
 +
|
 +
 
 +
|-
 +
| [[Plant]]
 +
| 100
 +
|
 +
 
 +
|-
 +
| [[Leather]]
 +
| 500
 +
|
 +
 
 +
|-
 +
| [[Leaves]]
 +
| 5
 +
|
 +
 
 +
|-
 +
| [[Thread]]
 +
| ceil(Dimension/500)
 +
| 20 for freshly extracted/gathered thread
 +
 
 +
|-
 +
| [[Cloth]]
 +
| ceil(Dimension/500)
 +
| 30 for freshly woven cloth
 +
 
 +
|-
 +
| [[Totem]]
 +
| 500
 +
|
  
 
|-
 
|-
 
| item_pants
 
| item_pants
| layer size/ 5 190  
+
| <s>layer size/ 5 190</s>
|  
+
| Based on LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
 +
 
 +
|-
 +
| [[Backpack]]
 +
| 500
 +
|
 +
 
 +
|-
 +
| [[Quiver]]
 +
| 300
 +
|
 +
 
 +
|-
 +
| [[Catapult parts]]
 +
| 2000
 +
|
 +
 
 +
|-
 +
| [[Ballista parts]]
 +
| 2000
 +
|
 +
 
 +
|-
 +
| [[Siege ammo]]
 +
| 3000
 +
|
 +
 
 +
|-
 +
| [[Ballista arrow head]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Mechanism]]s
 +
| 2000
 +
|
 +
 
 +
|-
 +
| [[Trap component]]
 +
| SIZE/10
 +
|
 +
 
 +
|-
 +
| [[Alcohol|Drink]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Mill|Powder]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Cheese]]
 +
| 100
 +
|
 +
 
 +
|-
 +
| [[Prepared meal]]
 +
| 100
 +
|
 +
 
 +
|-
 +
| [[Extract|Misc. liquid]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Coin]]
 +
| 1
 +
| Seemingly divided further
 +
 
 +
|-
 +
| [[Fat|Glob]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| Small [[rock]]
 +
| 200
 +
| As [[Thrower|thrown]] by adventurers
 +
 
 +
|-
 +
| [[Pipe section]]
 +
| 3000
 +
|
 +
 
 +
|-
 +
| [[Hatch cover]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Grate]]
 +
| 1000
 +
|
 +
 
 +
|-
 +
| [[Quern]]
 +
| 3000
 +
|
 +
 
 +
|-
 +
| [[Millstone]]
 +
| 3000
 +
|
 +
 
 +
|-
 +
| [[Splint]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Crutch]]
 +
| 200
 +
|
 +
 
 +
|-
 +
| [[Traction bench]]
 +
| 3000
 +
|
  
 
|-
 
|-
| item_shoes
+
| Orthopedic [[cast]]
| layer size/ 7 500
+
| 200
| The formula for high boots specifically appears to be 1/ 100 000, this is thought to be a bug.
+
|
  
 
|-
 
|-
| item_shield
+
| [[Tool]]
| 1/ 100 000
+
| 100
| Divisor is approximate.
+
| Should be SIZE/10{{bug|4979}}
  
 
|-
 
|-
| item_ammo
+
| [[Slab]]
| size/ 1 000 000
+
| 6000
 
|
 
|
  
 
|-
 
|-
| item_weapon
+
| [[Egg]]
| size/ 1 000 000
+
| Special
 
|
 
|
  
 
|}
 
|}
  
These values are up to date as of this writing {{version|0.31.03}}.
+
These values are up to date as of version 0.31.25.
  
 
Other examples: stack of cheap stones, or stone statue, 161-167 Γ. Steel chainmail 19 Γ. Steel or bronze bars, 15-16 Γ. Iron flask, 12 Γ.
 
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]].
 
The heaviest metal is [[Main:Platinum|Platinum]], and the lightest metal is [[Main:Adamantine|Adamantine]].

Revision as of 19:13, 12 December 2011

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

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 / 100,000

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
Bars 200
Cut gems 20
Blocks 250
Rough gems 250
Mined stone 7000
Wood logs 5000
Door 3000
Floodgate 3000
Bed 3000
Chair 3000
Chain 500
Flask 100
Goblet 100
Instrument 400
Toy 100
Window 2000
Cage 3000
Barrel 2000
Bucket 300
Animal trap 300
Table 3000
Coffin 3000
Statue 6000
Corpse Special
Weapon SIZE / 10
item_armor (layer size/ material size)/
1 010
Based on UBSTEP, LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
item_shoes layer size/ 7 500 Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
item_shield 1/ 100 000 Based on UPSTEP and the race that crafted it
item_helm layer size/ 60 000 Based on COVERAGE, LAYER_SIZE, and the race that crafted it
item_gloves 1/ 100 000 Based on UPSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Box 2000 or 100 Bags weigh 100, boxes/chests/coffers weigh 2000
Bin 1500
Armor stand 1000
Weapon rack 1000
Cabinet 3000
Figurine 100
Amulet 50
Scepter 300
Ammo SIZE / 10
Crown 100
Ring 5
Earring 3
Bracelet 20
Large gem 5
Anvil 1000
Body part Special
Remains 200
Meat 200
Fish 200
Unprepared fish 200
Live vermin Special
Tame vermin Special
Seeds 10
Plant 100
Leather 500
Leaves 5
Thread ceil(Dimension/500) 20 for freshly extracted/gathered thread
Cloth ceil(Dimension/500) 30 for freshly woven cloth
Totem 500
item_pants layer size/ 5 190 Based on LBSTEP, COVERAGE, LAYER_SIZE, and the race that crafted it
Backpack 500
Quiver 300
Catapult parts 2000
Ballista parts 2000
Siege ammo 3000
Ballista arrow head 1000
Mechanisms 2000
Trap component SIZE/10
Drink 200
Powder 200
Cheese 100
Prepared meal 100
Misc. liquid 200
Coin 1 Seemingly divided further
Glob 200
Small rock 200 As thrown by adventurers
Pipe section 3000
Hatch cover 1000
Grate 1000
Quern 3000
Millstone 3000
Splint 200
Crutch 200
Traction bench 3000
Orthopedic cast 200
Tool 100 Should be SIZE/10Bug:4979
Slab 6000
Egg Special

These values are up to date as of version 0.31.25.

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 Platinum, and the lightest metal is Adamantine.