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 "40d:Traffic"

From Dwarf Fortress Wiki
Jump to navigation Jump to search
m (article rating)
(Fixing quality template tags (615/690))
Line 1: Line 1:
{{av}}{{exceptional}}
+
{{av}}{{Quality|Masterwork}}
 
'''Traffic''' designations determine what path a dwarf will take, not what their final destination is. If a dwarf's task takes them somewhere, only a hard barrier will prevent them from going there.  Since movement in narrow hallways is slowed by {{L|dwarves}} moving past each other, traffic may become an issue once a settlement begins to grow in size.  
 
'''Traffic''' designations determine what path a dwarf will take, not what their final destination is. If a dwarf's task takes them somewhere, only a hard barrier will prevent them from going there.  Since movement in narrow hallways is slowed by {{L|dwarves}} moving past each other, traffic may become an issue once a settlement begins to grow in size.  
  

Revision as of 04:57, 7 May 2010

This article is about an older version of DF.

Traffic designations determine what path a dwarf will take, not what their final destination is. If a dwarf's task takes them somewhere, only a hard barrier will prevent them from going there. Since movement in narrow hallways is slowed by Template:L moving past each other, traffic may become an issue once a settlement begins to grow in size.

Some traffic problems can be prevented by good Template:L, such as making hallway which are likely to be high use double or more width and placing Template:L close to relevant Template:L. Other difficulties may be reduced by designating traffic areas.

Vegetation (saplings) will tend to die if repeatedly trampled upon, leaving dead Template:Ls or Template:Ls and quickly exposing bare Template:L. This may be desirable as Template:Ls block dwarves' and Template:Ls' paths, but unchecked traffic may trample entire areas of Template:L regrowth.

Only your dwarves will obey your traffic designations, and then only when they can. If a Template:L requires that they go into a restricted zone, they will. Other Template:Ls will not recognize your traffic designations, and even Template:Ls or Template:Ls will follow their own pathing.

Setting Traffic Areas

The do combination sets traffic areas, which are zones used to manipulate the movements of dwarves. Traffic areas can be designated as high, normal, low, or restricted. When walking from one point to another, dwarves consider these designations in finding the shortest path. High level traffic costs the pathfinding AI 1 point per square, Normal (default, undesignated) costs 2 points per square, Low costs 5, and Restricted costs 25. You can change the default values in Template:L, or per-fortress values with do.

  • It is often a good idea to set any Template:L source in a Template:L with seasonal freezing to a Restricted area so your dwarves will be less likely to be caught on it when it melts.
  • Some dwarves get Template:L if they walk through a Template:L and see an animal being slaughtered, so you may wish to designate the shop as Restricted.
  • If an area occasionally gets Template:Led, or is dangerous for some reason, routing dwarves around it could be lifesaving.
  • Setting High traffic areas along Template:L outdoors prevents vegetation from being needlessly trampled.
  • An important use of traffic designations is to restrict movement in the tile where a Template:L's firing arrow originates. This will prevent tragic Template:L training accidents. Note that Template:L can and will be killed by firing ballista even if movement is restricted.

Setting Restricted does not forbid a Template:L from traveling over those squares, but rather makes them willing to walk around them – for the normal cost table, 12.5 times further, or up to 25 times longer if there is an alternative high-traffic path. If you have an area that absolutely must not be stepped on by dwarves, consider Template:L.

Limitations

Traffic designations only affect path preferences when pathfinding. Dwarves generally choose their jobs without weighing the pathfinding costs. For example, one cannot use traffic designations to direct a dwarf to confine his digging to a specific area. He will still take whatever path necessary to get to the job he has chosen to work.

Additionally, traffic designations cannot be used to restrict where a dwarf will stand when building/digging. In other words, traffic designations will not prevent a dwarf from placing himself on the outside of the fort when the last tile of a Template:L or wall is completed. In some cases, a workaround is to place a wall where you want the dwarf to avoid standing, and suspend it. This prevents him from standing on that tile while building/digging. When the job is finished, the suspended wall may be canceled.

Using Traffic Areas to Improve Framerate

In cavernous rooms that handle large amounts of through traffic but have a small number of exits (a large central dining room, for example) designating a few high-traffic paths ("freeways") between the doors can help reduce the pathfinding cost for dwarves who are just passing through. There may also be benefits to adding low-traffic edges to these freeways to keep the search algorithm from looking for shortcuts. Likewise, any large dead-end room that branches off a major hallway should have the area around its doorway marked low or restricted traffic to prevent dwarves from searching it for shortcuts. As noted above in Limitations, this should not affect the dwarves who have a legitimate reason to hang out in the dining hall or visit the storage room - they will path to their destination regardless. Users may see up to a 10% increase in FPS by implementing these changes throughout their fortress.

One-way paths

Currentlyv0.28.181.40d, due to what seems to be a minor bug rather than a feature, it's not only possible but quite easy to create one-way Template:Ls - and with those, one-way halls, Template:Ls, and any other restricted Template:L you can create from one controlled access point to another.

See Template:L.


See also: