Patrol pathing improvement

Recently I’ve noticed every time I order my guards to intercept an intrusion in my town they run from the other end (where my farm is located). Seeing that they mostly spend their time there I wondered why that’s the case.

Assumption: afaik every town-owned plot of land (building, stockpile, farm plot) is a possible “generator” for patrol routes. When it is selected as the next “guarded object”, routing code usually draws a simple rectangle around it and then sends your squad that way.
The problem is, as soon as you get a farmer you usually need 3-5 plots of farmland, later this number increases to 5-7 (thread for sewing, medical herbs, late-game veggies). At the same time the number of buildings is usually rather small and amounts to 5-7 tops. Meaning, if stockpiles, buildings and separate farm plots are processed as separate “guarded objects”, farm plots occupy half of the list, therefore your guards will spend about half their time patrolling the farm.
The farm itself can be planned in many ways but is generally comparatively compact, equal to a couple of buildings. As a result, your guards will spend half of their patrols at a small plot of land, leaving the rest of the town unguarded.

Suggestion: I see three ways to fix the problem (if it really exists):

  1. When selecting the next guarded object for planning a patrol, process small objects located close to each other as a single object
  • That will lead to the compact farm being considered a “single object”. Cons: we won’t see guards walking in between rows of corn as we do now: not very practical but it looks cool.
  1. When selecting the next guarded object ignore those that are too close to the current one
  • Will need some fine-tuning about “how close should an object be to be ignored”, otherwise we will see our guards constantly walking across the whole town, which may be more efficient but isn’t very realistic (patrolling is usually done in succession)
  1. Keep a small “history” of patrolled points and use it to avoid recently patrolled objects
  • Can probably be a good addition to 2 (“ignore” proximity being set to “very close” to avoid running across the whole town). So the guards won’t constantly patrol objects that are very close to each other, and in addition won’t patrol points they have already been at 2 minutes ago.

Does this have any relevance? Did anyone else notice the thing with guards endlessly patrolling your carrots?


In one of my early games they would just constantly get in the way walking around my bunch of crates, and I’ve always thought it’s a bit silly how much they care about patrolling farms. I’m sure the farmers can watch fields better than them!


Honestly, I feel the guard path should be the registered boarder of player space. A few updates ago, it was noted for goblin spawning that the system marks where player space is or isn’t. So why not just have the guards patrol the outskirts of said space?

If you had a city, it’d keep them on the walls, and if you have a scattered town, you can always tell them to go into the heart of it, but at least this would protect the borders.

1 Like