Ludeon Forums

Ludeon Forums

  • October 15, 2019, 01:04:32 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 2 3 [4] 5 6

Author Topic: [1.0] Smart Medicine  (Read 33350 times)

Marsunpaisti

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #45 on: April 11, 2018, 09:49:26 AM »

Hmm. Not using either one of those. Perhaps its just the reloading of the save that fixes the errors then.
Logged

Reaper

  • Colonist
  • ***
  • Posts: 121
  • Reveried Refugee of The Northern Rim
    • View Profile
Re: [B18] Smart Medicine
« Reply #46 on: April 21, 2018, 11:20:24 PM »

Where can I find the config file for the mod settings?
Logged

Canute

  • Transcendent
  • *****
  • Posts: 7717
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #47 on: April 22, 2018, 03:12:51 AM »

Like all other config files too, should be same area like the safegames.
When you use windows open Options then click at "Open safe data folder".
Logged

alexo

  • Muffalo
  • *
  • Posts: 16
  • Refugee
    • View Profile
    • DEv alexo K
Re: [B18] Smart Medicine
« Reply #48 on: April 24, 2018, 05:05:30 PM »

Congrat! i need this!"
Logged

Kori

  • Colonist
  • ***
  • Posts: 530
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #49 on: June 10, 2018, 07:54:35 AM »

Smart Medicine seems to be conflicting with the Prison Labor mod.
When a prisoner is working as a doctor and tries to use medicine it's not possible and the following error appears

Code: [Select]
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

Can you please include prisoners into your mod's routine to make it compatible?

Does it already work for Hospitality guests who help your colony?
Logged

Sladki

  • Drifter
  • **
  • Posts: 30
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #50 on: June 18, 2018, 04:04:55 AM »

The latest release (from Github) is not compatible with Pharmacy: when a pawn tries to tend, he chooses the best available medicine (Downgrade is disabled) ignoring Pharmacy "advice".

But there is a strange thing: I've tried to compile .dll from source and it works fine with Pharmacy (log shows, that SM prefix uses Pharmacy "advice" validator when tries to find the best medicine).

Uuugggg

  • Drifter
  • **
  • Posts: 76
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #51 on: June 20, 2018, 08:27:35 PM »

Weird, I had rebuilt Smart Medicine to support Pharmacy because it didn't work; no reason it didn't work though.

Well there's a new version that seems to work.
Logged

EgotisticalElf

  • Muffalo
  • *
  • Posts: 3
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #52 on: July 08, 2018, 09:05:39 PM »

I can confirm that Pharmacist and Smart Medicine do not play well on the currently posted 1.0 builds.

I had to rebuild the Pharmacist from source as it needed updated references from the game proper. I tried to recompile Smart Medicine with those same reference updates and with a few compile errors I think resolved, the game refused to load the mod at all.

*edit*
PickUpAndHaul adds items to the pawns inventory as it hauls up to their weight limit, however, this mod hides the ability to see what they have (the button and such is on top of the list i guess).

