Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1] 2 3

Author Topic: Am I the only one who regularly runs into this problem?  (Read 4114 times)

UltraMagnus

  • Bay Watcher
  • More than meets the eye
    • View Profile
Am I the only one who regularly runs into this problem?
« on: September 11, 2014, 01:12:34 pm »

Slogo

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #1 on: September 11, 2014, 02:45:54 pm »

The default restricted traffic designation has it at 25. That means that each step through an restricted zone is going to 'cost' as much as about 12-13 steps through a normal zone (normal traffic is default 2 cost). Dwarves take the first found lowest cost path to their target (it's always the lowest possible cost, but if there are multiple paths it's just going to be one of them based on some sort of randomish criteria).

Which really means that by default restricted is more like a suggested restriction.

Whenever I first setup traffic designations for a fort I modify restricted traffic to be 99. That way it's very prohibitive for the dwarf to walk through a restricted area. It would have to save them 45-50 steps to want to pass through a single restricted tile instead of 12-13.
« Last Edit: September 11, 2014, 04:02:54 pm by Slogo »
Logged

UltraMagnus

  • Bay Watcher
  • More than meets the eye
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #2 on: September 11, 2014, 04:49:04 pm »

The default restricted traffic designation has it at 25. That means that each step through an restricted zone is going to 'cost' as much as about 12-13 steps through a normal zone (normal traffic is default 2 cost). Dwarves take the first found lowest cost path to their target (it's always the lowest possible cost, but if there are multiple paths it's just going to be one of them based on some sort of randomish criteria).

Which really means that by default restricted is more like a suggested restriction.

Whenever I first setup traffic designations for a fort I modify restricted traffic to be 99. That way it's very prohibitive for the dwarf to walk through a restricted area. It would have to save them 45-50 steps to want to pass through a single restricted tile instead of 12-13.
Is there a guide to explain how to edit that, and if so will effects of editing take place immediately in 40.10?

Trouserman

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #3 on: September 11, 2014, 05:17:50 pm »

Is there a guide to explain how to edit that, and if so will effects of editing take place immediately in 40.10?

Look in data/init/d_init.txt for the PATH_COST setting. If you change this, the new values will be active when you next start DF and all future sessions.
Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #4 on: September 11, 2014, 05:31:04 pm »

Pathing is pretty simple to think about.  Imagine that you're sitting at level 0.  Every tile around you is 1 inch higher.  2 tiles away is 2 inches higher.  This continues outwards, such that you're sitting inside a shallow pit.

When you decide where you're wanting to go, then that location becomes 0 level.  Now every tile around your destination is 1 inch higher, and so on.  When this happens, you end up with two shallow pits, and it's pretty easy to see the quickest way between the two.

Pathing cost is an arbitrary modifier.  If you set pathing to Restricted, then you select one tile and raise it by a foot.  Now it becomes awkward to pass through that tile, so you go around.  If you set a line of restricted traffic, then it's easier to go around that line.  However, if the only way to get from A to B is to go over a line of restricted traffic, then that's the ONLY way to go, and you'll climb those steep hills because there is no other way.

So if you want to totally remove travel, then set burrows.  If you want to totally remove traffic through one route BUT ALSO let them go another route, then you have to make them another route and not set it as restricted.

ALSO!  Pathing is a flood operation.  Every tiles away is 1 cost more than the last.  So if you set your restricted rating at 99, and the only way to get somewhere is to go through a restricted section, then your dwarves are going to end up trying pathfinding through EVERY OTHER tile on the map, which can cause moments of intense CPU lag, and cause one frame to hang briefly.  If an entire garbage dump is set as restricted, then moments of garbage collection are going to cause stuttering.  Instead, you should set your hallways as high priority and edges as restricted, with very few areas actually sealed off from traffic.  You actually end up doing better if you only use High and do not use Restricted, as this achieves roughly the same result and improves your FPS.

Loci

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #5 on: September 11, 2014, 06:09:48 pm »

So if you want to totally remove travel, then set burrows.  If you want to totally remove traffic through one route BUT ALSO let them go another route, then you have to make them another route and not set it as restricted.

