[0.18.1722] Doctoring/Patienting not correctly treated as "emergency"

Started by tchiseen, November 23, 2017, 06:38:12 PM

Previous topic - Next topic

tchiseen

Hello folks,

I've noticed along with other in B18 that Doctors will often let their patients die while they wander around, eat food and have a nice, full night's rest. I've been able to reproduce this behaviour, and I've even tried an old mod which 'fixed' this, which does not appear to do anything.

I've created a test savegame here: http://www40.zippyshare.com/v/9BLGFzfw/file.html


There are two pawns:

One is injured, downed and will die in ~5 hours.
The other pawn has their Joy at 13%, Food at 16% and Rest at 20%. This pawn is assigned to doctoring and is capable of doctoring.

The needy pawn will sleep until long after the downed pawn dies when left alone.

If you wake the needy pawn up once her rest need is over the second threshold, she will go to Joy activity, and then she will go and eat, while the pawn next to her bleeds to death on the ground. None of these needs crosses the low threshold at any stage.

I found a mod calling "Priority Treatment". As far as I can see, that mod simply sets treatment to "emergency". Here is the code:

<Defs>
  <WorkGiverDef>
    <defName>DoctorTendToHumanlikes</defName>
    <label>tend to patients</label>
    <giverClass>WorkGiver_TendOther</giverClass>
    <workType>Doctor</workType>
    <verb>tend to</verb>
    <gerund>tending to</gerund>
    <emergency>true</emergency>
    <requiredCapacities>
      <li>Manipulation</li>
    </requiredCapacities>
    <priorityInType>70</priorityInType>
    <prioritizeSustains>true</prioritizeSustains>
    <tendToHumanlikesOnly>true</tendToHumanlikesOnly>
  </WorkGiverDef>
...
<Defs>


Even with this mod turned on, the doctor ignores the dying pawn and COMPLETELY fills their needs while the pawn dies next to them. This happens with Work priorities set manually to 1 and when they're just Automatically assigned.

The issue happens when a pawns restrictions are set to "Anything" in the Restrictions tab
If you set the needy pawn to "Work" type restriction, they will eat a meal, and then tend to the patient, they will not seek joy or rest before doing so.

The expected behaviour would be something like;

Pawn is dying (<12 hours say)
  Any pawn assigned to doctoring would try to treat that pawn unless they have another 'emergency' themselves.
  Somewhat low Joy, Rest or Hunger shouldn't stop a pawn who is assigned to Doctoring with a high Priority from treating a badly wounded patient.
  Even with very low joy or hunger, a pawn assigned to doctoring should doctor a very badly injured pawn before seeking joy or food. (Slight Malnutrition is preferable to your friend dying)

And also more generically:
A pawn assigned to "Anything" should prioritize their emergency duties more logically. If everyone around you is writhing on the floor, bleeding to death, but you're getting a bit hungry, would you go to the kitchen, grab a meal, sit down and enjoy it while they died?

I found this post https://ludeon.com/forums/index.php?topic=35545.msg367773#msg367773 which mentions patienting is changed. Is there a way for me to revert this specific change and test the behaviour?


ison

The problem is that the pawn is not in any bed and needs to be rescued first, so it's handled by DoctorRescue, not DoctorTendEmergency.

Hmm, perhaps we should add an emergency version of DoctorRescue.

QuoteI found this post https://ludeon.com/forums/index.php?topic=35545.msg367773#msg367773 which mentions patienting is changed. Is there a way for me to revert this specific change and test the behaviour?

The change was simply to make pawns treat some "Patient" jobs as emergency, in this case it wouldn't change anything anyway.