Bay 12 Games Forum

Please login or register.

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

Author Topic: For the love of God, Dwarfs need to not wall themselves in.  (Read 2127 times)

devek

  • Bay Watcher
  • [KILL_EVERYTHING]
    • View Profile

Been doing lots of magma/water engineering projects lately and the side of a wall the dwarf decides to stand on makes no sense.

It would take maybe 5 min to put in a check to stop it..

"I can stand on spot A or B to build this wall... only spot A will allow me to eat food after the wall is built so I think I will stand there."

In the meantime, I fix it by putting a door first.. than building the wall in front of the door.
Logged
"Why do people rebuild things that they know are going to be destroyed? Why do people cling to life when they know they can't live forever?"

Capntastic

  • Bay Watcher
  • Greetings, mortals!
    • View Profile
    • A review and literature weblog I never update
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #1 on: July 19, 2010, 02:49:29 am »

This is a bug, not something that needs to be suggested.   It's also well known, and will be fixed.
Logged

thijser

  • Bay Watcher
  • You to cut down a tree in order to make an axe!
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #2 on: July 19, 2010, 04:08:00 am »

I think the right thing it should check is am i able to reach a meeting zone/the wagon...
Logged
I'm not a native English speaker. Feel free to point out grammar/spelling mistakes. This way I can learn better English.

Pilsu

  • Bay Watcher
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #3 on: July 19, 2010, 05:10:50 am »

Problem with that would be that they'd absolutely refuse to build anything if walled in, cut off by a downed bridge or the like or out of food in general.
Logged

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #4 on: July 19, 2010, 06:11:42 am »

This is a bug, not something that needs to be suggested.   It's also well known, and will be fixed.

How will it be fixed?
I had the idea that a dwarf could always remain on the side of the construction as the direction he came from. If you came from there, it is obviously an exit! No need to run checks for anything!
(This would not work sometimes if you have more than one dwarf constructing things in the same place. Or if there are building materials sitting inside the building.)
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #5 on: July 19, 2010, 08:29:50 am »

How will it be fixed?
I had the idea that a dwarf could always remain on the side of the construction as the direction he came from. If you came from there, it is obviously an exit! No need to run checks for anything!
(This would not work sometimes if you have more than one dwarf constructing things in the same place. Or if there are building materials sitting inside the building.)

This is, honestly, probably the most elegant solution.  I have no idea if this would be difficult for Toady to program, but making a dwarf pathfind to the spot where he is building, and then having it rewind to just being at the closest space away would be one way to do this...

Except that it would possibly cause problems with non-existant floors, like if you were building a wall over an open space, although I guess you could kludge that manually to be a "floor" for the purposes of that one pathfinding check as a special case, since the dwarf won't be standing on it, anyway...

Still, for right now, all you can do is use guides like http://df.magmawiki.com/index.php/40d:How_do_I_construct_a_wall_from_a_particular_direction

