Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: What is the exact order of priority for all jobs?  (Read 1219 times)

Slythe

  • Bay Watcher
    • View Profile
What is the exact order of priority for all jobs?
« on: March 05, 2012, 07:43:02 pm »

Maybe this has been discussed before and I just missed it, probably so, but I've never seen it.

Let's say a dwarf has every job enabled, and has equal skill in every labor, and after they finish their current job they see that there's a 'request' for one of every other job possible, and no other dwarf has any labor enabled...what's the order in which that dwarf will fulfill these jobs?  Medical jobs first, workshop jobs second, hauling last?  Something else?  Or is it not ranked at all, maybe just a reverse stack, FIFO?
« Last Edit: March 05, 2012, 07:44:37 pm by Slythe »
Logged

NecroRebel

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #1 on: March 05, 2012, 07:53:25 pm »

Unknown. It is known that for construction jobs it's a FILO order, but sometimes dwarves will take construction jobs when there are workshop jobs available and sometimes the opposite is true. Hauling jobs are usually taken first, but sometimes dwarves will take non-hauling jobs when there's hauling for them to do, so that's not an absolute priority, either.

It is believed that for the most part jobs take dwarves, not the other way around, so that might have something to do with it. Jobs might be able to snatch up closer dwarves more easily or some other factor might determine which job gets which dwarf. It's also believed that personality traits affect how readily dwarves will take to each job; this is especially noticeable with medical care jobs, where compassionate and empathic dwarves take those jobs far more quickly than otherwise.
Logged
A Better Magma Pump Stack: For all your high-FPS surface-level magma installation needs!

Slythe

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #2 on: March 05, 2012, 07:56:54 pm »

Interesting, and what I suspected.  Thanks NecroRebel.
Logged

Tharwen

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #3 on: March 05, 2012, 09:52:13 pm »

It's interesting how the game can be so mechanical and predictable in some respects, but many aspects of dorf behaviour are organic and unpredictable.
Logged
[Signature]

talysman

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #4 on: March 06, 2012, 02:22:01 pm »

I'm new to the game and not a programmer, but I'm going to guess that some of the odd behaviors (like which job gets taken first) have to do with instance numbers. I say this based on how much DF reminds me of a violent, fantasy-flavored version of The Sims. In the Sims, there were a number of weird behaviors, like Sims who need to improve Comfort walking all the way across a huge lot to sit down when there's a perfectly good chair right beside them. The reason for the behavior was that the "look for place to sit down" routine was looking for the chair with the lowest instance number. Or maybe it was the highest instance number; either way, the routine wasn't paying attention to the chair's distance, but to something that only made sense internally.

DF is better than the Sims, in this respect, but I remember creating a second 1-tile garbage dump as I dug deeper when expanding a fortress, thinking the dwarves would use the closest dump; instead, they used the newest dump, no matter what the distance. Dig designations, on the other hand, seem to be partially LIFO, partially distance-based. Or maybe I'm just being fooled...
Logged

Myiagros

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #5 on: March 06, 2012, 02:39:12 pm »

I always seem to have lever pulling jobs given to the dwarf that is mining at the lowest level in the complex.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #6 on: March 06, 2012, 02:45:34 pm »

DF is better than the Sims, in this respect, but I remember creating a second 1-tile garbage dump as I dug deeper when expanding a fortress, thinking the dwarves would use the closest dump; instead, they used the newest dump, no matter what the distance.
No, dwarves do always use the closest dump. They decide which is the closest by pure distance, not which one is the quickest to get to.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

quarague

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #7 on: March 06, 2012, 04:55:17 pm »

No, dwarves do always use the closest dump. They decide which is the closest by pure distance, not which one is the quickest to get to.

yes but afaik two minor caveats
1) a dump is only considered if it was designated before the dump order was given. mostly relevant when you pause the game, you still need to first create a new dump and then designate the stuff that should be dumped if you want the dorfs to use the new dump
2) dorfs enjoy dumping that involves throwing things into holes and are willing to walk further for that, mostly occurs if you have a garbage chute dump for goblin cages, suddenly dorfs will dump every single stone in the fortress in the garbage chute, too
Logged
More importantly, ... , making the project pointlessly difficult and requiring greatly overcomplicated means to set up  ...
from Sphalerite

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: What is the exact order of priority for all jobs?
« Reply #8 on: March 06, 2012, 05:18:36 pm »

Internally, the game keeps track of jobs using a doubly-linked list, though I haven't checked whether it adds jobs at the beginning of the list or at the end; logically, jobs at the beginning of the list would have the highest priority.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

khearn

  • Bay Watcher
    • View Profile
Re: What is the exact order of priority for all jobs?
« Reply #9 on: March 06, 2012, 08:30:08 pm »

2) dorfs enjoy dumping that involves throwing things into holes and are willing to walk further for that, mostly occurs if you have a garbage chute dump for goblin cages, suddenly dorfs will dump every single stone in the fortress in the garbage chute, too
That's just because they like that "thump!" you get when a rock lands on a goblin head.
Logged
Have them killed. Nothing solves a problem quite as effectively as simply having it killed.