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.34:Time"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
(Removed "Eggs" section due to falsification in forums (http://www.bay12forums.com/smf/index.php?topic=106323.0))
(partial rewrite)
Line 1: Line 1:
{{av}}{{Quality|Exceptional}}
+
{{av}}{{Quality|Exceptional|04:21, 13 July 2013 (UTC)}}
  
Time in Dwarf Fortress can be a somewhat complicated subject, but learning the ins and outs of the system is essential for modders and can be of great use to players, as time tracks everything from [[syndrome]]s to crop growth.
+
'''Time''' is an integral part of any simulation, none the least in a simulation as complex as Dwarf Fortress. Time is measured internally in unnamed units, commonly dubbed "ticks" by the community. Each tick represents one step in the Dwarf Fortress program, requiring calculations related to [[speed|unit movement]], [[flow|fluid movement]], [[temperature|temperature transfer]], various event checks, [[combat|combat checks]], [[path|pathing checks]], [[job|job changes]], [[skill|experience ticks]] - basically everything required to run the program, broken up between individual lumps of time. These ticks are then bundled up against days, months, seasons, and then years under the dwarven [[calendar]], which are then further engrossed within individual, context-sensitive [[Calendar#Ages|ages]]. For a discussion on the greater passage of time, see [[Calendar]]; this page is focused on the lower-level, "unit-based", in-game passage of time.
  
 +
== Mechanics ==
 +
=== Ticks ===
 +
How much a tick in time is worth against the yearly dwarven [[calendar]] depends on the game mode, as time in fortress mode is much more heavily accelerated than it is in adventurer mode. Fortress mode counts 1200 ticks per day and 403200 per year, while adventurer mode counts 86400 ticks to a day and therefore 29030400 ticks per year. According to these rates, each tick is equivalent to a real-world second in adventurer mode, but 1.2 ''minutes'' in fortress mode, making adventurers ''72'' times faster than your dwarves tick-for-tick. It's important to remember that this is done for both technical and interest-based reasons: adventuring alone with a limited field of view is not very technically demanding, but requires fine control of your movements, while managing as many as 200 dwarves running amok in a fortress and simultaneously simulating the greater part of their surroundings requires a lot of processing power, but much less fine control.
  
== Breakdown ==
+
How quickly time ''appears'' to pass in your game, especially in fortress mode, has as much to do with your hardware as with the number of ticks in a year. The number of [[frames per second]] is a direct reflection of how many ticks a second your processor is working through. This should be distinguished from the frame ''refresh'' rate, which is how many frames appear on your ''screen'' per second - since there's a limit to how many frame changes the human eye can see, there's not much purpose to displaying every single one of them on-screen. You can set your FPS to be visible by changing {{tt|[FPS:NO]}} to {{tt|[FPS:YES]}} in your [[Init.txt]] file, which will display two numbers in the top-right corner of your game window, the first being the frames per second and the second being the refresh rate. By default the framerate is capped at 100 FPS, but this setting can be changed or even removed: see [[Frames per second#Controlling FPS]] for a technical discussion. For tips on maximizing framerate, see the (topically named) [[Maximizing framerate]] article.
Time is measured in unnamed units, which are commonly referred to as "time units" or "ticks."  Time units are equal to different lengths of time, depending on the game mode.
 
  
In fortress mode, there are 1200 time units in a day; in adventurer mode, there are 86400 time units in a day.  Thus, a dwarf in adventure mode is capable of moving, fighting, and interacting 72 times as fast as a dwarf in fortress mode assuming the same statistics.  Assuming 24 hours per day, 60 minutes per hour, and 60 seconds per minute, this means that a time unit lasts 1 second in adventurer mode and 1.2 minutes in fortress mode.  Regardless of mode, there are 28 days in a month and 12 months in a year.
+
Dwarf Fortress is an ''extremely'' processor-intensive game, and so how many frames you actually get per second will depend on the strength of your machine, how far into the game and how clutter there is in it, whether or not you are not taking any fps-saving measures, what mods or other programs you are running, and so on. Regardless of mode, there are 28 days in a month and 12 months in a year. Assuming an FPS of 100, not counting pauses an hour of gameplay will translate into a year in-game.
 
 
In fortress mode, there are 403200 time units every year.  At 100 fps, it would take just over an hour in real-time to play through one year.
 
  
 +
=== Creatures ===
 
The amount of time it takes a creature to move, fight, or interact is directly proportional to its [[speed]] and inversely proportional to its [[agility]] and its [[strength]].  All creatures with default speed, regardless of their strength or agility, take between 5 and 16 time units per orthogonal tile traveled. Diagonal tile travel times are 362/256 times that amount, so they take between 8 and 23 time units for creatures with default speed. Median dwarves take approximately 10.5 time units and 14.9 time units to travel orthogonally or diagonally respectively.  Triggered devices can be affected by delays of up to 100 time units; see [[lever]].
 
The amount of time it takes a creature to move, fight, or interact is directly proportional to its [[speed]] and inversely proportional to its [[agility]] and its [[strength]].  All creatures with default speed, regardless of their strength or agility, take between 5 and 16 time units per orthogonal tile traveled. Diagonal tile travel times are 362/256 times that amount, so they take between 8 and 23 time units for creatures with default speed. Median dwarves take approximately 10.5 time units and 14.9 time units to travel orthogonally or diagonally respectively.  Triggered devices can be affected by delays of up to 100 time units; see [[lever]].
  
== Syndromes ==
+
=== Syndromes ===
 
[[Syndrome]]s use time units. A syndrome that lists its effect as starting at "5" means that for all but the [[Elf|fastest characters]], you will begin feeling the effects as soon as you take a step. "50" means 50 time units (or about five steps), and "500" reliably suggests that you'll be able to stagger all the way back to the hospital before your [[Giant desert scorpion|brain pours out of your ears]].
 
[[Syndrome]]s use time units. A syndrome that lists its effect as starting at "5" means that for all but the [[Elf|fastest characters]], you will begin feeling the effects as soon as you take a step. "50" means 50 time units (or about five steps), and "500" reliably suggests that you'll be able to stagger all the way back to the hospital before your [[Giant desert scorpion|brain pours out of your ears]].
  
== Plants ==
+
=== Plants ===
 
Plants use a tag called GROWDUR. The GROWDUR value is generally set to 300 or 500, which is actually 30000 time units or 50000 time units.  One growdur is equal to 100 time units.
 
Plants use a tag called GROWDUR. The GROWDUR value is generally set to 300 or 500, which is actually 30000 time units or 50000 time units.  One growdur is equal to 100 time units.
  
== Hives ==
+
=== Hives ===
 
[[Vermin]] in [[hive]]s which produce items  (namely [[bee]]s which produce [[honey]]) have the HIVE_PRODUCT [[creature token]], whose second parameter is the number of time units it takes for a hive to produce the product.
 
[[Vermin]] in [[hive]]s which produce items  (namely [[bee]]s which produce [[honey]]) have the HIVE_PRODUCT [[creature token]], whose second parameter is the number of time units it takes for a hive to produce the product.
  
== Lifespan and Development ==
+
=== Lifespan and Development ===
 
 
 
See [[Age]].
 
See [[Age]].
  
 
== Clocks ==
 
== Clocks ==
 
 
Based on the fact that [[pressure plate]]s take 100 steps to reset, some people have built various time-keeping devices to do various things around the fort, like flooding a trap once a month, or just for fun.
 
Based on the fact that [[pressure plate]]s take 100 steps to reset, some people have built various time-keeping devices to do various things around the fort, like flooding a trap once a month, or just for fun.
  
 
{{Category|Physics}}
 
{{Category|Physics}}

Revision as of 04:21, 13 July 2013

This article is about an older version of DF.

Time is an integral part of any simulation, none the least in a simulation as complex as Dwarf Fortress. Time is measured internally in unnamed units, commonly dubbed "ticks" by the community. Each tick represents one step in the Dwarf Fortress program, requiring calculations related to unit movement, fluid movement, temperature transfer, various event checks, combat checks, pathing checks, job changes, experience ticks - basically everything required to run the program, broken up between individual lumps of time. These ticks are then bundled up against days, months, seasons, and then years under the dwarven calendar, which are then further engrossed within individual, context-sensitive ages. For a discussion on the greater passage of time, see Calendar; this page is focused on the lower-level, "unit-based", in-game passage of time.

Mechanics

Ticks

How much a tick in time is worth against the yearly dwarven calendar depends on the game mode, as time in fortress mode is much more heavily accelerated than it is in adventurer mode. Fortress mode counts 1200 ticks per day and 403200 per year, while adventurer mode counts 86400 ticks to a day and therefore 29030400 ticks per year. According to these rates, each tick is equivalent to a real-world second in adventurer mode, but 1.2 minutes in fortress mode, making adventurers 72 times faster than your dwarves tick-for-tick. It's important to remember that this is done for both technical and interest-based reasons: adventuring alone with a limited field of view is not very technically demanding, but requires fine control of your movements, while managing as many as 200 dwarves running amok in a fortress and simultaneously simulating the greater part of their surroundings requires a lot of processing power, but much less fine control.

How quickly time appears to pass in your game, especially in fortress mode, has as much to do with your hardware as with the number of ticks in a year. The number of frames per second is a direct reflection of how many ticks a second your processor is working through. This should be distinguished from the frame refresh rate, which is how many frames appear on your screen per second - since there's a limit to how many frame changes the human eye can see, there's not much purpose to displaying every single one of them on-screen. You can set your FPS to be visible by changing [FPS:NO] to [FPS:YES] in your Init.txt file, which will display two numbers in the top-right corner of your game window, the first being the frames per second and the second being the refresh rate. By default the framerate is capped at 100 FPS, but this setting can be changed or even removed: see Frames per second#Controlling FPS for a technical discussion. For tips on maximizing framerate, see the (topically named) Maximizing framerate article.

Dwarf Fortress is an extremely processor-intensive game, and so how many frames you actually get per second will depend on the strength of your machine, how far into the game and how clutter there is in it, whether or not you are not taking any fps-saving measures, what mods or other programs you are running, and so on. Regardless of mode, there are 28 days in a month and 12 months in a year. Assuming an FPS of 100, not counting pauses an hour of gameplay will translate into a year in-game.

Creatures

The amount of time it takes a creature to move, fight, or interact is directly proportional to its speed and inversely proportional to its agility and its strength. All creatures with default speed, regardless of their strength or agility, take between 5 and 16 time units per orthogonal tile traveled. Diagonal tile travel times are 362/256 times that amount, so they take between 8 and 23 time units for creatures with default speed. Median dwarves take approximately 10.5 time units and 14.9 time units to travel orthogonally or diagonally respectively. Triggered devices can be affected by delays of up to 100 time units; see lever.

Syndromes

Syndromes use time units. A syndrome that lists its effect as starting at "5" means that for all but the fastest characters, you will begin feeling the effects as soon as you take a step. "50" means 50 time units (or about five steps), and "500" reliably suggests that you'll be able to stagger all the way back to the hospital before your brain pours out of your ears.

Plants

Plants use a tag called GROWDUR. The GROWDUR value is generally set to 300 or 500, which is actually 30000 time units or 50000 time units. One growdur is equal to 100 time units.

Hives

Vermin in hives which produce items (namely bees which produce honey) have the HIVE_PRODUCT creature token, whose second parameter is the number of time units it takes for a hive to produce the product.

Lifespan and Development

See Age.

Clocks

Based on the fact that pressure plates take 100 steps to reset, some people have built various time-keeping devices to do various things around the fort, like flooding a trap once a month, or just for fun.