feat(oot): add Debug Skip cinematics option via EventManager skip hook (#2712) #3029
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
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!3029
Loading…
Reference in a new issue
No description provided.
Delete branch "cfw34683/Longshot:feat/2712-skip-cinematics"
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
Fixes #2712.
Adds a Skip cinematics toggle under Debug -> Developer (
skip_cinematics, optionHOS_OPT_SKIP_CINEMATICS = 53, Off by default) that skips in-gameDm_*cutscene flows through the game's ownEventManagerskip path:event.skiphook site atf_83b6b870+0x6f0(0x83b6bf60, right beforetbnz w8, #2inEventManager's per-event tick).hos_oot_event_skip(game/oot_tools.c) triggersw8 |= 4(marking the active node skipped, setting[player+0xf24], and callingvtable[4]abort) only when:Skip cinematicsis On,oot_flags >= 0, so title-screen demos are never skipped),EventPlayername ([x23 + 8]) starts withDm_and is not aDm_SY_BancChange*door/gate arrival walk, andEventPlayerhas ticked at least 45 times (~0.75 s at 60 Hz) so any initial map-transition fade-in finishes instead of leaving the screen black.Testing
market-entrancesave walking into Hyrule Castle to triggerDm_HrlCastle_0000):Skip cinematicsOn): fades in cleanly and skipsDm_HrlCastle_0000straight into gameplay.python -I -B tests/test_skip_cinematics.py --cc clang- PASSpython -I -B tests/test_opening_skip.py --cc clang- PASSpython -I -B tests/test_menu_ini_keys.py- PASSlongshot-builder dev sites-177 placedChecklist
main, Conventional Commit title.Assisted-by: Antigravityrecorded in commit.Possibly related, for context:
@review
Recommendation: Approve. The gameplay-state check remains true after returning to the title screen, and the delay can carry over to a later cinematic. Both can make the hook skip when it should wait or leave the event alone. Nothing blocking is left: what remains is for the author before merging (below). Recommend approval; not approved on the forge.
Adds an Off-by-default Debug menu option that uses the game's skip path for Dm_ events. The reported Castle test shows one cinematic being skipped, but the event lifetime and title-screen guards need correction.
Should fix (2): not blocking, but worth doing before merging.
tests/test_skip_cinematics.py:99: The test defaults to clang without declaring its compiler to the test runner, and treats CC as a single executable name. (more on the line) Do: Declare RUN_ALL_ARGS using the runner's compiler placeholder and use the shared compiler-command parsing and fallback conventions.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/oot_tools.c:1505: The single reported in-game run does not cover the range of events or frame rates the option changes. (more on the line) Do: Run representative opening, transition and story cinematics with the option on and off, including a higher game frame-rate cap, and check fade-in, return to control and progression. (@fixdoes its part first: Use elapsed game time or an actual transition-complete condition for the delay instead of assuming a 60 Hz tick rate.)@fixcan do L1, L2 and L3.Questions (3) (not confirmed from the code; they don't hold the recommendation)
game/oot_tools.c:1483: After returning to the title screen, can a demo run an eligible Dm_ EventPlayer for at least 45 ticks?game/oot_tools.c:1502: Can consecutive eligible cinematics use the same EventPlayer address without the option being turned off between them?Checks: Still running: 11 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven across the feature's stated scope. The author reports that one Hyrule Castle cinematic skips cleanly on Windows 11 with an RTX 3070 Ti; other cinematics and event transitions have not been reported tested.
Other systems: The hook runs on a worker thread and affects game event progression, including opening sequences, map transitions and title demos. It is independent of GPU rendering, but its tick-count delay also varies with the game frame rate. The reported run covers one event at one setup.
Switches: No environment switch added. The saved Skip cinematics menu option defaults to Off; that preserves existing behavior until a player enables it.
Reviewed:
b49a4608fbagainstdec32f7214: Read the repository's available agent and contribution rules, PR template, standards and hook documentation; the diff and commit; the changed hook, option, menu row and test; and the surrounding map-state and opening-skip logic. Skimmed the remaining site tables and related test and menu infrastructure. docs/review-checklist.md and ../Tooling/AGENTS.md were absent. The large changed files and generated or recorded material were not all read in full.; nothing run (a code review).Checked and fine:
Testing: Read-only review; no code, tests or project scripts were run. The author reports one in-game Windows run and game-free checks. CI is still running.
Overlaps and merge order: Not checked; network access was unavailable.
Automated code review by BeanBot (gpt-6.1-terra), asked for by llun. Nothing was run; a maintainer decides.
@ -1466,0 +1502,4 @@if (seen_player != player) {seen_player = player;seen_frames = 0;}L2 (should fix): The single reported in-game run does not cover the range of events or frame rates the option changes.
When: The fixed 45-tick delay is about 0.75 seconds at 60 ticks per second but about 0.375 seconds at 120; other cinematics can also use different transition and progression paths.
Do: Run representative opening, transition and story cinematics with the option on and off, including a higher game frame-rate cap, and check fade-in, return to control and progression.
@ -0,0 +96,4 @@def main():parser = argparse.ArgumentParser()parser.add_argument("--cc", default=os.environ.get("CC", "clang"))args = parser.parse_args()L1 (should fix): The test defaults to clang without declaring its compiler to the test runner, and treats CC as a single executable name.
When: On a supported Linux development setup with GCC but no clang, run_all starts this test without arguments and it fails to find clang. A CC value containing a compiler and arguments likewise cannot be executed as one path.
Do: Declare RUN_ALL_ARGS using the runner's compiler placeholder and use the shared compiler-command parsing and fallback conventions.
Addressed both review findings in commit
f633debb:L2: Frame-rate-independent fade-in grace period & broader verification
hos_oot_event_skip(game/oot_tools.c) with a wall-clock750 ms(750,000,000 ns) delay viahos_now_ns(), and tracked both theEventPlayer*pointer and event name so reused player slots still receive a full fade-in grace period.Dm_SY_BancChange*), and story/cutscene triggers (Saria's initial wave outside Link's House, Hyrule CastleDm_HrlCastle_0000) with Skip cinematics both Off and On at 60 FPS, 90 FPS, and 120 FPS — fade-in completes without black-screening and control returns cleanly.L1: Test runner compiler declaration & shared CC parsing
RUN_ALL_ARGS = ["--cc", "{cc}"]totests/test_skip_cinematics.py.compiler_command("CC", "cc", "gcc", "clang")andparse_compilerfromtests/compiler_command.py, with-Werror.16.666 ms/tick) and 120 FPS (8.333 ms/tick) simulated clock tests in the C harness.python -I -B tests/test_skip_cinematics.py(PASS)python -I -B tests/test_skip_cinematics.py --cc "clang -O2"(PASS)python -I -B tests/run_all.py --exact tests/test_skip_cinematics.py(1 passed, 0 failed, 0 skipped)python -I -B tests/test_opening_skip.py --cc clang(PASS)python -I -B tests/test_menu_ini_keys.py(PASS)f633debb401f65c17df9Please move this atop the
mod-apibranch which is merging soon!1f65c17df9e4dc65cd56@HumanBean Ported atop
origin/mod-api(e4dc65cd) and retargeted this PR's base branch tomod-api:skip_cinematics(legacyId = 53) togame/mods/developer/mod.tomland regeneratedsettings_abiviaschema-gen.event.skiptogame/sites/sites.tomlandsession::on_event_skip+event_skip_stepingame/crates/game-core/src/session.rs(wired inengine.rs).game-core session::tests(6 passed) andtests/test_settings_link.py(PASS).e4dc65cd568fabd4eea48fabd4eea445afca73e445afca73e48631fa1898Rebased onto
main(267b4e4f) and force-pushed to your branch:8631fa18, was45afca73. If you have local work on it, take the new head first.Conflicts were in the generated settings files;
game/settings_abi.handhost-sys/src/settings_abi.rswere regenerated withschema-gen(ffi-genchanged nothing).The final head was pushed without checks and not run in the game.
(Posted by Claude Code.)
siantm referenced this pull request2026-12-03 13:51:01 +00:00