I lack the skillz to determine why though. :(
« Last Edit: July 08, 2018, 09:36:29 PM by EgotisticalElf »
Logged

Darlathan

  • Drifter
  • **
  • Posts: 21
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #53 on: July 25, 2018, 08:18:35 AM »


Multiple Reservations
This hardly deserves an entire section since it was actually easy to implement and it should be in the base game. But now multiple doctors can reserve the same stack.



Epic

CH3N9

  • Muffalo
  • *
  • Posts: 7
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #54 on: July 29, 2018, 02:59:39 PM »

Current version conflict with Pick Up and Haul 1.0.2 on Rimworld v1.0.1978. Pawn pick up stuffs but doesn't drop 'em at the stockpiles unless I done it manually.

Code: [Select]
Could not execute post-long-event action. Exception: System.TypeInitializationException: An exception was thrown by the type initializer for PickUpAndHaul.HarmonyPatches ---> System.Exception: Exception from HarmonyInstance "mehni.rimworld.pickupthatcan.main" ---> System.ArgumentException: Object type System.Collections.Generic.List`1[Harmony.ILCopying.ExceptionBlock] cannot be converted to target type: System.Collections.Generic.List`1[Harmony.ILCopying.ExceptionBlock]
Parameter name: val
  at System.Reflection.MonoField.SetValue (System.Object obj, System.Object val, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Globalization.CultureInfo culture) [0x000e3] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoField.cs:152
  at Harmony.Traverse.SetValue (System.Object value) [0x00000] in <filename unknown>:0
  at Harmony.CodeTranspiler+<>c__DisplayClass4_0.<ConvertInstruction>b__0 (System.String name, Harmony.Traverse trvFrom, Harmony.Traverse trvDest) [0x00000] in <filename unknown>:0
  at Harmony.Traverse+<>c__DisplayClass37_0.<IterateFields>b__0 (System.String f) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[System.String].ForEach (System.Action`1 action) [0x00018] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:361
  at Harmony.Traverse.IterateFields (System.Object source, System.Object target, System.Action`3 action) [0x00000] in <filename unknown>:0
  at Harmony.CodeTranspiler.ConvertInstruction (System.Type type, System.Object op, System.Collections.Generic.Dictionary`2& unassigned) [0x00000] in <filename unknown>:0
  at Harmony.CodeTranspiler.ConvertInstructionsAndUnassignedValues (System.Type type, IEnumerable enumerable, System.Collections.Generic.Dictionary`2& unassignedValues) [0x00000] in <filename unknown>:0
  at Harmony.CodeTranspiler.ConvertToGeneralInstructions (System.Reflection.MethodInfo transpiler, IEnumerable enumerable, System.Collections.Generic.Dictionary`2& unassignedValues) [0x00000] in <filename unknown>:0
  at Harmony.CodeTranspiler+<>c__DisplayClass10_0.<GetResult>b__0 (System.Reflection.MethodInfo transpiler) [0x00000] in <filename unknown>:0
  at System.Collections.Generic.List`1[System.Reflection.MethodInfo].ForEach (System.Action`1 action) [0x00018] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:361
  at Harmony.CodeTranspiler.GetResult (System.Reflection.Emit.ILGenerator generator, System.Reflection.MethodBase method) [0x00000] in <filename unknown>:0
  at Harmony.ILCopying.MethodBodyReader.FinalizeILCodes (System.Collections.Generic.List`1 transpilers, System.Collections.Generic.List`1 endLabels, System.Collections.Generic.List`1 endBlocks) [0x00000] in <filename unknown>:0
  at Harmony.ILCopying.MethodCopier.Finalize (System.Collections.Generic.List`1 endLabels, System.Collections.Generic.List`1 endBlocks) [0x00000] in <filename unknown>:0
  at Harmony.MethodPatcher.CreatePatchedMethod (System.Reflection.MethodBase original, System.String harmonyInstanceID, System.Collections.Generic.List`1 prefixes, System.Collections.Generic.List`1 postfixes, System.Collections.Generic.List`1 transpilers) [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at Harmony.MethodPatcher.CreatePatchedMethod (System.Reflection.MethodBase original, System.String harmonyInstanceID, System.Collections.Generic.List`1 prefixes, System.Collections.Generic.List`1 postfixes, System.Collections.Generic.List`1 transpilers) [0x00000] in <filename unknown>:0
  at Harmony.PatchFunctions.UpdateWrapper (System.Reflection.MethodBase original, Harmony.PatchInfo patchInfo, System.String instanceID) [0x00000] in <filename unknown>:0
  at Harmony.PatchProcessor.Patch () [0x00000] in <filename unknown>:0
  at Harmony.HarmonyInstance.Patch (System.Reflection.MethodBase original, Harmony.HarmonyMethod prefix, Harmony.HarmonyMethod postfix, Harmony.HarmonyMethod transpiler) [0x00000] in <filename unknown>:0
  at PickUpAndHaul.HarmonyPatches..cctor () [0x00000] in <filename unknown>:0
  --- End of inner exception stack trace ---
  at (wrapper managed-to-native) System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor (intptr)
  at System.Runtime.CompilerServices.RuntimeHelpers.RunClassConstructor (RuntimeTypeHandle type) [0x00026] in /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Runtime.CompilerServices/RuntimeHelpers.cs:101
  at Verse.StaticConstructorOnStartupUtility.CallAll () [0x00022] in C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\StaticConstructorOnStartup.cs:26
  at Verse.PlayDataLoader.<DoPlayLoad>m__2 () [0x00001] in C:\Dev\RimWorld\Assets\Scripts\Verse\Defs\Databases\PlayDataLoader.cs:279
  at Verse.LongEventHandler.ExecuteToExecuteWhenFinished () [0x00036] in C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:489
Verse.Log:Error(String, Boolean) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Utility\Debug\Log\Log.cs:78)
Verse.LongEventHandler:ExecuteToExecuteWhenFinished() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:493)
Verse.LongEventHandler:UpdateCurrentAsynchronousEvent() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:402)
Verse.LongEventHandler:LongEventsUpdate(Boolean&) (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\LongEventHandler.cs:257)
Verse.Root:Update_Patch1(Object)
Verse.Root_Entry:Update() (at C:\Dev\RimWorld\Assets\Scripts\Verse\Global\Root\Root_Entry.cs:38)
Logged

