[A17] JT's Field Surgery - Combat Casualty Care and Essential Medicines

Started by JT, July 05, 2017, 03:57:16 PM

Previous topic - Next topic

JT

I spend so much time refining mods that I often forget to release my updates!  Damn'd be him that first cries "hold, enough", but enough is enough!  Damn me!

Field Surgery
Combat Casualty Care and Essential Medicines


No immediate danger because the malignant lung was literally just removed.  Ask me again in 2 hours, 51 minutes, and 36 seconds.

Features:
* Ability to dismember malignant limbs and organs without the use of anaesthetic, in emergency situations.
* This causes loads of surgical pain, including phantom pain for all trailing digits, which really sucks for the patient... so you'll generally want to use proper amputation unless you don't have any medicine or don't care.
* Dismemberment will also leave a surgical cut in the parent body part.
* Hold Shift before clicking Add Bill to dismember non-malignant limbs and organs, if you so choose...
* Untransplantable waste material is produced from a dismemberment.  Suggestion: Remove "human flesh" from your freezer's whitelist and add it to your dumping zone.  Or don't.
* Draw blood packs and plasma packs from colonists.
* Blood packs will deteriorate when frozen.  Keep refrigerated only!  Can be treated with neutroamine for indefinite storage in freezer.
* Plasma can be frozen safely and lasts longer than blood, but only treats blood loss symptomatically.
* Saline is available from traders or easily manufactured from neutroamine.  It lasts indefinitely and is ideal for use in the field, but treats even fewer symptoms than plasma.
* Antimalarial medications for nauseating self-treatment of malaria.  Slightly-less-nauseating tonic water and alcoholic jinnantonyx for a more palatable solution (figuratively and literally).
* Ananogel for treating both the positive and negative side effects of fibrous and sensory mechanites.  Caution: Will not treat luciferium but will suppress its positive side effects.
* Endotide, a psychoid painkiller, for treating pain.  Avoid administering to patients with critical blood loss.
* Wormicide for treating gutworms.  Ingestible poison: please moderate your doses.
* Newly added additional symptoms of blood loss include respiratory depression as well as impairments to blood circulation and blood filtration.

Recommended for use with Combat Extended for optimal combat realism (but not required).  Be sure to load Field Surgery lower in your mod order, as Combat Extended replaces the BloodLoss hediff outright: if Field Surgery is loaded first then Combat Extended will undo everything, which is bad and it should feel bad.

Post-traumatic stress disorder was not caused by the surgery (surprisingly, I know... it was actually caused by the battle which led to the lung being damaged by an explosion) and is provided by RimDisorders (also not required).

