Step a structural zero-length "follow the player" walk each turn - #16
Open
angstsmurf wants to merge 1 commit into
Open
Step a structural zero-length "follow the player" walk each turn#16angstsmurf wants to merge 1 commit into
angstsmurf wants to merge 1 commit into
Conversation
…turn A zero-length looping walk -- a lone `Player 0` step with Loop set, which is the standard "follow the player" pattern -- never moves its walker at all. lStop only restarts a looping walk when `Length > 0`. That guard is needed, since a 0-length restart would recurse lStart <-> lStop forever, but it also means such a walk is left Finished immediately after its own lStart, and DoAnySteps' `Status = StatusEnum.Running` gate then rejects it on every subsequent turn. Everything else is already in place for these walks to work: TurnBasedStuff calls IncrementTimer for every walk regardless of status, IncrementTimer calls DoAnySteps unconditionally, and with Length 0 TimerFromStartOfWalk stays 0, so the lone step would match each tick if the gate let it through. Repro: Son of Camelot (Finn Rosenlov, IF Comp 2011). Megan's walk is exactly this shape, so she stays put instead of following the player down to Merlin's grave, and the game cannot be completed. Let a Finished walk through the gate when it loops and is structurally zero-length. The test is on the step turn counts, not on the runtime Length: a normal patrol walk that was stopped before it ever started is also Finished with Length 0 (never lStart'ed, so ResetLength never ran), but its steps carry real durations and it must stay stopped rather than jump to its first step. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
angstsmurf
marked this pull request as ready for review
July 27, 2026 19:20
angstsmurf
added a commit
to angstsmurf/spatterlight
that referenced
this pull request
Jul 27, 2026
The rationale claimed the real ADRIFT Runner still steps such a walker every turn and that FrankenDrift's `Status = Running` gate was what broke it. Not so: upstream ADRIFT has the identical gate in clsWalk.DoAnySteps, so a structurally zero-length looping walk is dead there too. Comment only; the fix itself is unchanged and is now offered upstream as jcwild/ADRIFT-5#16. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Problem
Son of Camelot cannot be completed with the current ADRIFT runner (regardless of the reply to the Adventure Upgrade dialog at the start.)
A zero-length looping walk — a lone
Player 0step with Loop set, which is the standard "follow the player" pattern — never moves its walker at all.lStoponly restarts a looping walk whenLength > 0. That guard is needed, since a 0-length restart would recurselStart<->lStopforever, but it also means such a walk is leftFinishedimmediately after its ownlStart, andDoAnySteps'Status = StatusEnum.Runninggate then rejects it on every subsequent turn.Everything else is already in place for these walks to work:
TurnBasedStuffcallsIncrementTimerfor every walk regardless of status,IncrementTimercallsDoAnyStepsunconditionally, and withLength0TimerFromStartOfWalkstays 0, so the lone step would match each tick if the gate let it through.Repro: Son of Camelot (Finn Rosenlov, IF Comp 2011). Megan's walk is exactly this shape.
Restore the attached save file in this game, type TELL MEGAN ABOUT MERLIN and then E. Instead of the expected text "Megan enters right after you" she stays put, and the game cannot be completed.
Fix: let a
Finishedwalk through the gate when it loops and is structurally zero-length. The test is on the step turn counts, not on the runtimeLength: a normal patrol walk that was stopped before it ever started is alsoFinishedwithLength0 (neverlStart'ed, soResetLengthnever ran), but its steps carry real durations and it must stay stopped rather than jump to its first step.The change is in
ADRIFT/Item Classes/clsCharacter.vb. Note that the copy atADRIFT/clsCharacter.vbhas the same code but is not referenced by any of the four.vbprojfiles, so I left it untouched.I have verified the reasoning against the source and tested the equivalent change in two other ADRIFT implementations (across ~110 games, without regressions), but I have not been able to build and run this repo's Runner myself. I have also verified the problem in Adrift Runner 5.0.36.6 on Windows 10.
🤖 Generated with Claude Code (but edited by a human)
Soc.tas.zip