Basically, dwarves prefer to construct from the left side, then the right, then north, then south.  (This is the same as http://df.magmawiki.com/index.php/40d:Mining#Dig_Priority but dwarves cannot construct diagonally, and support does not work diagonally, even though for almost every other intent or purpose, they are basically the same.) Build priority is also LIFO.  This means you want to basically figure out what you want to build, and then command it be built in opposite order (or just suspend anything you want to be built last, if it doesn't matter what order most of it is built in).  This also means that you should make the last piece of wall you build be the wall you want your dwarf standing on the left side of when he/she builds it. 

If you cannot have your dwarf standing on the left side for any wall piece (such as if you are walling off a dangerous corridor in a cavern, and your fortress is on the right of the wall), then designate the piece of wall you want to be built last before designating the others, designate the others, and then designate another wall that is to be built to the left of the wall you wanted to be built last, and set that wall's construction to suspend.  Dwarves will prefer not to stand on walls that are designated to be built when possible, and so will step over to the right of the wall when building that last piece of wall.  (You can do the same thing if you are building a left-right wall, and want dwarves to build from the south rather than the north.) 

Be careful, however, of sometimes having multiple dwarves on the building project.  Sometimes it's best to just suspend the last piece of wall until you know everyone is inside before you seal it off.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare

fanatic

  • Bay Watcher
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #6 on: July 19, 2010, 12:56:08 pm »

Or maybe we should just be able to specify "stand here when building". It isn't always clear to the game system why we do what we do.

This. seems like the easiest way to do it. just add something that works like when one builds a drawbridge.
Logged
fanatic cancels play DF : gone berzerk at framerate.                                                  x1000
------------------------
Pour magma first - ask questions later!

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #7 on: July 19, 2010, 02:22:48 pm »

This is a bug, not something that needs to be suggested.

Dunno.  It's well inside the gray area.  We kinda have a tracker entry for it, though.
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #8 on: July 19, 2010, 03:11:19 pm »

To me it looks like one of the unintentional features that make up a large part of the game's fun. Don't know if I want dwarves to completely stop walling themselves in, because that would also mean no more epic rescue operations trough above carp-infested water to save your legendary mason.
Logged

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #9 on: July 19, 2010, 03:36:52 pm »

Basically, dwarves prefer to construct from the left side, then the right, then north, then south.  (This is the same as http://df.magmawiki.com/index.php/40d:Mining#Dig_Priority

I don't know if you're telling this to ME, or just everyone, but I already know how it works. And I honestly cannot see any good reason as to why it is done this way. You've probably watched your dwarves mining something out, getting to the very last designated tile, and then walking for a huge distance ALL THE WAY AROUND through your mining tunnels so that they can dig it out from the other side. It's just silly, and I don't see why it has to be done this way. Maybe the stay-on-the-side-you're-already-on thing IS difficult to program. Or maybe he simply hasn't gotten to this thing yet.

Quote
but dwarves cannot construct diagonally, and support does not work diagonally, even though for almost every other intent or purpose, they are basically the same.)
[/quote]

This also perplexes me. It seems like the game was deliberately designed this way, but I'm not sure why. When building something like an aqueduct with a bend to it, you're required to build a floor, build the wall on the corner, deconstruct the floor, and build a wall there.
It wouldn't be a problem, except that Dwarves can walk through a diagonal, and liquids can flow through a diagonal. So it's weird to me that you can't construct on a diagonal. The only reason I can see fo rthis is because structures are not supported on a diagonal - but hey, that's an easy fix. If you order something built on a diagonal that has no support and will fall down the instant you build it, then the dwarves will suspend work on it until you get something next to it. (Or, diagonal supporting could simply be allowed. But that might interfere with future cave-in models) The downside is that every single construction would have to check to make sure there are supports, slowing the game down a bit. The way this is handled currently is when you select the building materials - If you can get to building materials, it can be supported. However, this doesn't seem to slow the game down because the game is already paused. So I suppose that the is-this-going-to-be-supported check could take place as you are designating the construction. I don't think that would be much of a problem.


Quote
Build priority is also [last in, first out]. This means you want to basically figure out what you want to build, and then command it be built in opposite order (or just suspend anything you want to be built last, if it doesn't matter what order most of it is built in).  This also means that you should make the last piece of wall you build be the wall you want your dwarf standing on the left side of when he/she builds it.

When learning how to construct walls, I remarked to my brother that it should be as easy as digging out a hallway. Now that I know more about the game, I know that this is pretty much impossible - not only because your dwarves need to be able to get to every single part of your wall, but also because you need to tell the game what materials to use, whereas with digging, the materials are already there.

An annoying but probably necessary part of this system is when the game says you can't construct something because there is no path to any building materials. I understand exactly why this is, but that doesn't mean it's not still annoying...
There could probably be a programming workaround for this... (something like, "when the dwarves get to this, construct it out of a common and nearby stone type") or people could just learn to build more scaffolding, I guess.
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #10 on: July 19, 2010, 03:40:01 pm »

I always imagined diagonals as narrow space that don't give dwarves enough room to properly construct something on the other side. Also, whenever my miners go around the premise to mine something from the other side, I usually assume it's safer to tear the wall down from that side or that the dwarf has another good reason to do it that way. I like a bit of mystique in my dwarves.
Logged

Solace

  • Bay Watcher
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #11 on: July 19, 2010, 03:41:21 pm »

First off, I'd also like logic based around a dwarf not channeling himself into a wall, or into a large drop, if there are options available.
Or maybe we should just be able to specify "stand here when building". It isn't always clear to the game system why we do what we do.
Works well if you've got one dwarf building one wall, less well if you have an unknown number of dwarves trying to build 20 adjacent walls.
To me it looks like one of the unintentional features that make up a large part of the game's fun. Don't know if I want dwarves to completely stop walling themselves in, because that would also mean no more epic rescue operations trough above carp-infested water to save your legendary mason.
... deconstruct the wall and try again?
Logged

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #12 on: July 19, 2010, 04:03:05 pm »

I always imagined diagonals as narrow space that don't give dwarves enough room to properly construct something on the other side.

Yeah, it's all about how stuff is being displayed vs. what's really going on. Like so:



I like to think that things are handled like the second picture, which is why dwarves and liquids can travel diagonally.
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

Tehran

  • Bay Watcher
    • View Profile
    • Dwarf Fortress Stories
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #13 on: July 19, 2010, 06:11:01 pm »

This is, honestly, probably the most elegant solution.  I have no idea if this would be difficult for Toady to program, but making a dwarf pathfind to the spot where he is building, and then having it rewind to just being at the closest space away would be one way to do this...

I had to read that again to get it...
That is exactly how it should be done. I just now realized why Toady programmed the weird W>E>N>S dig priority thing. It's because, if you're pathing to a tile that needs to be mined out, you can't actually stand on the tile to do it. Instead of pathing to the tile, you have to path to one of the 8 adjacent tiles. And that's why the W>E>N>S>NW>SW>NE>SE thing has to exist.

You're absolutely right. This problem could be solved (easily, I think) by pathing directly up to the dig-designated tile, and then sort of ghost-pathing ONTO the tile, and then taking a step backwards / "rewinding."
Logged
Visit http://dfstories.com for stories!
And here's my solution for sand modeling: http://www.bay12forums.com/smf/index.php?topic=58397.0

NW_Kohaku

  • Bay Watcher
  • [ETHIC:SCIENCE_FOR_FUN: REQUIRED]
    • View Profile
Re: For the love of God, Dwarfs need to not wall themselves in.
« Reply #14 on: July 19, 2010, 06:57:49 pm »

This is, honestly, probably the most elegant solution.  I have no idea if this would be difficult for Toady to program, but making a dwarf pathfind to the spot where he is building, and then having it rewind to just being at the closest space away would be one way to do this...

I had to read that again to get it...
That is exactly how it should be done. I just now realized why Toady programmed the weird W>E>N>S dig priority thing. It's because, if you're pathing to a tile that needs to be mined out, you can't actually stand on the tile to do it. Instead of pathing to the tile, you have to path to one of the 8 adjacent tiles. And that's why the W>E>N>S>NW>SW>NE>SE thing has to exist.

You're absolutely right. This problem could be solved (easily, I think) by pathing directly up to the dig-designated tile, and then sort of ghost-pathing ONTO the tile, and then taking a step backwards / "rewinding."

Technically, you wouldn't have to rewind, although it might depend on how the pathfinding code works.  You just have to not write down the last step in the list of steps to take.

Of course, talking about diagonals, the problem is now that you have to move to the closest NON-DIAGONAL space.  (Honestly, I'd say just let support and construction happen diagonally, like every-friggin-thing-else, but if we're keeping this system...) If we just ham-fist manually override the pathfinder to believe that the diagonals are walls or otherwise unwalkable terrain (that might actually be harder...), then we could achieve the same effect.
Logged
Personally, I like [DF] because after climbing the damned learning cliff, I'm too elitist to consider not liking it.
"And no Frankenstein-esque body part stitching?"
"Not yet"

Improved Farming
Class Warfare
Pages: [1] 2