Compatible with all known surgery mods (again, not required, but now you're just being pedantic).

Changelog:

06 July 2017 - A17 Version 4 Hotfixed:
* Fixed offset messages in the beverages (tonic water, jinnantonyx) -- the XML syntax had changed from A16 to A17.
* Version number unchanged.  Same download link.

05 July 2017 - A17 Version 4:
* Updated to Alpha 17, finally.  Eventually I may even be able to release a mod update without the "finally" qualifier.
    Eventually.  In my admittedly less than humble opinion, however, the wait was worth it.
* Some of the features I intended for this release are being delayed until version 5.  Specifically, no vanilla
    surgeries accommodate my improvements (yet).
* Minor rewrites to accommodate a few more seemingly unnecessary core restructurings in A17.
* Removed most of the prefixing on the internal classes of the mod, since it was redundant against the namespace.
* Conceptual body parts can no longer be dismembered. (waist, etc.)
* Although prostheses cannot be directly dismembered, by intention, dismembered higher limb segments will now properly
    drop the prostheses of lower segments.
* Dismemberment will now cause damage to the next higher body part(s) proportional to the side area of the part being
    removed, +1 HP.  e.g., if a lung is 20 HP, the side area is 20**(2/3) = 7.36, so floor(7.36 + 1) = 8 HP of damage
    to the torso.  This also applies to parts within parts -- removing the brain will cut the skull and cut the head
    based on the size of the brain.  Of course, the patient would not likely survive such a procedure.
* Fixed bug where the removed organ, if destroyed by surgery failure, would result in a 99999-point hit to the next
    higher body part (which in the case of the torso or head would be rather fatal I'm afraid).  Also reduced the
    damage applied to be no greater than the health of the specified body part.
* Re-enabled "elective" dismemberment: hold Shift while clicking Add Bill.  Options are therefore now hidden from non-
    guilty persons unless you want to see them.
* Parts that should not be dismembered can no longer be dismembered therapeutically (neck, etc.).  They can still be
    electively removed, with predictable results.
* Waste flesh is now produced upon removing any organ or non-solid tissue.  Currently the amount is a simple formula
    based on the part's hit points rather than volume.  This could theoretically produce more meat than simply
    butchering the body, but is balanced with the high chance of death and the moral implications of cutting a person
    apart piece by piece for food.  You know.  Just sayin'.
* Cannibals are now treated as psychopaths for purposes of positive thoughts from dismembering patients.
* Operations now produce plenty of blood filth in the operating area, especially on failure.
* New HediffComponent: CapToHediff.  This prevents the attached Hediff from having a higher severity than the target
    hediff.
* New HediffComponent: ExpireWithHediff.  This causes the attached Hediff to be removed if the target hediff is no
    longer detected.
* New HediffComponent: ModifyHediff.  This increases or reduces the severity of the target hediff over time, but only
    if the target hediff is actually present.
* New IngestionOutcomeDoer: TreatHediff.  This simply tends the first found target hediff with a quality of 0%.
* New ThingComponent: DeteriorateWhenFrozen.  This causes the attached Thing to suffer damage over time when frozen, an
    instant amount of damage when dropping below freezing, and/or an instant amount of damage when thawing above
    freezing.
* Added blood packs and blood extraction.
* Blood will DeteriorateWhenFrozen and will ModifyHediff of blood loss.
* Added plasma packs and plasma extraction.
* Plasma is CapToHediff'ed of blood loss, and will ExpireWithHediff of blood loss.  It suppresses the symptoms
    proportional to the amount of plasma IVs attached.
* Added saline packs and saline manufacturing.
* Saline is identical to plasma but treats fewer side effects (if using the exsanguination patch).
* All transfusion packs provide an attached IV.  The patient, if not incapacitated, is able to move around with reduced
    mobility with the IV pack attached.  Low-skilled medics may spill some of the contents while rigging it up.
* Added antimalarials, a bottled malaria preventive and treatment.  Nauseating.  Can be self-administered.
* Added wormicide, a bottled gutworms treatment.  Toxic, especially if multiple doses are taken too quickly.  Can be
    self-administered.
* Added tonic water.  Can be made at any stove from antimalarials.  Less nauseating and is a joy item.  Can be self-
    administered.
* Added jinnantonyx.  Can be made at any stove from antimalarials and beer.  Less nauseating and is a joy item.  Can be
    self-administered.
* Added ananogel, a bottled anti-mechanite treatment.  Simple and safe glittertech which can be self-administered.
* Added endotide, a strong painkiller.  Therapeutic in low doses, anaesthetic in high doses.  Avoid use on patients
    with heart problems as it reduces blood circulation.
* Optional exsanguination patch activated by default adds additional symptoms to blood loss, including respiratory
    depression and reduced circulation and blood filtration.

19 April 2017 - A16 Version 3:
* Updated to Alpha 16, finally.
* Since Tynan and crew threw me a bone and converted a utility class from protected to public, I no longer have to use
    a ridiculous IL reflection in the code, so this is now also safer and more robust.
* Changed: For colonists, "elective" dismemberment will no longer appear in the list of operations -- only injured
    parts can be dismembered.
* Prisoners can however still be Reservoir Dogs'ed, with all normal penalties intact.

14 August 2016 - A14 Version 2b:
* Hotfix: Whoops, stuck my version identifier in About.xml after the closing tag of the description, which caused debug
    errors on load. (The mod still worked fine, though.)  Which, naturally, I changed after I finished testing and
    before uploading... sigh.
* No other changes. =P

14 August 2016 - A14 Version 2:
* Finally came up with a solution for masochism I liked -- positive thoughts from limb(s) removed occur only if both
    masochist and prosthophile
* Fixed missing abstracts

12 August 2016 - A14 Version 1:
* First release


Download:
A17 - D O W N L O A D <- Click me! Or don't. I'm not your boss.
(v4 - A17 - 2017-JUL-04)

(Archived A16 v3 and A14 v2b versions.)

Licence:
Simplified BSD.  Feel free to adapt, claim, use, abuse, or embed in a modpack.  (Provided the licence remains intact, obviously.  Which is, basically, "give credit".  Full text in the mod's About folder as usual.)  I will continue making my own changes to the mod, unless I get bored, so by all means contribute back if you come up with something cool!



Not affiliated with Jamestec.  But he's got, like, six more letters to choose from for his namespaces. ;-)

Canute

QuoteFeatures:
* Ability to dismember malignant limbs and organs without the use of anaesthetic, in emergency situations.
* This causes loads of surgical pain, including phantom pain for all trailing digits, which really sucks for the patient... so you'll generally want to use proper amputation unless you don't have any medicine or don't care.

OHHHKAY,
don't you think the psychological thrauma would be intense when someone watch the doctor to amputate own limbs or organs, not to speak about the pain.
Do you realy think a soldier could still fight after this ?
You maybe could do that on a full bionic body, but never on a human.

Maybe the doctor should the KO anestetic method, that would damage the head by 1 point and anestetic the patient for the next operation.
He can treat the head afterwards. And sure it could be deadly if the patient allready got head damage.
But i think that is still better for the patience then no anestetic.

TKTom

Quote from: Canute on July 05, 2017, 05:30:29 PM
QuoteFeatures:
* Ability to dismember malignant limbs and organs without the use of anaesthetic, in emergency situations.
* This causes loads of surgical pain, including phantom pain for all trailing digits, which really sucks for the patient... so you'll generally want to use proper amputation unless you don't have any medicine or don't care.

OHHHKAY,
don't you think the psychological thrauma would be intense when someone watch the doctor to amputate own limbs or organs, not to speak about the pain.
Do you realy think a soldier could still fight after this ?
You maybe could do that on a full bionic body, but never on a human.

Maybe the doctor should the KO anestetic method, that would damage the head by 1 point and anestetic the patient for the next operation.
He can treat the head afterwards. And sure it could be deadly if the patient allready got head damage.
But i think that is still better for the patience then no anestetic.

I find it interesting that people make statements like this.

In our modern world where anesthetic is always used we might think this kind of stuff would be totally unbearable and impossible. Actually, surgery without anesthetic was very common in history, especially amputation.

During the age of sail shrapnel/splinter wounds were very common and often necessitated the removal of limbs. The ships surgeon would do this, often during battle. Adrenaline would either number the pain, the patient would pass out from it or the surgeon's assistants would just hold them down until the limb was removed. The patient didn't go insane from it.

And it is very difficult to "surgically knock someone out". The above kind of amputation could be done in around 30 seconds to 1 minute by a skilled surgeon with good tools. People don't normally stay unconscious for that amount of time without fairly grievous damage to their head and brain (normally you'd be talking about a skull fracture at the very least, if not internal bleeding.)

kaptain_kavern


JT

Quote from: Canute on July 05, 2017, 05:30:29 PM
OHHHKAY,
don't you think the psychological thrauma would be intense when someone watch the doctor to amputate own limbs or organs, not to speak about the pain.
Do you realy think a soldier could still fight after this ?
[snip]

Maybe the doctor should the KO anestetic method, that would damage the head by 1 point and anestetic the patient for the next operation.
He can treat the head afterwards. And sure it could be deadly if the patient allready got head damage.
But i think that is still better for the patience then no anestetic.

Ignoring the golden rule for a moment -- that you should never comment negatively on a mod unless you've actually downloaded it and tried it -- here's the essentials:

1) Amputation was historically performed without anaesthetic other than alcohol (which was imbibed, not administered).  A patient would chomp down on a leather bit.  (Wooden toggles were also used, but these could result in them breaking their own teeth from clenching too hard unless it was wrapped in rawhide.)  For a very accurate film representation of amputation prior to the industrial era, see Dr. Maturin in the movie Master and Commander.  The profession most commonly associated with amputation was the barber, also known as the barber-surgeon -- since he's the dude who has the razor-sharp knives for shaving with.  The procedure was one of two things: either they would twist a tourniquet against a brace until the bone snaps, and then cut through the now broken limb through the break with an extremely sharp blade in one go, or they would cut through the flesh as quickly as they could with a razor sharp blade until they hit the bone, then saw through the bone with a bonesaw, followed by the sharp blade again to cut through the remaining tissue.  Then they would try to tie off whatever arteries they could see and hope the rest would close themselves off before the patient died of blood loss.  Chance of death from an amputation was close to 60% -- I dropped that down to 45% to be charitable. ;-)

If it's a limb with a clear separation and it's not either the humerus or the femur, they could even do it with a butcher's cleaver.  Whatever the case, it wasn't pretty.

2) The surgical pain will keep that soldier out of commission for a very long while -- anywhere from a few game hours to a couple game days depending on the severity of the amputation.  This is "combat casualty care", not "stimpaks".  As the good fellow TKTom has said above, modern medicine often prejudices us to misunderstand how exactly this stuff was handled in the past, and it was often handled in a manner that we would find barbaric... but if you have a choice between dying of infection or gangrene or having your limb chopped off, most people would go for the latter.  Aron Rolston also mentions that he barely even felt pain while chiseling apart the bone of his arm with a pocket knife, and as soon as the arm fell free, he felt pure ecstatic relief: this was of course purely psychological as the nerves were undoubtedly firing like a Christmas tree, but his brain was in survival mode.

