fix(game): Skip title screen off shows the title again when the launcher remembers a save #3067
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!3067
Loading…
Reference in a new issue
No description provided.
Delete branch "HumanBean/Longshot:fix/skip-title-default"
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
A player reported that the latest nightly put them straight into their last saved game, with Skip title screen off.
Cause. The Longshot Launcher writes
start_slotinto the profile'sprofile.jsonwhenever a player picks a save in its Players list, and the save stays there for every later launch. The builder passes it to the game asHOS_START_SLOTon every start. Before the mod API (#2822), the game never readHOS_START_SLOT, so the title screen showed unless the Skip title row was on. Since #2822,api::title_skip::armstarts the skip whenHOS_START_SLOTis set, even with the row off. So any player who has picked a save in the launcher now skips the title on every start.Fix. The skip starts only while the Skip title screen row (the mod's
system.titleSkiptoggle) is on. The launcher's slot now only chooses which save that skip starts in. The Skip title mod's script no longer watches for the skip with the row off. The docs and comments that said the slot is followed with the row off now say the opposite.How to see it on main: in the launcher, pick a save in the Players list. Leave Skip title screen off. Start the game: it loads that save with no title screen.
Read first:
game/crates/api/src/title_skip.rs(armand the new test), thengame/mods/skip-title/src/main.ts.Testing
Tested: Linux, RTX 3090. In the game (headless,
rtof86349506, a throwaway profile withstart_slotslot_00, the repository savekokiri-start): with Skip title screen off the title screen shows and noskip title:line is logged; with it on the log saysskip title: starting in slot_00and the run is in play in Kokiri Forest. The old ini lineskip_title_screen=0migrates to off. Not shown: the picked slot winning over a newer save (only one save existed).tests/run_all.pyon both bug-fix branches together: 868 passed, 12 skipped, 3 failed, none from these changes:test_vk_wb_cpu_words_fastandtest_i18n_complete(fails onmain; #3065) andtest_lifter(fails onmain).Still to test:
profile.jsonhas astart_slot(pick a save in the launcher): with Skip title screen off, expecting the title screen; with it on, expecting a start in the picked slot, not the newest (by hand)longshot_options.inicould turn Skip title screen on for a player who had it off. This PR does not change the migration (by hand: a profile with an old ini holdingskip_title_screen=0, start once, checksettings.tomland the title screen)Measurements
Nothing to measure: this changes only whether a start skips the title screen.
Risks
A launcher flow that meant "start this save now" with the row off no longer skips the title. The player picks the save on the title screen's file list instead, as before #2822. A revert is enough to undo this. Nothing changes in saves or
settings.toml.Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named). (tests/run_all.pyon both bug-fix branches together: 868 passed, 12 skipped, 3 failed, none from these changes:test_vk_wb_cpu_words_fastandtest_i18n_complete(fails onmain; #3065) andtest_lifter(fails onmain).)main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
mainand passes here. (With the oldarmcondition put back,a_launcher_slot_with_the_toggle_off_arms_no_skipfails; with the fix it passes.)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_017vw8e2fJhRpDrY7pgVx6oJ
Possibly related, for context:
WIP: fix(game): Skip title screen off shows the title again when the launcher remembers a saveto fix(game): Skip title screen off shows the title again when the launcher remembers a saveRecommendation: Approve. The startup condition fixes the reported unwanted skip, but the new test shares mutable skip state with another parallel test and can make either test fail nondeterministically. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
The title screen remains visible when its skip setting is off, even if the launcher remembers a save. When the setting is on, the remembered slot still selects the save; the change is small, but its new regression test needs isolation.
Should fix (2): not blocking, but worth doing before merging.
game/crates/api/src/title_skip.rs:354: This test and the existing title-skip test mutate the same process-wide SKIP state without serializing their full sequences. (more on the line) Do: Serialize both tests with a shared test lock held for each entire sequence, or isolate the skip state per test.docs/dev/reference/switches.md:198: The related profile documentation still says that a profile starts on its start_slot without stating that the skip setting must be on. (more on the line) Do: Update the LONGSHOT_PROFILE row and profile reference to describe the toggle-dependent behavior.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)
@fixcan do L1 and L2.Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Yes. The new game-free test exercises the old condition with a launcher slot and the toggle off, and the author reports a headless game run at
86349506showing the title with the setting off and loading slot_00 with it on. The picked-slot-over-newest case has not been demonstrated in game.Other systems: The change affects startup and the Skip title system mod on Windows and Linux, independently of GPU rendering. The author tested Linux; the launcher flow with two saves remains to be checked. Save selection and migration code are unchanged.
Switches: HOS_START_SLOT now selects a save only when Skip title screen is on; it no longer starts a skip by itself. The setting defaults to off, which matches the intended behavior. The switch table was updated, but other profile documentation still describes an unconditional start.
Reviewed:
8634950630against2ca7d4f741: Read the diff, commit, repository instructions, contribution rules, standards and pull request template; read the changed Rust and TypeScript paths and their startup callers, save selection, fake host and related tests. Skimmed generated modding documentation and the switch and profile references. The adjacent Tooling checkout and docs/review-checklist.md were unavailable; large unchanged documentation and the remainder of the repository were not read in full.; nothing run (a code review).Checked and fine:
Testing: No commands from the project, builds or tests were run during this review. The author reports headless Linux game runs and a game-free test run; CI was still running.
Overlaps and merge order: Unknown; the network is closed.
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.
@ -196,3 +196,3 @@| `LONGSHOT_SAFE_START=1` | Set by `longshot-builder play --safe-start` for that play. The builder only passes it on; the Mod API's game side is to read it (no mod starts, and the Mods tab says why): this release's game does not read it yet. Environment only || `LONGSHOT_SHADER_CACHE=<folder>` | Keep the shader and pipeline caches (the prepared programs, the pipeline cache and its play files, the pipeline notes, the preparation's record, the driver's faults) in that folder instead of the game folder's `cache/`. longshot-builder sets it for the game it plays and for its shader preparation: `<the builder's cache>/shaders/<translator stamp>/<driver>/`, shared by every build of that translator on this driver ([where things are](build.md#where-things-are)). A whole path, made when missing. Environment only (`longshot_env.txt` cannot name a folder) || `HOS_START_SLOT` | Not a switch to set: the builder sets it in the game's environment at every start from the profile's `start_slot` (`build_core::game_env`), for the game's side (the Skip title mod starts in it, past the title screen: the engine's title skip, `api::title_skip`), and takes away one the environment or a file brought. A run that starts on a slot plays a profile whose `profile.json` names it || `HOS_START_SLOT` | Not a switch to set: the builder sets it in the game's environment at every start from the profile's `start_slot` (`build_core::game_env`), for the game's side (with Skip title screen on, the Skip title mod starts in it, past the title screen: the engine's title skip, `api::title_skip`), and takes away one the environment or a file brought. A run that starts on a slot plays a profile whose `profile.json` names it |L2 (should fix): The related profile documentation still says that a profile starts on its start_slot without stating that the skip setting must be on.
When: A developer reading the LONGSHOT_PROFILE row or the start-slot description in docs/dev/reference/profiles.md is told the remembered slot starts the game, although with the default setting off the title screen now appears.
Do: Update the LONGSHOT_PROFILE row and profile reference to describe the toggle-dependent behavior.
@ -347,0 +351,4 @@/// for every run, and a player with the row off sees the title screen.#[test]fn a_launcher_slot_with_the_toggle_off_arms_no_skip() {reset();L1 (should fix): This test and the existing title-skip test mutate the same process-wide SKIP state without serializing their full sequences.
When: Rust tests can run concurrently: after this test calls arm(false), the other test can call skip() and set SKIP to Refused before this test asserts None. Conversely, this test's reset or arm(true) can change the state between the other test's assertions.
Do: Serialize both tests with a shared test lock held for each entire sequence, or isolate the skip state per test.
BeanBot's review, at
73a123bc:cargo test -p api --lib title_skip: 3 passed.LONGSHOT_PROFILErow, the profiles page and the build page now saystart_slotis used only with Skip title screen on.Since the headless run at
86349506, only tests and docs changed.