fix(game): fast text no longer cuts off the sages' voice on the white screen #3177
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3177
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/fast-text-sage-voice"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
After a temple, the sage's last words are shown alone on a white screen with a voice. With Text speed above Normal,
that screen closed early and cut the voice off: it closes by itself a while after the last letter appears, and a faster
text brought that forward (at Instant, after about 3 s instead of about 9.5 s).
Those screens now keep the game's own pace whatever Text speed says. They are the five sages' messages
(
EventFlowMsg/Dm_Awake_<sage>_Get). Other dialogue, including the medallion boxes just before, stays as fast as chosen.To see it on
main: set Text speed to Instant and finish a temple.Read first:
game/crates/game-core/src/narration.rs. It wraps the text system mod's letter step and puts the step'stime back while one of those messages is the last one opened.
Testing
Tested: CachyOS (Linux 7.3.3), RTX 3090, NVIDIA 620.70, headless, the Forest sage's event started from a test-only
hook (not in this PR), no button pressed once the white screen opened. On
mainat Instant the words appeared at onceand the screen closed after about 3 s; with the fix, Instant typed and closed as Normal did (about 9.5 s). The medallion
box before it still appeared at once at Instant. Screenshots were compared; the voice itself was not listened to.
The test
game-core/tests/narration.rsfails onmainand passes here, with all ofgame-core's tests, clippy and fmt.mise run test: 885 passed, 13 skipped, 1 failed (test_lifter):the_repository_s_lock_and_the_table_agreefails the same way onmain; twobuild-driverdev_runtimetests hit aheld lock and passed when run again (11 of 11). This change touches nothing in the builder.
Still to test:
screen (by hand).
Measurements
Nothing to measure: a letter's time is changed on five messages; one flag is read at each letter step.
Risks
Only these five messages are covered. Other voiced cutscene text still follows Text speed; if one of those is cut off
too, its message file can be added. If a build ever shows another animated text while one of these is still the last
message opened, it would type at the game's pace until the next message. A revert is enough. Nothing changes in saves or
settings.
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.🤖 Generated with Claude Code
https://claude.ai/code/session_017vw8e3Wd6AA2ofRgZt7Lqm
Tested in game: RTX 3090, NVIDIA 620.70, CachyOS, headless: the Forest sage's white screen at Instant closed after about 3 s on main and about 9.5 s with the fix, as at Normal; the medallion box before it still appeared at once. Voice not listened to.
WIP: fix(game): fast text no longer cuts off the sages' voice on the white screento fix(game): fast text no longer cuts off the sages' voice on the white screenRecommendation: Approve. The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open as long as it does at Normal speed, but the reported run did not check whether the voice finishes. The other affected messages and a non-English language also remain untested. Recommend approval; not approved on the forge.
The change keeps the sages’ white-screen text at the game’s pace while leaving the preceding medallion text fast. It adds a small hook and shared state to the text path; its use of the last opened message can also affect another animated pane until a new message opens.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
game/crates/game-core/src/narration.rs:28: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. (more on the line) Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.Questions (1) (not confirmed from the code; they don't hold the recommendation)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven for the reported voice cutoff. On the author’s Linux RTX 3090 run, the Forest screen at Instant closed after about 3 seconds on main and 9.5 seconds with the change, matching Normal; the voice was not listened to. The game-free test checks the letter-step behavior.
Other systems: The hook applies to text panes on game worker threads on Windows and Linux, independently of GPU. Text size rules still run inside the wrapper. The state is global rather than associated with a pane, so overlapping or subsequent animated panes need particular attention; the available run does not establish whether those occur while the flag is set.
Switches: None added, changed or removed.
Reviewed:
ef19bf8d3dagainstd6e819e084: Read the diff, commit messages, repository rules, PR template, narration implementation and test, text-system rules and hook definitions, and the relevant text and chain code. Skimmed the remaining portions of engine.rs, lib.rs and the user guide; no generated files or recorded runs were changed. docs/review-checklist.md and the sibling Tooling AGENTS.md were absent.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no code or tests were run. The supplied CI checks were still running.
Overlaps and merge order: Not checked; network unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, as HumanBean took it out of WIP. Nothing was run; a maintainer decides.
@ -0,0 +25,4 @@static READ_ALOUD: AtomicBool = AtomicBool::new(false);/// Whether the message file `file` holds a full-screen text read aloud: the sages' last words.fn read_aloud(file: &str) -> bool {L1 (should fix): The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked.
When: At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice.
Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.
@review
Recommendation: Approve. The code is ready: only testing is left (a run of the change itself). The Forest screen now stays open at the Normal text pace, but the reported run did not check whether the voice finishes. The other affected sage messages and another language also still need an in-game check. Recommend approval; not approved on the forge.
The change keeps the sages’ white-screen messages at the game’s normal text pace while leaving other dialogue at the selected speed. It adds a small pair of hook handlers and a game-free test.
Testing before merging (1) (the change behaves the same on every system: one run of the change itself is enough; it doesn't hold the recommendation)
game/crates/game-core/src/narration.rs:28: The reported run confirms the Forest screen’s timing but does not confirm that the voice finishes, and the other affected messages and languages have not been checked. When: At faster text speeds, a sage’s screen may still close before its voice finishes, or a message name or language may behave differently; the headless run did not listen to the voice. Do: Run the affected sage screens at 2x or Instant with audio, including Spirit’s two messages and a non-English language, and record whether each voice finishes.Since the last review (on
ef19bf8d3d)Still open: L1 (The reported run confirms the Forest screen’s timing but does not confirm that the voice f…)
Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven for the voice cutoff: the reported Forest run closed after about 9.5 seconds with the fix versus about 3 seconds on main at Instant, but the voice was not listened to.
Other systems: The handlers apply to text steps across platforms and text speeds; the reported in-game run covers Forest on Linux with NVIDIA. The test covers the five message names and restoring fast text after another message opens.
Switches: None.
Reviewed:
ef19bf8d3dagainstd6e819e084: Read the diff, narration implementation and its test, repository instructions and pull request template. The combined read of the other changed files was truncated; their changes and relevant surrounding code were skimmed. No review checklist file was present.; nothing run (a code review).Checked and fine:
Testing: The author reports a game-free test passing on the PR and failing on main, plus a headless Forest timing comparison. CI is still running; no commands that execute project code were run during this review.
Overlaps and merge order: Not checked; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.