Skip to content

Conversation

@mibac138
Copy link

@mibac138 mibac138 commented Oct 6, 2025

Fixes delayed storyteller events not showing up. Events were added to the storyteller (IncidentQueue) of AsyncTimeComp, which was never ticked because of StorytellerTickPatch which made the method run per-faction, using the faction's storyteller. This caused a bunch of delayed events to just not work, e.g. requesting traders from the comms console, psychic rituals (summon animals, summon shamblers, void provocation), naturally spawning harbinger trees, and possibly others.

Fixes delayed storyteller events not showing up. Events were added to the storyteller (IncidentQueue) of AsyncTimeComp, which was never ticked because of StorytellerTickPatch which made the method run per-faction, using the faction's storyteller. This caused a bunch of delayed events to just not work, e.g. requesting traders from the comms console, psychic rituals (summon animals, summon shamblers, void provocation), naturally spawning harbinger trees, and possibly others.
@notfood notfood added fix Fixes for a bug or desync. 1.6 Fixes or bugs relating to 1.6 (Not Odyssey). labels Oct 6, 2025
@notfood notfood moved this to In review in 1.6 and Odyssey Oct 6, 2025
@notfood
Copy link
Member

notfood commented Oct 6, 2025

For some reason this patch is breaking areas in my testing save. It's not clear to me why as I can't reproduce it on a clean save. I'm suspecting it dislikes old saves. This save is working fine on dev. Out is the name of a zone. I'm trying to make a reproducible save.

System.Collections.Generic.KeyNotFoundException: The given key 'Out' was not present in the dictionary.
[Ref E463C88F]
 [0x00010] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
 [0x00000] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
  at System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) [0x0001e] in <e3b07672ffbd43c1838e1ebbe94cbdf5>:0 
  at Verse.AreaSource.DataForArea (Verse.Area area) [0x00000] in <31482697ada14932981abc5e76101d5d>:0 
  at Verse.PathFinderMapData.ParameterizeGridJob (Verse.PathRequest request, Verse.PathFinder+MapGridRequest& query, Verse.PathGridJob& job, Verse.PathFinder+GridJobOutput& output) [0x001b1] in <31482697ada14932981abc5e76101d5d>:0 
  at Verse.PathFinder.ScheduleGridJob (Verse.PathRequest request, Unity.Jobs.JobHandle handle) [0x00034] in <31482697ada14932981abc5e76101d5d>:0 
  at Verse.PathFinder.ScheduleGridJobs () [0x00040] in <31482697ada14932981abc5e76101d5d>:0 
  at Verse.PathFinder.PathFinderTick () [0x00042] in <31482697ada14932981abc5e76101d5d>:0 
  at Verse.Map.MapPreTick () [0x000b2] in <31482697ada14932981abc5e76101d5d>:0 
    - PREFIX multiplayer: Boolean Multiplayer.Client.AsyncTime.CancelMapManagersTick:Prefix()
UnityEngine.StackTraceUtility:ExtractStackTrace ()
Verse.Log:Error (string)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Map.MapPreTick_Patch1 (Verse.Map)
Multiplayer.Client.AsyncTimeComp:Tick () (at /media/Hakugyokurou/opt/SteamLibrary/steamapps/common/RimWorld/ModsDev/Multiplayer/Source/Client/AsyncTime/AsyncTimeComp.cs:120)
Multiplayer.Client.TickPatch:TickTickable (Multiplayer.Client.ITickable) (at /media/Hakugyokurou/opt/SteamLibrary/steamapps/common/RimWorld/ModsDev/Multiplayer/Source/Client/Patches/TickPatch.cs:251)
Multiplayer.Client.TickPatch:DoTick (bool&) (at /media/Hakugyokurou/opt/SteamLibrary/steamapps/common/RimWorld/ModsDev/Multiplayer/Source/Client/Patches/TickPatch.cs:221)
Multiplayer.Client.TickPatch:DoUpdate (bool&) (at /media/Hakugyokurou/opt/SteamLibrary/steamapps/common/RimWorld/ModsDev/Multiplayer/Source/Client/Patches/TickPatch.cs:196)
Multiplayer.Client.TickPatch:Prefix () (at /media/Hakugyokurou/opt/SteamLibrary/steamapps/common/RimWorld/ModsDev/Multiplayer/Source/Client/Patches/TickPatch.cs:115)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.TickManager.TickManagerUpdate_Patch1 (Verse.TickManager)
(wrapper dynamic-method) MonoMod.Utils.DynamicMethodDefinition:Verse.Game.UpdatePlay_Patch1 (Verse.Game)
Verse.Root_Play:Update ()

@notfood
Copy link
Member

notfood commented Oct 9, 2025

Testing required here. Preferable with old saves.

Multiplayer-v0.11.0-beta-storyteller-faction-fix.zip

@maxsupermanhd
Copy link

Hi me and my friend are playing on a build with this merged (rebased on latest dev) and I wonder why is this actually still not merged. Are you aware that Anomaly DLC is like literally unplayable without this because psychic rituals are not functioning without it at all?

It is getting annoying to apply on top of the dev every damn update.

If there is no repro then why not move this forward until we get a repo and then roll this back?

@notfood
Copy link
Member

notfood commented Nov 3, 2025

It errors for me and I've gotten no feedback whatsoever.

@mibac138
Copy link
Author

mibac138 commented Nov 4, 2025

I was unable to reproduce the issue, and I was under the impression that you weren't able to either (I thought it perhaps might've been a spurious issue), as you did not provide a save file. I'd be happy to have a look at a broken save and fix it

@maxsupermanhd
Copy link

I feel like it is starting to get lost in the Discord so I will repost trivial repro here from our coop odyssey playthrough.

  1. Load SpaceFox134-repro739.zip singleplayer save (unpack the zip because too fat...) and host it (no issues observed, logs are crystal clean everything works as intended)
  2. Start gravship launch and jump to orbital imperial satelite
  3. Confirm landing location (any location)
  4. Observe zones present in the gui and set on pawns, animals and mechs
  5. Upon unpause errors will begin piling into the debug log and ai on animals and mechs refuses to path anywhere unless zone restriction is unset.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

1.6 Fixes or bugs relating to 1.6 (Not Odyssey). fix Fixes for a bug or desync.

Projects

Status: In review

Development

Successfully merging this pull request may close these issues.

3 participants