The patient will receive the vanilla "Harmed Me" negative social thought against the surgeon for performing an unanaesthetised amputation that's medically necessary.  If anything was medically unnecessary, your whole colony will be infuriated.  I think through almost as many angles as Belisarius does. =)

3) Knocking someone out with a blow to the head is far more likely to kill them than chopping their limbs off, believe it or not!  Whenever someone is rendered unconscious from a blow to the head, it's because they've been concussed -- as in, the brain has been damaged.  If they're unconscious for a longer period of time, it's because they've been concussed badly.  I could absolutely implement an unanaesthetised knockout blow if you think that'd be more moral than cutting a limb off without anaesthetic, but I'm positive that you wouldn't like the chance of death I assigned.  Hee hee.




All I can say is, give the mod a try!  Play a medieval or tribal society where you wind up with a wound infection after your medicine runs out, and you'll quickly like the ability to amputate limbs that are going to result in death.  You should of course wait until the last minute to see if your palliative care manages to save the patient.

The other part, chopping limbs off unnecessarily, was added first and foremost (in the original A14 mod release) because I had originally assumed that prostheses could only be installed in limbs that were already missing -- then later when that proved to be false I retained it as a morality play.  (To that end I can only say I'm very, very pleased with the results, because this is exactly the sort of reaction I was looking for.)

lakajadiwa


JT

Should be save compatible, yes.  It patches vanilla content with XML patching, and adds no map components or other special detours at the moment.  Everything else is "new" content rather than "modified" content so it will simply get thrown into the object table, and AFAIK there's no serialised data being thrown askew.

You'll get errors if you remove the mod while you have any of the mod-added medicines on the map, but as far as I know they'll be non-fatal and your save will likely still work.

SpaceDorf

I felt compelled to post about Robert Liston ,
just to emphasize how realistic your mod is :)