Burrows do not work like that. A standard burrow only restricts the jobs a dwarf can take, not the movement of a dwarf. If you have two disconnected segments of the same burrow, a dwarf will happily walk back and forth through unburrowed tiles to carry out jobs in both segments. (Civilian alert burrows *do* limit movement outside the burrow, but they have their own set of problems.)

It would be nice if there was a designation that completely prevented a dwarf from ever entering a tile, but the best you can do for now is make the tile inaccessible (by, say, removing the ramps shown in the example).

Logged

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #6 on: September 11, 2014, 06:22:18 pm »

Burrows DO mean that a dwarf won't try to show the cows to his son, if the cows (or his son) are outside of his burrow.

khearn

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #7 on: September 11, 2014, 06:26:28 pm »

Well, burrows can be used in some cases to solve these problems, by preventing the dwarf from wanting to go to the other side of the restricted area.

An example is a map with one stream waterfalling down to another. The water level just before the falls is often low enough that dwarfs will think they can path through it, but when they try to cross, they get swept over the falls. Setting a restricted area in the water won't prevent the problem because if (for example) a hunter wants to get to an animal on the other side, the only way there might be the restricted area above the falls. But if you make a burrow that only includes the area on the "approved" side of the river, the hunter won't even decide he wants to go after that animal because it's outside of his burrow.

But setting up a burrow that only covers one side of a stream is admittedly a pain. So I usually restrict the shallow area and quickly build a bridge (floors, actually) over the stream elsewhere before allowing hunters and fishers to start working.

But there are plenty of other ways that you can use burrows to keep your dwarves from wanting to get to the other side of a dangerous place. I assume that's what Girlinhat meant, since I'm pretty sure she understands what burrows do.

   Keith
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.

Girlinhat

  • Bay Watcher
  • [PREFSTRING:large ears]
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #8 on: September 11, 2014, 06:34:37 pm »

That's really the essence of the problem.  Moat?  Restrict, bridge, High.  "Everything outside is going to kill you?"  Burrow.  There's a lot of different tools, all depending on what your problem is.

GavJ

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #9 on: September 11, 2014, 11:02:36 pm »

traffic designations really need an "infinite" option. Would makes things so much more intuitive.
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

nanomage

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #10 on: September 12, 2014, 09:06:38 am »

I think the real problem here is that what you've designated as restricted is the area above the moat. In pathfinding calculations, your dwarves will use the bottom of the moat. Have you restricted it as well?
Logged

slothen

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #11 on: September 12, 2014, 09:37:39 am »

my dwarfs do a good job of not drowning when I line the edges with ramps.
Logged
While adding magma to anything will make it dwarfy, adding the word "magma" to your post does not necessarily make it funny.
Thoughts on water
MILITARY: squad, uniform, training
"DF doesn't mold players into its image - DF merely selects those who were always ready for DF." -NW_Kohaku

UltraMagnus

  • Bay Watcher
  • More than meets the eye
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #12 on: September 12, 2014, 10:53:25 am »

I think the real problem here is that what you've designated as restricted is the area above the moat. In pathfinding calculations, your dwarves will use the bottom of the moat. Have you restricted it as well?
"Use the convenient bridge instead.
Moat base also restricted."
Granted, the picture isn't the best, but could you at least try to read the description within the silly little comic before making criticism?

nanomage

  • Bay Watcher
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #13 on: September 12, 2014, 11:05:03 am »

I think the real problem here is that what you've designated as restricted is the area above the moat. In pathfinding calculations, your dwarves will use the bottom of the moat. Have you restricted it as well?
"Use the convenient bridge instead.
Moat base also restricted."
Granted, the picture isn't the best, but could you at least try to read the description within the silly little comic before making criticism?
sorry friend, i didn't mean to make criticism, just wanted to help. yeah my bad
Logged

Absentia

  • Bay Watcher
  • On Break
    • View Profile
Re: Am I the only one who regularly runs into this problem?
« Reply #14 on: September 12, 2014, 02:12:07 pm »

I have to say, I wish everybody submitted their questions in comic strip form.

Burrows are great for a temporary hazard like this. I just issue a civilian alert immediately after releasing the water, and everybody goes to hang out in the dining hall until the water is high enough.
Logged
Pages: [1] 2 3