RimWorld

RimWorld

AWA Addon: Automatic Surgeries
48 Comments
Lomzie  [author] 14 Oct @ 11:03am 
Truly a RimWorld moment. If the operations to do this are surgery bills, then it might be possible, at least the ovum extraction. I'm not sure how well it would handle the implantation though, but do let me know if you test it.
nicvampire 14 Oct @ 10:59am 
I know this is a bit fucked up even for rimworld, but can you use this to automatically extract ovums and automatically use the fertilised ones to impregnate female prisoners?
Lomzie  [author] 29 Sep @ 4:11am 
Unfortunately, surgeries for non-colonist pawns such as animals or mechs is not something you can do, and it's not something I expect to ever support. This might change in the future, but don't count on it.
Skelebone 28 Sep @ 5:57pm 
Excuse me, is this mod capable of assigning surgeries to animals and mechanoids? My problem is that I want to create standardized bills for augmenting entire squads of animals and upgraded mechanoids. The mechanoid upgrade mod I'm using is based off of the surgery system (Mechanoid Modifications).

Adding this kind of functionality to animals and mechanoids would be absolutely extravagant. If I can already do this, I haven't been able to figure out how yet. Is this a feature...? If not, would it be possible to convince you to look into that in the future?

Regardless, even if I still have to do my animals and mechanoid mass-upgrades manually, I'm very pleased I can augment my regular supersoldiers en-masse easily now. Thank you!!

P.S. If anybody has a solution for copy-pasting mass surgeries for mechanoids and animals besides this mod, please elucidate me.
Lomzie  [author] 15 Sep @ 1:32pm 
Just a small notification to users of this mod. Recent additions to the main mod allows you to include prisoners when resolving work. This can be done using the "Exclude Pawns" button, third button from the left, bottom left corner.

This should allow you to automate surgeries on prisoners, which has been a commonly requested feature. You can add a Specialist work spec with the new "is prisoner" condition to exclude prisoners from being assigned to work they cannot do further down the list.
Lomzie  [author] 15 Aug @ 4:09am 
@stoiccalm This should be possible by having the "is slave" condition and an "add bill" task with the hemogen extraction surgery. You might also want to check that the slaves does not suffer from blood loss.
stoiccalm 15 Aug @ 3:57am 
Hi,

Can I use this to tell my people to hemofarm my vampires slaves rather than just prisoners? So far I've just been able to automatically have somebody come and conduct the surgery I order manually which isn't what I want. Thanks for the mod and appreciate any assistance. :)
ExoticButts 5 Aug @ 10:20am 
@Lomzie All good, I'll keep up the search. Thanks for the quick reply!
Lomzie  [author] 5 Aug @ 10:14am 
@ExoticButts
Unfortunately this is not something I currently intend or expect to support any time soon.

@BOT Derek
To help with the lists, the Searchable Menus mod might be of use to you. As to auto-implanting xenogerms, I like the idea and will add it to my TODO.
BOT Derek 5 Aug @ 7:28am 
Great mod. Just want to add a couple of feature requests:

