Jump to content

[Kenshi] Player Can Enslave


Recommended Posts

Posted

Thank you very much for your kind answer. I just realizing I wrote a lot.

 

About keep the npc slave wounded:

 

There is this Enum: "Beat Cage Occupant"

https://kenshi-modding.fandom.com/wiki/FCS:_Goals

I saw that Npc can use it, so I guess that player can too?

 

 

Recruit slave npc with items:

Recruit prisoners mod and immersive taming mod have such mechanics for recruiting.

 

Example: slave starving bandit can be recruited with food, etc.

 

Slave camp problem

Is it complicated to edit the save? I found I guide for checking world states via quick saves. Is it related?

Posted (edited)

  

  

3 hours ago, jerichoz said:

About keep the npc slave wounded:

 

There is this Enum: "Beat Cage Occupant"

https://kenshi-modding.fandom.com/wiki/FCS:_Goals

I saw that Npc can use it, so I guess that player can too?

 

I hadn't noticed this enum.

If the enum works, it could work. However, it doesn't change the problem much, whether you use ‘cannibalism’ or ‘beat cage occupant’, you have to use the trick used in ‘Player AI’ to make an AI package active on Player characters (AI packages is obviously designed for NPCs only, cause Player characters are supposed to be managed by the Player), which means having a dedicated squad to beat the cage occupants and starting a new game or reimporting a game. Then all you have to do is move the ‘beating’ characters into this squad.


Another solution would be to have your slaves beat the cage occupants (adding a new feature to the Player order of Player Can Enslave and using an AI Contract). It would be less RolePlay but simpler to set up

 

 

3 hours ago, jerichoz said:

Recruit slave npc with items:

Recruit prisoners mod and immersive taming mod have such mechanics for recruiting.

 

Example: slave starving bandit can be recruited with food, etc.

 

You can do this with a ‘Target Has Item’ Condition, provided that in the Dialogue Target is the Player. But you'll notice that there's nothing for testing weapons and armour.

 

 

 

3 hours ago, jerichoz said:

Slave camp problem

Is it complicated to edit the save? I found I guide for checking world states via quick saves. Is it related?

 

Not really, the most difficult part is to remember how to do it. It took me a few hours but I finally managed to remember, but it's late and I'll post it later.

Edited by Machiavelique
Posted (edited)

The main page has been updated.
I added a 8°) KNOWN PROBLEMS section where I explain how to edit the owner of a building in a save file

Edited by Machiavelique
  • 4 months later...
Posted (edited)

What do you do when the slave refuses to speak with you? When you talk to them and they say stuff like "I won't work for you" or "I refuse to be treated like this" ect.

I assume it is the stubborn mechanic you talk about in your mod description. But how do I get them out of it so I can talk to them and bring up the menu again?

Okay I figured it out. While I was testing it thinking that time would cause them to be un-stubborn a Shek ran in and decked the slave in the face and that caused a dialog to come out about how they will listen now.

One more question. What jobs are slaves able to do? I can't seem to get them to water the crops. Do you know the capabilities of the stage one slaves?

Edited by fgdfg2asdas
Posted

They can work in any building with a ‘ * ’ but they can't bring raw materials to the building. Unfortunately, this means they can't water the crops or bring wheat into the grain silos (so you have to load the silos with wheat and the crops with water yourself).

 

The reason is that I'm not able to get them to do that kind of work. In the FCS, there are AI packages for that, but no matter how many tests I wanted to run, it never worked.

  • 4 weeks later...
Posted

No I didn't make any change since october 30 2024.
And the latest update was precisely the addition of slave clothes


 

Quote

 

V1.0.3

 

- Added the "Slave dress_v.a006" from Ears (collar + rag skirt + rag skirt short) as craftable shackles/clothes

- Added a craftable "Crop top" shirt to go with Ears' slave dresses.

- Added a new research "Fashion Slave" which unlock craftable slave outfits above (require Research Bench II)

- Added a new research  "Fashion Slave - Colour everywhere" which unlock craftable coloured slave outfits (require Research Bench III)

 

 

