[A16] JT's Mods: Field Surgery, Pallet [Updated]

Started by JT, August 12, 2016, 02:24:28 PM

Previous topic - Next topic

JT



Field Surgery

This quick-and-dirty mod allows you to chop infected or otherwise damaged body parts off of injured people without the use of anaesthetic, for use in emergencies when there is absolutely no medicine available; in a medieval society, you no longer have to sit and watch a pawn progress from minor to major to extreme infection without being able to do a single thing about it but palliative care.  Of course, without proper anaesthesia, the procedure is extremely painful and even if you wind up saving their life, they will receive a negative social opinion of the surgeon for causing them pain.  Chance of dying under the knife is of course very high -- an unanaesthetised amputation should only be attempted if you have no other option, or if you intend for the person to suffer.

(That said, this mod was battle-tested: a raider attacked my colony when I had no medicine.  He was downed without being killed.  We took him into custody and treated his wounds without medicine in the dirty cell -- so, of course, his lung got infected.  My excellent surgeon cut it out, and after a rapid recovery we sent him on his way.)

This feature can also be used to remove otherwise healthy body parts from prisoners and visitors.  Although removed limbs will be fresh, they are not salvageable for resale as they are merely hacked off rather than carefully preserved for transplant.  Removal of benign body parts amounts to torture, and your colony will receive negative thoughts accordingly -- all colonists will be accessories (without concern if psychopathic), the torturer will be culpable (with positive thoughts for psychopaths), and the tortured will be furious (except masochists who are also prosthophiles).  Doing this act will of course severely damage relations with the faction of the victim.

By intention, the part is always removed.  If you fail the procedure, the victim will bleed profusely and it will be treated as "cut off" rather than "removed", although the difference is only cosmetic -- the limb is gone one way or another.

Compatibility
* 100% compatible with Expanded Prosthetics and Organ Engineering, Rah's Bionics and Surgery Expansion, and/or DE Surgeries (original thread).

Known Issues

       
  • If a pawn is already anaesthetised before you began the procedure, the anaesthesia will be removed after this procedure.  This means that you can lop a pinky finger off of a prisoner to wake them up from anaesthesia (although even minor body parts still incur the full mood penalty for torture, so this exploit is somewhat self balancing).
  • As I reuse the silly vanilla failure functions, it is possible to wind up cutting out someone's eye and accidentally stabbing them in the chest while chopping off their infected big toe if you wind up failing the task.  Bug Tynan for a fix -- I just work here! =)
  • After mutilating a prisoner in this manner, as long as they leave the map without any bleeding wounds, you will still receive the positive +15 to relations.  This would require a core detour and is probably an overkill solution to the problem.
  • It is possible to chop off prostheses with this system.  It's actually somewhat hard to detect prosthetic hediffs, so I didn't bother.  It's a potential future improvement.
Source code is included for future maintainability.  Licence is Simplified BSD. =)

Changelog:

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 (for CCL compatibility notice) (as of Alpha 16 2017 without CCL, this is no longer a significant issue)

12 August 2016 - A14 Version 1:
* First release

Dropbox Download:
A16 | D O W N L O A D (v3 - A16 - 2017-APR-19)
A14 Download (v2b - A14E - 2016-AUG-14)




Sleeping Pallet

This adds a simple and cheap sleeping pallet, a step up from sleeping on the bare ground and a step down from sleeping in a nice, cozy bed.

This mod is entirely standalone (which is how I use it), but is intended to fill the gap caused by mods which add a cloth requirement to beds (which require processing on a textile bench and/or a whole growing season to produce).

Licence: Simplified BSD.  Feel free to adapt, claim, use, abuse, or embed in a modpack.

Changelog:
19 April 2017 - A16 Version 3:
* Updated for Alpha 16.
* Now using a vanilla-friendlier graphic with better contrast and an outline.

17 August 2016 - A14 Version 2:
* Adjusted comfort level to 55%, down from 60%, for less comfort on finely-made pallets (and more discomfort on shoddy ones)
* Fixed unnecessary shader in graphicData causing white pallets

15 August 2016 - A14 Version 1b:
* First release (hotfixed immediately after upload)

Dropbox Download:
A16 | D O W N L O A D (v3 - A16 - 2017-APR-19)
A14 Download (v2 - A14E - 2016-AUG-17)



Butchery Spot
(Mod Deprecated)

Unless requested, I won't be updating this anymore as a functionally identical spot is now available in Nandonalt's Camping Stuff.

