RimWorld

RimWorld

Auto-Extract Genes
81 Comments
VitaKaninen Jul 18 @ 11:03pm 
I see it now. I thought I read it thoroughly, but I guess I missed that part. All good, then.
Nibato  [author] Jul 18 @ 7:22pm 
@VitaKaninen That's mentioned in the known issue of the mod description above.

This mod essentially just automatically clicks the "Insert person" gizmo/button on the extractor for you behind the scenes.

Even without using this mod, If you clicked the insert person button, and the target pawn interrupted by a mental break or something else, the same thing would happen. The command stays queued up in the extractor but the pawn will never go to it until the command is cancelled and re-issued. This actually happens with a lot of buildings that have an "Insert person" button in vanilla.
VitaKaninen Jul 18 @ 4:57pm 
I had a pawn (slave, not sure if that matters) who was on a mental break when their time came due to have their genes extracted. When they finally snapped out of it after a day or so, they did not go and have their genes extracted. This also meant that no one else would go and have their genes extracted, even though they were due, since it was waiting on the other pawn. Once I manually told them to enter it, everything started working as normal again, and everyone else would go use the machine again.
VitaKaninen Jul 17 @ 5:07pm 
Interesting. I will report it, then. Thanks!
Nibato  [author] Jul 17 @ 4:56pm 
@VitaKaninen I don't think mine or any other mod is causing that error. I was able to reproduce a similar exception without any mods and just the DLC. The exception occurred if a slave rebellion happens while a slave is inside the gene extractor. I'm speculating that it is a new bug in Rim World itself.
VitaKaninen Jul 17 @ 1:47pm 
I had an error when letting a slave auto-enter the extractor. Not sure if it is this mod causing it or another mod. RimWorld.SlaveRebellionUtility.CanParticipateInSlaveRebellion

https://gist.github.com/HugsLibRecordKeeper/0d21b9172cace98c86d448f149639999
Nibato  [author] Jul 17 @ 8:31am 
I've pushed a new update to hopefully address the frustrations you're having with the new setting.

If the tending is permanent, the pawn won't be skipped for queuing after the condition is tended (basic wounds, bleeding, etc). Only pawns with untended conditions, or conditions that require constant tending (diseases, flu, etc) will be skipped until the condition is healed (or developed immunity).
Diedel Jul 17 @ 8:14am 
Ok, that matches what i see, anything that can ever be tended blocks it, regardless of the current tend state. I understand why it is that way, but it does cause problems for me as i have my prisoners on auto-release when fully healed, so they might not be gen processed at all this way.

But as i said, just having that simple toggle in the options makes the whole process already a lot easier.
Nibato  [author] Jul 17 @ 7:35am 
I have some ideas I need to look into on making the tendable logic smoother, but I need to do some research before promising anything.
Nibato  [author] Jul 17 @ 7:32am 
Basically if the pawn has any condition/hediff that requires tending at all, they will be skipped for auto-extraction until the hediff is fully healed.

I was considering diseases that require tending multiple times when I implemented it, not just injuries and bleeding. I was thinking about conditions that may require constant tending when I implemented it (flu, plague, infection, etc). With those diseases, If they were just auto-inserted instantly after the initial tending, it could be unfortunate :P

I've implemented it in a pretty generic way to try and avoid any issues with hediffs added by other mods.
Diedel Jul 17 @ 6:59am 
So, after playing with the new version for some time i have to ask what "requires tending" is, because it doesn't seem to work the way i expected it to work.

The only pawns scheduled for extraction are now those that have no condition that are tend-able, regardless of the state.

But just having a quick way to disable the auto extraction helps a lot, is just turn it off while new prisoners are still being tended.
Diedel Jul 16 @ 9:31am 
Thank you for this, seems to be exactly what i need.
Nibato  [author] Jul 16 @ 8:06am 
@Diedel
Good idea! I've pushed an update that adds a mod setting to skip any pawns that have conditions that require tending or periodic tending. It should be enabled by default.

I've also added support for the Numbers (1.6 Temp) mod.

