[1.0] Less Arbitrary Surgery (2018-10-30)

Started by System.Linq, January 03, 2017, 07:45:48 PM

Previous topic - Next topic

System.Linq



This mod changes surgery success to be less arbitrary and random. It doesn't change your surgeon's chance of success, but it does change failures in the following ways:
   
-If they don't succeed, they get a second chance to succeed with non-lethal injuries.
-If they fail, they have a chance to only give non-lethal injuries based on their surgery skill (as they identify that the patient is dying and abort the surgery).
-If they fail that, then the death on failed surgery chance is reduced by their chance to successfully complete the surgery.
-If the surgery is not lethal, the difference between catastrophic and minor failure is based on the surgery success chance, instead of being a literal coin flip.
-Only impaired pawns will ever have ridiculous surgery injuries.
-Surgery failures will cause infection. Pawns injured during a successful surgery may get an infection, depending on the doctor's skill.
-Instead of doing 30 damage on a minor failure and 65 on a catastrophic failure, minor failures do 10-20 damage and catastrophic failures do 30-60. This makes it so that some surgeries (like on the head) are not disproportionately lethal even on minor failures.
-Instead of doing between 50-100% of a part's remaining health in damage per surgery injury, failures do between 10-25% of a part's remaining health, so that an injury is far less likely to kill or sever a part on a patient unless its total damage exceeds the part's remaining health.
-You will receive the body part or implant back on a minor failure.
   
Compatible with Psychology, EPOE, A Dog Said, DE Surgeries, and Mechanite Augmentation. If you've tested your mod with this and confirmed its compatibility, contact me to add it to the list.

Download
I recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.

If you do not have RimWorld on Steam, but you have a forums account, you can also download it manually through the attachment. Note that the mod requires HugsLib to function.



License
Can include in modpacks with credit. Can reuse/edit code with credit.

[attachment deleted due to age]

Dryerlint

But I like surgically murdering prisoners...

System.Linq

Then euthanize them. This mod is to avoid surgically murdering your colonists.

Lem Wright

But is it compatible with EPOE, and if not, when will there be a compatibility patch?

System.Linq

EPOE doesn't detour anything to my knowledge, so it's compatible.

Dryerlint

Quote from: Psychology on January 03, 2017, 08:11:23 PM
Then euthanize them. This mod is to avoid surgically murdering your colonists.

Actually I've found that I love this mod. Makes training surgeons much more... efficient.

Pichu0102

I've noticed that sometimes it will say there's an infection in the bionic body part I was adding, but when I check, even looking at debug diffs, there's no infection. Is it supposed to be infecting the part, or is this a workaround to just say it failed the first check but got the second one and they're minorly damaged, as opposed to putting up a notice that says it partially failed?

Thirite

Oh cool, I was waiting for Better Surgeries, but this sounds like it does a similar fix. Did you modify the damaged body parts on failure to actually reflect where the operation was taking place? ie: no more broken legs/stabbed kidneys while trying to install prosthetic hand

kunyomi

Does this only make surgeries less wacky when it fails, as in does it not alter the success rate of the initial failure check?

Canute

QuoteI recommend you download it from the Steam Workshop to receive automatic updates. Visit the Steam Workshop page to subscribe here.
Sorry i don't use steam mashines !:-)

But very nice mod, but could you add that a failure don't destroy the implant ?


System.Linq

Quote from: Pichu0102 on January 04, 2017, 05:24:57 AM
I've noticed that sometimes it will say there's an infection in the bionic body part I was adding, but when I check, even looking at debug diffs, there's no infection. Is it supposed to be infecting the part, or is this a workaround to just say it failed the first check but got the second one and they're minorly damaged, as opposed to putting up a notice that says it partially failed?

It has a chance to add the infection when you succeed on the surgery with minor injuries, though it may not work with bionic body parts. I haven't tested it. I'm not sure what you mean that there's no infection. Maybe it tries to add it, gives you a message about it, and then fails to add it?

Quote from: Thirite on January 04, 2017, 09:36:36 AM
Oh cool, I was waiting for Better Surgeries, but this sounds like it does a similar fix. Did you modify the damaged body parts on failure to actually reflect where the operation was taking place? ie: no more broken legs/stabbed kidneys while trying to install prosthetic hand

Yes, ridiculous failures will only ever happen when a doctor is impaired and fails critically.

Quote from: kunyomi on January 04, 2017, 11:32:10 AM
Does this only make surgeries less wacky when it fails, as in does it not alter the success rate of the initial failure check?

Correct, though the next version will add medical tending offset (i.e. hospital beds and vital monitors) to the success rate.

System.Linq

Updated to 2017-1-4.

-Instead of doing 30 damage on a minor failure and 65 on a catastrophic failure, minor failures do 10-20 damage and catastrophic failures do 30-60. This makes it so that some surgeries (like on the head) are not disproportionately lethal even on minor failures.
-Instead of doing between 50-100% of a part's remaining health in damage per surgery injury, failures do between 10-25% of a part's remaining health, so that an injury is far less likely to kill or sever a part on a patient unless its total damage exceeds the part's remaining health.
-You will receive the body part or implant back on a minor failure.

Canute

Did you do the wrong attachment maybe ?  Psychology 2017-1-4.rar

System.Linq

Whoops! Let's just say it was stealth advertising.

Canute

Quote-Instead of doing between 50-100% of a part's remaining health in damage per surgery injury, failures do between 10-25% of a part's remaining health, so that an injury is far less likely to kill or sever a part on a patient unless its total damage exceeds the part's remaining health.
I think that is too harmless, because of the "remaining health" at this way that part never get  broken. 10-25% of max. HP is better and not lethal except someone keep cutting on a few failures.

Quote-You will receive the body part or implant back on a minor failure.
You should add a damage to the implant, 25-49% of max. HP.  Then you got 3 tries to install it.