Corrupted Faction Breaks World Generation: IDEOFOUNDATION RANDOMIZE PLACE

Started by TurtleShroom, March 04, 2022, 02:13:54 PM

Previous topic - Next topic

TurtleShroom


Error in WorldGenStep: System.NullReferenceException: Object reference not set to an instance of an object
  at RimWorld.IdeoFoundation.<RandomizePlace>b__20_0 (Verse.PlaceDef p) [0x00000] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at System.Linq.Enumerable+WhereListIterator`1[TSource].ToList () [0x00017] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at System.Linq.Enumerable.ToList[TSource] (System.Collections.Generic.IEnumerable`1[T] source) [0x0001f] in <351e49e2a5bf4fd6beabb458ce2255f3>:0
  at Verse.GenCollection.RandomElement[T] (System.Collections.Generic.IEnumerable`1[T] source) [0x00018] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.IdeoFoundation.RandomizePlace () [0x00017] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.IdeoFoundation_Deity.Init (RimWorld.IdeoGenerationParms parms) [0x00025] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.IdeoGenerator.GenerateIdeo (RimWorld.IdeoGenerationParms parms) [0x0000f] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.FactionIdeosTracker.ChooseOrGenerateIdeo (RimWorld.IdeoGenerationParms parms) [0x0012a] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.FactionGenerator.NewGeneratedFaction (RimWorld.FactionGeneratorParms parms) [0x00078] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at (wrapper dynamic-method) RimWorld.FactionGenerator.RimWorld.FactionGenerator.GenerateFactionsIntoWorld_Patch0(System.Collections.Generic.Dictionary`2<RimWorld.FactionDef, int>)
  at RimWorld.Planet.WorldGenStep_Factions.GenerateFresh (System.String seed) [0x00005] in <360933dd75ad47e8a6d2a631ae77b5d8>:0
  at RimWorld.Planet.WorldGenerator.GenerateWorld (System.Single planetCoverage, System.String seedString, RimWorld.Planet.OverallRainfall overallRainfall, RimWorld.Planet.OverallTemperature overallTemperature, RimWorld.Planet.OverallPopulation population, System.Collections.Generic.Dictionary`2[TKey,TValue] factionCounts) [0x000fd] in <360933dd75ad47e8a6d2a631ae77b5d8>:0 
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 39)


Good afternoon.

I have had the honor of helping a gentleman expand and overhaul one of his Mods to add immense amounts of new content.

The problem, though, is that something I did recently has caused the World Generation to completely fail. What you see above is the error I receive when trying to generate a new World using minimal required Mods.

This is my Hugs Library Log: https://gist.github.com/e25db4d85fcd493d6e0bcb4af0de413a .

Removing the Faction in question fixes it. You will find the Faction in question attached, plus relevant Patches, below this post.

Thank you for any assistance you may render.


Warm regards,
-TURTLESHROOM

Canute

Hi,
i can't help you with that directly.
But at first, personaly i wouldn't even try to start a new colony with that many error's at rimworld startup.
I don't think all these error's are from the Weeaboo faction.
Even the Weeaboo faction, got failed patch operations, you should check if a mod is present  before you try to patch it.


For testing, you should use minimum mod's before you are testing them with others.

And btw. you should cleanup you old mods/scenarios :-)

TurtleShroom

Quote from: Canute on March 04, 2022, 04:31:28 PMFor testing, you should use minimum mod's before you are testing them with others.

Here's the crazy part about my Patches, though. Unless I really, REALLY messed up, then ALL OF THEM are Conditional. That means that they should not exist if the content is not loaded. Likewise, I made extensive use of the MAYREQUIRE Qualifier for the same reason.

That's actually what I am doing. If I accidentally sent a log with my entire Mod List on it, then let me know. I'll send the minimal version.

The Mods in question that came with the minimal tests are Mods that I've worked on and need to be tested for integrity with other Mods.

TurtleShroom

I managed to fix the issue.

It turns out that the Allowed Cultures statements that I had set, both of which depend on the MAYREQUIRE string for a Mod, cause the Faction to not generate if none of those required Mods exist. The ALLOWEDCULTURES string is a white list and it must always have something to call. Fixing that solved the problem.