one dataset · paper, tables, graph, wiki
simgrammar the grammar of simulation

core loop

embark and dig -> designate jobs, stockpiles, and workshops -> dwarves self-assign labors and craft -> needs, emotions, and stress accumulate -> migrants, caravans, sieges, and beasts arrive -> fortress thrives or collapses into the world's legends

design notes

Tarn Adams's stated principles are to break a system into parts, avoid overplanning, and base each model on a real-world analog; he describes the game as a story generator. The fortress is embarked inside a world whose geology and history were already simulated, and the fortress's own events flow back into that history through Legends, so a collapse becomes a record that a later adventurer can visit. Strange moods let an inspired dwarf seize a workshop to make a named artifact and go insane if materials are missing, which turns the production system into a story source. The game was free and donation-funded from 2006; a paid Steam edition with sprite graphics followed in December 2022, still short of a 1.0 version.

relations

30 stored edges
uses

Designation orders

The player designates digging, chopping, construction, and workshop jobs; dwarves with the matching labor enabled pick them up, and a manager can queue work orders automatically.

core
uses

Fluid and gas simulation

Water and magma flow tile by tile with up to seven depth levels per tile, so breaching a river, cavern lake, or magma source floods connected tunnels.

core
uses

History chronicle

Legends mode lists historical figures, sites, artifacts, and civilizations with a historical map; fortress deeds and retired adventurers are added, and the archive exports to XML.

core
uses

Simulated history generation

World generation builds elevation, rainfall, drainage, temperature, and vegetation layers, then simulates civilizations, sites, and historical figures for a player-chosen number of years before the fortress is embarked.

core
uses

Injury body model

Body parts are layered tissues (skin, fat, muscle, bone, nerves) damaged individually in combat; injuries can be permanent and are treated in a hospital with traction benches, casts, sutures, and splints.

core
uses

Mood and breakdowns

Emotions add to or subtract from a hidden stress value (-1,000,000 to +1,000,000) with effects from +10,000, +25,000, and +50,000; stressed dwarves throw tantrums, fall into depression, or wander obliviously, prolonged stress leads to insanity, and one breakdown can spread unhappiness.

core
uses

Stress accumulation

Emotions from events add to or subtract from a hidden stress value (-1,000,000 to +1,000,000) scaled by facets such as stress vulnerability and bravery; above +10,000, +25,000, and +50,000 dwarves risk tantrums, depression, obliviousness, and insanity, and long-term memories keep adding stress.

core
uses

Vertical layers

Z-levels, added in 2007, let the fortress descend level by level through soil and stone to caverns, the magma sea, and the underworld, connected by stairs and ramps.

core
uses

Adaptive threat scaling

Wealthier and more populous fortresses attract sieges and megabeasts.

supporting
uses

Agent skills

Work quality and speed rise with skill gained through practice in each labor.

supporting
uses

Crime and policing

A justice system punishes assault, murder, and vandalism.

supporting
uses

Crop cultivation

Underground farming on soil layers; plump helmet mushrooms are brewed into wine.

supporting
uses

Fire spread

Fires spread and burn dwarves and furniture.

supporting
uses
supporting
uses

Hauling jobs

Dwarves carry goods to player-defined stockpiles.

supporting
uses

Heat transfer

Tiles, materials, and creatures carry temperatures.

supporting
uses

Immigration by attractiveness

Migrant waves from the mountainhome grow as the fortress develops.

supporting
uses

Memories and thoughts

Emotions become short-term memories; strong or revisited ones are promoted to long-term memories that keep adding stress.

supporting
uses

Modding API

Raw text files define creatures, materials, and reactions; DFHack adds Lua and C++ scripting.

supporting
uses

Needs decay

Food, drink, and sleep, plus personal needs such as socializing or praying met at taverns, temples, and libraries.

supporting
uses

Personality traits

Facets such as bravery, stress vulnerability, and anxiety scale how stress builds and dissipates.

supporting
uses

Production chains

Ore is smelted to bars and alloyed; steel needs flux to make pig iron plus coke or charcoal, and magma can replace fuel.

supporting
uses

Raid defense

Ambushes, sieges, megabeasts, and forgotten beasts are met with squads, fortifications, and traps triggered by levers or pressure plates.

supporting
uses

Relationship values

Friends, family, and pets; their deaths are major stressors.

supporting
uses

Room recognition

Furniture defines bedrooms, dining halls, and offices; nobles demand rooms of rising value.

supporting
uses
supporting
uses

Trade routes

Yearly caravans from neighboring civilizations are handled by a broker; caravans can be absent or hostile depending on history.

supporting
uses

Unit commands

Military squads in uniforms train at barracks and can be ordered to attack.

supporting

backlinks

computed from other records

sources

4
Wikipedia contributors (2026). Dwarf Fortress. Wikipedia
Tarn Adams (2015). Simulation Principles from Dwarf Fortress. Game AI Pro 2, ed. Steve Rabin, CRC Press (chapter 41)
Dwarf Fortress Wiki contributors (2026). Legends. Dwarf Fortress Wiki
Dwarf Fortress Wiki contributors (2026). Stress. Dwarf Fortress Wiki

provenance

runs in log/runs
2026-10-24
created2026-10-24-catalog-gbcatalog
2026-10-24
reviewed2026-10-24-review-fixesmaintenance
2026-10-25
reviewed2026-10-25-contributor-readinessmaintenance