Ludeon Forums

RimWorld => Mods => Help => Topic started by: Big Poppa Pump on July 22, 2021, 12:47:40 PM

Title: [Solved] 'Exception while recalculating WearingColor_Ideo' error
Post by: Big Poppa Pump on July 22, 2021, 12:47:40 PM
I'm trying to update an old WIP mod from 1.2 to 1.3 but I get the following error when pawns wear the outfits I have added:

Exception while recalculating WearingColor_Ideo thought state for pawn Bomba: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.ThoughtWorker_WearingColor.CurrentStateInternal (Verse.Pawn p) [0x0003a] in <acc1a8abfe07492884c6f18dcdaa4807>:0
  at RimWorld.ThoughtWorker.CurrentState (Verse.Pawn p) [0x00000] in <acc1a8abfe07492884c6f18dcdaa4807>:0
  at RimWorld.SituationalThoughtHandler.TryCreateThought (RimWorld.ThoughtDef def) [0x0001e] in <acc1a8abfe07492884c6f18dcdaa4807>:0
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
RimWorld.SituationalThoughtHandler:TryCreateThought (RimWorld.ThoughtDef)
RimWorld.SituationalThoughtHandler:CheckRecalculateMoodThoughts ()
RimWorld.SituationalThoughtHandler:AppendMoodThoughts (System.Collections.Generic.List`1<RimWorld.Thought>)
RimWorld.ThoughtHandler:GetAllMoodThoughts (System.Collections.Generic.List`1<RimWorld.Thought>)
RimWorld.Alert_Thought:get_AffectedPawns ()
RimWorld.Alert_Thought:GetReport ()
RimWorld.Alert:Recalculate ()
RimWorld.AlertsReadout:CheckAddOrRemoveAlert (RimWorld.Alert,bool)
RimWorld.AlertsReadout:AlertsReadoutUpdate ()
RimWorld.UIRoot_Play:UIRootUpdate ()
Verse.Root:Update ()
Verse.Root_Play:Update ()


I believe this to be related to the new favourite colour system in 1.3 however I can't work out how to tell the game what colour my apparel is.
I have attached my defs file below and would appreciate any help.
Title: Re: 'Exception while recalculating WearingColor_Ideo' error
Post by: Big Poppa Pump on July 22, 2021, 01:45:07 PM
After further investigation and comparing with some of the Fashionrimsta items this only appears to be happening on apparel where specific items are set in the recipe e.g. using cloth instead of the leathery or fabric keywords. Still no idea what's causing this.
Title: Re: 'Exception while recalculating WearingColor_Ideo' error
Post by: RawCode on July 22, 2021, 06:50:06 PM
      <li>
        <compClass>CompColorable</compClass>
      </li>


you should compare your defs with vanilla defs and make same changes
Title: Re: 'Exception while recalculating WearingColor_Ideo' error
Post by: Big Poppa Pump on July 23, 2021, 05:25:55 PM
That was the line I was missing, thanks