Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: dumb dwarf pathing  (Read 1353 times)

iofhua

  • Bay Watcher
    • View Profile
dumb dwarf pathing
« on: May 18, 2012, 12:45:37 pm »

I am trying to build a wall in front of a dead-end tunnel with the dead-end going north. In order for the dwarf to NOT wall himself in and starve to death like an idiot he has to build the wall from the south. I have tried placing a restricted traffic zone to the north of the wall so he doesn't go there, but it seems he is determined to entomb himself and always builds the wall from the north no matter what.

First I would like to voice my frustration with the traffic zones. Why even bother having "restricted" traffic zones when the dwarfs ignore them anyway?

Second, how can I get him to build the wall from the south? Is this possible?
Logged

Bilanthri

  • Bay Watcher
    • View Profile
Re: dumb dwarf pathing
« Reply #1 on: May 18, 2012, 12:59:07 pm »

First, traffic zones do not have any effect on whether a dwarf will stand on a tile. They only effect pathing calculations.

The solution to your trouble is to designate a wall to be built over the tile that you want your dwarf to avoid standing on. Dwarves do not stand on tiles that are pending work, so, by suspending the wall construction, you can force the dwarf to stand on the tile you want him/her to.
Logged

GhostDwemer

  • Bay Watcher
    • View Profile
Re: dumb dwarf pathing
« Reply #2 on: May 18, 2012, 01:38:48 pm »

Traffic designations seem to be an area of massive confusion. Here's how they work. First, they have absolutely no impact on where a dwarf goes or doesn't go. That is not the purpose. No pathing calculations are done when a dwarf makes a decision about what to do next. Distance from the dwarf to the activity is calculated as the straight line distance between the two points. Only after the decision to begin a certain activity has been made does the game calculate a path between the dwarf and his destination. And it is only during these pathing calculations that traffic designations are used.

If there is only one path from the dwarf to the destination, traffic designations do absolutely nothing. The dwarf will take the only available path, even if he must path through a billion restricted squares. He has already decided what he must do, the only question is how to get there. And it is only when there is more than one potential path that traffic designations do anything. While calculating how many steps a particular path takes in order to determine the shortest path, normal traffic tiles count as two steps, high traffic tiles count as one step, low traffic tiles count as five steps, and restricted traffic tiles cost 25 steps.

Traffic designations can be used for many purposes, such as ensuring your dwarves walk on either side of a three tile wide hallway and leave the center lane free for passing. They can help ensure that your dwarfs take a longer, safer route over a shorter, more dangerous one. They can also help speed up FPS if used right. For instance, say you have a dead end hallway. The game might need to check every tile right up to the end to find out it is a dead end. But if you designate it as restricted, the game might only have to check a few tiles before it concludes that that path is too expensive.

Traffic designations do not restrict where a dwarf will go, they just help suggest what path he should take to get there. If you want to restrict what jobs a dwarf will take to begin with, use burrows. If you want to actually restrict where dwarves will go, use burrows set as civilian alerts or locked doors.
Logged

slink

  • Bay Watcher
  • Crazy Cat Dwarf
    • View Profile
    • Slink's Burrow Online
Re: dumb dwarf pathing
« Reply #3 on: May 18, 2012, 01:41:55 pm »

You can't stop a Dwarf from building a wall from his preferred direction with burrows.  It simply announces that he cannot get there.

The only thing I have found to force them to build standing where you want them to stand is the abovementioned trick of designating a wall where they want to stand, and then suspending that second wall until they have done what you want.
Logged
There is only one cat, and all cats are that cat.
Almost losing is sometimes fun.

robertheinrich

  • Bay Watcher
    • View Profile
Re: dumb dwarf pathing
« Reply #4 on: May 18, 2012, 02:03:16 pm »

I usually place a door 1 tile north of the corridor I want to have walled off. Then set it to forbidden, then place the wall. Maybe too complicated, but it works.
Logged

caddybear

  • Bay Watcher
  • Elf Supporter
    • View Profile
Re: dumb dwarf pathing
« Reply #5 on: May 18, 2012, 04:51:45 pm »

GhostDwemer, you might want to put that info in a sig or something, I've learned a lot from that and it should be freely available.
Logged
And then did ARMOK say, the east is the holiest of directions, and thou shouldst not stand there lest thou be strucketh down by my holiest of beards. And then did the dorfs did say, we shall build from the west, for more do we fear the beard of ARMOK than the strike of the elephant.