[1.0.6B] AI Infinite Loop Destroys My Entire Economy (savegame)

My settlement is in the middle of the map; plenty of food being produced there.
I have a small military outpost in a hill up north, close to the enemy spawn.
My soldiers used to have a lot of Scurvy, so to help with that problem, I placed a root cellar next to their outpost and set meat+vegetables+fruit as a minimum stock of 50 units each.


A couple of months after doing so, the game’s AI collapsed my entire economy just because of this one root cellar.

The infinite loop:

  1. They initially stocked the root cellar correctly with 50 units of everything
  2. A soldier grabs 2 units of food, and the stock drops below 50 units
  3. A villager in the middle of town is tasked with traveling north to restock
  4. That villager reaches the top of the hill with 2 units of food and deposits them. Done.
  5. But that villager is now hungry, and grabs 2 units of food from that SAME root cellar
  6. Once again, the stock drops below 50 units
  7. Repeat from step 3 until the end of time…

They literally do this, uninterrupted, all year. Every time a soldier gets hungry, another villager enters the infinite loop. After some time, over 100 laborers were walking up the hill with 2 units of food each. Nobody would chop wood, mine stone, grab berries or nuts, or do anything else in town as my 500 pop game’s entire economy started collapsing.

Later I was forced to move the root cellar back to the middle of town. The infinite loop stopped. But now I’m forcing my army to travel a long distance to get food, which is a horrible setup considering I need them ready to fight ASAP as a priority.

Savegame at the end of the previous year is called “Korvakstan y43”. To reproduce the bug, load that savegame and let the game run for a couple of months until the middle of summer to see the infinite loop happening. Check the cobbled road to the north-east. All the food dropped on the ground mid-winter is the symptom of the bug happening from the previous year and continuing into the next year.

We’d probably need a third storage quota introduced for a fix, not just Minimum and Maximum but a “Refill-to” or “Target” quota.

While waiting for a fix, you could place a Temporary Shelter next to your outpost instead. It’s supplied via wagon and has the additional benefit of not attracting rats. Another option is to place a few blueberry bushes and let your arborists plant a few fruit trees in the vicinity against scurvy. Hungry villagers would also take out food of a nearby forager shack, again no rat problem.

3 Likes

But soldiers never take shelter inside of Temporary Shelters.
Do they grab food from a Temporary Shelter anyway?
If so, that could work for my situation.

I think soldiers just magically replenish their food supplies. At least that how it worked days before.

PS. But putting that thing aside the idea about refill quota for storages is very decent. I would like to have that in the game.

3 Likes

Villagers don’t need to take shelter to grab food from it, but I think @mrCat is right. I remember now that was a thing, but I’m not sure it still is. Maybe they would get their food replenished from what’s stocked in their homes? Check if their homes are stocked by a market.

1 Like

Yes, all homes are close to fully staffed upgraded markets serving about 25 residences each, no problems there.
I don’t believe that the “magically resupply food” theory is accurate.
I kinda remember seeing soldiers “Seeking Food” after garrisoning post-war.
Also I used to have a lot of Scurvy in the army because the barracks where close to my smoked meat industry. Then when I added the nearby root cellar with vegetables, Scurvy stopped happening. Only when I moved everything (including the root cellar) far to the north did the infinite-loop issue start happening.
Anyway, I will do some tests for these ideas.

I don’t think we need more storage options in the buildings. We just need smarter AI.
If a root cellar has min=50greens and max=100greens, then when green drops to 48 they should aim for (at least) 75greens as average stock and have 1 villager carry 27 units back, instead of just 2.

Or use the same system for production quotas which stops certain industries from working and then starts them again. That system currently works pretty well.

I’d love to see military buildings being stocked by carts directly with firewood, food, weapons and perhaps medicine for faster healing

Addendum: that would resolve the issue of soldier’s relying on local storages for food, but not the underlying issue with the logistics logic, although those issues appear to happen in rare circumstances only

1 Like