Skip to content

Protect and recover Kirshara queues after target or address changes - #287

Draft
Guffawaffle wants to merge 14 commits into
STFC-Mod:devfrom
Guffawaffle:feature/faster-queue-recovery
Draft

Guffawaffle wants to merge 14 commits into
STFC-Mod:devfrom
Guffawaffle:feature/faster-queue-recovery

Conversation

@Guffawaffle

@Guffawaffle Guffawaffle commented Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Kir'Shara queues can stall after queued targets disappear, or clear when another ship moves or recalls and native player-state handling temporarily reports the queued ship's starbase address. The address failure was reproduced with the mod DLL disabled.

Provides three independently configurable protections:

  • Default-on Thin Queue Protection resumes after validated native pruning and confirmed destroyed queue heads.
  • Opt-in Faster Queue Recovery advances after a matching failed course response for an already removed target.
  • Default-on Queue Address Guard uses the current owned deployment address only within the affected native queue comparison, after validating ownership, active state, recall/removal status and the target's full address.

The address guard changes no fleet fields or queue contents and adds no polling. Explicit clearing, recalling the queued ship and genuine address mismatches retain native behavior. Hook-install switches are independent of runtime feature settings. Recovery/pruning support compatible Windows x64 clients; the address guard also has shared macOS code. The obsolete combat-completion repair remains retired.

Refreshed against current dev. Validation: Windows release build, all three local queue suites and all 11 example TOMLs pass. Static hook-fit checks cover all 11 detour targets on the matching installed Windows client 271. The earlier clean downstream build containing the identical address guard passed both gameplay controls: A's queue survived B's other-system move/recall and next engagement; recalling A cleared it normally.

Current refreshed-artifact gameplay and macOS native fit/runtime remain unverified. Delayed same-target course responses still lack a server request ID. CI results for the refreshed head are pending.

@Guffawaffle

Copy link
Copy Markdown
Contributor Author

This isn't working as well as my previous implementation on my personal branch. Moving back to draft until I figure it out.

@Guffawaffle Guffawaffle changed the title Faster Queue Recovery Action Queue Protection and Recovery Sep 20, 2026
@Guffawaffle
Guffawaffle marked this pull request as ready for review September 20, 2026 14:23
@Guffawaffle
Guffawaffle force-pushed the feature/faster-queue-recovery branch from 1e4d2bf to 46f144d Compare September 24, 2026 02:29
@Guffawaffle

Copy link
Copy Markdown
Contributor Author

This is now gloriously effective for me in group waves.

@Guffawaffle

Guffawaffle commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor Author

Hook/feature alignment follow-up for #313

Follow-up to #313: keep hook installation independent of feature enablement, with default-enabled compatibility switches under [patches] and feature checks inside the installed hooks.

InstallActionQueueRecovery() and InstallThinQueueProtection() return early based on [control].faster_queue_recovery and thin_queue_protection, and are called outside the patch registry. Register them with independent default-enabled [patches] switches, remove feature-based installer returns, and retain the existing runtime Enabled() checks (including queue_enabled). Preserve the Windows/metadata/layout compatibility checks and native planner behavior. This is a standalone correction.

Published c60b6f8: independent default-enabled queue hook switches, current runtime eligibility, disabled/toggle pending-request invalidation and full-family guards. Removed the unused feature-derived installation helper/assertions. Windows build at ff75bb5 passed; both policy suites reran after the final deletion-only delta, all 11 TOMLs passed, and three independent lanes reviewed full PR plus correction. Seven Windows270 static fits pass. Exact-artifact wave/toggle/partial-install execution remains unqualified; delayed same-target responses retain the documented request-ID limitation. New CI is queued; moving on without waiting.

@Guffawaffle Guffawaffle changed the title Action Queue Protection and Recovery Protect and recover Kirshara queues after target or address changes Oct 10, 2026
@Guffawaffle Guffawaffle reopened this Oct 11, 2026
@Guffawaffle
Guffawaffle marked this pull request as draft October 11, 2026 03:47

if ((MapKey::IsDown(GameFunction::ToggleQueue))) {
config->queue_enabled = !config->queue_enabled;
ClearActionQueueRecoveryRequests();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

So this would appear to empty the queue as soon as you disable the queuing system. However, some people may have hit that by mistake and/or actually want the queued to finish processing.

Comment thread mods/src/config.h
Comment on lines +192 to +194
bool faster_queue_recovery;
bool thin_queue_protection;
bool queue_address_guard;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is there a purpose to having three hook methods? Would not all these be desired to be enabled together?

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