[1.4] Antaios's Mods - Table Diner + Mod Medicine Patch

Started by Antaios, June 07, 2017, 12:07:52 AM

Previous topic - Next topic

Harry_Dicks

Quote from: MightyGooga on February 16, 2018, 08:29:55 PM
I would like to ask how to disable the packed lunch functionality? I play with SKHC

I believe this is a function of only HCSK, and not this mod. I could be wrong, but there is a chance that installing any extra mods with HCSK has the chance of breaking something. This is because HCSK changes so much of the base game, that anything that relies on Core defs can get really messed up.

Antaios

Quote from: Harry_Dicks on February 16, 2018, 09:24:24 PM
Quote from: MightyGooga on February 16, 2018, 08:29:55 PM
I would like to ask how to disable the packed lunch functionality? I play with SKHC

I believe this is a function of only HCSK, and not this mod. I could be wrong, but there is a chance that installing any extra mods with HCSK has the chance of breaking something. This is because HCSK changes so much of the base game, that anything that relies on Core defs can get really messed up.

Hmm, Sorry I missed this, Haven't checked the thread in a bit, Thought I had email prefs set...

I can't imagine this is something Table Diner has done itself. The Packed Lunch 'compatibility' is moreso a check that ensures TD doesn't overwrite any food search values that are explicitly stated or non-default. The only times it would do this, is in the configurable version if you tick the option for "Overwrite non-default search distances".
Either way, Table Diner would merely get people to eat their inventory meals at a table, not change which food they decide to eat, It's a whole other functionality which neither Table Diner nor Packed Lunch touch.

Lethe

Yes!!! Eating at tables!! How did I not notice this mod before?! Thank you! Some of my sanity has been restored to me. <3 I won't have to do my morning 'watch the colonists to ensure they're not eating in their rooms' ritual anymore! Freedom!!!

Rex705

I see some yellow table errors in the log. Everything seems to work I have no problems but I do see errors.

Antaios

Quote from: Rex705 on May 18, 2018, 06:49:46 PM
I see some yellow table errors in the log. Everything seems to work I have no problems but I do see errors.

Something about static constructors?
They're just warnings, not errors. Rimworld is over-cautious in that regard, it shouldn't be an issue.

Kori


Kori

Hello Antaios,

when I use an individual medicine setting for certain pawns or animals that is worse than the one selected in Pharmacist, my pawns become stuck.

First you get this error for ten times:
Notice: Modified by PharmMedicinePatch | Selected Medicine: Normal medicine or worse, As opposed to: Doctor care, but no medicine
Needed medicine  for Donkey was dropped onto a reserved stack. Job will fail and try again, so ignore the error please.

followed by
Notice: Modified by PharmMedicinePatch | Selected Medicine: Normal medicine or worse, As opposed to: Doctor care, but no medicine
Donkey started 10 jobs in one tick. newJob=TendPatient (Job_969836) A=Thing_ACPPeccary52688 B=Thing_Medicine52805 jobGiver=RimWorld.JobGiver_Work jobList=(TendPatient (Job_969816) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969818) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969820) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969822) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969824) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969826) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969828) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969830) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969832) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969834) A=Thing_ACPPeccary52688 B=Thing_Medicine52805) (TendPatient (Job_969836) A=Thing_ACPPeccary52688 B=Thing_Medicine52805)  lastJobGiver=RimWorld.JobGiver_Work

and now the pawn is frozen and cannot move.

It would be very helpful when it's safe to override the general Pharmacist settings with individual settings. Let's say you want to rescue wild animals without medicine, but the general setting you usually use for colony animals is with medicine.

Is this the right place to report this, or should I post it in the Pharmacist thread instead?

Uuugggg

> when I use an individual medicine setting for certain pawns or animals that is worse than the one selected in Pharmacist, my pawns become stuck.

Yea, the pharmacist patch is buggy in this case - even with vanilla medicines.

I can also tell you why! The JobDriver_TendPatient is failing since it checks if the patient is allowed to use the medicine chosen for the tending. The Pharmacist Patch is choosing higher meds than allowed. The job starts with disallowed medicine, immediately fails, and restarts with the same disallowed medicine again.

So, uh I can't quite tell what how that patch is supposed to work, but it's choosing disallowed medicine levels.

(Smart Medicine is logging that "Needed medicine  for Donkey was dropped onto a reserved stack. Job will fail and try again, so ignore the error please." but the job is failing without Smart Medicine anyway)

