Skip to content

Instantly share code, notes, and snippets.

@SineSwiper
Created February 28, 2020 01:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SineSwiper/ed723b4c2888e8c2e7a7bd3b86b2b95d to your computer and use it in GitHub Desktop.
Save SineSwiper/ed723b4c2888e8c2e7a7bd3b86b2b95d to your computer and use it in GitHub Desktop.
RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight.
Verse.Log:Error(String, Boolean)
Verse.GenCollection:RandomElementByWeight(IEnumerable`1, Func`2)
RimWorld.PawnApparelGenerator:DMD<DMD<GenerateWorkingPossibleApparelSetFor_Patch0>?1551514240::GenerateWorkingPossibleApparelSetFor_Patch0>(Pawn, Single, List`1)
RimWorld.PawnApparelGenerator:DMD<DMD<GenerateStartingApparelFor_Patch2>?139917440::GenerateStartingApparelFor_Patch2>(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:DMD<DMD<GenerateGearFor_Patch1>?-1373472768::GenerateGearFor_Patch1>(Pawn, PawnGenerationRequest)
Verse.PawnGenerator:TryGenerateNewPawnInternal(PawnGenerationRequest&, String&, Boolean, Boolean)
Verse.PawnGenerator:GenerateNewPawnInternal(PawnGenerationRequest&)
Verse.PawnGenerator:GenerateOrRedressPawnInternal(PawnGenerationRequest)
Verse.PawnGenerator:DMD<DMD<GeneratePawn_Patch1>?-375606656::GeneratePawn_Patch1>(PawnGenerationRequest)
AlienRace.HarmonyPatches:NewGeneratedStartingPawnPrefix(Pawn&)
Verse.StartingPawnUtility:DMD<DMD<NewGeneratedStartingPawn_Patch1>?1584453504::NewGeneratedStartingPawn_Patch1>()
RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns:PostWorldGenerate()
RimWorld.Scenario:PostWorldGenerate()
RimWorld.Planet.WorldGenerator:GenerateWorld(Single, String, OverallRainfall, OverallTemperature, OverallPopulation)
Verse.Root_Play:DMD<DMD<SetupForQuickTestPlay_Patch0>?125117440::SetupForQuickTestPlay_Patch0>()
Verse.<>c:<Start>b__1_2()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_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()
Error while generating pawn. Rethrowing. Exception: System.NullReferenceException: Object reference not set to an instance of an object
at RimWorld.PawnApparelGenerator+PossibleApparelSet.Add (RimWorld.ThingStuffPair pair) [0x00065] in <7db1f4b417fe457d9d6d60001b0240b1>:0
at (wrapper dynamic-method) RimWorld.PawnApparelGenerator.DMD<DMD<GenerateWorkingPossibleApparelSetFor_Patch0>?1551514240::GenerateWorkingPossibleApparelSetFor_Patch0>(Verse.Pawn,single,System.Collections.Generic.List`1<RimWorld.ThingStuffPair>)
at (wrapper dynamic-method) RimWorld.PawnApparelGenerator.DMD<DMD<GenerateStartingApparelFor_Patch2>?139917440::GenerateStartingApparelFor_Patch2>(Verse.Pawn,Verse.PawnGenerationRequest)
at (wrapper dynamic-method) Verse.PawnGenerator.DMD<DMD<GenerateGearFor_Patch1>?-1373472768::GenerateGearFor_Patch1>(Verse.Pawn,Verse.PawnGenerationRequest)
at Verse.PawnGenerator.TryGenerateNewPawnInternal (Verse.PawnGenerationRequest& request, System.String& error, System.Boolean ignoreScenarioRequirements, System.Boolean ignoreValidator) [0x00557] in <7db1f4b417fe457d9d6d60001b0240b1>:0
at Verse.PawnGenerator.GenerateNewPawnInternal (Verse.PawnGenerationRequest& request) [0x00096] in <7db1f4b417fe457d9d6d60001b0240b1>:0
at Verse.PawnGenerator.GenerateOrRedressPawnInternal (Verse.PawnGenerationRequest request) [0x00183] in <7db1f4b417fe457d9d6d60001b0240b1>:0
at (wrapper dynamic-method) Verse.PawnGenerator.DMD<DMD<GeneratePawn_Patch1>?-375606656::GeneratePawn_Patch1>(Verse.PawnGenerationRequest)
Verse.Log:Error(String, Boolean)
Verse.PawnGenerator:DMD<DMD<GeneratePawn_Patch1>?-375606656::GeneratePawn_Patch1>(PawnGenerationRequest)
AlienRace.HarmonyPatches:NewGeneratedStartingPawnPrefix(Pawn&)
Verse.StartingPawnUtility:DMD<DMD<NewGeneratedStartingPawn_Patch1>?1584453504::NewGeneratedStartingPawn_Patch1>()
RimWorld.ScenPart_ConfigPage_ConfigureStartingPawns:PostWorldGenerate()
RimWorld.Scenario:PostWorldGenerate()
RimWorld.Planet.WorldGenerator:GenerateWorld(Single, String, OverallRainfall, OverallTemperature, OverallPopulation)
Verse.Root_Play:DMD<DMD<SetupForQuickTestPlay_Patch0>?125117440::SetupForQuickTestPlay_Patch0>()
Verse.<>c:<Start>b__1_2()
Verse.LongEventHandler:RunEventFromAnotherThread(Action)
Verse.<>c:<UpdateCurrentAsynchronousEvent>b__27_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()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment