Kenshi
109 ratings
Layken's Slave-murder fix
2
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
12.758 KB
Dec 5, 2020 @ 12:46am
1 Change Note ( view )

Subscribe to download
Layken's Slave-murder fix

Description
Fixes slavers killing captured slaves by looting their death item.
This mod will only have an effect IF you use a death-item/execute mod


I've been using a custom made kill-item mod for ages now (Tainted Blood, an other mod by me) but as with all other mods like mine, there is one fatal flaw... slavery. The issue is that when an unconcious NPC is being enslaved by a slaver, the slaver loots the NPC's weapons, armor AND it's death item. The result ofcourse, is that once the NPC is enslaved, it dies instantly, leaving the slaver with a "OH come on!!!"-moment.
You can try limiting as many NPC's as possible having the item, to avoid them being killed by looters/slavers or deal with the fact that alot of NPCs will die when being looted, contributing over time to kenshi's "Empty-world effect". Based on a cryptic comment somewhere on the internet, the user probably not being fluent in english, I managed to understand what he implied and use it to make this fix. (credit to Kalims on Nexusmods).
This fix essentially bypasses a small part of the enslavement AI-script, which makes slavers ONLY loot the weapons of an enslaved NPC, and not the inventory or armor, preventing the slaver from killing the NPC.

This is not a solution to an age old problem, but more like an alternative. Seeing a fully armored samurai slave is a bit immersion-killing... but they won't be dead as soon as they are looted and shackled.

Make of this what you will, I will not bugfix this (there realy isn't anything to bugfix), this is my way of sharing what I found with the community.

DISCLAIMER! To be perfectly clear, and at the risk of repeating myself; this mod on it's own won't do you any good, you will need one of these :
- Kill item!
-Execute Enemy
-Any other similar mod, adding an item to NPC inventories that will kill-on-loot.

This fix will work with any mod like it. Only incompatibilities that could come to mind are mods who radically change vanilla AI scripts related to slavery, and even then I don't believe anyone would go about messing with these scripts specifically.
29 Comments
Nox Feb 28 @ 7:08pm 
Is there no way to do cohesive code modding in Kenshi?

I feel like the root fix would be to change the slaver loot script to avoid death items.
Three-legged Wolf  [author] May 22, 2023 @ 4:26am 
@weißes Licht unfortunately no. The Ai Script for enslavement loots both armor and items from inventory. To make this mod possible I had to bypass that script.
weißes Licht May 21, 2023 @ 7:06pm 
there is no way that make slaver take the armors, without take the inventory??
Three-legged Wolf  [author] Jun 16, 2022 @ 2:42pm 
@z.drone indeed. You play with Genesis I take it? In vanilla kenshi, npc's tend to run around with far less food as I remember it. But yeah, it does feel stupid at times. If you do find out another way of dealing with the problem, please do let me/us know :p.
SlothOfDoom Jun 15, 2022 @ 8:04pm 
@Three-legged Wolf It just doesn't look or feel like slavery if they leave armors on and inventories full of med kits and/or food items that are for good reason meant to leave characters in a hunger state, slow, and vulnerable.
Three-legged Wolf  [author] Jun 15, 2022 @ 3:17pm 
@z.drone I don't fully understand why you are looking for an alternate solution to the problem, since this very mod allready fixes it. Are you somehow bothered by the fact slavers don't loot inventories completely, for some reason? Just curious.
Three-legged Wolf  [author] Jun 15, 2022 @ 3:15pm 
@z.drone well aside from this very mod? not that I know of. This "enslavement-causes-slaves-to-die" problem has plagued death-item mods since the very beginning, and as far as I'm aware, I'm the only one who found a viable solution. The other solution would be to closely monitor and cherry-pick which NPC's get the death-item (which is kind of annoying and a very long process). But no, you can not make your solution work. There is no possible scenario that I can think of where u'd be able to fit a death-item into an equipment slot. Modders basically applied the "kill on loot" from looting downed animals, to humanoid NPC's. As such the death item can not be equipped. In theory, you could make the death-item into an armor-piece if the FCS allows it (don't think it will), but even then, it'd be a piece of armor in an NPC's inventory that would get looted by slavers anyway.
SlothOfDoom Jun 15, 2022 @ 2:14pm 
@Three-legged Wolf Ahh yeah. I didn't realize it had to be armor item. Is there a way to resolve the conflict in the belt slot to allow death items? Cuz that would solve the problem of slavers killing all the prisoners.
Three-legged Wolf  [author] Jun 9, 2022 @ 6:10am 
@z.drone the reason it crashes, if I had to make an educated guess, is because only equipment-type items are allowed in belt slot. Only armor can be placed in belt-slot, if the execute-item is armor, it can't be a death-item, and if it is to be a death-item, it can't be armor. Your solution can not work because both types are mutually exclusive. I would guess that your game crashes at the exact moment it tries to resolve this paradox by "equipping a non-equipment item" upon new NPC spawning. I hope I made sense ^^. But in short; Death-items must be an item inside inventory.
SlothOfDoom Jun 9, 2022 @ 5:04am 
@Three-legged Wolf I tried fixing exactly what this mod is meant to. The item I'm talking about is the "execute" item added by "Execute Enemy" listed in your very own DISCLAIMER. You can change it to the belt slot in the fcs. I figured that would work since slavers don't loot items from that slot. I got it to work but the game crashes after a few minutes whenever I make the change. Idk why.