Security for Foundation

Released (updated ago). Ranked 143 of 280 with 3,004 (0 today) downloads

Published by Batyushki (mod ID: 1138186)


Please Note

  • This mod only works with new games
  • Security buildings unlock at 20 villagers, but no Outlaws or Bandits will appear until you have 50 villagers
  • Performance-intensive mod, not recommended for lower spec PCs
  • This mod replaces an older version; you should only load one of the Security mods in a single game


Peace and security must be won by protecting your people from outlaws and bandits, and punishing villagers who step outside the law.

This mod adds a defensive element to the game: you must build Keeps, Towers, Walls and Gates to protect your people from outlaws and bandits. Workplaces built outside the security perimeter will be attacked and villagers will leave to become Outlaws.


The Constable oversees security and works in a Constable's Keep. The keep contains a Prison for captured outlaws. Guards stationed in Guard Towers patrol the streets to prevent trouble. You place Patrol Arrows where you want the guards to patrol.

Every Keep, Tower, Wall, Gate, and Guard adds Security to an area. If a workplace is too far away from security buildings or a patrol route, after two weeks the workers are tempted to steal food, goods and gold. When this happens, villagers become Outlaws. Anyone who has been unemployed for more than two weeks is also at risk of becoming an Outlaw.


These villagers leave the town and go to live in Outlaw Camps. They will try to steal food, goods and gold from unprotected workplaces. You prevent stealing by providing Keeps, Towers, and Guards near workplaces. You can see which buildings require more security by clicking on any security building and going into Edit mode. Green buildings are fully protected; Orange are targets for theft; and Red are at risk of encouraging new outlaws. Plus signs indicate buildings and patrols that generate security. The overlay disappears after 15 seconds, if you want to keep it on, pause the game.

There are two ways to catch outlaws:
• If there is nothing to steal, outlaws will come back to the village to buy food and get water. By placing patrols near markets and wells, you can question villagers and catch outlaws.
• You can place a Rally Point and staff it with guards who will go out and destroy outlaw camps. They will catch any outlaws who are at the camp when they attack.

Captured outlaws become Prisoners in the Constable's Keep. After serving a week's punishment, they are released as unemployed newcomers.

Outlaws cannot generate if 20% of the population has already become outlaws.


Mounted bandits from beyond your borders will sometimes approach the outskirts of your town. Bandits steal from workplaces and recruit villagers to become outlaws. Bandits are only frightened away if there are guards or soldiers nearby when they raid. The best protection against bandits to have walls surrounding the town, with well-guarded gates. Bandits will not raid if they encounter guards or soldiers along their route.


  • You can use towers and keeps from the Lord Manor, Wooden Keep, Giant Gate Masterpiece, Stone Gate Set mod, and Frontier Fortifications mod as guard towers and to generate security for the surrounding area. The patrol arrow has also been added to those buildings (found at the very end of the building part list).
  • Security buildings add residential desirability.
  • There are some workplaces that get an automatic green security rating: Woodcutter's Camp, Stonecutter's Camp, Forester's hut, and Hunter's hut. Outlaws are not interested in stealing from these workplaces which are often placed outside the town without defense.


  • Minotorious showed me how to use behaviour trees, and this mod is only possible because of that
  • RaisinMuffin allowed use of his campfire from Fantasy Decorations for the Rally Point

Detailed explanation of Security Scores

Workplaces get security from…

Constable's Keep

18 points

8 points for the Keep, 6 points for a Constable, 2 points for each Guard


8 points

4 points for the Tower, 2 points for each Guard

Gate or Wall

4 points

2 points for the Gate or Wall, 2 points for the Guard

Patrol Arrows

2 points

Per arrow visited by a Guard (one guard can visit 3-4 arrows each work cycle depending on distance), effect lasts for 5 days

Rally Point

10 points

2 points per Guard (these guards cannot patrol, they only seek out and destroy Outlaw camps)

Wooden Keep

20 points

10 points for the Keep, and 2 points for each Soldier

Frontier Fortifications Keep

10 points

4 points for the Keep, 6 points for the Constable

Frontier Fortifications Tower and Gate

4 points

2 points for the Tower or Gate, 2 points for the Guard

Stone Gate Set

8 points

4 points for any Keep or Tower, and 2 points for each Guard

Security is available in a radius from the generating building…

Less than 5 points

30 metres

Less than 10 points

50 metres

Ten or more points

70 metres

Workplaces that receive…

Less than 5 points

Outlaws will steal items and workers will be tempted to become Outlaws

Less than 10 points

Outlaws will steal items

10 points or more

Fully secure


Common Resources V1














Join the community or sign in with your gaming account to join the conversation:

wykay @wykay


Spind3l @spind3l