This is a spot where you can butcher animal corpses without the need to build a butchering table.  It's small, compact, and free to build.  Because it provides no chopping surface for close knife work, you cannot use this spot to make kibble and any mod-added recipes (e.g., EPOE organ grinding) will not apply to it.

Licence: Simplified BSD.  Feel free to adapt, claim, use, abuse, or embed in a modpack.

Changelog:
16 August 2016 - A14 Version 2:
* Fixed missing workgiver

14 August 2016 - A14 Version 1:
* First (buggy) release

Dropbox Download:
A14 Download (v2 - A14E - 2016-AUG-16)

BaconBits

Intersting.  Think I'll check this out.

Ottomiller

Very cool, I always wanted a mod like this. Thank you

Adventurer

No incompatibilities with DE Surgery or Expanded Prosthetics, right?

coemgen98

Quote from: Adventurer on August 14, 2016, 06:58:13 AM
No incompatibilities with DE Surgery or Expanded Prosthetics, right?

It works fine with in-game prosthetics but it cannot dismember  higher tier ones from EPOE. So far, the DE surgery options are still present and working. I'm not fully sure though since I have yet to encounter errors in-game myself. The author can help us clarify that, though.

kaptain_kavern

#5
After a quick browsing through the code, I'd say this should be compatible with DESurgeries.

edit: I tested and tried to spawn all combinations possible for 30min and i have not find any incompatibility with DESurgeries. I'm pretty sure it goes the same with EPOE surgeries in last release (I only speak about surgeries mechanics)

JT

#6
I've been running alongside DESurgeries and EPOE for a while now. =)

New version 2 up.  Fixes a CCL compatibility issue and raises the masochist code from the dead -- the existing masochist code was commented out because it didn't seem right for someone who likes pain to like dismemberment, but makes perfect sense for someone who likes both pain and dismemberment. =)

[edit]Hotfix up in first post.  When I threw a version number into the About.xml, I accidentally put it in outside the closing /description tag.  Duh.  The mod itself would have worked fine, but running in debug mode would give you a pop-up error.

JT

Two new minimods up:

Butchery Spot/Butchering Spot (I apparently call it both) is a "spot", just like the Crafting Spot, where you can chop up animals without building a full butchering table.  Since it doesn't include a work surface you can't chop meat into kibble.  Simple non-scripted mod that should be forward compatible.

[edit]Whoops, apparently this was broken. For whatever reason I assumed that the recipe appearing in the list was enough, but I also need a job giver too.  Will implement and fix. ;-)

Sleeping Pallet is a bed made of smaller amounts of wood, with a lower comfort factor. It helps bridge the cotton-free period when using T's Extended Fabrics and More Beds.  Also fairly simple definition-only mod.

123nick

the butchering spot, is it possible to make it give reduced meat? or similar? maybe take longer to?

JT

@123nick: I've been pondering that myself, actually.  I've been trying to convince myself not to bother, knowing that it would require a full script mod to do it. =P

Fixed version is up, anyway...

Duncan

Quote from: JT on August 12, 2016, 02:24:28 PM
This feature can also be used to remove otherwise healthy body parts

I like the mod, but I do not understand why this is in there. As far as I can tell you basically gain the ability to mutilate your colonists at a cost of terrible moods. Apart from a few wild sadists I don't understand why anyone would want to do this. The downside is that the medical operation screen is spammed totally full of pointless operations that I don't want to use, making it very difficult to find the actual, sensible operations I want to queue.

I changed this in the source code and rebuilt this for myself but I am using the skkardcore pack and the assembly is merged into their single big assembly, so I had to make this an alternate version of the function and connect it in the xml. Unless there is a good reason for this I would advocate removing this feature from the main version.

Please don't take this criticism too harshly, the idea of being able to remove infected parts without anaesthetic is something I find very sensible and I applaud your efforts.

ruzackovich

 Apart from a few wild sadists I don't understand why anyone would want to do this.

i using this methods , i chopped they legs to prevent rioting . because i need them a life . why? it's related with my colony.  its safe way to recruiting them while they still on the beds

even to capture them i using non lethal weapons .

JT

Quote from: Duncan on August 21, 2016, 11:20:03 AM
Quote from: JT on August 12, 2016, 02:24:28 PM
This feature can also be used to remove otherwise healthy body parts

I like the mod, but I do not understand why this is in there. As far as I can tell you basically gain the ability to mutilate your colonists at a cost of terrible moods. Apart from a few wild sadists I don't understand why anyone would want to do this. The downside is that the medical operation screen is spammed totally full of pointless operations that I don't want to use, making it very difficult to find the actual, sensible operations I want to queue.

