Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarves prefer to mine from the left  (Read 380 times)

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Dwarves prefer to mine from the left
« on: October 30, 2007, 02:33:00 pm »

A dwarf who is mining will keep mining adjacent tiles until there are no more adjacent to mine out, then find another spot to mine, etc.  The problem I am having is in a situation like this:

code:

XXXXX
XX XX
XX#00
XX#00

X's are mined-out space, and 0's and #'s are spaces designated to be mined.  If the miner is mining to the left, from the lower right, once they get to the tile which is exposed on both the left and the right (the ones marked with #) they will walk all the way around to the left side to mine it out, rather than just mine it from the right.

I hope this explanation makes sense.  They are walking a long ways to mine out a tile which they are already adjacent to.

Captain Failmore

  • Bay Watcher
    • View Profile
    • http://chairangaem.blogspot.com
Re: Dwarves prefer to mine from the left
« Reply #1 on: October 30, 2007, 03:12:00 pm »

I ran into a similar problem in the last version involving floodgates. If they could, my miners would always build floodgates from the left side of the construction site. This became a problem when my miners started getting stuck behind floodgates they'd just installed.
Logged
A HREF="http://chairangaem.blogspot.com">LOLCHAIR ADVENTURES

Toady One

  • The Great
    • View Profile
    • http://www.bay12games.com
Re: Dwarves prefer to mine from the left
« Reply #2 on: October 30, 2007, 09:02:00 pm »

It's a bit hard to correct all of these cases, since it could involve a lot of pathfinding, but certainly some of the silly short distances ones can be handled.
Logged
The Toad, a Natural Resource:  Preserve yours today!

Draco18s

  • Bay Watcher
    • View Profile
Re: Dwarves prefer to mine from the left
« Reply #3 on: October 31, 2007, 01:49:00 pm »

From observations:

Dwarves prefer west ( @# ) over anything else
Dwarves prefer east ( #@ ) over mining from the north
Dwarves prefer north over south
Dwarves prefer north over a north-diagonal (nw or ne)
[Assumed] Dwarves prefer a true cardinal (n,s,e,w) over any diagonal
Dwarves prefer NW over any other diagonal
[Assumed] Dwarves will pick the diagonal available with the highest preference of the two cardinals it makes (i.e. West-diagonals over East, and North-diagonals over South, resulting in NW > SW > NE > SE)

None of this has relevance on which tile a dwarf will mine out next (i.e. the dwarf might dig diagonally even if a to-be-mined block is to his direct east).  It appears that next-tile is random/semi-random whereby closer blocks will be chosen over farther blocks.

Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: Dwarves prefer to mine from the left
« Reply #4 on: October 31, 2007, 03:02:00 pm »

A bigger problem is that dwarves don't respect the order of mining, say, a wide 'channel'. In a situation where you're mining out the floor above an aquifer, for example, if your entry tunnel is from the left, the miner will be trapped. And won't hesitate to mine out the tile beneath him when he's got nowhere to go, as well. There are also problems with two miners doing the same 'pool' - one miner mines strips of ground, another claims a tile, the first miner bypasses it, goes further, and if the second miner is too slow, the first miner will separate the tile the second claimed from the rest, leaving a standing pillar. The only way to remove that pillar without killing or injuring a miner is carving it down to a ramp, and then removing it.

Also on that subject - why do the dwarves set to remove constructed floors stand ON the tile they remove? I lost one dwarf in an aquifer, and one was injured in a fall because of this.

Logged
Multiworld Madness Archive:
Game One, Discontinued at World 3.
Game Two, Discontinued at World 1.

"Europe has to grow out of the mindset that Europe's problems are the world's problems, but the world's problems are not Europe's problems."
- Subrahmanyam Jaishankar, Minister of External Affairs, India