1) findable list when you open the add bill button since there’s so many bills with mods
2) auto implant xenogerms and let you select with one from your saved list of xenogerm templates
ExoticButts 5 Aug @ 5:21am 
I know it's not strictly the purpose of this mod, but I'm looking at using this to automatically administer drugs to important animals within a colony, since they can't have drug policies. Does this allow bills to be automatically performed on animals specifically?
Lomzie  [author] 3 Aug @ 1:02pm 
@Rim Baby With description of organs being replaced, you mean the list you get when selecting the target organ? The "Searchable Menus" mod might be of help in that case.
Rim Baby 3 Aug @ 4:10am 
I'm having this really stupid problem of not being able to implant the styxilith because the description of what organs are being replaced is so large its covering the actual surgery and I can't select it. Any ideas how I can reduce the space the description is consuming so I can click the surgery?
Lomzie  [author] 17 Jul @ 9:43am 
@Diedel Not at the moment, no. I do plan to change this further down the line, however other things take priority at the moment.
Diedel 17 Jul @ 7:00am 
Just to make sure is read the comments right: There is no way to have it created anything for prisoners ? I really hoped i could use this to fix them up automatically :(
KRT™Alexander 29 Jun @ 3:47am 
It works now, awesome!
KRT™Alexander 28 Jun @ 11:03am 
Awesome, I'll let you know when I test next time
Lomzie  [author] 27 Jun @ 7:27am 
New patch has been pushed, which includes a bunch of fixes from @Teemo as well as a fix for the Orassans mod. Apparently the incompatibility was not just, if ever about the body types. Rather, it seems to have been caused by something called "Synchronite" being in the medicine category, but not actually being considered medicine by the mod, which in turn confused the mod into thinking that the surgeries required ingredients weren't available.
Lomzie  [author] 25 Jun @ 8:01am 
I've only glanced at the PR but it looks good! I appreciate it and I hope to find the time for a full review before the weekend.
Teemo 25 Jun @ 7:03am 
I created a PR with my changes, what I changed works for me. hopefully you approve of them.
KRT™Alexander 24 Jun @ 8:19am 
I think it did update for me as I do remember that it fixed the (missing string label) when trying to select the body part to attach the part to, so at least that part was fixed. I just forgot that that had been an issue when I tried originally xD
Lomzie  [author] 24 Jun @ 7:28am 
I have synchronized the most recent changes now. The relevant code can be found here: https://github.com/Lomztein/RW-AutomaticWorkAssignment/tree/main/Addon_AutomaticSurgeries/Source

Any and all ideas and suggestions are welcome and appreciated.
Teemo 24 Jun @ 6:02am 
I checked github and the latest commit is 1 month ago
Lomzie  [author] 24 Jun @ 1:03am 
I'm fairly certain I pushed the patch to the workshop, but it was quite late. The patch came with a new "any part condition" condition, if you have that available then you should be running the new version.
KRT™Alexander 24 Jun @ 12:45am 
Was it the github version that was updated only? I unsubscribed and resubscribed on the steam page to force an update, but if its not on steam yet then that might be why it didn't work
Lomzie  [author] 23 Jun @ 10:55pm 
That's strange. Sounds like it needs further tinkering. The source is on GitHub, the link is available on the main mod, but I haven't synchronized the most recent changes yet. I'll sync it when I get home from work later today.
Teemo 23 Jun @ 6:20pm 
Do you have this mod on github anywhere? I can try to take a look at it as well. I'd love to use this rather than manually try and get every equipped right. Especially after I set all those configurations up.

Also to note, it does assign people, just doesn't add the implants and stuff to their health list to be installed.
Teemo 23 Jun @ 6:19pm 
I should add that it added a part or 2 2 days ago. then when I tried it today it wasn't working at all
Teemo 23 Jun @ 6:18pm 
I couldn't get it to work either. I think it may have assigned 1 or 2 parts, but that's it. Should this get loaded after any mod that adds parts?
KRT™Alexander 23 Jun @ 3:12pm 
I tried on my main save, and it didn't seem to work. Tried with different types of bills including anesthetize and some body parts, it didnt give me any kind of log on what happened either.
I tried with a fresh start but generating new map failed, and atm I dont feel like trying to figure out why that is xD

Basically added a anesthetize bill with assignment set at 100%, then clicked apply and went through my pawns to check if a bill had been added. I assume clicking apply should apply it immediately as another rule gave feedback that "could not apply as pawn already has" message or however it is written precisely
Lomzie  [author] 23 Jun @ 2:14am 
KRT™Alexander I pushed a patch this weekend that should improve the robustness of how my mod handles body parts. I haven't had the chance to test your configuration yet, though. If you have the opportunity, then I would much appreciate if you could check if this patch resolves some of your issues. The mod is still hard-limited to humanoid body plans, but it should (in theory) function better with alien races mods.
Lomzie  [author] 7 Jun @ 1:33pm 
Thank you, I hope the spaghetti code wasn't too nightmarish to look through, some of the core components are in a dire need of a clean-up.

I have a few ideas on how to resolve the race issue, but the way bodies and body parts are tracked makes it rather tricky. I hope to find some time to look into it soon.
KRT™Alexander 7 Jun @ 12:16pm 
Copy, it is weird though cus even normal vanilla pawns with zero genetics or anything have the issue, but I suppose humanoid alien races mod changes it globally

if I could be bothered to set up to compile mods I'd happily help out, but alas I am lazy xD
Regardless, many thanks for your time and your fantastic mods!
Even just looking through how you managed some of the implementation was fun, as was figuring out the ins and outs of the automated work mod
Lomzie  [author] 7 Jun @ 12:06pm 
It seems there is an incompatibility with at least the Orassans mod. I am able to reproduce the error with that mod enabled, regardless of pawn race. It is likely a general issue with the Humanoid Alien Races mod, as my mod assumes only human pawns, but I don't have the time to investigate further right now.

I'll have to figure out a more robust way of handling body parts in the future, but for the time being I recommend not using my mod with other races than humans. It seems my mod is racist ._.
KRT™Alexander 7 Jun @ 11:21am 
and basically all the vanilla races expanded, bun race, fantasy races(LL)
KRT™Alexander 7 Jun @ 11:02am 
Eugh cant cus I added you then cancelled cus I remembered pastebin existed but pastebin wont work xD

I run alien races mod with orassans, androids, some other race mods I cant remember, and (nsfw) RJW which adds gentials to the game, and some race modds from loverslab as well , I dont think any of them alter the bodies in terms of changing how arms work with epoe etc, the body types are the same though their texture is changed I believe
KRT™Alexander 7 Jun @ 10:54am 
Cant pastebin it xD
I'll send it to you on steam if thats ok
Lomzie  [author] 7 Jun @ 8:57am 
That is very strange. Do you have any mods enabled that might alter the bodies of pawns? Can you provide your mod list?

The mod depends on the underlying human body plan definition, if your pawns have a different body plan, then that might be the cause of this issue.
KRT™Alexander 7 Jun @ 8:07am 
With the logging this is the result, I dont think the entire part is relevant but just in case
[AWA:AS] AddBillPostProcessor failed: Target body part mismatch.
https://i.imgur.com/WIPfC5W.png - advanced bionic spine


This is trying to install a synthetic heart
https://i.imgur.com/ypp0irE.png - setup


Its not an issue with reserving the item, it shows passing that check

Tested with a fresh save again, and its the same error
KRT™Alexander 7 Jun @ 6:08am 
Awesome, I'll let you know what I find :-)
Lomzie  [author] 7 Jun @ 5:49am 
@KRT™Alexander I have added logging messages to all checks my mod makes before adding a surgery bill, that should provide some information on failure. Try to unsubscribe and resubscribe to the mod to force a fresh download, and let me know what you see.
Lomzie  [author] 7 Jun @ 5:21am 
There is no logging, but I can quickly add some that might help find the issue. Redownload the mod in an hour or so, and let me know if you learn anything.

It is worth noting that there are a lot of variables with surgeries that my mod needs to account for, and it's perfectly possible that I've missed something.
KRT™Alexander 7 Jun @ 4:44am 
It isnt, have had sometimes upwards of 20 aux worker AI's sat in storage but no surgeries scheduled
I do run LWM's deep storage but my suspicion isnt on that atm, as the item is still on the map, unless perhaps it's struggling to reserve it cus its in deep storage, but it didnt work when I used a normal stockpile either on a new save to see if it was a usage / current play issue

Does the mod have any kind of logging built in that I can check? ie logging the results of the functions associated with the process.
I do run like 500+ mods so it could be any one of those that causes the issue, at some point I'll investigate more properly as well. Dont spend any significant time trying to help here, until I get some more narrowing down on it xD
Lomzie  [author] 7 Jun @ 4:20am 
Everything looks right, and I used EPOE myself when testing. The mod does check for ingredient availability, and reserves ingredients for an in-game day to avoid more surgeries than you can afford. Could this be why it's not working?
KRT™Alexander 6 Jun @ 11:13am 
Is the mod compatible with EPOE forked? https://gtm.steamproxy.vip/workshop/filedetails/?id=1949064302

I've added operations to be done, even in new save(I do have big mod list, but I am getting no errors relating to this mod)

https://imgur.com/a/hga4z2d - is it that I have set it up wrong?
Sylvan_Fox 1 Jun @ 2:58pm 
Finally, Automatic Slave Hemogen Farm.
Lomzie  [author] 27 May @ 5:50am 
[岗] Señiorita woofers You're gonna have to enslave prisoners first for them to be harvested automatically, but you should be able to make it work.

A group of enslaved pigskins with VEs Organ Regeneration gene, all automatically harvested the moment an organ is ready, would truly be a sight to behold.
[岗] Señiorita woofers 27 May @ 4:12am 
Finally. Automated Organ harvest colony.