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.

User:Maunder

From Dwarf Fortress Wiki
Revision as of 01:32, 10 November 2010 by Calite (talk | contribs) (→‎Open Questions and Problems: Hopefully helped with Pathing questions)
Jump to navigation Jump to search

This is my corner of magmawiki.

As a new player I'm going to list the questions I have a hard time finding the answers to. Hopefully these will help improve the wiki, and when I include the answers, it should also help future new players such as me.

I began playing v 0.31.12 and updated as then flurry of bug fixes came to 0.31.16. All questions below are relevant to these (DF2010).

I've been playing for a couple weeks so I've already sorted many early issues out. I'll just start with the things which are annoying me right now.

New Player Questions

Resolved Questions and Problems

The wiki needs a general guide to using magma, or laying out magma workshops.

  • A big question I had was how to make the final connection to allow magma to flow. I went with my original plan to channel from above, at the shore of a magma reservoir, to open the edge and let it flow down the long "hallway" I'd made. Wiki explains that channeling now creates a ramp (it didn't used to), and the only ways to remove the ramp both involve getting down into that channel afterwards. Obviously I don't want to do that since the magma is going to be there. Will the ramp interfere with the flow?
    • No. I left the ramp, the magma flowed just fine. I then covered the open channel (including its ramp) with a constructed floor. I have just succeeded in erecting my first. I have don't know the safest way to penetrate a lava tube or lake from the side, with no floor access from just above the liquid surface...
  • Another question was the positioning of the forges and workshops. Only the Magma Forge page indicates that one should locate the forge with "one of the impassable squares" over the hole to the magma below, but nowhere did I find specific instruction about which squares they are. The "picture"s on the right side of these buildings were helpful, but without a key, I was just guessing.
    • The "impassable" squares of a magma forge are the "east" and "west" sides. Because the Magma Smelter's has the hole on the "north" side, that means the two kinds buildings can't be aligned along a magma channel -- one set of buildings are necessarily offset from the others.
  • mason positioning. it's happened many times that my masons have constructed the last bit of wall trapping themselves within. What is wrong with these guys? even dividing up the job into smaller pieces in various orders I can't seem to avoid this. Multiple times I've had them immediately deconstruct that last bit they just built in order to get out, then wait for them to decide to leave, then re-assign the same construction.
  • A mason builds a segment of wall in the caves, then just stood there for a long time. He was listed as having No Job. The path he used on the way in was now blocked, but it seemed to me there were other ways around. Other segments of wall were queued nearby, but as yet unbuilt. He's in the lower right corner, while the entrance back to the fortress is in the upper left:
    Maunder-lost-mason-a.png
    .
  • how do I get animals trained? many many times I have added the job "Train a War Dog" only to be told "none is available". But my fortress has half a dozen adult dogs! What am I doing wrong?
    • Pets cannot be trained! That explains part of my training problem. I'm not sure if that's sensible, but now that I have the idea, I know to train dogs the instant they mature to adults! -- Maunder 17:07, 12 October 2010 (UTC)
  • immigrant dwarves with skills in foreign ranged weapons (Bows and Blowguns) will never acquire ammunition. Dwarves can't make arrows/blowdarts, nor can they get it by trading. (Possibly can be acquired by defeating enemies using them?) Similar situation if a strange mood dwarf makes one of these things. This should be considered a bug. Don't bother equipping dwarves with these "preferred" weapons.
  • gem cutting. when adding a task, the list shows which types of gems you have still uncut. but there's no way to know how many of each type. if you queue up 5 times "Cut Wood Opal", but you only have 2 uncut wood opals, you get job cancellations. to avoid having jobs cancelled, just queue one cut task of each available type. But then you have to do this repeatedly to get all your gems cut. If you have two uncut wood opals, why not have the task entry grey out the cut task if you've already got two queued?
    • The "solution" is to just use repeat on all tasks. The cancellation notice will occur when there aren't any more of that type of gem. what I don't know is whether that "breaks" the work chain (does the dwarf walk away and consider a different task when his current task ends?)
  • gem encrusting. I queue up a bunch of "encrust finished goods", then I end up with items that have many many gems on them, and most items with nothing. is there any way to encourage the dwarf to spread the gems across a larger number items? I now queue up just four encrusts at a time, but then the shop ends up being idle a lot.
    • The best solution, explained by Another: objects can have only 1 decoration of each material (artifacts can have multiple but of different types - e.g. spikes+bands+image). Queuing 100 encrusting with the same gem results in 100 different items being decorated (green glass is the main candidate). Queuing 100 encrusting with 100 different gems will most likely result in 1 item decorated 100 times. Same goes for studding with metals and sewing leather images.
  • How can I release a (tame) creature from a cage? I've followed wiki instructions but have not yet managed it. First: you can't use q to operate a cage that is in a stockpile, because q controls the stockpile options instead. Second: I "built" the cage in question on an open floor, selected the specific cage with the animal in it. Then q on that cage lists assigned animals -- but the menu doesn't seem to function the way others do, and "deselecting" the given dog as per the wiki instructions doesn't seem to let him out.