Kassidoo

  • Drifter
  • **
  • Posts: 57
  • Refugee
    • View Profile
Re: [B18] Smart Medicine
« Reply #55 on: August 24, 2018, 10:00:12 AM »

Hi, it seems something broke SmartMedicine today in my game (B19)
https://gist.github.com/HugsLibRecordKeeper/dc1d82931009672417af256e25a35ad5

heres a snipet

Code: [Select]
Isildria threw exception in WorkGiver DoctorTendToHumanlikes: System.NullReferenceException: Object reference not set to an instance of an object
at SmartMedicine.Settings.Get () <0x00022>
at SmartMedicine.GoodLayingStatusForTend_Patch.Postfix (Verse.Pawn,bool&) <0x00031>
at (wrapper dynamic-method) RimWorld.WorkGiver_Tend.GoodLayingStatusForTend_Patch1 (Verse.Pawn,Verse.Pawn) <0x000c2>
at RimWorld.WorkGiver_Tend.HasJobOnThing (Verse.Pawn,Verse.Thing,bool) <0x00103>
at RimWorld.WorkGiver_TendOther.HasJobOnThing (Verse.Pawn,Verse.Thing,bool) <0x00032>
at RimWorld.JobGiver_Work/<TryIssueJobPackage>c__AnonStorey1.<>m__0 (Verse.Thing) <0x0005e>
at Verse.GenClosest/<ClosestThingReachable>c__AnonStorey0.<>m__0 (Verse.Thing) <0x000fa>
at Verse.GenClosest.ClosestThing_Global (Verse.IntVec3,System.Collections.IEnumerable,single,System.Predicate`1<Verse.Thing>,System.Func`2<Verse.Thing, single>) <0x00214>
at Verse.GenClosest.ClosestThingReachable (Verse.IntVec3,Verse.Map,Verse.ThingRequest,Verse.AI.PathEndMode,Verse.TraverseParms,single,System.Predicate`1<Verse.Thing>,System.Collections.Generic.IEnumerable`1<Verse.Thing>,int,int,bool,Verse.RegionType,bool) <0x00504>
at (wrapper dynamic-method) RimWorld.JobGiver_Work.TryIssueJobPackage_Patch1 (object,Verse.Pawn,Verse.AI.JobIssueParams) <0x0131b>
Logged

Uuugggg

  • Drifter
  • **
  • Posts: 76
  • Refugee
    • View Profile
Re: [B19] Smart Medicine
« Reply #56 on: August 30, 2018, 02:19:52 PM »

Updated for official B19, problems seem to be fixed
Logged

deliveryservice

  • Drifter
  • **
  • Posts: 48
  • A Package
    • View Profile
Re: [B19] Smart Medicine
« Reply #57 on: September 04, 2018, 10:53:27 AM »

I get this warning:
Code: [Select]
Tried to use an uninitialized DefOf of type StatDefOf. DefOfs are initialized right after all defs all loaded. Uninitialized DefOfs will return only nulls. (hint: don't use DefOfs as default field values in Defs, try to resolve them in ResolveReferences() instead)
Verse.Log:Warning(String, Boolean)
RimWorld.DefOfHelper:EnsureInitializedInCtor(Type)
RimWorld.StatDefOf:.cctor()
System.RuntimeMethodHandle:GetFunctionPoi

This is mild but it may leads to complication after more mods were added.
« Last Edit: September 04, 2018, 10:55:12 AM by deliveryservice »
Logged

bigheadzach

  • Colonist
  • ***
  • Posts: 151
  • Refugee
    • View Profile
Re: [B19] Smart Medicine
« Reply #58 on: September 22, 2018, 02:09:43 PM »

So I have a prisoner develop an infected injury (2% higher than immunity at the time) and my colony only has standard medicine, no herbal. Both Smart Medicine and Pharmacist are set to their initial settings, which suggest that even a prisoner should get standard meds for a life-threatening injury (which an infection leading immunity would be).

Yet, the doctor applies no medicine to tending the infection. The only way I "fixed" this was cranking both Pharmacist and the prisoner's personal vanilla settings from "Herbal" to "Best Possible".

Am I seeing a bug, or am I misunderstanding how SM determines the use of standard meds? Is there a logic that gives up when "Herbal or worse" is the setting and only "Better than Herbal or nothing" is available?
Logged

Soupy Delicious

  • Drifter
  • **
  • Posts: 93
  • Refugee
    • View Profile
Re: [B19] Smart Medicine
« Reply #59 on: October 25, 2018, 09:15:23 AM »

Wow, looks like a really well thought out mod.  I'd be interested, if you'd update :D
Logged
Pages: 1 2 3 [4] 5 6