Liston's most famous case

Amputated the leg in under 2 1⁄2 minutes (the patient died afterwards in the ward from hospital gangrene; they usually did in those pre-Listerian days). He amputated in addition the fingers of his young assistant (who died afterwards in the ward from hospital gangrene). He also slashed through the coat tails of a distinguished surgical spectator, who was so terrified that the knife had pierced his vitals he dropped dead from fright.

    That was the only operation in history with a 300 percent mortality.

I remember him mostly being listed in the threads about medical failures :)
Maxim 1   : Pillage, then burn
Maxim 37 : There is no overkill. There is only open fire and reload.
Rule 34 of Rimworld :There is a mod for that.
Avatar Made by Chickenplucker

deathstar

I am getting this error when trying to activate this mod:



Not sure what is conflicting here, anyone got an idea right off the bat?

edit: I deactivated all mods save for this one and CE, still getting the error.


sidfu

u need to use
        <ingestHoldOffsetStanding>
            <northDefault>
                <offset>(0.18,0,0)</offset>
            </northDefault>
        </ingestHoldOffsetStanding>
instead of just

        <ingestHoldOffsetStanding>
                <offset>(0.18,0,0)</offset>
        </ingestHoldOffsetStanding>

JT

Aha!  Looks like that's another of those curious little core engine changes that snuck in from A16 to A17.  At least this one seems to make sense, since they're offering the ability to change the offsets directionally rather than heuristically.

Sorry about that, folks.  I saw that error but given the cryptic nature of it I was certain it was from one of my other installed mods.  Ai ya.

