Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Need help with pathing problem. Dwarves keep circling in a loop.  (Read 1438 times)

jcochran

  • Bay Watcher
    • View Profile
Need help with pathing problem. Dwarves keep circling in a loop.
« on: September 23, 2013, 08:21:39 am »

I have a problem with dwarf pathing that I wonder if any of you have a solution to. I'm constructing a spike corridor intended on exposing trap avoid creatures to a series of retracting spike traps while causing non-trap avoid creatures to safely bypass the corridor. Here's the corridor under construction with the pathing enforcement hatch covers, doors, and pressure plates in place and functional.

Spoiler (click to show/hide)

The center corridor was eventually going to be filled with spike traps hooked up to a repeater. The pressure plates at each end are hooked up to the hatch cover and door next to each pressure plate. The two breaks in the walls near the middle of the three corridors are covered by hatch covers over a pit. They are intended on providing maintenance access to the dwarfs for corpse removal and such. When the repeater is running, the hatches are open denying access. And when the repeater is off, the hatches are closed, permitting access. In the image provided, the hatches are open.

Now for the problem I'm having. The dwarves get "stuck" in a loop with this construction. I ordered a channel to be dug for a grinder off to the right of the image. The miner that took the task was off to the left of the image. Here's what he did.
1. Approached the passage ways heading east until he reached the western pressure plate.
2. Upon hitting the pressure plate, both the door and hatch cover opened, denying access to the central corridor and granting access to the southern corridor.
3. Dwarf took the southern corridor and continued east.
4. Upon reaching the end of the corridor and taking the NE jog, the dwarf then turned NW until he hit the eastern pressure plate. When this happened, the door and hatch cover both opened, denying access to the central corridor and granting access to the northern corridor.
5. The dwarf then proceeded to take the northern corridor heading west until he exited it just west of the western pressure plate.
6. Finally, he headed east again until he hit the western pressure plate and the cycle repeated with the dwarf going around the entire circuit counter clock wise until I eventually had another dwarf pull the lever to close the two maintenance hatches. When that happened, the dwarf entered the central corridor, pathed west for a short bit, then pathed east and finally heading towards his original pathing goal.

Obviously, that pathing behavior means that my original plan isn't going to work. I've tried various combinations of designating high/normal/low/restricted traffic on the three corridors to no avail. If all else fails, my alternative plan is to have a relatively short spike corridor with protective pressure plates and hatches to keep the dwarves safe and a longer non-trapped corridor that they'll actually travel to get to their destination. But it isn't as guaranteed to prevent trap avoid creatures from taking the same longer but "safe" path.
Logged

lazygun

  • Bay Watcher
    • View Profile
Re: Need help with pathing problem. Dwarves keep circling in a loop.
« Reply #1 on: September 23, 2013, 02:47:22 pm »

It sounds like the dwarf is discovering the hatch is open, then trying to path to the tile on the opposite side of the hatch, rather than his ultimate destination. At least, he's definitely trying to path to somewhere in the middle tunnel.

Possibly it would work with two hatches separated by a tile. So when the hatches opened, there would be no accessible adjacent tile to path to.

hatch,floor,hatch,spike traps,hatch,floor,hatch
Logged

TheDarkStar

  • Bay Watcher
    • View Profile
Re: Need help with pathing problem. Dwarves keep circling in a loop.
« Reply #2 on: September 23, 2013, 06:37:41 pm »

You could try messing with pathing priorities.
Logged
Don't die; it's bad for your health!

it happened it happened it happen im so hyped to actually get attacked now

jcochran

  • Bay Watcher
    • View Profile
Re: Need help with pathing problem. Dwarves keep circling in a loop.
« Reply #3 on: September 23, 2013, 06:52:50 pm »

You could try messing with pathing priorities.
I already did so and mentioned it in my original post. No joy. But frankly, that wasn't unexpected since when the game makes its original path it most likely only considers the central corridor since it's the only one transferable ignoring the fact that the doors and hatches will open when the pressure plates are activated. The upper and lower corridors are not pathable except for the 100 ticks or so after activation of the pressure plates.  To me it looks like "I planned to walk through the central corridor and damn, that's what I'm gonna do regardless of how obsolete that decision was..." I will try the 2nd hatch method suggested and see if that fixes the problem.

Edit: Solved due to suggestion by lazygun.

I didn't quite follow lazygun's suggestion. I instead linked the pressure plates at each end of the corridors to both floor hatches at each end of the spike corridor. Doing that solved the pathing problem and the dwarves acted as expected, traveling west to east on the southern corridor and east to west on the northern, never using the central corridor. However, at the same time, I discovered that the new arrangement was very effective in separating dwarves from wheelbarrows. A dwarf would approach a pressure plate and arrive at it at the same moment as the wheelbarrow being pushed arrived on top  of the floor hatch. So down it went. Thankfully, that problem was easily solved by the addition of a second pressure plate at each end also hooked up to the floor hatches and door to encourage the dwarf to path down the proper corridor.
« Last Edit: September 24, 2013, 08:18:10 am by jcochran »
Logged

Merendel

  • Bay Watcher
    • View Profile
Re: Need help with pathing problem. Dwarves keep circling in a loop.
« Reply #4 on: September 25, 2013, 03:41:11 am »

yes That wheelbarrow issue is one trap many folks fall into the first time they try to force dwarves to not go down a path by using pressure plates and hatches.   You need at least 1 tile in-between the plate and the hatch or the hatch opens under the wheelbarrow when the dwarf trips the plate
Logged