RecompiledBirds / RimVali

The RimVali: Far From Avalon code repository.
https://discord.gg/RpCM3RU
9 stars 17 forks source link

Pack system not recognizing a pawn? #46

Closed VynalDerp closed 2 years ago

VynalDerp commented 3 years ago

I was playing with the Avali mod prior to the update a little while ago (before the Core mod released), and my game ran pretty fine. After the update, it seems something messed up and I keep getting spammed with thousands of these errors, making the save unplayable right now. I don't know if this is a mod issue or save file issue, but I can edit my save file if there is a way to fix it. Would rather not lose a few in-game years of work.

(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

System.NullReferenceException: Object reference not set to an instance of an object at AvaliMod.AvaliUpdater+<>c.b__11_0 (Verse.Pawn x) [0x00000] in <10eb6b2b2a0946398435abc76f7271ee>:0 at System.Linq.Enumerable+WhereListIterator`1[TSource].MoveNext () [0x00037] in <351e49e2a5bf4fd6beabb458ce2255f3>:0 at AvaliMod.AvaliUpdater.GivePackThoughts (AvaliMod.AvaliPack pawnPack, Verse.Pawn pawn, AvaliMod.PackComp packComp) [0x00090] in <10eb6b2b2a0946398435abc76f7271ee>:0 at AvaliMod.AvaliUpdater.UpdatePawns () [0x00086] in <10eb6b2b2a0946398435abc76f7271ee>:0 at AvaliMod.AvaliUpdater.WorldComponentTick () [0x000b8] in <10eb6b2b2a0946398435abc76f7271ee>:0 at RimWorld.Planet.WorldComponentUtility.WorldComponentTick (RimWorld.Planet.World world) [0x00013] in <7927e938de4c4089b4add4215e58d5b1>:0

VynalDerp commented 3 years ago

Actually, after a bit of messing around I have an update to this. The cause is packs swapping specialties. If I have an Avali pawn join the pack when it has the Construction specialty, and then the specialty changes to Mining, I will then get spammed with this error until the specialty switches back to Construction. This was caused by the latest update, as prior to it, swapping specialties didn't result in this error spamming the logs.