Skip to content

Multifaction generating map crashlanded scenario throws error regarding starting animal. #590

@Tick-git

Description

@Tick-git

Label: Multifaction, 1.6, Bug

Found via Steam with SirWilliams using the current 1.6 beta build.
Reproduces on dev.

Generating a new map with the Crashlanded scenario throws an error, probably related to the starting animal.

I haven’t looked into it at all yet. This might be connected to some of the recent changes, because I think I already generated a map with Crashlanded in Multifaction within the last few days - but I could be wrong.

How to reproduce:

  • Use two instances of RimWorld
  • Host a Multifaction game
  • Join with client
  • Choose Crashlanded scenario
  • Generate map
Error in GenStep: System.NullReferenceException: Object reference not set to an instance of an object
[Ref C70DD9D9]
  at RimWorld.ScenPart_StartingAnimal.PetWeight (Verse.PawnKindDef animal) [0x00005] in <981a33edf24d499488b0f820d94638e1>:0 
    - TRANSPILER multiplayer: IEnumerable`1 Multiplayer.Client.Patches.StartingAnimalPatch:Transpiler(IEnumerable`1 insts)
  at RimWorld.ScenPart_StartingAnimal.<PlayerStartingThings>b__17_0 (Verse.PawnKindDef td) [0x00000] in <981a33edf24d499488b0f820d94638e1>:0 
  at Verse.GenCollection.TryRandomElementByWeight[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T& result) [0x0012a] in <981a33edf24d499488b0f820d94638e1>:0 
  at Verse.GenCollection.RandomElementByWeightWithFallback[T] (System.Collections.Generic.IEnumerable`1[T] source, System.Func`2[T,TResult] weightSelector, T fallback) [0x00000] in <981a33edf24d499488b0f820d94638e1>:0 
  at RimWorld.ScenPart_StartingAnimal+<PlayerStartingThings>d__17.MoveNext () [0x0004a] in <981a33edf24d499488b0f820d94638e1>:0 
  at System.Collections.Generic.List`1[T].AddEnumerable (System.Collections.Generic.IEnumerable`1[T] enumerable) [0x00059] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at System.Collections.Generic.List`1[T].InsertRange (System.Int32 index, System.Collections.Generic.IEnumerable`1[T] collection) [0x000f4] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at System.Collections.Generic.List`1[T].AddRange (System.Collections.Generic.IEnumerable`1[T] collection) [0x00000] in <51fded79cd284d4d911c5949aff4cb21>:0 
  at RimWorld.ScenPart_PlayerPawnsArriveMethod.GenerateIntoMap (Verse.Map map) [0x00058] in <981a33edf24d499488b0f820d94638e1>:0 
    - PREFIX multiplayer: Boolean Multiplayer.Client.Patches.ScenPartPlayerPawnsArriveMethodPatch:Prefix()
  at RimWorld.Scenario.GenerateIntoMap (Verse.Map map) [0x00014] in <981a33edf24d499488b0f820d94638e1>:0 
  at RimWorld.GenStep_ScenParts.Generate (Verse.Map map, Verse.GenStepParams parms) [0x00005] in <981a33edf24d499488b0f820d94638e1>:0 
  at Verse.MapGenerator.GenerateContentsIntoMap (System.Collections.Generic.IEnumerable`1[T] genStepDefs, Verse.Map map, System.Int32 seed, System.Boolean stepDebugger) [0x0016a] in <981a33edf24d499488b0f820d94638e1>:0 
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
Verse.MapGenerator:GenerateContentsIntoMap (System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,Verse.Map,int,bool)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.MapGenerator.GenerateMap_Patch2 (Verse.IntVec3,RimWorld.Planet.MapParent,Verse.MapGeneratorDef,System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,System.Action`1<Verse.Map>,bool,bool)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.GetOrGenerateMapUtility.GetOrGenerateMap_Patch2 (RimWorld.Planet.PlanetTile,Verse.IntVec3,RimWorld.WorldObjectDef,System.Collections.Generic.IEnumerable`1<Verse.GenStepWithParams>,bool)
Multiplayer.Client.Factions.FactionCreator:GenerateNewMap (RimWorld.Planet.PlanetTile,RimWorld.Scenario,bool)
Multiplayer.Client.Factions.FactionCreator/<>c__DisplayClass5_0:<CreateFaction>b__0 ()
Verse.LongEventHandler:UpdateCurrentSynchronousEvent (bool&)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.LongEventHandler.LongEventsUpdate_Patch2 (bool&)
Verse.Root:Update ()
Verse.Root_Play:Update ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.6Fixes or bugs relating to 1.6 (Not Odyssey).bugSomething isn't working.multifactionBugs or issues only in multifaction mode.

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions