[A17] [WIP] Reclaim Reuse Recycle - Harvest Corpse parts

Started by DoctorVanGogh, June 19, 2017, 03:00:32 AM

Previous topic - Next topic

DoctorVanGogh

I've put together a small mod prototype that extends butcher jobs to also return any installed parts from corpses. Basically what's visible in the corpse's "Health" tab and is artificial comes out when the corpse is butchered.

I've seen some remarks that this would be technically infeasible, but from the code I've seen this is almost trivially easy. I'm running this locally with EPOE, A dog said and some other mods that add parts, and am seeing zero issues.

If you want to give it a try, here's the public github repository including releases.

Ideas about possibly extensions I've got so far:

  • Reclaimed parts pop out with their 'damage' carried over. (Corpse with 'Bionic leg' damaged to 30% hitpoints, 'Bionic leg' on ground has 30% of max hitpoints). Problem: Parts get installed at 100% health, no matter the hitpoints of the implant before installation.... So it's kinda pointless...
  • Maybe add minor/catastrophic fail chances like in operations and mechanoid operations. Would need to decide on skill to use. Butchery? Medicine? Combination of the two? Again: Minor failure would lead to damaged part... which would be pointless once reinstalled...
  • Don't pop out usable parts, but some sort of 'reclaimed XYZ' item. Add work table/jobs to transform those back into usable parts. No idea how feasible
  • 'Icky' debuff on corpse parts like deadman's clothes. Scope almost guaranteed to be too big for a mod.... Also, where's the distinction between an artificial liver where the removal actually killed the prisoner and the same item removed after prisoner execution. Possibility for interesting drama though ;)

If any issues crop up, post them here or on the github issue tracker.
Appreciate my mods? Buy me a coffee

Devon_v

THANK YOU. I've never understood how that valuable bionic leg is just somehow ruined forever if the person it's attached to dies, yet I can mangle said person horribly and surgically remove the leg and it's fine. I'd taken to just using the dev controls to spawn bionics as "loot" when someone so equipped died.


Doing this might have been a major issue in previous alphas, but 17 drastically changed how mods can interact with data for the better.

SpaceDorf

The Idea itself sounds awesome.

I think it should use the medical and crafting skill, with a chance of botching the "operation".
It should provide a debuff between butchered human and dead-mans cloth, but I have no Idea what to call it ..
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

lazuli42

Amazing mod! So glad you were able to figure out how to do it, people have been asking for this mods for ages. You should consider hosting it on the steam workshop so more people can see it.

DoctorVanGogh

Quote from: lazuli42 on June 25, 2017, 10:50:37 AM
You should consider hosting it on the steam workshop so more people can see it.
That's the general idea, once I get things to a level I consider stable and at least somewhat feature complete.

As you might have noticed (or not ;)) I've pushed an update that also returns mechanoid parts on disassembly.

There are some issues with additional stuff in the background I'm working on - depending on how those turn out, I'll either release this mod with about the current feature set, or put some more work into it.

But ultimately it should be a matter of weeks (at most) until I get things polished enough - so stay tuned ;)



Appreciate my mods? Buy me a coffee

Hammerskyne

I have no idea what scope of effects you are able to implement, as my experience with modding is limited to changing the xml files, but would it be possible to have critical failure as no part return, and regular failure as some percentage of plasteel/steel/components dropped? Or maybe pull from the assemblies for the parts involved?

The part durability not really mattering seems to be outside the scope of what you're trying to do, and I agree that the icky debuff idea is a little nonsensical but I don't know what else you'd want to do to 'balance' the functionality out. Maybe just make it really really hard? Like 20% critical failure/60% regular failure at 10/10 cooking/medicine?

Also: would you be able to/ interested in adding a disassembly task for either crafting/med or construction/med for people who don't routinely butcher corpses, but rather cremate them instead?

Dragoon

I think if you do try to balance the mod. You should make it optional. Honestly, you don't need to add a debuff. Usually, people who have bionics don't show up until you are able to have some of them yourself.

If you do make it skill based I suggest medicine or Butchery.
Quote from: faltonico
I truly can't understand that sense of balancing a LOT of modders have, pouring more resources on something doesn't make it more difficult, but more annoying. It is not engaging, even if i'm swimming in silver at late game ¿why to bother?, why all the effort to get there?.

DoctorVanGogh

Okay - the mod is feature complete and ready for some extended tests (might add some research integration in the future).

https://github.com/DoctorVanGogh/ReclaimReuseRecycle/releases

Can be installed into any running savegame.

Quote

Reclaim, Reuse, Recycle

Rimworld mod that allows extracting added parts & implants from corpses.

This mods basically adds two types of jobs/recipes:


  • A "Harvest corpse" job at the Butcher & Machining Tables which will try to extract all recoverable artificial body parts.
  • A set of "refurbish" type jobs on the Drug Lab which will transform extracted parts into fully reusable body parts again.

Basic concepts

Extracted part status

