Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Any easy way to make an "inverse" burrow?  (Read 1981 times)

Lawlcat

  • Bay Watcher
    • View Profile
Any easy way to make an "inverse" burrow?
« on: September 21, 2011, 12:12:18 pm »

I'm wondering if there's any way to make an "inverse" burrow? That is a burrow that is basically everything but the opposite of where I select. I'd like to have a burrow inside my fort so that in the case of a goblin invasion or dragon or some other fun, I can give the civilian alert to go into the burrow and get inside the fort, thus leaving no dwarf outside to be butchered.

The problem is that if I make a burrow, say, in my dining hall and then give the order, dwarves who are safely working away down deeper building rooms, workin in the workshop, getting wood from the caverns all come up and immediately stop what they are doing. I'd like to just tell them to NOT be outside, but anywhere inside is fine.

I figure I could just hit w and shift -> to go as far down as I can in one corner, then as far up as I want below ground in the opposite corner and give it, but that seems horribly inefficient.
Logged

Musashi

  • Bay Watcher
  • cancels Work: distracted by Dwarf Fortress.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #1 on: September 21, 2011, 12:14:48 pm »

The best you can do is spend way too much time designating that goddamn burrow, sorry.
Logged
I don't mean to alarm you, but it appears that your Dwarves are all in fact elephants.

Locke

  • Bay Watcher
  • Disregaurd Women, Apply Magma
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #2 on: September 21, 2011, 12:16:35 pm »

Macros my friend. Record your macro from Z level one, designate the entire burrow. End recording, play. one press mass designation.
Logged
No, I am not Locke from Final Fantasy.
No, I am not Locke from Lost.
I'm from Ender's Game, Mofo.

khearn

  • Bay Watcher
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #3 on: September 21, 2011, 12:19:35 pm »

Just be glad that you can do 3D selects for burrows now. It used to be that you had to do each level separately.

Just go to the upper left corner pf the top level underground and hit enter, then go to the lower right of the bottom level you want and hit enter again. Then hit 'r' and remove any areas you don't want. Believe me, that's far more efficient than it used to be. And also much more efficient than many other areas of the DF user interface.

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

elf-fondling human

  • Bay Watcher
  • 4-d ftw
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #4 on: September 21, 2011, 12:38:48 pm »

^this. It's actually really simple, especially since I learned that you can remove parts of a burrow designation, tailoring it to your hallways and stair cases and whatnot.
Logged
That didn't last long, huh? Shame, cause binary's cool. Anyway, an important message: I will be changing my names on every username based thing I use to ASCIt on/around 10/1. Consolidating, I guess you could say.

Xen0n

  • Bay Watcher
  • Took joy in ‼SCIENCE‼ lately.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #5 on: September 21, 2011, 12:41:53 pm »

Just be glad that you can do 3D selects for burrows now. It used to be that you had to do each level separately.

Just go to the upper left corner pf the top level underground and hit enter, then go to the lower right of the bottom level you want and hit enter again. Then hit 'r' and remove any areas you don't want. Believe me, that's far more efficient than it used to be. And also much more efficient than many other areas of the DF user interface.

This.
I in fact do the exact same thing Lawlcat is attempting.  I have a burrow labelled, "Stay Off the Surface" (Have a similar one for "Stay out of the Caverns").  I just make a new burrow, do as khearn suggests above, and presto, done.  Takes about 8 seconds.  Much faster than it's taken me to write this post, several times over. 
Logged

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #6 on: September 21, 2011, 12:52:40 pm »

I was thinking a sort of "fill" command used with the burrows would be nice.  Make small burrows covering all the entrances/exits, and then use the fill inside so that every tile accessible from where you initiate the fill command that does not require passing through the burrows already designated is added.

But this would be too convenient to ever appear in the game, so yeah, the massive block of burrow that you then carve pieces out of is the way to go.  And if your burrows go down through cavern layers... my sympathies.
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

Tharwen

  • Bay Watcher
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #7 on: September 21, 2011, 02:20:04 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.
Logged
[Signature]

vyznev

  • Bay Watcher
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #8 on: September 21, 2011, 02:38:46 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.

Use traffic designations.  You can edit the [PATH_COST] tag in d_init.txt and increase the cost of restricted tiles from the default 25 to something huge like 5000 to make sure dwarves really won't go through those tiles if they can avoid it.

