Kenshi
Guards Give a Shit (AI Enhancement Mod)
67 Comments
Daichin 26 May @ 4:52am 
Hello, the author. I'm working on my own mod that globally improves interactions with factions and would like to use your mod to integrate it into my mod. Can I do this? I will give you credit
Proddito 27 Dec, 2024 @ 8:54am 
I currently have a weird issue where there are 5 Hundred Guardians blocking the entry into the Squin Armor Shop.
YourLocalFemboy 24 Mar, 2024 @ 2:25pm 
Guards pick up their allies but do not put them in beds just standing there with them!
Kinda cute.
@Stack
Spencer 19 Feb, 2024 @ 12:16pm 
NPCs doing the loop of body picking up and dropping is actually a vanilla bug if I recall, it may not be the related to any mod
如沐烈火 9 Dec, 2023 @ 1:15pm 
When I reload the archive, the problem is solved,any way,thank you for the work.
如沐烈火 9 Dec, 2023 @ 1:09pm 
Great work! It's a good mod indeed, and I had a problem with why NPCs keep picking people up and dropping them, and then switching to another person and repeating the action。
catasmypfp 29 Oct, 2023 @ 11:17pm 
Good mod, but I wish it didn't turn every guard and shopkeeper in the game into little Sherlocks. Knocked out a shopkeeper and two guards facing the opposite direction maybe 20 meters away spun around and started yelling at me. Similarly, stealing is impossible with the mod as well; Take a single simple first aid kit in an empty room while sneaking and the town descends upon you.
For anybody wondering, I fixed it by disabling the mod and importing.
Kindrad  [author] 15 Aug, 2023 @ 9:48pm 
@sullis
Yes.
I haven't got any reports of it not working this year either. I don't think Kenshi has had a major update in well over a year either and that is unlikely to change in the near future.
Sullis 15 Aug, 2023 @ 4:40pm 
Does this mod still work on 2023?
mfjaylotus 29 Jul, 2023 @ 10:07pm 
@skup your comment made me laugh out loud for a few minutes imagining that, hahahaa thanks for the laugh and the heads up man hahaha
VoRoN 31 May, 2023 @ 8:04am 
Useless mod. I raise money by robbing their murdered comrades
jackassik 13 Jan, 2023 @ 10:51am 
I tried making a mod like this myself as I had one of my favourite Bar Keep dying due to beak things and it didn't work. Thanks, I will definitely try this out.
Dhunterz007 11 Oct, 2022 @ 11:13am 
this the mod that i looking for so long,try made one and no success....
Skup 18 Aug, 2022 @ 9:30am 
I loved this mod for it's, what I'll call realism, in the sense that the "guards do give a shit". But I find frankly they give so much of a shit that they have gained powers giving them the sight through walls and earth or maybe simply the vision in their mind of where a downed ally is.

Examples:
1) Even at night from sleeping in their beds (dreaming about their neighbors being burglarized I imagine), shop guards or shopkeepers will come sprinting from other stores, open the door to what should be to them a normally closed shop at night to "find and rescue" the people I assassinated.

2) I lure gate guards away from a gate to fight them in smaller numbers. I win that fight but then some asshole(s) will come running from within the city, who should be oblivious to the entire situation, to "find and rescue" his downed friends.
GE0 19 Dec, 2021 @ 11:31am 
Hello Kindrad,

I am working on a bugfix compilation mod for various issues in Kenshi, and I was wondering if I may add your mod to that compilation? All credit for the original fix will go towards you of course.
StrayBullet 14 Dec, 2021 @ 10:55am 
Mandatory
BackshotBandit 15 Jul, 2021 @ 12:42pm 
it good, subcrib it
mahatmadandy 25 Mar, 2021 @ 2:31am 
Thanks for this explanation and sweet mod :)
Kindrad  [author] 24 Mar, 2021 @ 8:17pm 
@mahatmadandy

I honestly have no idea.

I've not encounter the bug you just described as I've never built cages in a city house before.

Based on what you said it sounds like the police AI just finds the closest allied cage and doesn't check if it's the NPCs faction or the player's faction. I wouldn't put it past the Kenshi AI to do that. Given your description and my experience with Kenshi AI it sounds entirely plausible that that could happen. I have yet to have an allied guard place another downed guard in one of my city houses though.