Posted

Then what could be the issue? It's especially the collar where after I craft it, the item icon is simply a grey rectangle with a stretched red X on top. The other clothing items don't show when equipped, and either has a grey rectangle icon or none at all. 

 

Also, is enslaving only limited to healing prisoners in PLAYER OUTPOST's cages? I have started a slave camp with only *buildings that belong to the player faction (no outpost), but it won't trigger the slavery prompt when I try the regular healing and caging method. 

Posted
1 hour ago, fasdfasffasdf said:

Then what could be the issue? It's especially the collar where after I craft it, the item icon is simply a grey rectangle with a stretched red X on top. The other clothing items don't show when equipped, and either has a grey rectangle icon or none at all. 

 

This typically looks like problems with links or missing textures/icons.
I haven't made any changes so the links haven't been able to change, so you need to make sure the textures/meshes/icones are in place.

 

The collar icon should appear in your inventory, if in mods\Player Can Enslave\icons you have a Collar.png

 

another example of what you should have in mods\Player Can Enslave\icons\Clothes\CropTop:

CropTop.JPG.d222e35e099d1af2db2aadcb2c1e7cfb.JPG

 

etc you need to start by checking with the source file that everything is as it should be

 

1 hour ago, fasdfasffasdf said:

Also, is enslaving only limited to healing prisoners in PLAYER OUTPOST's cages? I have started a slave camp with only *buildings that belong to the player faction (no outpost), but it won't trigger the slavery prompt when I try the regular healing and caging method. 


Yes, it's deliberately restricted to the Player Outpost. iirc It is not possible to test the owner of a building, so either restrict it to the Player outpost or allow it everywhere (including cages in other faction towns).

Posted

Thanks, everything else works now.

 

54 minutes ago, Machiavelique said:

Yes, it's deliberately restricted to the Player Outpost. iirc It is not possible to test the owner of a building, so either restrict it to the Player outpost or allow it everywhere (including cages in other faction towns).

 

How can I restrict it or remove the restriction? What about the inside/outside condition for the cage? If I allow it everywhere will the NPC also get the ability to enslave when healing a character in a cage?

Posted (edited)
On 4/10/2025 at 1:14 AM, fasdfasffasdf said:

How can I restrict it or remove the restriction? What about the inside/outside condition for the cage? If I allow it everywhere will the NPC also get the ability to enslave when healing a character in a cage?

 

 

image.png.46d9405f884e08d551b5f7c5d51ae3e1.png

 

 

In *Player's Slave Dialogue Package

On the left windows you have Events
On the middle windows you have dialogues for the Event selected

On the top right windows you have conditions to start the selected dialogue

On the right windows you have others conditions to start the selected dialogue
 

Example, If you look at the above picture:
On Event "Healing other start", there are differents dialogues which can start (*Capture a slave, *Recapture a slave, *Changing slavemaster (on Player) etc)

The "*Capture a slave" dialogue will start if all conditions are met (T_TARGET is character healed, T_ME is the healer)
So if you remove T_TARGET DC_IN_A_PLAYER_TOWN == 1 this dialogue will start everywhere (whether or not the healed caracter is in a Player Town) if the others conditions are met of course.

 

 

Be aware that removing conditions can break things, because if several dialogues can begin, only the dialogue with the highest priority will start.
Priority is determined by score bonus (right-hand window). The higher the score bonus, the higher the priority level.