Keep in mind that burrows and traffic designations serve different purposes.  Burrows tell dwarves where they should be, traffic designations tell them how to get there.  If a dwarf has to cross a restricted traffic area to get where he wants to go, he will do so, even if he tries really hard to find some other path there first.
« Last Edit: September 21, 2011, 02:42:55 pm by vyznev »
Logged
Climbing is a strength-based skill. Elephants are very strong. Why are you surprised?

Makbeth

  • Bay Watcher
  • His lower body is melted.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #9 on: September 21, 2011, 02:53:38 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.

I couldn't agree more.  Unfortunately there seems to be no means of getting Toady to actually do this.
Logged
Diso Faintpuzzles was born in 120.  Although accounts vary it is universally agreed that Diso was chosen by fate as the vanguard of destiny.

In the early spring of 143 Diso began wandering the wilds.

In the early spring of 143 Diso starved to death in the Horn of Striking.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Any easy way to make an "inverse" burrow?
« Reply #10 on: September 21, 2011, 03:26:00 pm »

Putting in a feature to make areas selectively restricted would make the pathfinding code a good deal more complicated.  At the moment DF builds an internal map which shows which tiles can be reached from which other tiles.  When a creature is looking to go somewhere, the game first checks to see if the target is even reachable from where the creature is.  Only after determining that the target is even reachable at all does it call the pathfinding code to figure out how to get there.  Adding a forbidden zone function that can be selectively applied to some creatures but not others will require DF to maintain multiple connectivity maps (number of maps will have to be equal to two the power of the number of zones, since creatures may be assigned to multiple zones) and then when a creature is trying to figure out how to get somewhere, check the specific connectivity map that creature has applied to it.  It's not as simple of a thing as you think it is.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

Xen0n

  • Bay Watcher
  • Took joy in ‼SCIENCE‼ lately.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #11 on: September 21, 2011, 03:29:44 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.

I couldn't agree more.  Unfortunately there seems to be no means of getting Toady to actually do this.

I thought this at first too, but lately I'm not sure if there is really much call for it.  Most instances where I don't want a dwarf to be somewhere, burrows already handle perfectly.  It's only very rarely where I have a situation where I have two areas that I want a dwarf, and some area in the middle I don't want them, and in those cases walling off and doors work fine.  There aren't many situation I can think of that aren't easily solved by a burrow, locked door, or traffic designation. 
Logged

Tharwen

  • Bay Watcher
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #12 on: September 21, 2011, 03:35:45 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.

Use traffic designations.  You can edit the [PATH_COST] tag in d_init.txt and increase the cost of restricted tiles from the default 25 to something huge like 5000 to make sure dwarves really won't go through those tiles if they can avoid it.

You can just modify the values directly in the game too, if you don't feel like restarting.

Anyway, the key phrase there is 'if they can avoid it', which means that you can't use pathing costs to create (for example) a corridor that only berkserkers and invaders will use, while sealing off the rest of the fortress from the outside.

Also, doing so would carry a risk of fucking your framerate up, as the algorithm would search every other square before slowly and reluctantly crawling through the not-actually-forbidden area.
Logged
[Signature]

Xen0n

  • Bay Watcher
  • Took joy in ‼SCIENCE‼ lately.
    • View Profile
Re: Any easy way to make an "inverse" burrow?
« Reply #13 on: September 21, 2011, 03:39:37 pm »

The only problem is that dwarves will still path through the unburrowed area. The game really needs a 'forbid area' option that stops (rational) dwarves from going through it.

Use traffic designations.  You can edit the [PATH_COST] tag in d_init.txt and increase the cost of restricted tiles from the default 25 to something huge like 5000 to make sure dwarves really won't go through those tiles if they can avoid it.

You can just modify the values directly in the game too, if you don't feel like restarting.

Anyway, the key phrase there is 'if they can avoid it', which means that you can't use pathing costs to create (for example) a corridor that only berkserkers and invaders will use, while sealing off the rest of the fortress from the outside.

Also, doing so would carry a risk of fucking your framerate up, as the algorithm would search every other square before slowly and reluctantly crawling through the not-actually-forbidden area.

True, traffic costs couldn't create that 'enemy only' corridor while all other entrances are sealed, but you should be able to do it by having a burrow that includes everything except the corridor and the world outside.  Since there is no viable area for a dwarf to be outside, they'll never path outside by any means, including the enemy corridor.
Logged