It's also confusing and disconcerting that after toggling the "assignment" of an animal, your only option to leave the dialog is then "Escape - Cancel".
    • Apparently deselecting the given animal from the cage will let him out eventually, when a dwarf comes by to do it. I haven't witnessed it yet. I'm still working out the details on how to slaughter a caged animal or prisoner.
  • Why can I not construct upward stairs on a constructed floor? How does one build a tower, if this is not possible? I also could not construct a ramp, or even a wall!
    • constructed stairs must be built over an empty space -- leave a hole in the floor you're building where you plan to put stairs. It makes sense for up/down stairs. Doesn't make sense to me for building up stairs, or walls, but that's how it works. If you already built the floor, you can deconstruct it again with d-n and then construct the stair/wall whatever. this info should be added to the wiki somewhere.
  • retrieving shot bolts or enemy items. Either my hunter or military units fired bolts at something. Several are scattered around. How do I encourage them to retrieve them for reuse?
On a related note, one squad managed to kill a Goblin Thief earlier, and, following orders, brought the mutilated corpse back to the refuse pile. But they left his goods, including a silver dagger. I didn't even realize it until I got a message about a raccoon stealing a silk shirt. How can I set orders to pick up these items as well?
I suspect that those items are marked as "Forbidden" - k over them and check. This prevents your workers from running out of your base in the middle of an attack and trying to collect all the junk on the ground. 76.20.35.236 15:32, 26 October 2010 (UTC)
    • Thank you, yes, the items were default marked forbidden, the option to change this is in o-F-t set orders menu. However, changing the orders only affects newly dropped items, not those already forbidden on the map. There is also an option to retrieve "used ammunition" o-F-p, although I've been advised by DeMatt not to do this because items aren't stacked into inventory slots again, but remain as a "bundle of 1". He says "Military dwarfs and hunters carry only one stack (or maybe two?)", but I haven't confirmed this myself.

Open Questions and Problems

  • do some embark areas have absolutely no sedimentary layers? that would be disappointing... are sedimentary layers always nearer the surface?
    • An answer, more or less, at Embark#Layers : Igneous layers will never be found in the same biome as sedimentary layers, but it is possible to have both in the same map by embarking over two or more different biomes. How do I know what biomes my selected location actually has? Any way to get a "world map" view of my area once I've started?
  • How can I collect and use the bodies of vermin and other defeated creatures? I've tried "Butcher a dead animal" and other tasks many times, only to be told "none available". What am I doing wrong? Yes, I have refuse stockpiles so the bodies are brought nearer the butcher shop. Not all are the "vermin" category, I think.
    • Are the bodies outside? Do you have 'dwarves collect refuse from outside' turned on? You can create garbage dump activity zone near your butcher, and set the corpses for dumping, I think this works better than relying on storage piles. Be sure to reclaim the corpse after dumping, though.GhostDwemer 15:43, 1 November 2010 (UTC)
  • I have multiple traps with caught live vermin, like two-legged lizards, and a (tame) cockroach. What do I do with them? Can't I make food or leather out of the lizard?
    • Part of this is my confusion about what is "animal" and what is "vermin". There's no real cue to let you know what you're dealing with. In my mind, now, is the idea: "vermin" == useless. "animal" == butcherable, in theory. But when I saw barrels of butterfly ichor and the like available from the trade caravan, it made me think I can do something with those "vermin"...