Reclaimed parts (which can be any added part or implant that could be removed from a corresponding live pawn) are either extracted in a non-sterile or mangled variant. Undamaged (or slightly damaged) parts are extracted as non-sterile, while moderately damaged parts get extracted as mangled versions. The thresholds for non-sterile/mangled/no extraction can be changed in the mod options. (Defaults are 100%-85%: non-sterile, 85%-50%: mangled, otherwise: non reclaimable).
Non-sterile parts only need the part and medicine to be usable again, while mangled parts need additional material(s) for restoration.



Non-SterileMangled

Extracted part 'Complexity'

Parts are categorized by Complexity (a visible stat on the reclaimed part). Available levels are

  • Primitive
  • Advanced
  • Glittertech

This complexity is derived from the extracted part by internal tags, techlevel or ultimately price and should account for all mod-added parts.
Each complexity level corresponds to the medicine (and possibly other materials) needed to make the part usable again. Primitive needs Herbal Medicine (plus wood/cloth), Advanced uses regular Medicine (plus steel/components) and Glittertech requires Glitterworld Medicine (plus components & plasteel).

Harvesting Jobs

Extraction is a composite job that will always try to remove all possible parts in a corpse.
The extraction can fail and that failure is calculated per part. Failures work similar to surgery and are in fact calculated from the surgery/mechanoid extraction success chance of the executing pawn. Success chance is multiplied by 1.5 compared to regular surgeries to accomodate for the composite nature of the harvesting job as well as the lack of 'supporting' medicine (Room stats still apply for biological harvests).
A minor failure will typically still allow extraction of a (mostly) undamaged part, while catastrophic failure will almost certainly destroy the part.

Changes to vanilla behavior

This mods adds two special ThingFilters to the animal, humanlike & mechanoid corpse categories: Harvested & Unharvested corpses.
Harvested corpses contain no reclaimable parts, while Unharvested corpses ultimately could have (some) parts removed.
The vanilla Butcher corpse job get's changed to only use Harvested corpses by default. If you want to make it use any corpse, make sure to activate Unharvested corpses too (but why would you?).

Compatibility

Mod load order should not matter for this mod. It also should support any and all additional parts from 3rd party mods.
While the complexity might not be 100% as expected for 'weird' extra parts it will always guess something and thus allow reclamation & reuse of the part(s).

Bugs & issues

Please report any errors or issues on the github issue tracker.
Appreciate my mods? Buy me a coffee

SpaceDorf

Sounds awesomer any minute.

I have a few questions to your description :

1.) The area where the parts are removed has to be clean or sterile as well to improve chances of reclaiming parts ?
2.) Are there item requirements to remove the parts ?

3.) So removing bionics and implants uses the medicine skill and removing mechanoid parts uses crafting ?

4.) Are there debuffs for extracting from human bodies ?
5.) Are there debuffs when Installing second Hands ( got it .. *snort* .. second Hands .. ²) ?


² i am sorry for this inappropriate and bad joke, but someone had to do it sooner or later.
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

DoctorVanGogh

Quote from: SpaceDorf on July 25, 2017, 01:38:57 PM
Sounds awesomer any minute.

I have a few questions to your description :

1.) The area where the parts are removed has to be clean or sterile as well to improve chances of reclaiming parts ?
2.) Are there item requirements to remove the parts ?

3.) So removing bionics and implants uses the medicine skill and removing mechanoid parts uses crafting ?

4.) Are there debuffs for extracting from human bodies ?
5.) Are there debuffs when Installing second Hands ( got it .. *snort* .. second Hands .. ²) ?


² i am sorry for this inappropriate and bad joke, but someone had to do it sooner or later.
1) It's the 'surgery success chance' of the room. As far as i know you can only check that with a medical bed inside the room & selected. So yeah - sterile should be your friend.
2) No - not at the current time
3) It uses a character's 'Surgery success chance' & 'Mechanoid surgery succes chance' values. Open the 'i' window for your character, select that stat and read the explanation on the right ;)
4) No at this time.
5) No - and don't worry - now can _really_ get you mother's (bionic) eyes!
Appreciate my mods? Buy me a coffee

SpaceDorf

Quote from: DoctorVanGogh on July 25, 2017, 04:31:01 PM

5) No - and don't worry - now can _really_ get you mother's (bionic) eyes!

Yeth, they have been in ththe family for quite a while now.
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

SpaceDorf

I found a problem with the harvesting filters.

Since you added them to humans and animals, they still have an effect on each other :
I can't bury humans without setting the appropriate filters in the animals section
and I can't butcher animals withouth setting the filters in the human section.

I think you should make the filter general.
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

DoctorVanGogh

Quote from: SpaceDorf on July 28, 2017, 10:07:49 AM
I found a problem with the harvesting filters.

Since you added them to humans and animals, they still have an effect on each other :
...
DAMN - good catch. I had a similar issue before and thought I'd fixed it.

Went ahead and used your suggestion: (un)harvested filters are now simplified (and global). The issue should no longer occur.

Try the new release
Appreciate my mods? Buy me a coffee

SpaceDorf

Thanks for the fix then,

Meanwhile I cleaned my first Badger-Hand Implant which is now ready to install ..
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

SpaceDorf

I tried the new release and RimWorld started to disco-flicker after loading a game.
Meaning the screen turned from visible to black to visible.


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