Patched .rar is already up under the same download link as before (or, here's a shortcut) -- no change made to the version identifier since it doesn't affect gameplay.

mimib14

Nice mod! Really enjoying this so far, it adds more detail and a greater sense of urgency to surgery and battlefield wounds  :D

I am having a few problems, though:

  • When I try to draw plasma, it draws blood instead.
  • I haven't tried any of the other recipes yet, but so far I haven't been able to produce saline. It uses up the neutroamine and the bill completes like if it were working right, but no item is produced.

Soupy Delicious

Man... I've been wanting this kind of mod for ages. You're not adding in any super fancy pantsy endgame stuff, it's not all about the shiny and convenient (the opposite, actually).  Totally awesome.

I do have a worry, though: the medicines you've introduced... do they allow one a potential escape route to something in game, where there isn't in the vanilla game?  If so, that could probably throw a balance that Tynan intended.  I realise I'm doing exactly what you tutted against in one of the comments here (no, I have not yet played your mod), but I like to think I'm asking sensible questions.

So, it's the medicines I'm worried about; I can see that you've made the actual meat, you could say, of this mod as brutal as it needs to be (love you for that. I do.).

Is the acquisition of the medicines and the painkiller difficult (through expense, or finnickyness [not a word]; risk at every step of the process) enough to make treating such health conditions (be it cut off limb or malaria) always tense, always a maybe?  I want to think of medicines and blood packs as a precious treat, and not an endgame solve-all.

Hmmmmmm sorry to be a pain ;D

Lazarae

Trying to use ananogel to get rid of fibrous mechanites. Keep getting errors, both using the 'administer ananogel' option in the operations tab and right clicking -> 'take ananogel' with the afflicted character.

JobDriver threw exception in initAction. Pawn=Kelly, Job=DoBill A=Thing_Human32217 B=Thing_JTFieldSurgeryAnanogel287651 C=(117, 0, 105), Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at JTFieldSurgery.IngestionOutcomeDoer_TreatHediff.DoIngestionOutcomeSpecial (Verse.Pawn pawn, Verse.Thing ingested) [0x00000] in <filename unknown>:0
  at RimWorld.IngestionOutcomeDoer.DoIngestionOutcome (Verse.Pawn pawn, Verse.Thing ingested) [0x00000] in <filename unknown>:0
  at Verse.Thing.Ingested (Verse.Pawn ingester, Single nutritionWanted) [0x00000] in <filename unknown>:0
  at RimWorld.Recipe_AdministerIngestible.ApplyOnPawn (Verse.Pawn pawn, Verse.BodyPartRecord part, Verse.Pawn billDoer, System.Collections.Generic.List`1 ingredients) [0x00000] in <filename unknown>:0
  at RimWorld.Bill_Medical.Notify_IterationCompleted (Verse.Pawn billDoer, System.Collections.Generic.List`1 ingredients) [0x00000] in <filename unknown>:0
  at Verse.AI.Toils_Recipe+<FinishRecipeAndStartStoringProduct>c__AnonStorey4A7.<>m__781 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver=RimWorld.JobGiver_Work, curJob.def=DoBill, curDriver=Verse.AI.JobDriver_DoBill
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.<DoRecipeWork>c__AnonStorey4A6:<>m__77C()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

JobDriver threw exception in initAction. Pawn=Psyche, Job=Ingest A=Thing_JTFieldSurgeryAnanogel287651, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at JTFieldSurgery.IngestionOutcomeDoer_TreatHediff.DoIngestionOutcomeSpecial (Verse.Pawn pawn, Verse.Thing ingested) [0x00000] in <filename unknown>:0
  at RimWorld.IngestionOutcomeDoer.DoIngestionOutcome (Verse.Pawn pawn, Verse.Thing ingested) [0x00000] in <filename unknown>:0
  at Verse.Thing.Ingested (Verse.Pawn ingester, Single nutritionWanted) [0x00000] in <filename unknown>:0
  at RimWorld.Toils_Ingest+<FinalizeIngest>c__AnonStorey27E.<>m__104 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver=, curJob.def=Ingest, curDriver=RimWorld.JobDriver_Ingest
Verse.Log:Error(String)
Verse.AI.Pawn_JobTracker:StartErrorRecoverJob(String)
Verse.AI.JobDriver:TryActuallyStartNextToil()
Verse.AI.JobDriver:ReadyForNextToil()
Verse.AI.JobDriver:DriverTick()
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()