If you want the update immediately you may need to unsubscribe and resubscribe to the mod to get steam to download it right away.
Diedel Jul 16 @ 12:39am 
How hard would it be to only have them queued for extraction if they are not bleeding? I really would like to turn the default on, but usually that leads to new prisoners dying. The number mod integration would make it easier, but it seems that doesn't work with the temp 1.6 one.
Nibato  [author] Jul 13 @ 1:28pm 
I can't reproduce that error. If I'm understanding the log correctly, it's complaining that the Gene Extractor doesn't exist in the game. I'm guessing due to any one of these reasons: biotech dlc isn't loaded, another mod removes it, or my mod loads before biotech. I'd need a complete log, and list of mods to even be able to begin to figure out what's going on.
Ogrozera Jul 13 @ 9:15am 
I got two errors:"

[AutoExtractGenes - Start of stack trace]
Verse.PatchOperationAdd(xpath="/Defs/ThingDef[defName="GeneExtractor"]"): Failed to find a node with the given xpath
Verse.PatchOperationConditional(xpath=/Defs/ThingDef[defName="GeneExtractor"]/comps): Error in <nomatch>

Patch operation Verse.PatchOperationConditional(/Defs/ThingDef[defName="GeneExtractor"]/comps) failed
file: C:\Program Files (x86)\Steam\steamapps\workshop\content\294100\2882834449\Common\Patches\AutoExtractGenesAssignerComp.xml
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.PatchOperation:Complete (string)
Verse.LoadedModManager:ClearCachedPatches ()
Sudo Modding Jun 21 @ 6:38am 
For any colony that tries to create the "perfect" genotype, it's a god send. It saves hundreds of needless clicks, and remove some mental load (having to check regularly if one of the prisoner is ready for gene extraction). Thanks!
[咕咕]竹兮 Apr 4 @ 9:45pm 
Excuse me, there are some races I do not see automatic extraction option, is it a compatibility issue?
Raskaran Mar 17 @ 5:35pm 
@Nibato as for the Known Issue workaround. My Vampire couldn't implant genes as he was constantly interrupted by this mod. Have a settings page or increase the timer to be over implantation time. thx
Nibato  [author] Nov 15, 2024 @ 7:20am 
I've never personally had any performance issues with it.

The auto extractor check is ran per-extractor-building roughly every 250 ticks (CompTickRare). When looping through the pawns the first thing it checks is to see if auto extract is enabled and if their genes aren't regrowing. there's no need to proceed calculating/checking anything else if those checks don't pass.

I have a few ideas on how things could be rewritten for better performance, but I'm probably not going to invest time into premature optimization without profiler data showing the need for it.
harrydubois Nov 15, 2024 @ 6:55am 
Wouldn't calculations tank the performance?
Alan2025 Oct 30, 2024 @ 7:46pm 
Thank you so much! I didn't think the button would be there also
Nibato  [author] Oct 30, 2024 @ 4:00pm 
For anyone who has other mods that push the checkbox out of the window, If you go to the info page of the pawn (clicking the i), under the Health tab, the checkbox should be there as well.

This window is a bit bigger and has more room, so it may be accessible there.

Example: https://imgur.com/a/Fkf1qgy
Alan2025 Oct 29, 2024 @ 7:13pm 
I have a couple mods that modify the health bar, enough to make the extract gene button inaccessible since it's under the window, is there another way to enable it or a fix for this? (A part from removing the mods obviously)
Goomba Aug 5, 2024 @ 7:15pm 
Will this work with/can you add compatibility with Gene Extractor Tiers?
https://steamcommunity.com/sharedfiles/filedetails/?id=3016454783

Thanks and great QoL mod!
bolemeus Aug 5, 2024 @ 4:32am 
Currently Im not seeing the uto extract genes checkbox on all of my owns pawns, not on any of my slaves, and not on most of my prisoners.
Weirdly enough though some of my prisoners do have the chackbox.

I'm also using the numbers addon, and I can add the column there and check all of the pawns I want auto extracted there. It is a bit of a hassle though.