If two dialogues meet all the conditions and have the same priority, then the game engine will use the percentage chance of each dialogue (right-hand window) to determine which one wins (it's a ratio so if they both have 100%, each gets 50%).

 

Also be aware that characters don't just have one Dialogue Package, they usually have several (and each of them can also have ‘Healing_Other_Start’ events with their own conditions).

 

Clearly, making changes isn't that simple and you need to think carefully about what you're doing.
For example, if you remove all the conditions in the ‘*Capture slave’ from the ‘Player's slave’ Dialogue Package while keeping the same priority level, you'll block all the other Healing_Others_Start events that have a lower priority (so they could only be displayed if the character concerned doesn't have a Player's slave Dialogue Package attached).

Edited by Machiavelique
Posted (edited)

I cheesed the game by building a slave camp just far enough from the base for slaves to work but also close enough to connect it using the walls. So while it meant no more needing to edit the mod, I came across a new glitch. 

 

I used the map editor (shift + f12) to place the *player's slave camp in game to make the cheesing possible, but after saving it seemed to have corrupted all my save files. 

 

Now everytime I start a new game or load an old save, it shows that there's already a *player's slave camp placed in game somewhere (which it shouldn't have any pre existing one at all). I can't do anything but to create a second copy of the slave camp, nor am I able to delete or move the first one. Restarting the game or turning on/off the mod doesn't get rid of the slave camp marker either. 

 

So, is there a way to permanently keep a movable *player's slave camp in game without having to build a new one everytime I load a save?

 

Edit: I found a way to save it by using shift f12 and save to mod. Then relaunching the game will load *player's slave camp as a permanent town. 

Edited by fasdfasffasdf
Posted

What's the probability for a first stage slave NPC to trigger the join player squad dialogue? I got it once randomly from a worker slave, but it failed to convince him and now nothing has happened ever since (~10 in game days). 

Posted (edited)

The probability of triggering this dialogue when this event occurs is:

- 20% when the slave has an AI contrat "Working Slave*" and is outside the cage (so between 5am and 11pm)

- 0% between 11pm and 5am.


So it's as if the probability is 15% this event occurs.

This dialogue is triggered according to random rules (there is therefore an infinitely zero probability that it will never occur).

If a slave spent 10 days without triggering this dialogue, this is perfectly normal given the probabilities I've configured.

 


To be more precise:
When you order your slave to work, he will work for a certain amount of time (between 18h and 115h). Once the cooldown is over, if the slave isn't in the cage, he can either start a dialogue to get him to join your team, or rebel, or automatically repeat a new work period (between 18h and 252h). If, on the other hand, the slave was caged, he will automatically repeat a new work period (between 12h and 132h).

 

The chances of a slave working for a short, medium or long period are not the same.
When I mentioned between 18h and 252h, he has :
- 6% repeat an 18h period

- 13% repeat an 36h period

- 16% repeat an 72h period

- 20% repeat an 126h period (or rebel and attack, but with a low percentage)

- 13% repeat an 162h period

- 8% repeat an 198h period
- 4% repeat a 252h period

- 20% trigger the dialog that allows you to try to convert him
 

 

If you look at these probabilities, you'll soon realise that 10 days is an entirely plausible timeframe and that this is indeed the expected behaviour.

If you have any doubts, you can say to your slave: ‘Stop, don't do anything’, then ‘Come on, work!’ This will reset his work period to between 18h and 115h (but maybe that period was about to end, you can't know that and that's the whole point).

Edited by Machiavelique
Posted

Yes looking back now you're right about the stats because I just got 2 slaves triggering the recruit dialogue back to back. Could you show where those numbers are configured in the FCS? I looked into it earlier and couldn't find anything related: the trigger event, the probability, the AI reactions, etc. 

Another thing I'd like to ask is what's the probability for successfully persuading NPC into joining. I failed to convince them everytime (using the third recruit dialogue option), and I saw in the FCS that there are two versions of the same recruit dialogue based on a STRONGER THAN PLAYER condition, which I also have no clue about. 

Regardless, much appreciation goes to this great mod that is singlehandedly motivating me to keep playing Kenshi. 

Posted (edited)
On 4/14/2025 at 4:07 AM, fasdfasffasdf said:

Yes looking back now you're right about the stats because I just got 2 slaves triggering the recruit dialogue back to back. Could you show where those numbers are configured in the FCS? I looked into it earlier and couldn't find anything related: the trigger event, the probability, the AI reactions, etc. 

 

Capture.JPG.758ded521d95c30cdef2c01c046a064f.JPG

 

 

On 4/11/2025 at 9:00 PM, Machiavelique said:

If two dialogues meet all the conditions and have the same priority, then the game engine will use the percentage chance of each dialogue (right-hand window) to determine which one wins (it's a ratio so if they both have 100%, each gets 50%).


In the above picture you have 8 dialogues with the same conditions (T_ME DC_IS_IMPRISONED == 0) and the same score bonus (0)
It's a ratio so the probability to trigger the first dialogue (the one selected on the above picture) is 100/500 => 100/(100+30+65+80+100+65+40+20) = 20%

 

The probability to trigger the one with (T_ME DC_IS_IMPRISONED == 1) is 100% cause there is only 1 dialogue with 100% chance

 

 

 

 

 

 

 

 

On 4/14/2025 at 4:07 AM, fasdfasffasdf said:

Another thing I'd like to ask is what's the probability for successfully persuading NPC into joining. I failed to convince them everytime (using the third recruit dialogue option), and I saw in the FCS that there are two versions of the same recruit dialogue based on a STRONGER THAN PLAYER condition, which I also have no clue about


These probabilities are a little less obvious to calculate. Basically, you have to sum up all the probabilities that allow the ‘JOIN SQUAD’ to be triggered, so I'm going to find it hard to explain in such detail, but it follows the same logic as what was explained earlier about the probability of triggering dialogues when they have the same score bonus and their conditions are valid.

Slave weaker than slave master:

15/152  * 75/175    =  0.0423  =   4.23%
30/152  * 100/300  =  0.0658   =  6.58%
7/152                                        =  4.61%

TOTAL                                          15.42%

 

Slave stronger than slave master:
15/145  * 15/100  =  0.0156  =  1.56%
30/145  * 30/400  =  0.0155  =  1.55%

TOTAL                                        3.11%

 

So the chance the slave join your team when this dialogue is triggered is:

- 3.11% when the slave is stronger than the slave master

- 15.42% when the slave is weaker than the slave master

Edited by Machiavelique
Posted

I see it now, thanks for the long reply and explaining in detail. 

 

Another thing, the mod description says that emancipated playable slaves have a chance to betray? I unlocked some of my converted slaves' shackles using the key, and the slave status just went away. There was no ex-slave or old slave label.

 

So, what does the betrayal mean? Will they randomly just leave the player squad or are they at the final stage already?

Posted (edited)
1 hour ago, fasdfasffasdf said:

I unlocked some of my converted slaves' shackles using the key, and the slave status just went away. There was no ex-slave or old slave label.

 

This is indeed the expected behavior, so everything's fine.

If they approach an NPC squad, they can indeed leave your team and join their squad. However, if they don't approach a squad of NPCs, they won't be able to progress in the conversion phase (this is done on purpose).

 

The chances of betrayal are reasonably low (10 or 15% don't remember and I din't open FCS to see) and decrease as the slave progresses through the conversion phase (at the end it's maybe 1% 2% or 3%).

I think I've set the total probability of betrayal at 20% (what I mean by that is the sum of the probabilities of all phases combined).

Edited by Machiavelique
  • 2 weeks later...
Posted

I created an account just to comment on this mod. Although I really think the process of purchasing slaves is quite effective. I honestly have a lot of trouble capturing slaves and making them my own. I'm not sure exactly what I'm doing wrong, I'm wondering if recruit prisoners mod is messing with the mod somehow, I have uninstalled it and I still can't recruit slaves properly. 

Posted (edited)

The slave buying process is unfortunately the most unstable feature, as it requires you to always buy your slaves with the 1st member of your 1st squad (if you change the position of the 1st member of your 1st squad or move him to another squad, your character's icon can definitely turn to black into dialogue).

 

 

Compatibility between Player Can Enslave & RecruitPrisoners:

Quote

On the RecruitPrisoners FAQ:

You will need to have prisoner cages built within your base to use this. Once you have some, find an NPC you want to capture and is usable in the mod, knock them out or attack them until they're unconscious, then take them to your cage and talk to them when they're awake. Follow the dialogue tree and fufill what they need to recruit them to have them join you.

 

 

This means that RecruitPrisoners triggers dialogues when you talk to NPCs who are locked in cages (as does Player Can Enslave).
The two mods could therefore have compatibility problems

I quickly checked RecruitPrisoners and:
- It uses lower priority dialogues than Player Can Enslave
- Most of its dialogues have a cooldown (which prevents them from being triggered several times in a row).

Overall, the 2 mods seem compatible to me.

 

 

The expected behaviour is that Player Can Enslave should take over from RecruitPrisoners. Which is a really good thing, because Player Can Enslave requires a lot of conditions for its dialogues to be triggered. To recruit prisoners, you should therefore be able to use both the Player Can Enslave dialogue system and the RecruitPrisoners system, simply by playing on their conditions.

 

To put it more simply:
- Don't put locked shackles on NPCs and you'll inevitably use the RecruitPrisoners dialogue system.
- Put locked shackles on NPCs and (if the other conditions are met), you'll go through the Player Can Enslave dialogue system (because it has priority over RecruitPrisoners).

 

 

So why it doesn't work?

Either I've misunderstood how RecruitPrisoners works, or you haven't followed the steps in the guide:

On 1/7/2024 at 1:25 AM, Machiavelique said:

So to capture a slave you have to:
- Not be ally with anti-slavers.
- Make sure s/he injuries but not KO.
- Lock her/him in a "Prisonner Cage" in your outpost (and inside a building).
- Chains her/him with a "*Light Prisonner Shackle" (or higher shackle), then you can see your slave will got the "Escaped slave" status (the slave must have locked shackles).
- Make sure your slave is conscious (not KO) and start healing her/him to start the capture dialog and make her/him your own (the character who heals her/him will be her/him "slavemaster").
- A "selling slave" windows popup. Just sell the slave for 1 cat (this means you'll earn 1 cat).
- Now the slave is yours, s/he got the "Slave" status and when you mouse over the status you'll see the name of her/him master/mistress (except for some characters where the name display is buggy).
- (Wait the end of the dialogue before capture another one).
- Keep your slave in cage and talk to her/him (sometimes the bubble doesn't appear and you just have to pick up your slave and put her/him back in the cage). Select "Come on, let's start by getting you out of your cage".
- After that, your will be able to give order to your slave. Here I recommend to immediatly give the command "Stop! Don't do anything!" to avoid a minor bug (see the "4.4 Player Order/Get out of your cage!" section for more details).

 

Note: You can capture slaves from other factions if their shackles are still locked. Just follow the procedure above and ignore the chaining step as the slave is already chained.

 

 

 

 

Edited by Machiavelique
Posted

Thanks for the reply! I was able to actually get it working but for some reason after the slave is captured the dialogue tree bubble doesn't appear. I tried picking them up and putting them back in and I'm still having trouble. Any suggestions?  

Posted (edited)

Not really, I've never encountered any problems, and I've tested this mod extensively both before and after it was released. The only idea that comes to mind is another mod that prevents this dialogue from being triggered or that you try to capture a non-vanilla character who has a dialogue package player that inherits a vanilla dialogue package player (which would explain why the healing event work for the capture dialogue) but doesn't have a dialogue package that inherits a vanilla dialogue package (which would explain why the bubble doesn't appear) .

 

You can tell me who you're trying to capture (character + faction), if it's a vanilla character it might be an oversight on my part.
You can also try deactivating as many mods as possible (to make sure it's not a compatibility issue with another mod) and try again by reloading a save before the capture dialog was triggered.

Edited by Machiavelique
Posted

Hey sorry for the late response. It seems to be working better but I also noticed some weird glitch when I try to enslave someone from the reavers. For some reason the sell slaves screen shows my own character instead of the slave I'd like to capture. Any tips? 

screenshot.jpg

Posted

I seem to remember having the same problem when I tried to capture an NPC with a character who previously belonged to the same faction as that NPC.

It's seems "Legs" belonged to Revears faction before joining your team.
 

I seem to remember adding a DA_SEPERATE_TO_OWN_SQUAD to try and solve the problem but it didn't change anything.

 

Simply ignore this and select Sancho

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...