This new version of Security doesnt seem to work. I have endless outlaws forming even though 1/4 - 1/3 of my aprox 80 pop village are guards I have green security everywhere (btw the overlay constantly glitches out and disapears have to hit edit like multiple times to see whats going on) I still get outlaws even though I have constable place and 4 towers that according to the bld radius cover every building in my town every tower is full manned at their doors and I even have 2 campfire things fully manned with rally points at every well and market stall that should put them well above 10 pts yet outlaws still spawn! My new town is ****** now wonderful waste of time that was. Can I get the constable buildings else where without this stupid mechanic? as I dont like this at all but I like the buildings I get the attempt but honestly it is very unbalanced and lack feedback the old system was easier to understand. Also I get bandits already I dont even have commoners yet... I shouldn't be forced to build a stone wall at pops less than 100 (where are the wooden options?) makes absolutely no sense nor should you need that many guards and towers it just makes every village not a village basically forces me to build them all as castles...which is not really the point in this game. NTM medieval castles are often supported by multiple villages most castles dont come to be without a few hundred people to support them... which was my plan to build multiple villages and one castle not 5 castles and no villages... this mod is a good idea in theory but currently executed in frustrating ways and does not work as described. Not looking for troubleshooting as the mod is working this is just feedback I wont be using this again as it doesnt allow me to do what I hoped I use most of your other mods and they are great you just missed the mark atm on this one.

Batyushki @batyushki

Hi Spind3l. The overlay disappears after 15 seconds, you need to pause once it appears to see it. It's so you don't have to have it on all the time you are editing a security building, as it gets in the way of seeing the building.

When you get outlaws, is the message Bandit Attack or Villager became Outlaw? If bandit attack, you need to have your security at the edges of the village (at the entrance roads) so that the bandit will encounter a guard on its way. If you get the second message (Villager became an Outlaw) then you have undefended workplaces, or you are not employing newcomers within 14 days. Maybe you're getting unemployed people becoming outlaws?

To be honest I'm not sure why you're having so much trouble, I'd be happy to have you share your save on Discord and I can give you more specific advice. I know I built the mod so it is easier for me, but I rarely have more than 3-4 outlaws and that only when I forget to defend somewhere or don't give people jobs.

Also remember that you can use Frontier Fortifications and Lord Manor as guard towers, so for instance guards can be part of the manor without having to build a separate castle for security.

Spind3l @spind3l

well must be the unemployed ppl that said them automatically becoming outlaws is kind of silly I figured since I still have 10+ pts of security at the town center they wont turn, for example my unemployed folks are surrounded by 3-7 guards, and yet my town center has 3-4 outlaws running around I always tend to keep 3-4 unemployed folks around for flexibility and because 100% employment isnt realistic no place has this. I used to be able to hire them when I need to now I have 0 most of the time and a bunch of outlaws that just get taken prisoner every so often eating food and delaying progress. BTW The bandit randomly shows up just never does anything except be all sus around my warehouses but I get no message for an attack. Like I said I think its working as it should I just dont get why I cant prevent outlaw creation outright. Any chance you have these awesome buildings in another set without the security mechanic? I assume your not going to change the unemployed automatically becoming outlaws even if I have more guards then unemployed around them which does mess my play style up unfortunately but I understand you cant cater to everyone

Batyushki @batyushki

I can understand why you manage it that way, I set the delay to 14 days and then there is a 20 percent chance of them turning outlaws if still unemployed. One workaround is to put them in builder huts which are instant builds, then reassign them from there. I will consider releasing the buildings separately, great idea.

As far as why I have unemployed people become outlaws even when they are in the middle of the town - they prefer stealing to being unemployed, when you have no job you have nothing to keep you occupied and crime seems more appealing. I have always wanted logic to make unemployment a problem (besides just general unhappiness). People can become criminals even when they are surrounded by police, it's just harder to commit crime then.

SapphicDentistry @sapphicdentistry

Howdily-doodily, big fan of the mods. I have a weird issue going on with my new save regarding security. I created the constable's keep, created a rally point (hadn't read close enough to realize what they were exactly for), went from 49-53 villagers, and then suddenly started having freezes that last around 33 seconds (according to my stopwatch). It then goes for about 10 seconds with no problem, and then another half-minute-freeze.

I've never encountered anything like this before in this game, and I can't quite see any mod I have downloaded that may conflict with this one. It ~seems~ like it's occurring when a villager or villagers go full outlaw-country (more specifically, when the notification pops up) as the freeze typically occurs when the village center shows more outlaws are "employed". However, this freeze will even occur for the same length of time when no villagers become outlaws.

Here's my modlist: - and I've been playing on Thracian Valley. If there is anything I can do to help, or if you see any way for me to fix it, please let me know!

