Skip to content

Implement audio beacon cadence configurability#10

Open
caturria wants to merge 1 commit intoBlindGuyNW:devfrom
caturria:audio-beacon-delay
Open

Implement audio beacon cadence configurability#10
caturria wants to merge 1 commit intoBlindGuyNW:devfrom
caturria:audio-beacon-delay

Conversation

@caturria
Copy link
Copy Markdown

@caturria caturria commented Apr 6, 2026

Rationale

  • Hard-coded two second beacon interval is too infrequent to track patrolling NPCS.
  • The Zone Eater's Belly is a stealth section. A higher beacon cadence is essential for determining when the bridges can be jumped across without being spotted by the lookouts.

Usage

  • Beacon frequency added as option in mod menu.
  • Default setting of 50% is close to original cadence (2100MS).
  • Setting to 0% causes beacons to play every 100MS.
  • Setting to 100% reduces the cadence to 4100MS.

Implementation details

  • Added new SliderItem class to ModMenu.
  • Original VolumeItem now inherits from this.
  • Functionally, SliderItem is VolumeItem minus the toggle capability.
  • Removes the BEACON_INTERVAL constant, instead computing nextBeaconTime using the preference.

Critique welcome

Disclosure: C# is not my forte. I learned enough of it to pass two college courses years ago and haven't worked in it since. I'm happy to make revisions as you see fit.

Thank you for your consideration, and for this wonderful project!

…o ModMenu that intentionally lacks toggle. Remove hardcoded constraints on beacons in AudioLoopManager.
Copy link
Copy Markdown
Owner

@BlindGuyNW BlindGuyNW left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution, Jordan! The feature is well-scoped and the SliderItem refactor is clean. Just a few minor fixes needed before merging.

continue;
}
nextBeaconTime = Time.time + BEACON_INTERVAL;
nextBeaconTime = Time.time + (0.1f + (PreferencesManager.BeaconDelay / 25f));
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The 25f divisor and 0.1f floor are a bit opaque here. Could you extract this into a local variable with a short comment explaining the range?

Suggested change
nextBeaconTime = Time.time + (0.1f + (PreferencesManager.BeaconDelay / 25f));
nextBeaconTime = Time.time + (0.1f + (PreferencesManager.BeaconDelay / 25f)); // Slider 0-100 maps to 100ms-4100ms

Or pull the expression into a named variable — either works.

Comment thread FFVI_Mod/Core/ModMenu.cs
new ToggleItem("Audio Beacons",
() => FFVI_ScreenReaderMod.AudioBeaconsEnabled,
() => FFVI_ScreenReaderMod.Instance?.ToggleAudioBeacons()),
new SliderItem("Beacon delay",
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things here:

  1. Title case: All other menu items use title case ("Audio Beacons", "Beacon Volume"), so this should be "Beacon Delay".
  2. Indentation: The leading spaces and continuation lines are off compared to surrounding entries. Should match:
Suggested change
new SliderItem("Beacon delay",
new SliderItem("Beacon Delay",
() => PreferencesManager.BeaconDelay,
PreferencesManager.SetBeaconDelay),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants