AI optimisation issue: Hearthlings will pickup things they can't store

I tagged a resource item poorly in one of my mods. Ideally, the AI should know better than to pick up items for which they have no stockpile space. Somehow they are doing it anyway. So after a while, I found that they had trouble moving stuff because their backpacks were full of this item.

Ideally, nobody would ever make such a mistake in creating items. In practise, there should probably be some protection in the hearthling AI that prevents them from picking up items they can’t put away.


hey there @tuhalu… thanks for the report…

did you intend to classify this as resolved?

Kind of. I had a completely different report that turned out to be wrong. At this point, it’s not really a bug anymore. At the very best, it would be a low priority fix for the dev team I think.

It would be best fixed by fixing the “ALL” toggle in stockpiles to really be all items rather than turning every filter category on (which is definitely not all items!).


The default setting when you drop a brand new stockpile is “all” but this really means all, including items not filtered yet.
Anyway, the last update (haven’t tested it yet) is supposed to fix the case of a few items like the rabbit toy or the fire fit which were some of the items causing trouble.
Perhaps it would be good to get a temporary category bound to a “misc” filter (also temporary) to put any item we may have to test during the alpha?

I was actually using the user settings tags that @sdee revealed recently. It makes all your stockpiles default to None. I might not have noticed otherwise. Actually, until alpha 11, you couldn’t fill your backpack full of garbage you couldn’t put down, so I suppose this could still be considered a proper backpack bug?

Let the devs decide I guess >.>


Ah ok, but then indeed if you toggle all, the uncategorized objects won’t be stored. That’s the drawback I found because I too wanted the none setting by default…

When the game wants to put something in a stockpile, it checks to see if there are any filters on the stockpile. By default, the filter object doesn’t even exist and all options are toggled on. If the filter object doesn’t exist yet, the game automatically allows the item to be put in the stockpile. If there is a filter object, then the game checks to see if the item satisfies one of the filter. If the filter object is empty, this is the same as the filters being set to “none” and no items can be placed. This is all done in LUA.

Unfortunately, this clashes with the way the toggles work in the javascript attached to the html file that creates the stockpile window. In there, if you toggle “ALL” on, it actually just turns every filter tag on. Obviously this is different to the initial state of a stockpile where the filter doesn’t exist.

A relatively simple fix would be to have the “all” button apply it’s own tag that can be checked. If the “ALL” tag is in the filter list and set to “on”, then ignore all the other tags and just let any item into the stockpile! Obviously, you’d have to turn off the “all” tag whenever the “all” toggle is off, but that’s how every other filter works already (with the exception of the “none” button, which isn’t really a filter anyway).

1 Like