# \[Suggestion\] A queue task system for each individual Hearthling?

**URL:** <https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605>\
**Category:** Suggestions\
**Created:** [March 30, 2015, 6:47pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605 "2015-03-30T18:47:15Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![TheMysticWyvern](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@TheMysticWyvern](https://discourse.stonehearth.net/u/TheMysticWyvern)\
**Post date:** [March 30, 2015, 6:47pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/1 "2015-03-30T18:47:16Z")

</div>

Struggling with my Hearthlings for a few days has given me the idea of a task queue system. Basically, if you have several things going on at the same time, such as mining, building, etc, you can open up an individual Hearthling’s queue and prioritize certain things, and they will move onto the next task when there’s no more work for them in the first task. If there is work for them to do in one of the tasks, they will not move onto the next until you re-prioritize their tasks.

So, the queue could look something like this:

1. Mining
2. Building
3. Organizing Stockpiles (including bringing items into stockpiles)
4. Crafting

Another suggestion I have is the ability to set patrolling routes for certain Hearthlings (as long as they’re footmen or other fighters).

---

<div class="post-metadata">

**Author:** ![thorbjorn42gbf](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/thorbjorn42gbf/32/4774_2.png) [@thorbjorn42gbf](https://discourse.stonehearth.net/u/thorbjorn42gbf)\
**Post date:** [March 30, 2015, 6:49pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/2 "2015-03-30T18:49:39Z")

</div>

_Cough_

> [@Task Priority -- An important mechanic ignored by many DF-like games](http://discourse.stonehearth.net/t/task-priority-an-important-mechanic-ignored-by-many-df-like-games/3249):
>
> If I understand the current gameplay implementation correctly, the AI is task based. The player assigns tasks, the AI director keeps a queue of them and selects units capable/compatible and convenient to carry out the task and completes them. Player has no direct control over what the units do. A common problem with this system is that if you have something that’s urgent, you have to either cancel all other tasks or modify a lot of unit job priorities such that a specific job is done right awa…

---

<div class="post-metadata">

**Author:** ![TheMysticWyvern](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@TheMysticWyvern](https://discourse.stonehearth.net/u/TheMysticWyvern)\
**Post date:** [March 30, 2015, 6:52pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/3 "2015-03-30T18:52:53Z")

</div>

Ah. I didn’t see that in my search. Thank you. xD

---

<div class="post-metadata">

**Author:** ![RepeatPan](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/repeatpan/32/46418_2.png) [@RepeatPan](https://discourse.stonehearth.net/u/RepeatPan)\
**Post date:** [March 30, 2015, 7:10pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/4 "2015-03-30T19:10:51Z")

</div>

The problem is how the game is currently designed. Basically, when you want to do something (mine X, harvest Y, place Z), the game tells the manager (town service) to do that. The town itself will create a task (~an AI action) and throw it into one of the task schedulers. As far as I’ve seen, schedulers are somewhat difficult to understand; they track their available workers and try to assign them the tasks. This is done with categories and priorities. In theory, it’s possible to modify this priority per hearthling, I suppose…

The action itself has a priority again, which is usually above the average (1) so it’s primarly executed. I don’t know right now how the task scheduler knows when a hearthling is idle (maybe checks for the idle action, or waits until the last task is finished), so that could be an issue.

Nevertheless, the system is based on priorities. So it is possible to a very fine tuning of those things… While theoretically possible to assign different priorities to different hearthlings, I haven’t looked into the whole task business closely yet. Depending on how the task schedulers interact with each other (if at all), it might not be possible to prioritise certain tasks over others. No idea. It’s a pretty big chunk of code to understand at once and my last attempt to mess around with it was rather fruitless, so I just gave up and ninja’d an existing task pool.

---

<div class="post-metadata">

**Author:** ![TheMysticWyvern](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@TheMysticWyvern](https://discourse.stonehearth.net/u/TheMysticWyvern)\
**Post date:** [March 30, 2015, 7:15pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/5 "2015-03-30T19:15:23Z")

</div>

I understand completely. It’s just frustrating to see Hearthlings abandon their tasks over and over again. One of my first actions in this new game was to build a shared sleeping quarters. I have the required materials, but I guess the Hearthlings thought the building would look nicer without a front wall. There are times that they’re not maintaining their stockpile, despite having the required resources.

Also, an unrelated bug, the trapper’s knife, weaver’s spindle, and carpenter’s saw aren’t listed as tools, instead falling under the “uncategorized” category. The wooden shield is also there. Is there a category for equipment?

---

<div class="post-metadata">

**Author:** ![FerretBandit](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@FerretBandit](https://discourse.stonehearth.net/u/FerretBandit)\
**Post date:** [March 30, 2015, 8:27pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/6 "2015-03-30T20:27:18Z")

</div>

Don’t forget harvesting! 😄

---

<div class="post-metadata">

**Author:** ![Barney324](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Barney324](https://discourse.stonehearth.net/u/Barney324)\
**Post date:** [March 30, 2015, 9:03pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/7 "2015-03-30T21:03:53Z")

</div>

i am in a similar situation:

i have 10 hearthlings (enough to get things done you would think)

but when i say… want to mine… then my _Workers_ will mine obviously… then i try to build a ladder to help the miners get out… note i say _Try_

what happens is… the farmers farm… the harvesters harvest… the footmen… footer??

but NO ONE builds then a ladder for about a day, maybe more meaning one or 2 will always died

_We NEED a task schedular we can use ourselves!_

---

<div class="post-metadata">

**Author:** ![TheMysticWyvern](https://avatars.discourse-cdn.com/v4/letter/t/a6a055/32.png) [@TheMysticWyvern](https://discourse.stonehearth.net/u/TheMysticWyvern)\
**Post date:** [March 30, 2015, 9:08pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/8 "2015-03-30T21:08:20Z")

</div>

I’m in the exact same boat right now. I just dug a pit and two workers are trapped down there. Nobody’s building them the ladder I requested. They’re content to just… gather resources and put them in the stockpile.

---

<div class="post-metadata">

**Author:** ![Averest](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/averest/32/47783_2.png) [@Averest](https://discourse.stonehearth.net/u/Averest)\
**Post date:** [March 31, 2015, 8:33pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/9 "2015-03-31T20:33:45Z")

</div>

The only way I’ve found around having to wait for someone else to build a ladder is to designate a small stockpile where you plan to dig. They’ll bring the log to the stockpile and then you can remove the stockpile so you can designate the digging area and the log will be useable for building a ladder. I only make small log stockpiles so my Hearthlings don’t constantly create hauling jobs when they could be doing something else useful.

---

<div class="post-metadata">

**Author:** ![Barney324](https://avatars.discourse-cdn.com/v4/letter/b/ea666f/32.png) [@Barney324](https://discourse.stonehearth.net/u/Barney324)\
**Post date:** [March 31, 2015, 9:56pm UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/10 "2015-03-31T21:56:53Z")

</div>

what an amazing idea!!!

---

<div class="post-metadata">

**Author:** ![8BitCrab](https://sea2.discourse-cdn.com/flex022/user_avatar/discourse.stonehearth.net/8bitcrab/32/48512_2.png) [@8BitCrab](https://discourse.stonehearth.net/u/8BitCrab)\
**Post date:** [April 1, 2015, 2:41am UTC](https://discourse.stonehearth.net/t/suggestion-a-queue-task-system-for-each-individual-hearthling/11605/11 "2015-04-01T02:41:24Z")

</div>

you sir, iz genius! 😄
