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.

Editing v0.34:Time

Jump to navigation Jump to search

Warning: You are not logged in.
Your IP address will be recorded in this page's edit history.

You are editing a page for an older version of Dwarf Fortress ("Main" is the current version, not "v0.34"). Please make sure you intend to do this. If you are here by mistake, see the current page instead.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 11: Line 11:
  
 
== Applied mechanics ==
 
== Applied mechanics ==
=== Creature actions ===
+
=== Creature movement ===
{{main|speed}}
+
The amount of time it takes a [[creature]] to move, fight, or interact is at its root directly proportional to its [[speed]]. There is a {{tt|[SPEED:#]}} [[creature token]] in the creature [[raw file]]s that handles a creature's speed on land, and a separate {{tt|[SWIM_SPEED:#]}} token that does the same in water; this is then plugged into the formula 1000/(100 + {{tt|[SPEED]}}) to give the creature's adjusted speed. This means that lower speed values are actually better: the default speed on land is 900, the default [[swimming]] speed is 2500, and the default {{tt|[AQUATIC]}} swimming speed is 500.
  
The amount of time in between a [[creature]]'s actions is at its root directly proportional to its [[speed]]. The default base speed is 900, though this value can be changed with a {{tt|[SPEED:#]}} [[creature token]] in the creature [[raw file]]s. A median creature with default speed will be capable of performing an action roughly every 10 ticks. The creature's actual performance is subject to many other modifiers (agility, strength, encumbrance, etc.).
+
No (unmodded) creature in the game gets to move every tick: indeed, an average creatures moves only once every ten ticks. To make this easier to understand, you should think about a creature's defined speed in terms of the {{tt|mod x}} operator, which shears off the last x digits of a number: for instance, 926 {{tt|mod}} 1 would give you 920. A creature's default speed is modded by two by the game to arrive at the number of ticks a creature must wait before it can move. Thus a creature with the default speed of 900 must wait nine ticks before it can move, and then must wait nine ticks more; a creature with a speed set to 500 would have to wait only five before it can spend a tick moving. A speed of 0 will result in a creature moving ''every'' tick.
 +
 
 +
In the case of fractional numbers, the last two digits (the remainder) will represent the chance out of a hundred that a creature will get to move after waiting out its basal period. So a creature whose speed is set to 975 will wait five ticks, then have a one in four chance of getting to move; if it fails this check, it must wait a further tick (because of their low base [[agility]], 975 is statistically where most dwarves fall). Thus the way speed is implemented its name is a bit of a misnomer: it is more of a turn delay. The entire formula put together, which is what the game uses internally, will tell you how many times per ten ticks a creature gets to move; it is probably implemented the way it is to allow fractional movement chances while preventing creatures from moving faster than once per tick, which is technically impossible.
 +
 
 +
This base speed is then modified by two [[Attributes#Body Attributes|physical attributes]], agility and strength, to which it is inversely proportional. A creature with maximum agility and strength attributes can move around three times faster than a creature with minimum stats. Agility and strength are trained by various physical-type tasks, which means that your [[military|soldiers]] can probably move significantly faster than your [[bookkeeper]]. These properties are multiplicative, so their relative effect decreases to nothing as the creature's basal speed approaches zero.
 +
 
 +
All creatures with default speed, regardless of their strength or agility, take between 5 and 16 ticks 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.
 +
 
 +
400 is the fastest speed that you will see in the wild without modding; creatures this fast will move at twice the speed of your dwarves.
  
 
=== Syndrome effects ===
 
=== Syndrome effects ===

Please note that all contributions to Dwarf Fortress Wiki are considered to be released under the GFDL & MIT (see Dwarf Fortress Wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)