Batyushki @batyushki

Hi SapphicDentistry can you please contact me on the Foundation Discord server so that I can get your save file, I will need to investigate. It might be a mod conflict or specific to that map.

Batyushki @batyushki

Issue is now fixed for Thracian Valley map.

Thestoryquietlyended @thestoryquietlyended

Why are there unassigned workers and resources full when I build the city center after installing security for foundation mods? I move my mouse to the city center. Resources are full and unassigned workers are displayed. I want to assign and do not respond to the newly opened archive. Other buildings have not been built. Can you reply? thank

Batyushki @batyushki

Thestoryquietlyended I'm not sure exactly what you mean, can you contact me on Discord and we can look at this together.

WorngSpellign @worngspellign

Hi, great job with the mod. For me it is really good and way more challenging because security need more people and more resources (food, house, etc.). Really need to work hard to plan ahead for that needs. I'm about hit 500 population and still not soldier yet cause security tend to consume more resources. Love it :)

Hiramas @hiramas

Hey there, love your mods, they integrate so well together.
Is the fact that Outlaws can still be hired away from being an outlaw a known bug? Or just a limitation of the game?

Batyushki @batyushki

Hiramas it's a limitation of the game. However I put in some code so that if you do this, the next day they should switch back to an outlaw.

KlausJr1630787196 @klausjr1630787196

Neat concept until my entire food supply ran out due to 10 outlaws and 5 prisoners. Might be good to balance out the cap until a higher population. 10 outlaws, 5 prisoners and 5+ guards is almost half the population at 50 and recovering with no food supply/labor is impossible.

Keestap @keestap

Just a quick tip, I've found stopping immigration just before 50 pop and making sure everything is covered with security helps. You might need to just let your village run for a bit to build up resources but it's better than losing pop to outlaws.

Batyushki @batyushki

No question this is a mod that increases difficulty. It's not too hard though if you expand your security as you expand the town. The 5 prisoners will quickly return to the village. Can you not redirect some of the existing workers that aren't guards or outlaws to produce food? Good luck and hopefully it goes better next time.

KlausJr1630787196 @klausjr1630787196

It was hard to keep up with the rate of stealing vs food production. this also diverted labor from building/polished stone and other resources. I had built a little to aggressively so my running costs caught up and I was unable to counteract the rate of villagers becoming outlaws and improving the town to raise comfort. It ended in a loop of barely recovering until a storm hit and food production dropped. The rate at which prisoners return was a little slow. The time to outlaw, getting caught, prisoner for one individual was bout 1.5-2 weeks. Perhaps introduce a mechanic where outlaws are turned away at the gates/ the ability to remove their impact on the comfort/happiness. At the very least make a "poor" option to build security without needing so much polished stone? That resource was my downfall.

Batyushki @batyushki

To help with the polished stone issue, I recommend using frontier fortifications or lord manor, those towers are relatively cheap and can house guards.

daepa @daepa

Hey there, loving the update trend these days, I'm really enjoying the revamped mods you've been working on.
I recently got the Security unlock notification after getting to 20 villagers, but I ran into a couple of issues.
First, the Frontier Fortifications building doesn't seem to have Security integrated; there're no patrol arrows or descriptions to the towers/gates saying that they provide security.
Second, I built a guard tower with the Lord Manor and put a rally point down with the Security building, but I'm not getting any of the green/orange/red icons like in the second screenshot you provided when I go into edit mode with those buildings. Do I need to wait a week or two in-game for Security to get integrated with my save?

daepa @daepa

Just in case it helps, I have Security loaded after each of the mods specified in the Other section.

Batyushki @batyushki

daepa Hi there, thanks for contacting me. You will need a tower or keep from the Security monument, when you right-click that you'll see the security scores. They won't show on the other mods that have security functions, only the Security monument itself.

The patrol point should be placed from the same monument - in your case the patrol from the Lord Manor tower should be placed from within the Lord Manor monument (the patrol arrow should be at the bottom of the parts list).

As for why Frontier Fortifications doesn't have security functions, I'm not sure. It's working for me when Security is lower in the list than Frontier Fortifications. Could you contact me on Discord and I can help you troubleshoot further? I'm able to add a guard to a Frontier tower as soon as I build one, even before 50 villagers.

daepa @daepa

Thanks for the super quick reply! I do see the patrol arrow in the Lord Manor, but I don't seem to see it on the Stone Gate Set either. I'll check again with my load order.

For the Frontier Fortifications problem, I can add guards to the Frontier towers, but they don't have a radius or Security descriptions. Should I DM you on Discord or would you rather I create a thread?

Batyushki @batyushki

Feel free to create a thread on discord in moddng general