Repository navigation
Conversation
…e new time - sleepers get up, chasers give up (lost in the split of 26c60bf) Wld_SetTime (PC_Sleep, Nadja, a world's startup) and Marvin's "set time" only moved the clock: visible NPCs kept their state until it ended by itself, so the sleepers slept on through the morning. GameTimeService.SetTime now raises GameTimeSkipped; NpcService recalculates every routine and resets each living NPC like after culling (AiHandler.ResetAfterTimeSkip - it was still there, nobody called it): visible ones one per frame, culled ones when they show up. Dead and knocked out NPCs stay. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…me jump of the world's startup no longer leaves stale marks G2's STARTUP_* scripts call Wld_SetTime while the world loads: every NPC got a time-skip mark, an NPC's first build never used it up, and at the first real sleep the marked visible NPCs were skipped - Lobart's farmers slept on. A time jump while the world loads is ignored now (logged once), never built NPCs are not marked (they start fresh), a first build drops the mark, and visible NPCs are always queued (once). The log counts visible and culled NPCs. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the time-skip reset no longer teleports them to a waypoint The reset after a time jump sends an NPC to its routine waypoint like after culling. NPCs in a guide/follow state (ZS_GuidePC/ZS_FollowPC, ZS_Guide_Player/ZS_Follow_Player), party members (AIV_PARTYMEMBER, e.g. Mordrag leading the hero) and the hero's summons (AIV_MM_PARTYMEMBER) are kept now; the log counts them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…time - the time-skip reset leaves him out A time jump during a dialog (Marvin's "set time"; sleeping opens no dialog) reset the dialog partner like after culling: empty AI queue, teleport to his routine waypoint, while the dialog was still open. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…skip reset uses the shared "is down" rule The reset skipped every NPC with BS_UNCONSCIOUS, which ZS_MagicFreeze also sets. It now uses IsDown(): dead or knocked out, not frozen. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…pt the down, the hero's company and his dialog partner Co-Authored-By: Claude Opus 5.5 <[email protected]>
…alkingTo, used by the time-skip reset Co-Authored-By: Claude Opus 5.5 <[email protected]>
…eService doesn't raise GameTimeSkipped then, the NPC reset drops its own loading flag Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Companion (escort, party member, summon), used by the time-skip reset Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s, the routine change PR stacked on it doesn't end their activities then Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Author
Review (architecture-reviewer + gothic-reviewer), two roundsRound 1 (9d34048). Gothic: fix before merge. Architecture: fits with concerns. Everything was fixed in this PR:
Round 2 (66c90a7). Gothic: OK to merge. Architecture: fits with concerns. Fixed:
Follow-ups: #568 (split Editor check (G2 Khorinis, slot 6):
|
7 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
After the hero sleeps (or Marvin sets the time), every living NPC starts over at its routine for the new time, the same way as after it was out of view: it goes to its routine spot with an empty action queue, no enemy and its weapon away. Visible NPCs reset one per frame; culled ones reset when they show up again.
Left out on purpose:
This restores a fix that was lost when the experimental branch was split into PRs (26c60bf).
AiHandler.ResetAfterTimeSkipwas still in the code, but nothing called it.Technical:
GameTimeService.SetTimeraisesGlobalEventDispatcher.GameTimeSkipped.NpcService.ResetNpcsAfterTimeSkiprecalculates the routines and queues the resets.NpcRoutineService.RecalculateAllNpcRoutinesis extracted from the minute tick.DialogModel.IsTalkingToandNpcHelperService.IsHeroCompanion. The older copies of both checks move to them in NPC code cleanup after the 2026-11-25 fixes: split NpcService, one place per rule #568.Why
In a playtest (G2 Khorinis), the NPCs kept sleeping after the hero slept until morning.
How to test manually
[TimeSkipReset] Time skipped - resetting N visible NPC(s).[GameTime] ... not reportedonce during the world load, and there is no reset.Save/load
Nothing new is saved. A reset still pending for a culled NPC is lost on load; after a load every NPC starts at its routine anyway.
Known gaps / follow-ups
NpcServiceand move the older copies to the new helpers.Docs/adr/2026-11-25-time-skip-npc-reset.md🤖 Generated with Claude Code