Kenshi
394 ratings
Surgical Limb Removal
2
7
3
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
15.253 MB
Oct 5, 2020 @ 7:16pm
1 Change Note ( view )

Subscribe to download
Surgical Limb Removal

Description
Does your faction have a troubling tradition of standing in acid until one’s legs fall off? Is there an initiation ritual of tying yourself to the pole of the fishmen or being tortured within the terrible peeler machine? Perhaps a high rate of "accidental" turret friendly fire incidents on unarmored limbs or deliberate withholding of medical attention? The loss of frail organic limbs leads to better things, of course, but if the screams of your companions’ trouble you on the way to this goal, now there is a solution!

What it does

• Adds a Surgical Bed which is unlocked when you complete the Skeleton Repair Bed research. Building costs are the same as the repair bed + (4) Advanced First Aid Kits. It has the same appearance as the Skeleton Repair Bed, but you won't get the two confused. This is because the Surgical Bed has peeler functionality which requires it to be a cage, not a bed, so it can't be entered freely.
• Removes screaming of player characters when they are in player-owned "peeler-type" furniture. This includes both the original Peeler and the new Surgical Bed. They will scream as normal if captured by another faction and put in one of their peelers. I didn’t see a way to not change dialogue for both player-owned Peelers and the Surgical Bed at the same time, but if you're downloading this mod you probably aren't the type who wants to torture your own characters.
• Adds dialogue for characters when they enter player-controlled "peeler-type" furniture for the first time (or just after a reload). Dialogue varies between cheerful, concerned, or maniacal, some lines based on character personality. There is a good amount of branching and variation. If the dialogue isn’t triggering, taking them out of the Surgical Bed and reloading should fix it.

In-game Usage

Once you have researched Skeleton Repair Bed, the Surgical Bed will be available for construction. You will need two characters to use it. It is cage which can't be entered freely, so one character must pick up the other and place them in the bed. Which is convenient for not accidentally getting into it. You will want another character on hand to heal throughout the process. I like to roleplay this as the medic is actually a surgeon who is removing the limbs. For robots, which you can't bandage ahead of time, you will need to be more carefully about bleeding to death once the limbs come off. So, yeah, mechanically it is just a different looking peeler with different dialogue.

Compatibility

Very compatible, only possible conflict is I see is that I changed the base game dialogue "screaming torture" (organics) and "Robot being tortured". But, I really doubt anyone has done any mods which change it since the dialog is just a single dialog node which is repeatedly triggered when a character is being tortured.

Custom Races

Because there is a new animation, for custom races you will need to add the animation to the race/character in the FCS, as per usual.

How Peelers Work (if you’re not familiar)

The peeler is unique in that blood loss doesn't happen even as the limbs are cut up. Blood loss occurs only once the limb removal mechanics are triggered. If you haven't kept the healing up throughout the process you can be in a bad situation. Core body parts are targeted for healing first, but in this case, the core body parts aren't actually bleeding because of the peeler mechanics so it’s wasted effort. If you have to heal the core part all the way from 0 before you can start healing the limbs from -100, it will take multiple healers to prevent the patient from bleeding out. The peeler is slow in terms of damage output, even a level 1 medic can keep a patient fully bandaged.

How the Mod Works (alt title: Janky Dialogue Solutions Inc.)

The peeler damaging effect is added by the game when a building has conditions of 1) its functionality is "BF_CAGE" and 2) its functionality produces something. I set the production item to Foul Raw Meat, but also made the production multiplier 0.01 so it's not going to be much. Because it is actually a cage as far as the game is concerned, I had to make an alternate sleeping animation so that the character is orientated in the "bed" correctly. This might be a discovery of interest to others since I couldn’t find anything online about how to cause the peeler effect.

I got the bed and animation working, but then the dialogue ended up taking the most time to figure out. When a character is in “peeler-type” piece of furniture, they’re continuously triggering the event EV_SCREAMING_TORTURE. Basically every character in the game uses the dialogue “screaming torture” (or “Robot being tortured”) when the event fires. The game keeps triggering the dialogue until there is no longer a valid line for the character to say. Two ways of ending dialogue in Kenshi are the dialogue frequency settings and dialogue conditional statements. I wanted to avoid using the dialogue frequency settings because it affects all characters who use that line of dialogue, since I imagined a situation where multiple characters would be having their limbs removed simultaneously or in quick succession. I also wanted the new dialogue to only run one time, when they entered the bed, not to keep cycling through it, so I needed a Dialogue Condition (DC) to trigger the first time through. I had issues getting DC_NUM_DIALOG_EVENT_REPEATS to work like I expected, but didn’t do extensive testing since I found another solution. It might be considered a bug.

