RimWorld

RimWorld

Quality Surgeon Reborn
38 Comments
WAAAAGH!!! 16 hours ago 
:steamthumbsup:
тетеря, блин 23 hours ago 
thanks 👍
Gideon  [author] 10 Jun @ 8:23am 
All, I'm doing a code review for this mod. It looks like the reason people are experiencing situations where an unavailable best doc makes no surgery get done is because the way the code handles checking doc eligibility is not adaptive, it always checks for the best doc and if that doc is unavailable no one else ever bets the bill.

I'm looking into a way to cache docs on the map and instead of stalling the job when the best pawn is unavailable, having it look at that list to see if the pawn who wants to do the job is in the eligible docs list at the highest skilled spot.

This approach will work, but it's a performance hog when jobs are evaluated, so it requires optimizations to avoid rebuilding the cache every time a pawn wants to do a job (this will get expensive on CPU as more pawns join the colony). I have ideas for this as well, but please be patient as this will all take some time to design and test.
Gideon  [author] 5 Jun @ 9:51am 
No worries
ignis 5 Jun @ 9:37am 
I don't have it saved
Gideon  [author] 5 Jun @ 8:35am 
@Ignis, do you have a save file where this happened? If so, please friend me and I'll work with you to look into this.
ignis 17 Apr @ 6:12pm 
Looks like if the best surgeon in the colony is paramedic, mod breaks and no surgery is performed.
subhuman_p0s 21 Feb @ 7:36am 
is there a similar mod but for diseases?
Gideon  [author] 22 Jan @ 7:53am 
@Thels, I'm not a fan of log spam. If you don't mind, please friend me and I'd like to get screenshots of what you're experiencing so I can see if I can decompile and remove the log spam.
Robin Banks 16 Oct, 2024 @ 10:22pm 
@Thels what log spam? so it' causes errors?
(^0v0^)OriginalOwl 21 Aug, 2024 @ 6:48am 
When gatekeeping goes wrong
Thels 21 Aug, 2024 @ 2:27am 
Please note, this mod causes a lot of debug log spam.
Gideon  [author] 9 Aug, 2024 @ 9:23am 
@Ganja

The very first line of the description says it isn't my original work and who the creator was:

Reupload for 1.5 of Hatti's QualitySurgeon. The original mod is located here: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=857350593
GanjaMan [NL] 8 Aug, 2024 @ 9:49pm 
you shouldn't name the mod like it's your own man, its kinda low ngl
Babok3k3 11 Jul, 2024 @ 4:22am 
i have my best guy with 20 medic but the 2nd medic with 8 want to do all surgery
ED-9527 28 Jun, 2024 @ 7:49pm 
If he is the one on the table, or is unable to perform tasks requiring manipulation, the next best one will perform the operation.

I used a single mechanic and tried to use a nursing robot to operate on myself.
But when I lay in bed waiting for the operation, the nursing robot did not respond.
There is only one person in my colony, the above is from Google translator.
Dat_ni 26 Jun, 2024 @ 4:57pm 
@013A I have the same problem, only surgeries i have seen done are the administer drug type, others i have to force my doctors.
013A 9 Jun, 2024 @ 9:43am 
it seems like the mod isnt giving the job to the next best surgeon when the best one is busy. my best doctor was waiting for a bionic spine and the guy next in line wouldnt do the job until i turned off doctoring for the better one
Democracy Officer 24 May, 2024 @ 1:14pm 
Ive noticed that this mod appear in my mod load list in the main menu, but does not appear in my mod list, in game. I noticed it after almost lost a pawn to a unskilled surgeon. It is not working for me, even in new games, for some reason.
Gideon  [author] 22 May, 2024 @ 11:35am 
@Roggle, to be clear, the mod does not force the best surgeon to do anything, it just prevents others from doing surgery. If you have doctoring disabled (or low priority), operations will not get done.
Roggle 20 May, 2024 @ 4:32pm 
@Gideon I don't think so haha. Must be a complication with another mod I had.
Gideon  [author] 19 May, 2024 @ 9:55am 
@Roggle I have not had this problem. Your work priorities might need adjusting.
Roggle 19 May, 2024 @ 9:53am 
Thanks for the effort but sadly it doesn't work for me. Issue is no one went to do the operation even after two days so something is wrong. (tons of good doctors not hurt). Thanks though bud.
Glass Shahk 9 May, 2024 @ 4:00pm 
This mod is unfortunately breaking some pawn logic causing my second best surgeon (the only person assigned to actually do surgery) to grab meds off the shelf, decide that he's not the right guy for the job, drop the meds on the floor. Then the jobgiver tries to give the job to my best surgeon (who isn't assigned to do any surgery); they promptly ignore the jobgiver because it isn't their job, and my second best surgeon tries to take over repeating this loop.
Nepenthe 1 May, 2024 @ 8:17pm 
I use DnSpy; it's great for viewing the code inside C# Mono DLLs and makes editing the DLLs a simple right click -> edit, change code, compile, save. (Or copy the code out to a new c# project if you want to make it easier for long-term maintenance)