I changed this in the source code and rebuilt this for myself but I am using the skkardcore pack and the assembly is merged into their single big assembly, so I had to make this an alternate version of the function and connect it in the xml. Unless there is a good reason for this I would advocate removing this feature from the main version.

Hi!  Finally came back to Rimworld after far too many months of Skyrim and shame (and Dragon Age: Origins and ecstasy, and Pillars of Eternity and happiness, and UnderRail and adulation... in short, big backlog, no more time for Rimworld and A15's changelog just didn't interest me).

If you've still got a diff or a copy of that, I'd love to have a look at the changes to see if I'd rather have them.  It's been a long while since I've touched Rimworld or this code, but I seem to recall that aside from being difficult to detect whether a limb could have a genuine condition and therefore I kept it so that you could catch the edge case scenarios that weren't detected automatically, I also intended to permit you to hack off a limb prior to installing a prosthesis for that limb, since I figured that prostheses couldn't be installed without the body parts being missing first (I still find that beyond silly -- no doctor on Earth would install a prosthesis voluntarily, and the best scenario you could hope for is a basement flesh doctor offering to hack your limb off for you first; I guess we can have some small comfort that the Rim isn't Earth, though).  I also seem to recall I justified its use for proactively removing wounded parts that could eventually become infected, in addition to its "benefits" of hacking up enemy prisoners.  No one would wittingly do this to their own colonists, I'd hope!

[edit] There's also a kind of morality play at work here: you have the freedom to do something, but with enough drastic consequences that you should not except under very specific scenarios.  The interface clutter is kind of Rimworld's fault for not giving a decent sorting method or pop-out/folder-based verb menu, and it's tough to reconcile the freedom to do something with the interface clutter it produces... maybe A17 will do better in that regard.

QuotePlease don't take this criticism too harshly, the idea of being able to remove infected parts without anaesthetic is something I find very sensible and I applaud your efforts.

Nah, feedback positive or negative is always cool.  Feedback was so sparse on this, other than an integration into Skyarkhangel's mod without notice other than a credit, that I wasn't actually expecting it to get any feedback at all. =)

By the time I vanished I also discovered that my Hospitality version of the sleeping pallet "worked", as in allowed the room to be used for guests, but didn't work as an actual sleeping pallet -- the Hospitality mod probably hard-codes its scan for bedding based on the defs rather than on the code classes, which is unfortunate.

JT

'Morning, y'all!  (Hope you had a Happy Critter Easter!)

Both Field Surgery and Sleeping Pallet have been updated -- well, were actually updated a couple days ago, but I never got around to releasing them then. =P  That's mostly because I've got two other mods I've been working on over the last couple days but haven't been able to iron the bugs out, and I figured I might as well just release the ports for now rather than waiting for a concerted release of everything.

Stay tuned, Bat-fans.




Update 2017 MAY 03:

Still working away on my big content update to Field Surgery.  My intention is to make it a genuine field surgery mod, including medical interventions in the field (similar to how pawns will perform emergency bandaging on mortally wounded pawns before rescuing them), and I've gotten a few "self-interaction" medications in place (generally with nasty side effects) for malaria, gutworms, and mechanites which are useful in lone settler scenarios.

My only barrier thus far is trying to figure out where the blood recovery rate is handled, since I'd like to modify the danger of blood loss a bit more.

I've also got my first detour-based mod about ready for prime time (and I'll see about bitching at a moderator to move my thread back to Releases when that's ready) and just have a couple more sessions to ensure everything works perfectly.

The XML-based mod that I was working on shortly before my disappearance last year is now also ready to go, having ironed out one of the errors I was facing -- some items in Combat Realism were marked as "Sellable" rather than "Stockable" so would throw errors when a merchant had to spawn with them.

My other mod is ridiculously difficult to implement in the game engine thanks to the esotericity of the tasking system, well in excess of the actual utility of the mod; as a matter of course I'd like to finish it anyway, but it's at the bottom of my priorities list. =P




Update 2017 JUN 01:

