erdelf / AlienRaces

Rimworld mod alien race framework
MIT License
106 stars 69 forks source link

RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight. #112

Open mycroftjr opened 1 month ago

mycroftjr commented 1 month ago
RandomElementByWeight with totalWeight=0 - use TryRandomElementByWeight.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Log.Error_Patch1 (string)
Verse.GenCollection:RandomElementByWeight<Verse.ThingDef> (System.Collections.Generic.IEnumerable`1<Verse.ThingDef>,System.Func`2<Verse.ThingDef, single>)
RimWorld.Precept_Relic:GenerateStuffFor (Verse.ThingDef,RimWorld.Ideo)
RimWorld.Precept_Relic:SetRandomStuff ()
RimWorld.Precept_Relic:Notify_ThingDefSet ()
RimWorld.Precept_ThingDef:Init (RimWorld.Ideo,RimWorld.FactionDef)
RimWorld.IdeoFoundation/<>c__DisplayClass38_0:<InitPrecepts>g__AddAndInitPrecepts|0 ()
RimWorld.IdeoFoundation:InitPrecepts (RimWorld.IdeoGenerationParms,System.Collections.Generic.List`1<RimWorld.Precept>)
RimWorld.IdeoFoundation:RandomizePrecepts (bool,RimWorld.IdeoGenerationParms)
RimWorld.IdeoFoundation_Deity:Init (RimWorld.IdeoGenerationParms)
RimWorld.IdeoGenerator:GenerateIdeo (RimWorld.IdeoGenerationParms)
RimWorld.FactionIdeosTracker:ChooseOrGenerateIdeo (RimWorld.IdeoGenerationParms)
RimWorld.FactionGenerator:NewGeneratedFaction (RimWorld.FactionGeneratorParms)
RimWorld.FactionGenerator:CreateFactionAndAddToManager (RimWorld.FactionDef)
RimWorld.FactionGenerator:AddFactionToManager (RimWorld.FactionDef)
RimWorld.FactionGenerator:GenerateFactionsIntoWorld (System.Collections.Generic.List`1<RimWorld.FactionDef>)
RimWorld.Planet.WorldGenStep_Factions:GenerateFresh (string)
RimWorld.Planet.WorldGenerator:GenerateWorld (single,string,RimWorld.Planet.OverallRainfall,RimWorld.Planet.OverallTemperature,RimWorld.Planet.OverallPopulation,System.Collections.Generic.List`1<RimWorld.FactionDef>,single)
RimWorld.Page_CreateWorldParams:<CanDoNext>b__19_0 ()
Verse.LongEventHandler:RunEventFromAnotherThread (System.Action)
Verse.LongEventHandler/<>c:<UpdateCurrentAsynchronousEvent>b__28_0 ()
System.Threading.ThreadHelper:ThreadStart_Context (object)
System.Threading.ExecutionContext:RunInternal (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object,bool)
System.Threading.ExecutionContext:Run (System.Threading.ExecutionContext,System.Threading.ContextCallback,object)
System.Threading.ThreadHelper:ThreadStart ()
erdelf commented 1 month ago

what makes you think this error is in any way related to HAR ? Seems like relic gen is in trouble because one or more Stuff is breaking.