Antaios

Oops, My bad.

I forgot about my own index offset, so it was comparing the wrong medicines, and therefore reaching the wrong conclusions.
Updated, and it should be fixed now.


Kori

I still get these notifications whenever medicine is picked ;)
Notice: Modified by PharmMedicinePatch | Selected Medicine: Herbal medicine or worse, As opposed to: Herbal medicine or worse
Notice: Modified by PharmMedicinePatch | Selected Medicine: Doctor care, but no medicine, As opposed to: Doctor care, but no medicine

Is it possible that the patch or Pharmacist in general breaks the ability of non-colonist humans (prisoners with Prison Labor, guests with Hospitality..) to pick and use medicine?
When one of my prisoners tried to tend an injured colonist, I got the following error:

Notice: Modified by PharmMedicinePatch | Selected Medicine: Herbal medicine or worse, As opposed to: Herbal medicine or worse

Needed medicine  for Wolverine was dropped onto a reserved stack. Job will fail and try again, so ignore the error please.

JobDriver threw exception in initAction. Pawn=Wolverine, Job=TendPatient (Job_1209010) A=Thing_Human15994, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.AI.Toils_Haul+<CheckForGetOpportunityDuplicate>c__AnonStorey2.<>m__0 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver=PrisonLabor.JobGiver_Labor, curJob.def=TendPatient, curDriver=RimWorld.JobDriver_TendPatient


Prisoners seem to be completely unable to tend wounds now, they only feed the patients..  :(


Antaios

Quote from: Kori on May 29, 2018, 04:16:04 PM
I still get these notifications whenever medicine is picked ;)
Notice: Modified by PharmMedicinePatch | Selected Medicine: Herbal medicine or worse, As opposed to: Herbal medicine or worse
Notice: Modified by PharmMedicinePatch | Selected Medicine: Doctor care, but no medicine, As opposed to: Doctor care, but no medicine
There should be some random lines before those messages aswell, from base Pharmacist.
It's some debug stuff I want to leave in as long as Fluffy has his lines in. So no-one ever looks at Pharmacist debug logs without knowing the patch is altering it's behaviour. I can remove it, and Fluffy has an issue on his github to remove his 'debug spam', I'll probably wait until he updates though. The log messages should be harmless, they're not errors, just 'info'.

Quote from: Kori on May 29, 2018, 04:16:04 PM
Is it possible that the patch or Pharmacist in general breaks the ability of non-colonist humans (prisoners with Prison Labor, guests with Hospitality..) to pick and use medicine?
When one of my prisoners tried to tend an injured colonist, I got the following error:

Notice: Modified by PharmMedicinePatch | Selected Medicine: Herbal medicine or worse, As opposed to: Herbal medicine or worse

Needed medicine  for Wolverine was dropped onto a reserved stack. Job will fail and try again, so ignore the error please.

JobDriver threw exception in initAction. Pawn=Wolverine, Job=TendPatient (Job_1209010) A=Thing_Human15994, Exception: System.NullReferenceException: Object reference not set to an instance of an object
  at Verse.AI.Toils_Haul+<CheckForGetOpportunityDuplicate>c__AnonStorey2.<>m__0 () [0x00000] in <filename unknown>:0
  at Verse.AI.JobDriver.TryActuallyStartNextToil () [0x00000] in <filename unknown>:0  lastJobGiver=PrisonLabor.JobGiver_Labor, curJob.def=TendPatient, curDriver=RimWorld.JobDriver_TendPatient


Prisoners seem to be completely unable to tend wounds now, they only feed the patients..  :(
I don't think this is Pharmacist's doing, it's done its work by that time.
It might be a conflict between smart medicine and prison labour. Smart medicine looks as if it intends for that error to pop up in the event medicine is dropped for tending and is 'forbidden', it may be that the prisoners consider it forbidden, and then prison labour is either not restarting the job, or the prisoners can't use medicine because the game considers it forbidden for them.
That's my best guess from ~10 minutes through the githubs & source.

I'd try making a backup of your save, then removing Pharmacist and seeing if it still happens, then remove smart medicine and check that aswell.

Kori

You are right, without Smart Medicine it works.
Thank you for your help!

mrsebseb


Antaios

Recompiled pharmacist patch for new Pharmacist version, no significant changes.