Monthly update here.  Mostly burned out on that last mentioned mod, which was going to be a tech-level-based overhaul of the wall construction system (so that medieval peasants couldn't build walls out of steel, for instance) and which would use rock chunks to build walls to begin with, without need to break them on a stonecutting bench into stone blocks.  I rather literally have to entirely write a construction tasking system from scratch to do so -- a custom designator with custom drop-down list to place custom blueprints which are then tasked with a custom jobgiver for a custom job to place custom frames and to construct.  Prior to the designator method I had berms working fine (the precursor to cobblestone walls), but they would always produce a non-critical error in the console as the method I was using was shortcutting the game's standard frame code and so the frame was always reading as "destroyed", and so deleting the frame would produce a nasty (and hard-coded) error message to the console that would have only been work-around-able with a core detour of a critical function (i.e., it throws up warning klaxons just thinking about it).

I'll see about porting and polishing my other five mods (unreleased ones included) for A17 over the next week or so.  I've been holding off on playing A17 until most of my favourite mods had been ported to A17, since I've got the luxurious position of not being a major enough mod to have to update to avoid breaking anyone's modlist. =P  (I still don't know if I can even play A17 seriously as it is.  I'll deeply and sorely miss Combat Realism, and hope Combat Extended hits a release version sometime soon, because vanilla combat mechanics still feel horribly wrong to me even with the medical improvements.)




Update 2017 JUL 04:

Happy We-Want-Slavery Day, neighbours!

TL/DR: Three or four mods releasing starting today.

Everything is up to date, but I'm spending too much time testing, and by testing I mean getting sidetracked and actually playing the game instead.  Two days ago, with a final build of Field Surgery ready to go, I wound up starting the game intending to test the mod and then completely ignoring it and playing for four hours instead.  After shutting down the game, I realised my folly and started the game back up to test the mod again.  And then played for two more hours instead.  Luckily, the next day I wasn't quite so foolish and ironed out the last few remaining bugs.  In addition to all of the new features I've added since the last release, the thought system subtly changed in A17 and a bit of that code needed adjustment.

I have finally noticed that my principal mistake is not providing any screenshots, which has been rectified for Field Surgery and is forthcoming for the remaining mods.  Making reasonably appealing release posts is my only hangup at this point, as I loathe making presentations.

In summary:

Field Surgery is up to date (and much expanded) and will be released sometime soon on a new release thread.  Lots of new features and trauma medicine to give it its own unique place in your load order.  I was anticipating holding off on releasing it until I'd actually gone ahead and done my core detours to make it a comprehensive experience, but I decided that it's probably better to get a working release out there before I start gutting the vanilla medical system.  (Still 100% compatible with all medical mods, just to dispel any fears, and will be even after I make my changes to the core.)

My pallet mod is up to date and will be released sometime soon on a separate minimod thread.  Also added a double pallet since that's all the rage these days.

A new trader types mod will be released within hours and will be on the minimod thread.  Because the XML patching system is in its infancy, it includes optional patches inside the package: you will have to do some manual configuration to install.  It supports SeedsPlease and Combat Extended with these optional patches.

A new wall overhaul mod will be released sometime soon on a new release thread.  This mod was a bitch and a half, as noted above, until I dug deeper into the core code to find out why my original plan didn't work; or, rather, would work but would require so much effort as to be unfeasible at best and insane at worst -- I almost wish I had kept the prototype that I had gotten working (albeit with console log errors) just to showcase how ridiculous the effort was, but I was so deeply incensed at the amount of time wasted on this mod that I went through it with a bloody axe...

In addition to finally finding the smoking bullet that was making the mod non-functional without resorting to my excruciating workaround, the new patching system in A17 finally made this relatively easy and even allowed the mod to do away with any assemblies entirely, which is both safer for you and easier to maintain.

For butchery spot et al. needs, Tribal Essentials has your back.  I suggest only Tribal Joy and Tribal Production to avoid redundancy with my own mods, assuming of course you choose to use mine.

A fifth mod is still ongoing.  Since it was using HugsLib detours in A16, it has to be rewritten almost from scratch to accommodate transpiler Harmony patching in A17, so after learning the technique the actual implementation got bumped down my priorities list.  (I could release the A16 version as it's error-free, but that would probably cause more confusion than positive gain.)

I've got a compatibility patch for Medieval Times and Combat Realism I've been working on (actually, that was most of May), which has to be updated for A17 features.  It was actually working great in A16, and just wasn't finished up to the scope I had set for myself (full ammo sets for catapults, ballistas, machicolations, and arbalests).  According to the licensing of Medieval Times, this one needs official approval before I can release it, however.

I've also got a Combat RealismExtended genericising patch which does away with the Earth calibres in favour of generic names (e.g., ".303 British cartridge" is now "bolt-action rifle cartridge"), but I'm updating that for the A17 patch system so it's taking a little longer.  I have learned nothing from my BYOND days and am still committing to a half-dozen projects simultaneously. =P

That's the rough order of what you can expect, anyway.

Cabdono

Thank you, field surgery sounds perfect for my current starting medieval colony.