RimWorld

RimWorld

Desperate Hunger(Continued)
lol 10 Jun @ 2:29am
Bugreport: body mastery from Anomaly
Looks like 'Body mastery' trait doesnt' play nicely with this mod. It removes food need which throws red errors.



ERROR

Exception in Verse.AI.ThinkNode_Priority TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
[Ref C51C759B]
at CM_Desperate_Hunger.JobGiver_GetFood_Patches+JobGiver_GetFood_TryGiveJob.Postfix (Verse.Pawn pawn, RimWorld.JobGiver_GetFood __instance, Verse.AI.Job& __result) [0x00011] in <6d5f5bd932f94341a54c0ebca591d13d>:0
at RimWorld.JobGiver_GetFood.TryGiveJob (Verse.Pawn pawn) [0x002af] in <6730df069ffe428683811f303f55aa22>:0
- PREFIX Telardo.MultiFloors: Boolean MultiFloors.HarmonyPatch_MainColonistBehavior:BackToDietLevelForGetFood(Pawn pawn, Job& __result)
- PREFIX OskarPotocki.VFECore: Boolean AnimalBehaviours.VanillaExpandedFramework_JobGiver_GetFood_GetPriority_Patch:StopEatingThings(Pawn pawn)
- POSTFIX CM_Desperate_Hunger: Void CM_Desperate_Hunger.JobGiver_GetFood_Patches+JobGiver_GetFood_TryGiveJob:Postfix(Pawn pawn, JobGiver_GetFood __instance, Job& __result)
- POSTFIX Orion.Gastronomy: Void Gastronomy.Dining._JobGiver_GetFood_Patch+TryGiveJob:Postfix(Job& __result, Pawn pawn)
at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00008] in <6730df069ffe428683811f303f55aa22>:0
- POSTFIX Krkr.Rule56: Void CombatAI.Patches.ThinkNode_Patch+ThinkNode_TryIssueJobPackage_Patch:Postfix(ThinkNode __instance, ThinkResult __result, Pawn pawn)
at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x0002d] in <6730df069ffe428683811f303f55aa22>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable`1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable`1 instructions, MethodBase original)
- POSTFIX Krkr.Rule56: Void CombatAI.Patches.ThinkNode_Patch+ThinkNode_TryIssueJobPackage_Patch:Postfix(ThinkNode __instance, ThinkResult __result, Pawn pawn)
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch3 (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Priority.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Priority,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.ThinkNode_Duty.TryIssueJobPackage_Patch1 (RimWorld.ThinkNode_Duty,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Priority.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Priority,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Conditional.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Conditional,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Priority.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Priority,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Tagger.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Tagger,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Subtree.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Subtree,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Priority.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Priority,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:RimWorld.ThinkNode_JoinVoluntarilyJoinableLord.TryIssueJobPackage_Patch1 (RimWorld.ThinkNode_JoinVoluntarilyJoinableLord,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.ThinkNode_Priority.TryIssueJobPackage_Patch1 (Verse.AI.ThinkNode_Priority,Verse.Pawn,Verse.AI.JobIssueParams)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Pawn_JobTracker.DetermineNextJob_Patch1 (Verse.AI.Pawn_JobTracker,Verse.ThinkTreeDef&,bool)
Verse.AI.Pawn_JobTracker:TryFindAndStartJob ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Pawn_JobTracker.EndCurrentJob_Patch6 (Verse.AI.Pawn_JobTracker,Verse.AI.JobCondition,bool,bool)
Verse.AI.JobDriver:EndJobWith (Verse.AI.JobCondition)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.TryActuallyStartNextToil_Patch1 (Verse.AI.JobDriver)
Verse.AI.JobDriver:ReadyForNextToil ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.JobDriver.TryActuallyStartNextToil_Patch1 (Verse.AI.JobDriver)
Verse.AI.JobDriver:ReadyForNextToil ()
Verse.AI.JobDriver:Notify_PatherArrived ()
Verse.AI.Pawn_PathFollower:PatherArrived ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Pawn_PathFollower.TryEnterNextPathCell_Patch1 (Verse.AI.Pawn_PathFollower)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.AI.Pawn_PathFollower.PatherTick_Patch3 (Verse.AI.Pawn_PathFollower)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Pawn.Tick_Patch2 (Verse.Pawn)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickList.Tick_Patch2 (Verse.TickList)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.DoSingleTick_Patch6 (Verse.TickManager)
Verse.TickManager:TickManagerUpdate ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch2 (Verse.Game)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Root_Play.Update_Patch1 (Verse.Root_Play)




POSSIBLE SOLUTION (by cursor, I'm a noob)
// ... existing code ...
[HarmonyPostfix]
public static void Postfix(Pawn pawn, JobGiver_GetFood __instance, ref Job __result)
{
// Don't need to do this if TryGiveJob was already successful, or if the animal is not starving

REMOVE if (__result != null || !DesperateHungerMod.settings.featureEnabled || pawn.needs.food.CurCategory != HungerCategory.Starving || (!DesperateHungerMod.settings.desperateHumans && !pawn.AnimalOrWildMan()))

INPUT if (__result != null || !DesperateHungerMod.settings.featureEnabled || pawn?.needs?.food == null || pawn.needs.food.CurCategory != HungerCategory.Starving || (!DesperateHungerMod.settings.desperateHumans && !pawn.AnimalOrWildMan()))
return;

// Find something to eat
Pawn prey = BestPawnToHuntForPredator(pawn, __instance.forceScanWholeMap);
// ... existing code ...
< >
Showing 1-2 of 2 comments
lol 10 Jun @ 10:46pm 
Looks like something similar here


Exception in Verse.AI.ThinkNode_Priority.TryIssueJobPackage: System.NullReferenceException: Object reference not set to an instance of an object
[Ref C51C759B]
at CM_Desperate_Hunger.JobGiver_GetFood_Patches+JobGiver_GetFood_TryGiveJob.Postfix (Verse.Pawn pawn, RimWorld.JobGiver_GetFood __instance, Verse.AI.Job& __result) [0x00011] in <6d5f5bd932f94341a54c0ebca591d13d>:0
at RimWorld.JobGiver_GetFood.TryGiveJob (Verse.Pawn pawn) [0x002af] in <6730df069ffe428683811f303f55aa22>:0
- PREFIX Telardo.MultiFloors: Boolean MultiFloors.HarmonyPatch_MainColonistBehavior:BackToDietLevelForGetFood(Pawn pawn, Job& __result)
- PREFIX OskarPotocki.VFECore: Boolean AnimalBehaviours.VanillaExpandedFramework_JobGiver_GetFood_GetPriority_Patch:StopEatingThings(Pawn pawn)
- POSTFIX CM_Desperate_Hunger: Void CM_Desperate_Hunger.JobGiver_GetFood_Patches+JobGiver_GetFood_TryGiveJob:Postfix(Pawn pawn, JobGiver_GetFood __instance, Job& __result)
- POSTFIX Orion.Gastronomy: Void Gastronomy.Dining._JobGiver_GetFood_Patch+TryGiveJob:Postfix(Job& __result, Pawn pawn)
at Verse.AI.ThinkNode_JobGiver.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x00008] in <6730df069ffe428683811f303f55aa22>:0
- POSTFIX Krkr.Rule56: Void CombatAI.Patches.ThinkNode_Patch+ThinkNode_TryIssueJobPackage_Patch:Postfix(ThinkNode __instance, ThinkResult __result, Pawn pawn)
at Verse.AI.ThinkNode_Priority.TryIssueJobPackage (Verse.Pawn pawn, Verse.AI.JobIssueParams jobParams) [0x0002d] in <6730df069ffe428683811f303f55aa22>:0
- TRANSPILER net.pardeike.rimworld.lib.harmony: IEnumerable1 VisualExceptions.ExceptionsAndActivatorHandler:Transpiler(IEnumerable1 instructions, MethodBase original)
- POSTFIX Krkr.Rule56: Void CombatAI.Patches.ThinkNode_Patch+ThinkNode_TryIssueJobPackage_Patch:Postfix(ThinkNode __instance, ThinkResult __result, Pawn pawn)
bblkepling  [developer] 16 Jun @ 8:48pm 
Should be fixed now, next time please report bugs with a Hugslog in the comment section. Steam doesn't send me notifications for new discussions while it does for comments.
< >
Showing 1-2 of 2 comments
Per page: 1530 50