|This article is about the current version of DF.|
For temperature as it relates to choosing an embarkation site, see Climate.
|This feature has one or more outstanding bugs. Please view the Bugs section for details.|
 Temperature scale
Temperatures in Dwarf Fortress are measured in the game's own, unnamed temperature scale, since termed "Degrees Urist" by the community. Temperatures in Dwarf Fortress are stored as sixteen-bit unsigned integers, which translates into a minimum value of 0 °U and a technical maximum of 65535 °U (216-1), although this is internally limited to 60000 °U—60001 °U is used for temperatures which have been set to NONE. Floating point values are not considered, and when they appear any decimals are either sheared off or rounded away by the game. Urists are scaled logically against the Fahrenheit scale, so conversions are simple, if non-intuitive:
- [URIST] = [FAHRENHEIT] + 9968
- [CELSIUS] * 9/5 + 10000
- [KELVIN] * 9/5 + 9508.33
- [RANKINE] + 9508.33
Some reference numbers:
|Boiling point of water||10180||212||100||373.15||671.67|
|Human body temperature||10067round||98.6||36.6||310.15||558.27|
|Freezing point of water||10000||32||0||273.15||491.67|
|Zero degrees Urist||0||-9968||-5555.5||-5282.405||-9508.33|
Values designated with round have been rounded internally to avoid decimals: for instance, the human body temperature is technically 10066.6, but has been rounded up to raws. Also interesting is the fact that temperatures in Dwarf Fortress can go far, far below absolute zero, which is physically impossible; considering Dwarf Fortress also allows perpetual motion, sometimes it's best not to ask questions.in the
|Urist asks...||I'm a modder who needs to work with temperature conversions all the time. Is there any tool I can use to lessen the amount of work involved?|
Temperature conversions are usually only useful when modding, and can be annoying to do manually; luckily a simple has been created for those who find themselves having to convert a lot of temperatures to and/or from degrees Urist often.
Examples of some temperatures encountered in DF, the most important ones in bold:
|Event / location||Temperature|
|Outside, freezing climate (varies)|
|Underground, glacier ice|
|Tiles next to magma (warm stone)|
|Outside, scorching climate (varies)|
|Wood fire (max)|
|Material is fire-safe|
|Common stone melts (varies)|
|Coal fire (max)|
|Material is magma-safe|
|Creatures made of flame/fire|
 Material values
|Defined: Value • Color • Density • Strain at yield • Temperature values|
|Derived: Magma safety • Fire safety|
|Fluids: Depth • Flow • Pressure|
Temperature has important constraints on the materials in the game, and dictates a number of material properties related to states of matter and heat/cold damage. These are defined by material definition tokens in the material raw files, most of which use temperature as an input field:
- [MELTING_POINT:#] — This is the temperature at which a liquid material will freeze, or a solid material will melt. In Dwarf Fortress the melting point and freezing point coincide exactly; this is contrary to many real-life materials, which can be supercooled.
- [BOILING_POINT:#] — This is the temperature at which the material will boil or condense. Water boils at .
- [IGNITE_POINT:#] — This is the temperature at which the material will catch fire.
- [HEATDAM_POINT:#] — This is the temperature above which the material will begin to take heat damage. Burning items without a heat damage point (or with an exceptionally high one) will take damage very slowly, causing them to burn for a very long time (9 months and 16.8 days) before disappearing.
- [COLDDAM_POINT:#] — This is the temperature below which the material will begin to take frost damage.
- [SPEC_HEAT:#] — This determines how long it takes the material to heat up or cool down. A material with a high specific heat capacity will hold more heat and affect its surroundings more before cooling down or heating up to equilibrium. The input for this token is not temperature, but rather the specific heat capacity of the material.
- [MAT_FIXED_TEMP] — A material's temperature can be forced to always be a certain value via the MAT_FIXED_TEMP material definition token. The only standard material which uses this is nether-cap wood, whose temperature is always at the melting point of water. If a material's temperature is fixed to between its cold damage point and its heat damage point, then items made from that material will never suffer cold/heat damage. This makes nether-caps fire-safe and magma-safe despite being a type of wood.
Due to the way fixed temperature is handled, giving a material a fixed temperature will not cause its actual temperature to change accordingly — instead, its temperature will simply be permanently locked at whatever it was previously. Removing a material's fixed temperature, however, will cause all items made of it to heat or cool until reaching equilibrium with their surroundings. The fixed temperature of a container does affect its contents, but you can't freeze water by putting it into a bucket made from nether-cap because water will not freeze until it cools below . The fixed temperature of an inorganic material has no effect on unmined walls made from that material, though boulders will take on that temperature as they are produced via mining.
 Temperature transfer
Temperature transfer in DF is fairly simple - most temperature values have a whole part (in "degrees Urist") and a fraction part (which ranges from 0 to the material's SPEC_HEAT minus 1). Once per tick, the game calculates the relevant temperature difference (e.g. between the item itself and the tile in which it is located) and adds that to the fraction part, then adjusts the whole part until the fraction part is within range. For example, a piece of Lignite (which has SPEC_HEAT 409) at temperature 10015.0 (room temperature underground) exposed to Magma (temperature 12000) will heat up by 1985 fraction units, which will increase its temperature to 10019.349. In order to reach its ignition point of 11440, it would need to be in the magma for a total of 517 ticks, over 5 seconds at 100 fps.
- Temperature calculations are a known cause of lag. If maximizing framerate is a concern, you can disable temperature calculations through an option in D init.txt. With temperature calculations disabled, effects such as water freezing, melting, or evaporating, or creatures and items taking temperature-related damage will not occur.
- When temperature calculations are disabled, dwarves will refuse to set foot in a cast obsidian tile (or any other tiles previously occupied by magma).Bug:6033