RimWorld

RimWorld

Rimworld Exploration Mode
Errors with savefiles, duplicated pawns, and PawnMapKnowledgeManager
I'm having the oddest error in my savefile(s): I have a "ghost copy" of a couple of my pawns, that reserve things (beds, items ... one prisoner nearly starved, because that prisoner is "reserved" by a pawn that dosen't seem to exist ...)

After spending all day digging into this (it's a hard one, because it has to do with save-files; not something I can easily reproduce in a new save, or modlist-bisect/binary-search for ...), I'm ... I'm pretty sure it's Rimworld Exploration.

The thing is, for each of the pawns that has a 'ghost duplicate', I can find 1. that pawn <id>, 2. at the ghost-<loc>, in my savefile - and it's always in the <li Class="RimworldExploration.PawnMapKnowledgeManager"><RWE_updateTracker> section. (God, I wish the Steam Workshop had code-span formatting ...)

I tried to dig into this further, but I can find no mention of "PawnMapKnowledgeManager" in the source on GitHub[github.com]; are there new features/changes that never got pushed to GitHub, or perhaps am I just blind?

Anyway, I can't figure out why this mod would be saving an entire copy of a pawn's def on scribe, instead of just a reference to the pawn - this has to be the bug, right? Is that how it's intended to function?
< >
Showing 1-3 of 3 comments
The closest thing I have to a reliable repro of this, is that once it has begun to occur (once there are two duplicated <def>Human</def> with the same <id>), you'll start to get errors when you mouseover a sleeping-spot/bed assigned to that bugged Human:

Tried to get sleeping slot pos with index 1, but there are only 1 sleeping slots available.
UnityEngine.StackTraceUtility:ExtractStackTrace ()
(wrapper dynamic-method) Verse.Log:Verse.Log.Error_Patch4 (string)
RimWorld.BedUtility:GetSlotPos (int,Verse.IntVec3,Verse.Rot4,Verse.IntVec2,bool)
RimWorld.BedUtility:GetSleepingSlotPos (int,Verse.IntVec3,Verse.Rot4,Verse.IntVec2)
(wrapper dynamic-method) RimWorld.Building_Bed:RimWorld.Building_Bed.GetSleepingSlotPos_Patch1 (RimWorld.Building_Bed,int)
RimWorld.Building_Bed:GetMultiOwnersLabelScreenPosFor (int)
(wrapper dynamic-method) RimWorld.Building_Bed:RimWorld.Building_Bed.DrawGUIOverlay_Patch1 (RimWorld.Building_Bed)
(wrapper dynamic-method) Verse.ThingOverlays:Verse.ThingOverlays.ThingOverlaysOnGUI_Patch3 (Verse.ThingOverlays)
(wrapper dynamic-method) RimWorld.MapInterface:RimWorld.MapInterface.MapInterfaceOnGUI_BeforeMainTabs_Patch2 (RimWorld.MapInterface)
(wrapper dynamic-method) RimWorld.UIRoot_Play:RimWorld.UIRoot_Play.UIRootOnGUI_Patch4 (RimWorld.UIRoot_Play)
(wrapper dynamic-method) Verse.Root:Verse.Root.OnGUI_Patch2 (Verse.Root)

Due to the sneakiness of this bug, though, I haven't been able to narrow it down to which combinaton of mods causes this - it may not be Rimworld Exploration alone; hence why I ask if this is intended behaviour (the 'saving an entire copy of some pawns, down to the <id></id>'), and why RWE needs to do that. It might help me narrow it down to know what's going on here.

(I'm also a developer, if that's helpul info, heh.)
Haven't verified that RWE is the sole cause; but have verified that it participates - removing RWE, rebooting the game, then loading a save, re-saving over it while RWE Is disabled, and re-loading that overwritten save, fixes all the oddness.

... does leave my pawns without priorities set, though. Sigh. Hahaha.

https://imgur.com/kNEWMtb
TheLastBulletBender  [developer] 24 Aug, 2023 @ 5:10pm 
Originally posted by ec#2718 on Discord:
Haven't verified that RWE is the sole cause; but have verified that it participates - removing RWE, rebooting the game, then loading a save, re-saving over it while RWE Is disabled, and re-loading that overwritten save, fixes all the oddness.

... does leave my pawns without priorities set, though. Sigh. Hahaha.

https://imgur.com/kNEWMtb

The part causing the problem has been completely removed.
< >
Showing 1-3 of 3 comments
Per page: 1530 50