WIP: feat(audio): a Disable low health audio row, to turn off the beep and Link's red flash at low hearts #1293
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
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!1293
Loading…
Reference in a new issue
No description provided.
Delete branch "kendowashere/Longshot:feat/heart-alert-mute"
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?
Type: feat · Risk: low · Tested on: Windows 11, RTX 5070 Ti, DualSense · Needs: Linux, any GPU
Why
At low health the game beeps and Link flashes red about once a second until he is healed. Some players find it grating, and others want a calmer screen for immersion; there is no way to turn it off. This adds an Audio row that does. No issue on the tracker or pull request (Longshot's or Hookshot's) fits: searched for low health, beep, low hp, heart beep, hearts, health warning and alarm.
What changed
The Audio tab gets Disable low health audio: Off (the default, the game as it is) or On, which turns off the beep and Link's red flash at low hearts. The hearts' own low-health glow (the heart meter's Pinch animation) and every other sound stay.
f_804caa80) pulses at low health in the block at0x804d24b8, reached from one branch. The block restarts a state of Link's (+0x1860: 1, its timers -1.0) and plays the sound-link trigger whose name is at0x84b6e110,HeartAlert(the soundSE_Sys_HeartAlert, inPlayer.bars), withf_8045fbd0(plays a sound-link trigger by name on the actor's sound user), then joins the update at0x804cd120. That is the only call in the game that passes that name.nx2/oot_patches.pypatch_heart_alert: at the block's first line,if (hos_low_health_audio_disabled()) goto L_804cd120;, the join the block itself ends with. Skipping the whole block, and not only the sound call, also stops the red flash. The patch checks the block before it applies: the name, the call, and no other call in it. The report warns when it is not found once.host/oot_heart_alert.c(new):hos_low_health_audio_disabled()reads the row (HOS_OPT_DISABLE_LOW_HEALTH_AUDIO, option id 96, which no open pull request uses), 0 without a menu. The log sayslow health audio: disabled, ...or... the game's low-health pulse playsonce.gpu/vk/vk_menu.cpp,vk_menu.h,vk_replay.cpp,vk_api.h(the row, its default and the host's view of it; the ini keydisable_low_health_audio),gpu/vk/menu_i18n.h(the row's texts in all 13 languages),README.md(the option table and a line).Measurements
Verdict: nothing to measure: a menu row, off by default; with it Off, the pulse's block runs as before after one option read a pulse.
Flags and settings
One new menu row (the ini key
disable_low_health_audio); no switch and no build flag. The README's option table lists it.disable_low_health_audio, id 96)Testing
Tested:
tests/test_heart_alert.py(new) applies the patch to a fixture of the pulse's block (the skip first in it, joining where the block does; a second run changes nothing), refuses a block with another call or another name (InWater, the slot beforeHeartAlert's) and a join that is not there, and checks the row, its default, the host's option and the README row. I also applied the patch to the real liftedf_804caa80of a build on currentmain: found once, together with the other patches in that file.python -I -B tests/run_all.pyon this branch (cded3573) onmain@f88e6e3a: 628 passed, 43 failed, 45 skipped. A cleanmain@f88e6e3aon this PC, run at the same time: 625 passed, 45 failed, 45 skipped. Every failure here also fails onmain:test_auto_handheld,test_bug_report_defaults,test_cpu_report,test_crash_dialog,test_crt_options,test_damage_debug_menu,test_display_startup_failure,test_dlss_feature_size,test_failed_compile_keeps_objects,test_framegen_preset,test_fsr_uniform_ownership,test_guest_imported,test_hud_layout_row,test_import_reach,test_invalidate_vcore,test_job_queue,test_linux_preflight,test_linux_pressure,test_mirror_budget,test_missing_nup,test_pads_after_menu,test_parallel_init_order,test_pending_guest_import,test_perf_report,test_pipeline_play_cache,test_portable_builder_home,test_portable_builder_startup,test_present_thread,test_profiling_mode,test_readback_timeout_source,test_recorder_sync,test_replay_write_order,test_rumble_menu,test_run_all_changed,test_slow_frames,test_staging_burst,test_target_image_pool,test_tested_configurations,test_upscaler_round_trip,test_upscaler_rows,test_vcore_escape,test_vk_occlusion_queries,test_walk_key.main(6c9edffe), together with my other branches. At low hearts with the row Off, the beep and Link's red flash play as before; with it On, both stop, and the hearts still glow.host/oot_heart_alert.ccompiles for a Linux target (clang-fsyntax-onlyagainst the Linux sysroot andhost/posix). That is not a Linux build, link or run.Not tested: Linux and Steam Deck; a run of this exact commit on current
mainin the game (it was run on an earliermain; the patch's place is found once on currentmain's lift).Must be tested:
Risks
What could break: the patched block is entered only at low health, and with the row Off it runs as before. With it On, the state the block would restart (
+0x1860) keeps its last value; the update's code after the join treats it as it does on any frame without a pulse.Turning it off: the row Off (the default), or revert the commit.
Compatibility: the options file gains one line. The player's next build translates the game again because the lifted function changes, as for any change to
nx2/oot_patches.py. Shader and pipeline caches andMKWVK_API_VERSIONare untouched (a newHOS_OPT_*number, no struct change).Checklist
Everyone
type(scope): description) of the status line's type.can't be run by hand is in Testing's Not testable by hand, with why.
in Risks.
main.python -I -B tests/run_all.pypasses (any failure that also fails onmainis named).third_party/untouched (a new folder with aPROVENANCE.mdinstead).When it applies
Assisted-by:/Co-Authored-By:trailers.tests/that reads changed source updated in this PR, not weakened.Tested in game: Windows 11 Pro, GeForce RTX 5070 Ti, a DualSense through SDL; a pack of this change (with my other branches) on main @
6c9edffe. At one heart: row Off, the beep and Link's red flash as before; row On, both gone and the hearts still glow.Brought up to the ready-for-review standard (#1454): the checklist's Everyone list has two new boxes, added here from what this PR's description and comments show (please check they match what you know).
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.