As for guards hanging out in bed that's just Kenshi AI being kinda dumb. It happens if you were to place KO'd patrolling NPCs into an allied bed yourself as well.
mahatmadandy 24 Mar, 2021 @ 3:23am 
Great mod, thank you x 1000. I wondered if this mod deals with vanilla Kenshi bug, when guards destroy player's doors to get to prison cages and put criminals there, when all other cages in town are full. Would now guards smash your doors and place wounded npcs on player beds, preventing from using beds at all?. And with guards staying in beds idle, even if healed, the only solution would be assasinating and removing them. Byt then new wounded would come and circle continues.....
Davik Shaftler 18 Mar, 2021 @ 7:14am 
@Kindrad
I've seen it happen in the united cities. In some cases i see the npcs Asjodi pointed out being arrested for burglary.
Kindrad  [author] 17 Mar, 2021 @ 9:12pm 
I still haven't experienced that myself so I can't really offer a fix. I'll maintain that faction relations are unchanged, however, so it shouldn't be an issue. Unless the player does something to cause a fight to break out at least.

Is there a particular city/town where it happens frequently?
Davik Shaftler 16 Mar, 2021 @ 6:50pm 
@Lord Pouria Asjodi

I'm noticing that happening as well. I keep having to import because all the shopkeepers in the united cities keep getting arrested and enslaved.
Kindrad  [author] 19 Feb, 2021 @ 5:31pm 
@Lord Pouria Asjodi

No it shouldn't. It adds additional rescue behaviors to the guard ai. It does not, however, alter any of the other behaviors or faction relations.
Lord Pouria Asjodi 19 Feb, 2021 @ 5:40am 
I'm wondering does anyone know if this mod changes anything in regards to faction relationships between AI?

I've installed few new mods to my playlist and in my newest game I've noticed a lot of massive chaotic fights in cities that previously were orderly (UN Samurai attacking Mercs, attacking Shinobi, attacking slave traders, etc..).I'm trying to pinpoint what caused this massive problem.

My assumption is that this mod should not cause any friction in the regard, correct?
Von Avalon 12 Feb, 2021 @ 10:53pm 
@Kindrad its whatever, the mod is still great. kenshi's got its limits and you can only do so much. 10/10 mod baby
Kindrad  [author] 11 Feb, 2021 @ 11:39pm 
@butts
yeah that's just a kenshi thing. It's kinda annoying and I don't how it could be fixed or if it's even possible to fix. Maybe something with more AI fallback options...
Von Avalon 21 Jan, 2021 @ 3:52pm 
im not sure but, when the HN guards put their allies in beds, they dont get out of bed. even after they're fully healed their goals are still aimless and they just lay in bed.
Podunk Noname 14 Jan, 2021 @ 9:22pm 
interesting-
YES please!
Kindrad  [author] 9 Jan, 2021 @ 9:05pm 
@Dix Dark
Thanks.
Come to think of it I do notice that sometimes the AI doesn't seem to "notice" something from time to time and just ignores it. I've seen the patrolling paladins ignore fighting and prioritize healing downed teammates. This mod doesn't touch them so that would probably fall under a problem that can't be fixed through a mod.
Dix Dark 9 Jan, 2021 @ 1:50pm 
Yeah, I've looked into modding this game, and I want to say that it's a real shame that basic AI behavior is hardcoded.

There's too much hardcoded in general(I really want to change some job assignment) :(

Also, that thing with guards happened only once, I couldn't reproduce it.
Kindrad  [author] 5 Jan, 2021 @ 1:06pm 
The guards shouldn't prioritize healing over fighting though as the healing is a lower priority. I can see about tweaking values further but the Kenshi AI ultimately decides what it wants to do and when. The mod basically gives them more behaviors/options of actions they can do but cannot strictly dictate when or if they choose to do it.
Kindrad  [author] 5 Jan, 2021 @ 1:02pm 
For more clarification the AI cannot distinguish between a KO'd squad member and one who is missing their legs. It can only look for "Can't Walk" as an option.
Kindrad  [author] 5 Jan, 2021 @ 12:59pm 
@Dix Dark
I wish the AI could stay in bed till fully healed. That isn't an option for AI. I could see about at least giving the guards the shopkeeper AI as a workaround so they unlock the door and shopkeep. There isn't a terrible amount I can do about that unfortunately. Luckily that isn't very common an occurrence.
qinlongfei 4 Jan, 2021 @ 7:12pm 
Wait, you mean Kenshi NPCs aren't supposed to get disabled from a current play through after the first time they receive a KO?
Tañgle™ 4 Jan, 2021 @ 2:28am 
Very interesting. I am thinking about trying this. But as to what Dix Dark brought up earlier, I would like to see a reply as that may be a damper on it.
Dix Dark 4 Jan, 2021 @ 2:06am 
Shopkeeper got injured(almost lost a leg and has -350 hp on it), now when he tries to unlock his shop in the morning his guard puts him back to bed before the shopkeeper can crawl to the door to unlock it, and it repeats over and over :|
It is funny, but really stupid.