Still trying to sort this one out.
  • In a similar vein, I have not had much luck with Trapping, Fishing, and Hunting. I can't seem to get these working successfully. The wiki needs guide to making these industries successful -- the tools, skills, workshops necessary, layout of piles and workshops, zone placement, etc.
    • i've had some luck with hunting. as I was told -- one simply creates enough equipment, then a dwarf with "Ambush" skill will pick up equipment and sometimes go hunt game. however, i've had hunters complain about not having any ammunition even though i'd assigned it under 'mf', some were marked in that menu as being equipped, and there were 250 bolts available besides.
still learning the details.
  • how can I get the military units to wear the best armor? the military equipping menus are really opaque. i understand the idea of creating uniforms and assigning them, but really, early on, i don't have that kind of supply. i just want one of the best fighters to have the few steel items that i got from trading. I can't create and assign a "steel" uniform, because I don't have all those items. in a related problem, meanwhile, a "recruit" has grabbed a hammer, and the somewhat skilled hammerdwarf has none. The best pick is in the hands of a Novice miner. The battle axes were grabbed by military guys, and I need them available to the woodcutters. Argh! Getting a dwarf to drop an item and reassigning is such a mess! I'm not even sure how I managed it once, but it took over half a year of game time.
    • Part of the problem with the military equipment dialogue is similar to that with assigning squads. In the right column is a list of all items of a given category , including those you've already assigned to another . It's good that you can see all items, so you can take an item from someone who shouldn't have it and give it to someone better suited. But you have no indication that item is already in use by another dwarf. This results in confusion as you assign that nice bear leather armor to dwarf 2, only to realize later that dwarf 1 no longer has any armor. This dialog needs some indicator telling you it's already assigned to someone (or perhaps just in use by someone, although that's less useful, it would be easier to implement). Maybe a letter "A" means item has been assigned to another dwarf, or else another dwarf has "become attached" to the item, otherwise a letter "U" means being used by someone but wasn't necessarily assigned to them.
    • I had a similar problem with assigning dwarves to squads, initially, because the list on the right shows all dwarves, including dwarves already assigned to another squad. but I see now there is an indication in the upper right corner if the currently selected dwarf belongs to another squad.
    • Now I have a larger selection of armor, but I'm just as bewildered about equipping them. If I assign a breastplate to a guy who's currently got a "leather armor", can he wear both? They both appear "equipped" in the list, so I'm guessing they're assigned to him and no other dwarf can wear them. Or did I just give him ownership, so he has two pieces that he can't wear simultaneously?
    • Can I create a uniform which allows me to use the best available armor, varied though it might be, but still allows others to wear lower quality stuff when there's no more iron/steel/bronze available?
Any way to do something similar with non-military dwarves... ? I'd like everyone to wear leather if possible...
  • path finding. the weavers are nuts, trying to "collect webs". they choose a web which might be fairly close geometrically, but is really far through the stairs, hallways and caves that they need to get there, meanwhile running past and sometimes getting caught in and stomping existing webs on the way there. How do I keep the weavers near my entrance to the caves, where they can be safer (and take less time)?
    • do I need to avoid walking on my farms? set traffic area to avoid it?
A while back I redid the

xTATTEREDx  · +FINE+  · *SUPERIOR*  · ≡EXCEPTIONAL≡  · ☼MASTERWORK☼

This article is about an older version of DF.
Pathing preview.png

Pathing is a videogame concept that refers to the path the AI selected to route from point A to B. It has important implications for fortress design, security design and framerate management.

Basic movement

Creatures can move in the four cardinal directions (north, south, east, and west), and four diagonal directions (northeast, southeast, southwest, northwest), as long as the target space is not blocked. This means creatures can path through diagonal gaps on the same Z-level. For example, this rat (r) can reach the cheese (%):

r
%

Creatures can move directly up or down, as long as the target space is not blocked and the movement is possible (via flying, climbing, swimming, stairs, etc.). Creatures can move diagonally across Z-levels only when both lateral and vertical movement are simultaneously possible (e.g., when using a ramp), with one exception[1] (see below). For example, this giant sparrow (S) can not attack the cat (c):

                                         
S                                      
                                         
                                         
This diagram has multiple z-levels! Press
< to go up one z-level.                  
                                     
 c                                     
                                     
                                         
This diagram has multiple z-levels! Press
> to go down one z-level.                
                                         
                                       
                                         
                                         
This diagram has multiple z-levels! Press
> to go down one z-level.                

Exception for diagonal movement between Z levels

Diagonal movement between Z-levels is possible when the floor is missing from the space above the wall, which would otherwise block movement. Flying and swimming creatures can pass through the gap caused by the missing floor. Common causes for a missing floor include building an up-down or down stair (without the matching up staircase below it), or constructing a wall underneath tree branches.[2] For example, this giant sparrow can attack the cat, because the down stairs (>) on level 2 has removed the floor, creating a hidden gap:

                                         
S                                      
                                         
                                         
This diagram has multiple z-levels! Press
< to go up one z-level.                  
                                     
>c                                     
                                     
                                         
This diagram has multiple z-levels! Press
> to go down one z-level.                
                                         
                                       
                                         
                                         
This diagram has multiple z-levels! Press
> to go down one z-level.                

Path finding method

Dwarf Fortress uses a modified A* search algorithm (a nice demo) (confirmation), which quickly calculates a decent path between points. The A* method takes point A and tries to quickly calculate a decent path to reach point B. This path is not always the quickest path - in fact, in a game with as complicated and ever-changing an environment as Dwarf Fortress, pathing probably rarely chooses the quickest path. The purpose and utility of the algorithm is to find a useful path without using a lot of processing space, balancing speed and computability.

Choosing the nearest raw materials uses the shortcut of checking the Manhattan distance from the dwarf's current position, rather than an actual search. Thus, when constructing things, the valid materials list will be ordered from nearest to farthest; this, however, ignores any walls or obstacles in the way. An important part of fortress design is to be as open as possible, as more doorways will result in quicker paths (and thus better performance) as well as avoiding the hurdles of cross-map walks to find something the metric says is a short distance away. Workshops automatically path to the nearest valid raw materials; building things allows you to choose what to grab.

Applications

For workshop jobs, the closest available valid material is used for the job. The simplest way to use pathing to your advantage is to surround a workshop with a stockpile accepting only specific raw materials that you want it to be using. While this is usually better handled by using linked stockpiles, it remains useful when trying to understand why, instead of decorating some beds in your furniture stockpile, your gem setter decides to fancify some commoners' coffins in the next-door mason's workshop.

The way pathing is handled should influence the way you design your fortress. An important part of fortress design is to be as open as possible, as more doorways will result in quicker paths (and thus better performance) as well as avoiding the hurdles of cross-map walks to find something the metric says is a short distance away.

Applications of pathing (aka pathing abuse). Note that they do see every path, so if the green bottom bridge is raised, they will take the caravan entrance instead.

Implications in security design are a bit more thorough. Hostile creatures and dwarves running errands are able to consider the entire map when making pathing choices, and their A* pathfinding will mean that they will always take the shortest route, if there is a choice. This is a point separating trading caravans, which path to your trade depot, from goblin sieges, which look for the shortest path in instead. One clever exploit of this behavior is demonstrated at right; caravans will always take the winding, clean-top path, because that is where the trading post is, while incoming enemies will prefer the shorter, trapped bottom entrance.

Doing the Calculation

Each tile will have a value, this value is in some way based on how close it brings us to the item and that tile's traffic value. Thus the procedure is something like this:

  1. First, we check all the tiles next to the target and mark their values.
  2. From there, repeatedly check all accessible tiles from the target until we reach the dwarf.
  3. From the dwarf, pick recursively the tiles with the lowest value, and you have a path.
  4. Now the dwarf will follow this path to get to the target.

Things that are wandering (Animals, wandering invaders) may use a combination of the above method with some random movement. For jobs that require chasing a moving thing, this procedure may be done over and over, or a different algorithm may be used.

Additionally, the following variations have been suggested, but nothing is certain:

  • Dwarves may remember paths that have worked before and try them before anything else.
  • Inaccessible items may be invisibly considered forbidden for a certain amount of time after a dwarf discovers it is inaccessible, and therefore not considered in pathing.

Optimizations

To improve pathing speed and performance:

  • Keep small stockpiles immediately next to workshops. This means Urist McCrafter doesn't have to do very much pathing to find his rocks (though it may cause Urist McHauler to do even more pathing).
  • Keep Haulers near places where things will need to be moved from (excess stockpiles, mines, butcher's shops or other shops that have a high item yield).
  • Make it easy to get in and out of the areas where workshops are.
  • Staircases in rooms instead of in central areas should greatly improve pathing speeds.
  • Applying traffic costs properly will greatly increase the speed of finding paths. Make corners of rooms higher cost and the center of major hallways and rooms with stockpiles and workshops lower cost. More on traffic.

Splitted One-way

It's not possible to create areas path-able in one way only (though it was in 0.28, by exploiting a bug). However, it's possible to create a strong preference for pathing differently in different directions. A* algorithm in itself is asymmetrical, which suggests that bias in its priorities at least sometimes can be exploited to split traffic by direction. Consider this floor diagram:

R R + + + + + + + + H H
+ + + +
H H + + + + + + + + R R
: w a l l
+ : f l o o r - n o r m a l t r a f f i c
H : f l o o r - H i g h t r a f f i c
R : f l o o r - R e s t r i c t e d t r a f f i c

If this fragment is set up between a closed cave and outside, dwarves will always choose to pass through it via the left corridor, even if that corridor is farther both from the dwarf's original location and destination. Since A* is "best-first", i.e. strongly prioritizes lower path cost in the immediate vicinity, we may guess that DF calculates path from the destination to the creature. (This seems more efficient if creatures more often need to path from open space into a dead-end or maze than vice versa, or the destination is cut off from open space more often than the creature.)

This isn't foolproof (e.g. pets ignore traffic designations and dorfs don't path through it from end to end when picking up something within it), or even too useful in itself (you need alternate paths to be very close - enough that the immediate traffic cost matters much more than difference in distance), but it does allow to e.g. make assumptions as to whether a dwarf arrives or leaves for pressure plate automation purpose, without forcing path retries (and attendant CPU load) inherent in "suddenly closed door"/"suddenly opened hatch" technique (even if you need a strict one-way, these methods can be combined, to make path retry an exception rather than rule).

The longer the space between entrance and exit (left and right in the diagram) of the two one-way-floors, the more likely dwarves will stick to the desired side even obstacles like animals and dwarves are in their way. Of course, there will be fewer actual collisions than predicted if everyone moves in the same direction.

Warning: Using Restricted traffic on floors dwarves have to pass — like the entrance of a fortress - leads to high pathing costs (and thus potentially FPS drop) because of searching for alternative routes![Verify]

If you want to use this, keep those (path-through) restricted areas as small as possible. On the other side, the higher the restricted costs, the more likely dwarves stick to the correct site. The same is true for longer tunnels. And the longer the tunnel, the less additional pathing will be done. If the tunnel is at least as long as the costs of the restricted area, you don't have to bother additional costs. So, this should only be used for long tunnels. Never use it to control traffic inside your fort between rooms unless you restrict most of your fort's area!

Other dwarves

It is possible for entities such as dwarves to walk over each other when necessary. However, moving over occupied tiles in this manner is much slower, and dwarves will try to path so that they can avoid it. This introduces an important consideration to fortress design.

If you have a long, 1-tile wide corridor which already has a dwarf moving through it, other dwarves who need to get from one side of the corridor to the other will try to avoid colliding with that dwarf, by pathing elsewhere. If it so happens that the corridor is long, and there are no nearby alternative routes, this may cause a very significant increase in pathfinding burden.

For this reason, it's best to make high-traffic routes at least 2 tiles wide, and avoid single doors and single stairs. This ensures that when a dwarf tries to find a detour around another dwarf in his way, he will be able to do so easily and without modifying his current path much.

"Maunder" in other Languages Books-aj.svg aj ashton 01.svg
Dwarven: nimar
Elven: alí
Goblin: snust
Human: anur

to hopefully answer questions like these. Hopefully it can answer your questions, if not tell me. Calite 01:32, 10 November 2010 (UTC)

  • how does one, or can one, clean up the mess of broken ammunition littering the map? k doesn't even show an item there, so i can't declare it refuse and have it (eventually) smashed by a drawbridge.
  • how does one butcher corpses of defeated enemies? or slaughter tame livestock? or auto-tan work? this has been very frustrating, trying to supply the leather to a moody dwarf. after designating a tame animal to be slaughtered, how does one control which butcher's shop will do the job?
    • I figured out that corpses and/or body parts must be near a butcher's shop to auto trigger a butcher job. just how near, i don't know. similarly, the skin resulting from butchering must be near a tanner's shop to auto trigger the tan hide job. again, i don't know the max distance. creating a stockpile of "skins" is not helpful, because it can take quite a while for a skin to get stockpiled, and will be ignored by a tanner until then. so.. always have a tanner's shop near a butcher's shop?. that helps, even if i don't have a clear understanding of how to control things. I added a mention of maximum distance to Meat industry, Tanner's Shop and Butcher's shop.
    • i read elsewhere that sentient animals can't be butchered. how do you tell if an enemy is sentient?
  • a drawbridge of just length 1 doesn't appear to work. when i raise it, dwarves still exit freely?... not sure.
  • why should I accept the liaison's offer to become a barony? is there an advantage that I am not seeing? seems like my mayor is more useful than a baron...
  • using magma. what balance of various magma workshops/furnaces are needed? which are needed near each other? any pointers?

Unexplained

Histories

This is a wonderful map location, excepting the lack of iron, which could be bad. I've got three extensive cave systems already, and I haven't ventured that deep.

    • The first cave system begins 6 levels below the valley floor and continues down to level -9. It contains vast quantities of water held on level -10.
    • The next cave system begins already at level -12 and continues down to level -16. It contains an opening to a magma pipe, with the pool of magma reaching level -16 (the magma surface is higher than the lower parts of the cave!). I've checked somewhat and haven't found any connection between these cave systems -- there appears to be a single solid layer between them.
    • The third cave system begins at -24, and continues down to -28, although the bottom layer just contains a pool of water. The pool of water, interestingly is directly next to the magma pipe.
    • The magma pipe continues down and opens to a big magma sea around 33 levels below the valley floor. The magma sea goes down to at least level -37, where it is quite vast. It may be deeper but I haven't confirmed it yet. (hot stone at level -39, though)