Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [33d] Problem in how craft materiels are chosen  (Read 1655 times)

Riemann

  • Bay Watcher
    • View Profile
[33d] Problem in how craft materiels are chosen
« on: December 07, 2007, 12:12:00 am »

I've finally figured out what crafters do when choosing what materiel to work with. In a new fort that was almost covered in raw stone I noticed that my crafter was choosing stones that meet these criteria:
1) Closest in the X/Y axis
2) On the lowest possible Z axis value

So the crafter chose stones on the bottom floor (3 down from the workshop) directly under his feet. If they had been on the same Z level they would be the closest. As it is there is quite a walk between the two.

This seems similar to the behavior of miners who will prefer to dig out from the upper left to lower right on the lowest Z level possible.

Logged

red glass

  • Bay Watcher
    • View Profile
Re: [33d] Problem in how craft materiels are chosen
« Reply #1 on: December 07, 2007, 08:53:00 am »

I'm pretty sure it's strictly a distance formula (without respect to walls, floors, etc). So a stone 15 z-levels below the workshop won't get used if there's something just 10 squares to the left, but that 10 squares to the left won't get used if there's a stone 3 levels down and 4 squares over.
Logged

Align

  • Bay Watcher
    • View Profile
Re: [33d] Problem in how craft materiels are chosen
« Reply #2 on: December 07, 2007, 09:20:00 am »

Z level is completely ignored for distance calculations. If a dwarf is standing next to a rock and there's one on the same square as the dwarf except 15 levels down, he'll go for the latter stone.

[ December 07, 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.

Draco18s

  • Bay Watcher
    • View Profile
Re: [33d] Problem in how craft materiels are chosen
« Reply #3 on: December 07, 2007, 02:37:00 pm »

You can verify that the Z axis is ignored by building a crafts shop N levels down directly below your trade depot.  when you go to select goods to trade you'll notice that they are not at a distance of N but a distance of 0.
Logged

Riemann

  • Bay Watcher
    • View Profile
Re: [33d] Problem in how craft materiels are chosen
« Reply #4 on: December 07, 2007, 04:09:00 pm »

You can verify this bug in a similar way. Build a craft shop with stone nearby, then tunnel out several levels directly below it. Notice that those stones (the ones at 0 x/y distance but Lots Z distance) will be chosen.

Also note that if several stones are tied for least x/y distance the one that is chosen is that with the lowest Z value.

Logged