It would be better if the shopkeeper stayed in bed until fully healed...

Also, for some reason sometimes guards prioritizes healing and hauling bodies over fighting, so they getting killed trying to heal and haul...
Napkin (RPKN) 14 Dec, 2020 @ 1:45pm 
Hi, I was looking for minor QoL improvements and came across your mod, thanks for making it. I read the discussion below where you go in-depth about the limitations, thanks for taking your time and energy contributing to the Kenshi community :3
Kindrad  [author] 14 Dec, 2020 @ 1:20am 
@bombed
Thanks. There are some perks to sorta being a game dev as a modder. It's easier to identify what's what when modding.
I can probably go really in depth into how a GOAP (Goal Oriented Action Planner) AI works (I assume thats what kenshi uses) and so forth.
bombed 12 Dec, 2020 @ 5:28pm 
damn dude, was reading it over and was on the fence but seeing you go off about how it all works made me want it more. good work, cant wait to try this out as the bartender in the hub died very early for me
Goat Chease 8 Dec, 2020 @ 11:21pm 
Thanks for the thorough answer, either way the mod helps a lot because they don't sit there for the animals to eat.
Kindrad  [author] 8 Dec, 2020 @ 9:34pm 
@Goat Chease

That being said, that's been bothering me as well. However, as I mentioned there really isn't a good way of doing that. I might investigate the dialogue thing when not swamped with work, however, I don't think much would come of it.
Kindrad  [author] 8 Dec, 2020 @ 9:33pm 
@Goat Chease

Potential solution:

Off the top of my head, I can see possibly looking into abusing the dialogue system which can check if a character is [almost KO'd] and assign the downed guard a new AI temporarily. This would be similar to how dialogue options can override mercenary AI to follow player for a certain amount of time.
Though that would be a significant kludge and would likely break constantly or have unintended side effects. Not to mention it'd be a significantly more invasive alteration and would need special dialogue options for most of the differing guard squads.
Kindrad  [author] 8 Dec, 2020 @ 9:32pm 
@Goat Chease

More thorough technical answer:

The Kenshi AI to my knowledge uses a particular type of planning AI in which you give it tasks and goals. Both are hardcoded and a modder can only choose which goals the AI can use and the importance of each goal. For this mod I gave the Guard AI the extra goals of high importance related to making sure any downed ally is either picked up or in bed. I cannot add a goal for sleeping until healthy. That isn't a "goal" so to speak. Simply that can't accomplish their guarding goal until they wake up. It's a limitation of the particular way the developer decided to implement this planning AI.
Kindrad  [author] 8 Dec, 2020 @ 9:32pm 
@Goat Cheese

Simple Answer:
I am fairly certain that's not possible through modding. At least no in any sort of straightforward easy approach. There isn't a way to check a character for how healthy they are in the AI.
Goat Chease 8 Dec, 2020 @ 4:18pm 
Came to the workshop looking for exactly this, the only problem is the guards don't stay in the bed to heal up. They wobble back to the gates with broken arms and splitting headaches. If you could update it so they at least heal into the positives that would be awesome. Either way thanks for the mod. :lunar2020contentgoat:
Kindrad  [author] 30 Nov, 2020 @ 10:37pm 
@BigRowdy Thanks. Not very many of them sadly, especially for NPCs. Perhaps check out my Bonedog AI mod if you haven't already.
BigRowdy 30 Nov, 2020 @ 10:25pm 
K good mod. AI mods are awesome!
Kindrad  [author] 30 Nov, 2020 @ 9:40pm 
@BigRowdy No import is not required. It should start working on any save.
BigRowdy 30 Nov, 2020 @ 8:49pm 
Import required?