Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: 33b - z-depth resourse oddity  (Read 2012 times)

karnot

  • Bay Watcher
    • View Profile
33b - z-depth resourse oddity
« on: November 24, 2007, 11:50:00 am »

Not only stone, but any resourse in general.
Suppose a mason needs a stone for work - he will look for closest stone, but WILL NOT think about z-depth, and will consider ALL levels as one, for determining the closest. So if you have a stone layng about directly above the mason workshop and another, that is 5 tiles on the same level as the workshop - the dwarf will go get the one above the shop, even if he has to walk 100 steps to get there.
Logged

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #1 on: November 24, 2007, 02:18:00 pm »

I've noticed this occasionally, too. It's quite annoying.
Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!

valcon

  • Bay Watcher
  • Experience rivers.
    • View Profile
    • My YouTube Channel
Re: 33b - z-depth resourse oddity
« Reply #2 on: November 24, 2007, 02:22:00 pm »

my dwarves always seem to go for the most recently mined stone, might be just my perception, but it FEELS annoying :P
Logged
Still doing Let's Plays, still got a gold toof. 

Adventure Mode:  The Movie!

red glass

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #3 on: November 24, 2007, 04:31:00 pm »

Dwarfs gathering for stockpiles will (and have for a long time now) always grab the most recently created item (stone mined, tree chopped, etc).

However, dwarfs in workshops always gather the closest stone. In the new versions, distances appear to be a simple manhattan distance calculation without looking at where floors exist. So if you happen to be mining bedrooms under your mason's workshop (bad idea since they'll be unhappy about noise), stones right below the mason's shop will be where the mason dwarf will get his stones from rather than the stockpile right next to him.

Though, on the other hand, we don't want a strict penalty for traveling a floor -- I've seen a lot of forts where workshops are all on some level and all stockpiles are one floor above/below it with stairs right next to the workshop.

Logged

Sean Mirrsen

  • Bay Watcher
  • Bearer of the Psionic Flame
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #4 on: November 24, 2007, 04:40:00 pm »

Actually, this just forces you to better organize your workshops and stockpiles. It's frustrating at initial stages, because you don't usually worry about that early on. In an extreme case, I was prospecting some 5 levels below a mason's workshop, and the mason decided to run 5 levels down (at least two corridors 5 screenwidths long) to take a stone, instead of taking one from a stockpile 7 tiles away...
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

Gelmax

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #5 on: November 24, 2007, 08:26:00 pm »

This is actually the first time I've even considered the idea that that might be inconvenient for some - I use staircases and Z-levels extensively in my fort, building most workshops on the top couple of Z-levels and doing much mining deeper down, with plenty of staircases so that dwarves never have to travel far to change Z-levels. As such, whatever materials I need are always a staircase and a very short walk away, regardless of level.

Basically, your problem is that the mason has to walk 100 steps to go up one Z-level in the first place. There's no downsides to building staircases, you know. If you know there's a fair amount of stone a Z-level or two away but otherwise very close to your workshop, just build a staircase.

[ November 24, 2007: Message edited by: Gelmax ]

Logged

Draco18s

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #6 on: November 24, 2007, 09:05:00 pm »

True, there's no downside to building more stairs, however it doesn't mean that the problem doesn't exist.  It's merely a way to work with the problem in a less irritating fassion.
Logged

Zombie

  • Bay Watcher
  • Ǵ̨̕o͘d͝d̡͢e̡̕s̷͟s̵͢ ͝of̴ ͡G͘͠a̧mi̶n̛͝g̨
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #7 on: November 24, 2007, 10:21:00 pm »

I agree. More stairs is a temporary fix at best. We KNOW there's some problems with pathing anyway, so this is just another pathing problem.

Instead of doing actual or "by the road" pathing, it seems to do literal or "as the crow flies" pathing. The difference is that instead of seeing if there IS a way to get somewhere and seeing how far away that place is, it just... Tries to go there.

Who knows, we might get pathing errors if you have stone above or below a workshop and no actual path to get there. Say, for instance, if a staircase is destroyed.

Logged
If I had a dollar for every dwarf whose feelings I didn't care about, I'd have seven dollars, with more coming in the fall.

Urist McSharpblade, Axe Sheriff cancels Justice: Needs more than an axe for this.

MULTI-THREADING - I'm talking about it!

palin88

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #8 on: November 25, 2007, 03:49:00 am »

The problem, as always, is if you're willing to trade FPS for better pathing.

Doing a z-level tolerant path search would take much longer than the current flat path search.

Logged

Griz

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #9 on: November 25, 2007, 04:50:00 am »

I'm not sure exactly what's happening, but the pathfinding may be entirely disregarding z-levels. if you have a garbage chute that goes several levels down with a dump zone designated on each level, the dwarves will often go up or down to throw the item instead of using the dump on their current level.
Logged

Align

  • Bay Watcher
    • View Profile
Re: 33b - z-depth resourse oddity
« Reply #10 on: November 25, 2007, 05:33:00 am »

Pretty sure that the pathfinding originates from the dwarf; ie, it checks the adjacent squares first, then the squares adjacent to those, etc. Changing that to actual pathing would make a huge difference in cost.
One idea is to make it only check the nearest squares on the same z-level, unless it detects a staircase in which case it'll start checking the nearest squares on different z-levels.

[ November 25, 2007: Message edited by: Align ]

Logged
My stray dogs often chase fire imps back into the magma pipe and then continue fighting while burning and drowning in the lava. Truly their loyalty knows no bounds, but perhaps it should.