[B19] Reclaim Reuse Recycle - Harvest & reuse Corpse parts

Started by DoctorVanGogh, August 26, 2017, 08:43:36 AM

Previous topic - Next topic

DoctorVanGogh

Okay - there is a somewhat more 'brutal' way to get stuck pawns to work again if you're willing to try. Do the upgrade (keep different saves from before & after :D).

Then:

  • Open the Options
  • Enable Development mode (center column, bottom)
  • In the now appeared toolbar at the top of the screen open the debug actions (4th from the left)
  • Pick the 'Tool: Damage to down' button (you can filter in the textbox, or pick it manually 2nd column from the right, near the top - don't pick 'damage to death' ;))
  • Left-Click each or your pawns.... They should now all be down :D
  • Open the debug actions again, pick 'Tool: Heal random injury (10)'
  • Click with that onto each of your downed pawns until they are fully healed again (will take multiple clicks per pawn)
Pawns should now correctly use the 'new' work settings. Remember to make them pickup their weapons again, and disable the Development mode when you're done.

Again: Sorry about the mess.
Appreciate my mods? Buy me a coffee

MajorDam


Hey, thx for your reply  :)
I'll test that method as soon I have the possibility and let you know.

Cheers  8)

OmegaSwordEX

#17
I'm getting this weird bug where stockpiles become completely unusable and are not recognized by any pawns if theyre set to not allow harvestable corpses.

EDIT: Started getting this constant error whenever the game tries to load up a job that takes corpses but with filters as to which it should use (i.e. only primitives and harvested, no glittertech, etc). I am running a decent amount of mods (80~) and I bet its conflicting with something, but I cant be sure. Off the top of my head I could name DESurgeries and EPOE maybe, and Rimjobworld :^)

Exception in BreadthFirstTraverse: System.NullReferenceException: Object reference not set to an instance of an object
  at DoctorVanGogh.ReclaimReuseRecycle.Filter_Corpse.<DoesMatch>b__5_1 (DoctorVanGogh.ReclaimReuseRecycle.PackedThingDef pd) [0x00000] in <filename unknown>:0
  at System.Linq.Enumerable.Any[PackedThingDef] (IEnumerable`1 source, System.Func`2 predicate) [0x00000] in <filename unknown>:0
  at DoctorVanGogh.ReclaimReuseRecycle.Filter_Corpse.DoesMatch (Verse.Corpse corpse) [0x00000] in <filename unknown>:0
  at DoctorVanGogh.ReclaimReuseRecycle.Filter_Corpse.Matches (Verse.Thing t) [0x00000] in <filename unknown>:0
  at Verse.ThingFilter.Allows (Verse.Thing t) [0x00000] in <filename unknown>:0
  at RimWorld.Bill.IsFixedOrAllowedIngredient (Verse.Thing thing) [0x00000] in <filename unknown>:0
  at RimWorld.WorkGiver_DoBill+<TryFindBestBillIngredients>c__AnonStorey2B3.<>m__15B (Verse.Thing t) [0x00000] in <filename unknown>:0
  at RimWorld.WorkGiver_DoBill+<TryFindBestBillIngredients>c__AnonStorey2B3.<>m__15E (Verse.Region r) [0x00000] in <filename unknown>:0
  at Verse.RegionTraverser+BFSWorker.BreadthFirstTraverseWork (Verse.Region root, Verse.RegionEntryPredicate entryCondition, Verse.RegionProcessor regionProcessor, Int32 maxRegions, RegionType traversableRegionTypes) [0x00000] in <filename unknown>:0
  at Verse.RegionTraverser.BreadthFirstTraverse (Verse.Region root, Verse.RegionEntryPredicate entryCondition, Verse.RegionProcessor regionProcessor, Int32 maxRegions, RegionType traversableRegionTypes) [0x00000] in <filename unknown>:0
Verse.Log:Error(String)
Verse.RegionTraverser:BreadthFirstTraverse(Region, RegionEntryPredicate, RegionProcessor, Int32, RegionType)
RimWorld.WorkGiver_DoBill:TryFindBestBillIngredients(Bill, Pawn, Thing, List`1)
RimWorld.WorkGiver_DoBill:StartOrResumeBillJob(Pawn, IBillGiver)
RimWorld.WorkGiver_DoBill:JobOnThing(Pawn, Thing, Boolean)
RimWorld.WorkGiver_Scanner:HasJobOnThing(Pawn, Thing, Boolean)
AIRobot.<>c__DisplayClass1_1:<TryGiveJob>b__0(Thing)
Verse.<ClosestThingReachable>c__AnonStorey5FB:<>m__BFD(Thing)
Verse.GenClosest:ClosestThing_Global(IntVec3, IEnumerable, Single, Predicate`1)
Verse.GenClosest:ClosestThingReachable(IntVec3, Map, ThingRequest, PathEndMode, TraverseParms, Single, Predicate`1, IEnumerable`1, Int32, Int32, Boolean, RegionType, Boolean)
AIRobot.X2_JobGiver_Work:TryGiveJob(Pawn)
Verse.AI.ThinkNode_JobGiver:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_PrioritySorter:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
RimWorld.ThinkNode_Conditional:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.ThinkNode_Priority:TryIssueJobPackage(Pawn, JobIssueParams)
Verse.AI.Pawn_JobTracker:DetermineNextJob(ThinkTreeDef&)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob()
Verse.AI.Pawn_JobTracker:EndCurrentJob_Patch1(Object, JobCondition, Boolean)
Verse.AI.Pawn_JobTracker:JobTrackerTick()
Verse.Pawn:Tick()
AIRobot.X2_AIRobot:Tick()
Verse.TickList:Tick()
Verse.TickManager:DoSingleTick()
Verse.TickManager:TickManagerUpdate()
Verse.Game:UpdatePlay()
Verse.Root_Play:Update()

