RimWorld

RimWorld

Medical System Expansion 2
nikos 24 Jan, 2021 @ 11:04am
Rimthreaded Movement stat calculation issue.
This is the only issue i have had with RT + MSE2 so far.
The issue is that colonists / visitors / animals / mechs. don't calculate the moving stat correctly (so far only the movement stat has been affected) (and only seems to happen when pawns are generated on the map (raids / traders / etc...)

I was wondering if this is something that the MSE2 developers can easily fix?

To reproduce issue:

1. Use Rimthreaded mod with MSE2
2. use dev mode to spawn trade caravans or raids
3. some of the pawns (usually 1-2 people in a caravan) have bugged movement stat
4. if the affected pawn has to recalculate the movement stat, the issue goes away. (if the bugged pawn gets hungry for example or if a bugged raider gets shot)


Exception ticking Cagal (at (293, 0, 2)): System.NullReferenceException: Object reference not set to an instance of an object
at RimThreaded.PawnCapacityUtility_Patch.CalculatePartEfficiency (System.Single& __result, Verse.HediffSet diffSet, Verse.BodyPartRecord part, System.Boolean ignoreAddedParts, System.Collections.Generic.List`1[T] impactors) [0x00007] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
at (wrapper dynamic-method) Verse.PawnCapacityUtility.Verse.PawnCapacityUtility.CalculatePartEfficiency_Patch3(Verse.HediffSet,Verse.BodyPartRecord,bool,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
at MSE2.HarmonyPatches.LimbEfficiencyFix.SingleLimbCalc (Verse.BodyPartRecord limbCore, Verse.HediffSet diffSet, Verse.BodyPartTagDef limbSegmentTag, Verse.BodyPartTagDef limbDigitTag, System.Single appendageWeight, System.Collections.Generic.List`1[T] impactors, System.Single& totLimbEff, System.Int32& totLimbs, System.Int32& functionalLimbs) [0x0004e] in <289cabf940b24550bfb971ccfdb75e21>:0
at (wrapper dynamic-method) Verse.PawnCapacityUtility.Verse.PawnCapacityUtility.CalculateLimbEfficiency_Patch1(Verse.HediffSet,Verse.BodyPartTagDef,Verse.BodyPartTagDef,Verse.BodyPartTagDef,single,single&,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
at RimWorld.PawnCapacityWorker_Moving.CalculateCapacityLevel (Verse.HediffSet diffSet, System.Collections.Generic.List`1[T] impactors) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.PawnCapacityUtility.CalculateCapacityLevel (Verse.HediffSet diffSet, Verse.PawnCapacityDef capacity, System.Collections.Generic.List`1[T] impactors, System.Boolean forTradePrice) [0x00044] in <d72310b4d8f64d25aee502792b58549f>:0
at RimThreaded.PawnCapacitiesHandler_Patch.getCacheElementResult (Verse.PawnCapacitiesHandler __instance, Verse.PawnCapacityDef capacity) [0x0007a] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
at (wrapper dynamic-method) Verse.PawnCapacitiesHandler.Verse.PawnCapacitiesHandler.GetLevel_Patch0(Verse.PawnCapacitiesHandler,Verse.PawnCapacityDef)
at (wrapper dynamic-method) RimWorld.StatWorker.RimWorld.StatWorker.GetValueUnfinalized_Patch1(RimWorld.StatWorker,RimWorld.StatRequest,bool)
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest req, System.Boolean applyPostProcess) [0x00043] in <d72310b4d8f64d25aee502792b58549f>:0
at RimWorld.StatWorker.GetValue (Verse.Thing thing, System.Boolean applyPostProcess) [0x00007] in <d72310b4d8f64d25aee502792b58549f>:0
at RimWorld.StatExtension.GetStatValue (Verse.Thing thing, RimWorld.StatDef stat, System.Boolean applyPostProcess) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.TicksPerMove_Patch2(Verse.Pawn,bool)
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.get_TicksPerMoveCardinal_Patch1(Verse.Pawn)
at (wrapper dynamic-method) Verse.AI.PathFinder.Verse.AI.PathFinder.FindPath_Patch0(Verse.AI.PathFinder,Verse.IntVec3,Verse.LocalTargetInfo,Verse.TraverseParms,Verse.AI.PathEndMode)
at Verse.AI.PathFinder.FindPath (Verse.IntVec3 start, Verse.LocalTargetInfo dest, Verse.Pawn pawn, Verse.AI.PathEndMode peMode) [0x00028] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x0002c] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00211] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.PatherTick () [0x001c8] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.Pawn.Tick () [0x00054] in <d72310b4d8f64d25aee502792b58549f>:0
at RimThreaded.RimThreaded.ExecuteTicks () [0x00105] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
Verse.Log:Error(String, Boolean)
RimThreaded.RimThreaded:ExecuteTicks()
RimThreaded.RimThreaded:ProcessTicks()
RimThreaded.<>c:<CreateWorkerThread>b__88_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
< >
Showing 1-2 of 2 comments
nikos 24 Jan, 2021 @ 11:11am 
Not sure if this is related. but i will post anyway