There are a lot of DCs in the FCS that relate to imprisonment. For this mod I used: DC_IS_IMPRISONED, DC_IS_IMPRISONED_BY_TARGET, and DC_IS_IMPRISONED_BY_OTHER. DC_IS_IMPRISONED works as expected; when a character is in a cage it is True (== 1). DC_IS_IMPRISONED_BY_TARGET and DC_IS_IMPRISONED_BY_OTHER also work as expected. If your target is T_ME then they are True or False based on whether the character is imprisoned by their own faction (DC_IS_IMPRISONED_BY_TARGET) or a different faction (DC_IS_IMPRISONED_BY_OTHER). There is one caveat: the values of the DCs are updated after DC_IS_IMPRISONED is updated. Note that they’re False (==0) by default. This means you have a set of two variables, one of which will always have changed from False to True after DC_IS_IMPRISONED is becomes True. I set up the start of the dialogue to trigger in this “gap” between DC_IS_IMPRISONED updating and the other two variables. After going through the dialogue the first time through one of the pair is now true, so there are no longer any valid lines to use when the engine tries again.

Unfortunately, doing it like this also means that you can’t know right away whether you are imprisoned by an enemy faction or by your own faction, so I used DC_IN_A_PLAYER_TOWN to confirm if you are in a player base (for the expected use case of the mod inside of a player owned base). If you are not in a player owned town, the first line of dialogue is a “ “ to give time for the variables update. Then you can know which faction you are imprisoned by. Note that the timing of the variable updates is speculation on my part, but it was a good working hypothesis that held true for this project.

One tidbit to close on: the base game's screaming torture dialog doesn't check if a character is KO'd, enabled them to scream while unconscious. I left this as is, figuring it's treating them like they're barely conscious and too delirious to take actions to escape.

Enjoy! And please inform me of any bugs, typos, etc.
Popular Discussions View All (1)
0
Dec 8, 2021 @ 7:48am
Малый перевод удачи вам :) ;)
GRIZLIMEN ДОБРЫЙ
45 Comments
Mn0chrmBny Feb 20 @ 1:27pm 
i wonder if theres a way to abuse this to raise toughness substantially, ive never messed with the peelers but this is an easy way to get ahold of one.
дождь Dec 23, 2024 @ 4:43am 
оч полезно, спасибо автору и переводчику в обсуждении!
Spocks Toupee Sep 22, 2024 @ 1:02am 
@EnderN7 Did you IMPORT the Game after you installed the mod?
EnderN7 Sep 11, 2024 @ 3:21pm 
so i guess this mod doesnt work if you have already researched skeleton beds before installing this mod, kinda lame
Princess Foxymew Aug 29, 2024 @ 4:22am 
For those who wonder: You can't select what limbs get removed. They all do. So you better be ready to go full borg, I guess. Unless you want to get rid of the last limb, then you can heal up and let the last one deteriorate. I guess.
Secondarily: If it doesn't seem to be doing anything, it's probably because the character still has clothes on. It'll destroy the clothes, so make sure to take that off first.
Ravenecroft Aug 27, 2024 @ 12:50am 
Lmfao i for one appreciate all the info! Saves a lot of FSC digging to resolve conflicts. I really wish more authors did this much but its understandable why they dont.
Killer Turnus Aug 23, 2024 @ 11:39am 
Bro thinks a few well divided paragraphs is a lot,
slesovoy Aug 14, 2024 @ 10:39am 
Bro really thought that we would read 15 pages of the description of a mod that adds one bed
Bob Saget Jun 19, 2024 @ 6:40am 
Before I download, this lets me choose what limb to remove, correct? Or does it work the same as a peeler essentially.
masterchiefgeek Jun 16, 2024 @ 3:41pm 
i put my character on the bed nothing happened