DoctorVanGogh

#18
Okay: I have an idea what that is - you are using some weird mod race which does not have properties I assume to be there for corpses. Can you supply your modconfig?

Also: Please check if #afd97ea fixes your issue (Green button "Clone or Download").
Appreciate my mods? Buy me a coffee

OmegaSwordEX

#19
Quote from: DoctorVanGogh on August 31, 2017, 11:52:44 AM
Okay: I have an idea what that is - you are using some weird mod race which does not have properties I assume to be there for corpses. Can you supply your modconfig?

Also: Please check if #afd97ea fixes your issue (Green button "Clone or Download").

I'm quite sure the error on the harvest job is caused by Rimjobworld, since it adds extra parts to all pawns and I'm not sure if theyre categorized as artificial or natural, the mod must be getting confused when trying to remove the newly added parts I guess?

Regardless, here is my modsconfig.xml

EDIT: The new commit seems to have fixed the filtering issue for the jobs, but I just noticed something different now, which is probably caused by Rimjobworld definitely, corpses are being harvested multiple times with no results, I am assuming the game is trying to harvest a corpse for the RJW parts the mod forcibly adds to all pawns (signifying "natural" sexual characteristics that arent considered prosthetics) and is getting no drops from it. Basically the mod adds parts such as breasts and genitals to pawns when the mod is loaded, and those parts are able to be operated on ingame as well. The mod is fully compatible with EPOE, its not here on ludeon forums for obvious reasons but if this is a conflict that is completely out of reach to be fixed then I guess thats it. A real shame, I really enjoy the functionalities of both mods and your mod in particular is amazing to me.

[attachment deleted by admin: too old]

DoctorVanGogh

Quote from: OmegaSwordEX on August 31, 2017, 12:36:13 PM
... corpses are being harvested multiple times with no results...
Please try c28a021. This sounds like an issue you could have in general if you transplanted a human organ to another pawn with EPOE, not just a special thing for the quoted mod of yours.
Appreciate my mods? Buy me a coffee

OmegaSwordEX

The mod is running normally and corpses are being harvested as they should with all filters working properly. Everything seems to be working absolutely perfect. Thank you for your time and effort in solving this issue.

Kapun

I have a suggestion: Make a addon that would modify surgery: Minor failures will cause the part to be returned (not destroyed) but it would become non-sterile. Major ones would make the part mangled. Catastrophic failures will ether destroy the part, making it disappear, or maybe make the part would become "damaged beyond repair". These parts could then be salvaged to give back some of their material cost (60% maybe?). It would also be cool if these thing could be configurable using mod options.
Sorry for my bad English. Your mod is great :)

SpaceDorf

Salvaging the parts for ressources sounds like a good idea in 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

That is a nice idea.... in principle.... How about returning... I don't know 20-30% of the materials needed for a part if it can't be recovered (or if you decide not to refurbish, but go the melt down/disassemble route).

Except not every part that can be reclaimed actually has a recipe to build it :D What do you return then?

Maybe I'll do something.... "generic" when I do another feature pass for this (conciding with next release to break as little as possible). Like add 'destroy reclaimed part' to the incinerators, add 'disassemble part' - but then again, that would just be a thin facade of "un-build X" for every reclaimable part... And vanilla doesn't even begin to touch that...

So yeah - It's not like I didn't have that idea... there are just some rather infeasible parts in it.
Appreciate my mods? Buy me a coffee

Kapun

Well, yeah, but there are mods like EPOE that allow most parts to be manufactured. So what about the surgery failure effects idea? Noone seems to be commenting that.

DoctorVanGogh

Well.... I must have misunderstood you there... Yeah - the "change vanilla surgery failures" feature is on my radar. In fact is has already been requested.

May in fact be the thing for the next 'big' feature release ;)
Appreciate my mods? Buy me a coffee

CEPMatos

It looks like the game considers every single object an 'unharvested corpse'. It's mandatory to leave the 'unharvested corpse' allowed in any stockpile configuration in order for the pawns to haul objects there.

DoctorVanGogh

Oh my.... how did that sneak in.... Well, I guess that happens when you try to work around shellfish.

Should be fixed in cf0dbc6.
Appreciate my mods? Buy me a coffee

Kori

Quote from: DoctorVanGogh on September 10, 2017, 03:45:31 PM
Oh my.... how did that sneak in.... Well, I guess that happens when you try to work around shellfish.

Should be fixed in cf0dbc6.

I'm using cf0dbc6, and as soon as a human corpse gets the rotten status, it can't be hauled to any stockpile anymore, even with the whole corpses submenu completely allowed. It works fine as long as they are fresh though.
Could you please have a look at this? :)