Exception ticking GuineaPig653369 (at (323, 0, 122)): System.NullReferenceException: Object reference not set to an instance of an object
at RimThreaded.PawnCapacityUtility_Patch.CalculatePartEfficiency (System.Single& __result, Verse.HediffSet diffSet, Verse.BodyPartRecord part, System.Boolean ignoreAddedParts, System.Collections.Generic.List`1[T] impactors) [0x00007] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
at (wrapper dynamic-method) Verse.PawnCapacityUtility.Verse.PawnCapacityUtility.CalculatePartEfficiency_Patch3(Verse.HediffSet,Verse.BodyPartRecord,bool,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
at MSE2.HarmonyPatches.LimbEfficiencyFix.SingleLimbCalc (Verse.BodyPartRecord limbCore, Verse.HediffSet diffSet, Verse.BodyPartTagDef limbSegmentTag, Verse.BodyPartTagDef limbDigitTag, System.Single appendageWeight, System.Collections.Generic.List`1[T] impactors, System.Single& totLimbEff, System.Int32& totLimbs, System.Int32& functionalLimbs) [0x0004e] in <289cabf940b24550bfb971ccfdb75e21>:0
at (wrapper dynamic-method) Verse.PawnCapacityUtility.Verse.PawnCapacityUtility.CalculateLimbEfficiency_Patch1(Verse.HediffSet,Verse.BodyPartTagDef,Verse.BodyPartTagDef,Verse.BodyPartTagDef,single,single&,System.Collections.Generic.List`1<Verse.PawnCapacityUtility/CapacityImpactor>)
at RimWorld.PawnCapacityWorker_Moving.CalculateCapacityLevel (Verse.HediffSet diffSet, System.Collections.Generic.List`1[T] impactors) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.PawnCapacityUtility.CalculateCapacityLevel (Verse.HediffSet diffSet, Verse.PawnCapacityDef capacity, System.Collections.Generic.List`1[T] impactors, System.Boolean forTradePrice) [0x00044] in <d72310b4d8f64d25aee502792b58549f>:0
at RimThreaded.PawnCapacitiesHandler_Patch.getCacheElementResult (Verse.PawnCapacitiesHandler __instance, Verse.PawnCapacityDef capacity) [0x0007a] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
at (wrapper dynamic-method) Verse.PawnCapacitiesHandler.Verse.PawnCapacitiesHandler.GetLevel_Patch0(Verse.PawnCapacitiesHandler,Verse.PawnCapacityDef)
at (wrapper dynamic-method) RimWorld.StatWorker.RimWorld.StatWorker.GetValueUnfinalized_Patch1(RimWorld.StatWorker,RimWorld.StatRequest,bool)
at RimWorld.StatWorker.GetValue (RimWorld.StatRequest req, System.Boolean applyPostProcess) [0x00043] in <d72310b4d8f64d25aee502792b58549f>:0
at RimWorld.StatWorker.GetValue (Verse.Thing thing, System.Boolean applyPostProcess) [0x00007] in <d72310b4d8f64d25aee502792b58549f>:0
at RimWorld.StatExtension.GetStatValue (Verse.Thing thing, RimWorld.StatDef stat, System.Boolean applyPostProcess) [0x00006] in <d72310b4d8f64d25aee502792b58549f>:0
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.TicksPerMove_Patch2(Verse.Pawn,bool)
at (wrapper dynamic-method) Verse.Pawn.Verse.Pawn.get_TicksPerMoveCardinal_Patch1(Verse.Pawn)
at (wrapper dynamic-method) Verse.AI.PathFinder.Verse.AI.PathFinder.FindPath_Patch0(Verse.AI.PathFinder,Verse.IntVec3,Verse.LocalTargetInfo,Verse.TraverseParms,Verse.AI.PathEndMode)
at Verse.AI.PathFinder.FindPath (Verse.IntVec3 start, Verse.LocalTargetInfo dest, Verse.Pawn pawn, Verse.AI.PathEndMode peMode) [0x00028] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.GenerateNewPath () [0x0002c] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.TrySetNewPath () [0x00000] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.TryEnterNextPathCell () [0x00211] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.AI.Pawn_PathFollower.PatherTick () [0x001c8] in <d72310b4d8f64d25aee502792b58549f>:0
at Verse.Pawn.Tick () [0x00054] in <d72310b4d8f64d25aee502792b58549f>:0
at RimThreaded.RimThreaded.ExecuteTicks () [0x00105] in <0ab21a70642749dcbfc77cddb42d7b0d>:0
Verse.Log:Error(String, Boolean)
RimThreaded.RimThreaded:ExecuteTicks()
RimThreaded.RimThreaded:ProcessTicks()
RimThreaded.<>c:<CreateWorkerThread>b__88_0()
System.Threading.ThreadHelper:ThreadStart_Context(Object)
System.Threading.ExecutionContext:RunInternal(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object, Boolean)
System.Threading.ExecutionContext:Run(ExecutionContext, ContextCallback, Object)
System.Threading.ThreadHelper:ThreadStart()
Last edited by nikos; 24 Jan, 2021 @ 11:12am
noj  [developer] 28 Jan, 2021 @ 9:00am 
fixed with RimThreaded's newest version (1.2.5)
< >
Showing 1-2 of 2 comments
Per page: 1530 50