I'm happy to help with getting this mod back into a Visual Studio project if you decide to take on maintenance of it.

https://i.imgur.com/4cj8exf.png
Gideon  [author] 1 May, 2024 @ 7:55pm 
@Nepenthe, you're welcome. At this time, I don't have original source code for the mod, so this reup was simply to make it stop giving incompatibility notices. If the original modder doesn't pick it back up again, I'll look at the effort to decompile and attempt to rebuild the project from scratch.
Nepenthe 30 Apr, 2024 @ 8:36pm 
Also, thanks for the mod - this has saved many of my colonists from botched surgeries without needing to micromanage everything.
Nepenthe 30 Apr, 2024 @ 8:35pm 
Anomaly adds a "surgical inspection" and because of [REDACTED] you don't always want your best surgeon to do the surgery; it's often best to have a paramedic mech do the work. While you can force any humanlike pawn to perform a surgery with this mod installed you can't force a paramedic. Adding an exception to the postfix patch to not cancel surgery if the pawn checking to see if they can do the job is a mech and the job is a surgical inspection fixes that:

Current code in QualitySurgeon.Postfix() (as seen in dnSpy):

if (QualitySurgeon.isSurgery(recipe) && QualitySurgeon.checkForDoc(pawn, billGiver, recipe))

Suggested updated:

if (QualitySurgeon.isSurgery(recipe) && QualitySurgeon.checkForDoc(pawn, billGiver, recipe) && (!(recipe.defName == "SurgicalInspection" && pawn.RaceProps.IsMechanoid)))
Gideon  [author] 30 Apr, 2024 @ 1:32pm 
@lol Thanks for sharing that. I try to remember to put that link in the description, but forgot to on this one. I'll add it for transparency.
lol 23 Apr, 2024 @ 2:14am 
The original mod is here, in case anyone needs it: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=857350593
Gideon  [author] 21 Apr, 2024 @ 7:18pm 
If you don't allow someone to perform medical jobs it will not override.
[JdG] Pejman 21 Apr, 2024 @ 2:55pm 
Does it check for job priorities ? I remember that one time where I didn't know my best medical pawn wasn't affected to doctor so no surgeries would get done
Beinskalle 19 Apr, 2024 @ 4:17pm 
@Gideon Cool, np if not :Khappy:
Gideon  [author] 19 Apr, 2024 @ 10:52am 
@Beinskalle No promises but I'll check out that mod and see what it might take.
Gideon  [author] 19 Apr, 2024 @ 10:51am 
@Kullix what I want to know is why this isn't vanilla logic yet. lol
Beinskalle 19 Apr, 2024 @ 9:53am 
Nice, thanks for the reupload! Would also love a reupload of "Finishing Touches By The Best Builder" by ryouta, if possible! :D
Azylacus 19 Apr, 2024 @ 9:36am 
@Kullix
No has needed to make this mod before, because this one has existed for years
Kullix 19 Apr, 2024 @ 9:31am 
are there no other mods that do this? like dont get me wrong this mod is absolute fire and ive downloaded it instantly but like why the hell has NO ONE done this yet 😭