I'm also using the Smart medicine mod, which also adds a 'surgery uses best' checkbox at the top of the health tab. Maybe you checkbox at the bottom doesn't fit anymore, but thats weird because I do see your checkbox on some of my prisoners, but not all
Донор семени Jun 30, 2024 @ 2:10pm 
Спасибо тебе, добрый человек! Не понимаю, почему такую важную функцию не может разработчик сделать...
potnik Jun 19, 2024 @ 1:28pm 
can you make a similar mod for softscanners?
Atlantispy May 6, 2024 @ 5:28pm 
Would you be able to do an auto mod for "Hemogen extraction"? It seems weird that I can't just have a blood donation drive for my colonists in case someone loses a lot of blood!
Nibato  [author] Apr 20, 2024 @ 8:10am 
I just pushed an update to potentially fix the ghoul issue. Let me know if you're still having problems
Sm4Ck Apr 20, 2024 @ 4:30am 
@Cinders I have noticed this too, also if you have auto-extract enabled before turning pawn into a ghoul it will still enter gene extractor when its genes are finished regrowing and there is no way to disable it.
Cinders Apr 16, 2024 @ 6:04am 
Hi! I love this mod, thank you so much for sharing it with us! I noticed that ghouls do not have the auto-extract toggle available. Is that intended?
Arganot Apr 6, 2024 @ 2:06am 
Have not tried the mod or biotech functions yet but I like the idea. Does the mod have the ability to turn off auto extraction or put them on hold if conditions are met? Say if your gene bank is full pawns don't go get scanned only for the genes to rot on the ground. Or if all of that pawns genes are in gene banks as singles? Random's Gene Assistant mod tracks genes the player has, maybe collaberating could add that functionality if not present (just going off your mod's description.)
Nibato  [author] Apr 2, 2024 @ 11:56am 
@AerosAtar Whoops, I accidentally uploaded the debug build instead. I pushed an update to the workshop, so this -should- be fixed shortly for you
AerosAtar Apr 2, 2024 @ 9:30am 
I think you have left the harmony debug logging active, as I am getting a harmony.log file on my desktop with the listed patching seeming to refer to this mod. :)
Xrona Jan 14, 2024 @ 3:14am 
Hello. Should we expect compatibility with races from other mods? It’s just that half of my colony doesn’t have this jackdaw for auto extraction.
Endorsi Oct 3, 2023 @ 5:24pm 
Hi, sometimes when the health tab has too many stats/defs in it this can be pushed 'off' the GUI (appears half cut off at the bottom? Also worth noting I'm using the Health Tab Mod by Fluffy. Any chance of a patch for this?
StoryTaleBooks Sep 11, 2023 @ 12:07am 
Mx Emmin, your best bet is probably just arresting your colonist.
Mx Emmin Sep 10, 2023 @ 8:40am 
Is it possible to make an auto-extract blood/hemogen version of this for slaves & colonists? Wish it wasn't just prisoners.

I don't know how to submit requests on Github sorry
Elgate Aug 20, 2023 @ 9:12am 
Is it possible to add compatibility with Gene Extractor Tiered?
https://steamcommunity.com/sharedfiles/filedetails/?id=3016454783
Multiple Birds Jul 11, 2023 @ 8:18am 
@Freakin I believe it's assigned to hauling.
Multiple Birds Jul 11, 2023 @ 8:16am 
Very useful mod. I've noticed a mod conflict when using auto sorting with rimpy or the like. where pawns will go invisible and trapped in the gene extractor until you deconstruct it. It's probably obvious, but if anyone else gets this problem I've fixed it by loading this mod after any xenogene related mods.
Sir Luis Jul 5, 2023 @ 12:45pm 
can you please please make a auto brain scanner for subcore softscanner and the subcore polyanalzyer?
Nibato  [author] Apr 25, 2023 @ 11:56pm 
@TWrecks I have implemented your request for a mod option to have auto extract genes checked by default. It should be settings->mod options. Let me know if you have any issues with it.
Nibato  [author] Apr 22, 2023 @ 3:57pm 
@Chrisinater5 you should be able to use the kNumbers mod to do bulk assignment now
Freakin Apr 18, 2023 @ 8:34am 
Who brings them over to the extractor? Like how do i assigne ppl to do this? Seems like it takes forever till they do it on their own
Nibato  [author] Mar 17, 2023 @ 2:19am 
I'll take a look into possibly implementing some of these feature requests when I get the time. Thanks for your suggestions, guys!
Maarx Mar 16, 2023 @ 3:23pm 
Feature Request: This Needs a Column in "Numbers" Mod

https://github.com/Nibato/AutoExtractGenes/issues/1
Chrisinater5 Mar 10, 2023 @ 10:04pm 
Is there a way to assign pawns in bulk to this option? if not could it be? maybe a tool or gizmo when selecting a bunch of pawns.
TWrecks Mar 8, 2023 @ 4:53pm 
Hiya Nibato, I'm just wondering if you could make it so that this functionality is default on for any pawn that isn't a baseline genome pawn. I think that'd be really helpful :)

Happy to donate a little if you need.