Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: mining patterns  (Read 2813 times)

eerr

  • Bay Watcher
    • View Profile
mining patterns
« on: August 21, 2022, 11:32:42 pm »

Some time ago, Toady upgraded the patterns dwarves mine in.(the pattern was mind-numbing in older versions) I want to suggest that (especially for modifications!) other races have different mining patterns, like digging in a straight line when possible, or randomly hopping to available tiles not too far away.
or mining based on the distance from one starting tile.

it would be a great way to add character to races that mine!
Logged

SixOfSpades

  • Bay Watcher
  • likes flesh balls for their calming roundness
    • View Profile
Re: mining patterns
« Reply #1 on: August 22, 2022, 03:34:12 am »

More greedy individuals (though whether dwarves or humans might be more prone to that trait is debatable) could preferentially try to dig gem/ore tiles first, rather than regular boring stone--especially noneconomic stone. (Maybe even, miners might decide to dig gems in tiles that haven't been designated for digging. This would only happen in moments of impulse, when the miner has finished digging an assigned tile and there are some non-designated gems just right there.)

But as far as race-based mining patterns are concerned, the more community-minded dwarves might automatically take advantage of the soil-rock dichotomy as a way to train inexperienced miners. If both soil and rock tiles are available mining tasks, higher-level Miners might concentrate on the rock tiles, leaving the soil tiles to give their greener comrades more of a chance to catch up. Similarly, newer Miners would preferentially dig through dirt. The % chance that either type of miner would consider this decision is based on the degree of difference between the highest-level & lowest-level miners in the fort. (Perhaps with the definition of 'miner' restricted to "a dwarf who has the Mining labor enabled, and is not currently in military service.")

But personally, I'd say the more urgent change that should be made in mining is by calculating the pathing, not simply the distance, when choosing one's next mining job. When I make the mistake of designating more than 1 z-level to be dug at a time, I frequently see dwarves finish mining out all tiles adjacent to their own, and then rather than just moving a few steps to one side, they'll run 1/4 of the way across the map, down some stairs, and then back another 1/4 map, all to get to another digging tile that was "TwO sTePs ClOsEr" to their original position. Granted, this is a problem common to pretty much all tasks throughout the fort, and making excessive pathing calculations can be very draining on the processor & thus kill your FPS . . . but I submit that (in my experience, anyway) the vast majority of mining is done in a fort's early days, before most FPS drains have become a problem, and thus mining can afford to be a special-case exception that uses more intelligent pathing without sacrificing overall game speed.
Logged
Dwarf Fortress -- kind of like Minecraft, but for people who hate themselves.

eerr

  • Bay Watcher
    • View Profile
Re: mining patterns
« Reply #2 on: August 22, 2022, 08:51:24 am »

So dwarves will attempt to dig out adjacent tiles with disregard for being on an adjacent z-level?
I had no idea. that's kind of an interesting discovery, actually.

so, one of your suggestions is that the dwarves should only dig adjacent tiles, when those are reachable from the current tile?
Logged

SixOfSpades

  • Bay Watcher
  • likes flesh balls for their calming roundness
    • View Profile
Re: mining patterns
« Reply #3 on: August 22, 2022, 09:53:05 am »

It happens with all dwarves & all jobs, actually. Depending on how your fort is laid out, a dwarf will go to the main food stockpile and say,
     "Now, why should I eat my lunch in the perfectly good dining hall, which is literally right through that door, when I can easily carry my lunch through the dining hall, up four flights of stairs, past the trade depot, around the hospital, and finally eat it in the church where I'll get annoyed at being 'forced' to eat without a proper table?"
When choosing the destination of a Miner's next task, or the spot where a dwarf goes to eat, the game only checks the distance between the starting & (potential) ending points, not the path that the dwarf would have to take to actually get there. The game only calculates the pathing after the destination has been chosen.

So, to put my suggestion more clearly: When a Miner has dug out all tiles adjacent to his current spot, he should move to the work-adjacent tile with the shortest walkable path to his current position*. This would optimally be done by checking if there's a path to such a job site within 5 steps, and then (if the answer is no) within 10 steps, and then 15, 20, & finally a path of 25 steps, and if there are still no "hits" it finally defaults to its current algorithm--finding the job site the shortest distance away, regardless of pathing.
* Actually, there should be a modifier to prioritize squares that are adjacent to multiple tiles designated for digging, in order to maximize the work that can be done before the pathing calculation needs to be done again.
Logged
Dwarf Fortress -- kind of like Minecraft, but for people who hate themselves.

A_Curious_Cat

  • Bay Watcher
    • View Profile
Re: mining patterns
« Reply #4 on: August 24, 2022, 10:48:27 pm »

More greedy individuals (though whether dwarves or humans might be more prone to that trait is debatable) could preferentially try to dig gem/ore tiles first, rather than regular boring stone--especially noneconomic stone. (Maybe even, miners might decide to dig gems in tiles that haven't been designated for digging. This would only happen in moments of impulse, when the miner has finished digging an assigned tile and there are some non-designated gems just right there.)

“Y’know.  This seems like a waste.  They dug all of that raw adamantine out but they left these eight tiles (one of which, for some reason, they seem to have carved a fortification through).  I’ll just clean up by finishing what they’ve left undone!”
Logged
Really hoping somebody puts this in their signature.

SixOfSpades

  • Bay Watcher
  • likes flesh balls for their calming roundness
    • View Profile
Re: mining patterns
« Reply #5 on: August 25, 2022, 02:16:23 am »

Logged
Dwarf Fortress -- kind of like Minecraft, but for people who hate themselves.

Dibbler

  • Bay Watcher
    • View Profile
Re: mining patterns
« Reply #6 on: September 01, 2022, 05:43:20 am »

More greedy individuals (though whether dwarves or humans might be more prone to that trait is debatable) could preferentially try to dig gem/ore tiles first, rather than regular boring stone--especially noneconomic stone. (Maybe even, miners might decide to dig gems in tiles that haven't been designated for digging. This would only happen in moments of impulse, when the miner has finished digging an assigned tile and there are some non-designated gems just right there.)'

What if the greedy dwarf want to aquire something? That could increase the likelyhood, and have the dwarf keep the gem in his inventory, instead of letting it drop to the ground, and satisfy the demand.
Logged

Azerty

  • Bay Watcher
    • View Profile
Re: mining patterns
« Reply #7 on: September 14, 2022, 06:50:06 pm »

Should it depend from available safety tools?
Logged
"Just tell me about the bits with the forest-defending part, the sociopath part is pretty normal dwarf behavior."