Combat cooldown waiter can leave attacks permanently unready

Summary: this appears to be a stock stonehearth bug rather than an ACE bug. The base-game wait_for_global_attack_cooldown_action.lua schedules one cooldown check, but if recovery is still active when that check occurs, it logs an error and does not retry. the problem may normally be rare, but it becomes prominent in a heavily modded game where several mods add or alter combat actions. those changes may increase overlapping attacks or otherwise extend the cooldown after its original check was scheduled. this causes soldiers to stop attacking and briefly choose idle, medical, drinking, or other tasks.

Steps to reproduce:

  1. load a settlement using ACE and several mods that add or modify combat content.

  2. select a combat unit and order it to attack an enemy or hostile object.

  3. wait for the unit to stutter or drop the combat task entirely

  4. check the log for “Aborting attack. Global_attack_recovery on (…) still not expired.”

Expected Results: when the recovery timer fires, the action should check whether recovery has expired. if it has been extended or the timer fired slightly early, it should wait for the newly calculated remaining duration. the soldier should then continue attacking without yielding to unrelated tasks.

Actual Results: if recovery remains active when the timer fires, the stock action logs an error but does not schedule another check or make the attack runnable. the attack command can remain registered while the AI falls back to idle or unrelated tasks. another combat event may eventually restart the attack, causing the soldier to repeatedly alternate between attacking and doing something else.

Notes: only stonehearth.smod registers wait_for_global_attack_cooldown_action.lua so i believe the issue is base game.

Attachments:

Version Number and Mods in use:

stonehearth 1.1.0.949 x64

ACE Pre-Release 0.9.6.21b

heavily modded existing save

combat-related additions: ACE, Combat Dash, GoblinWarfare, Swamp Goblins, Gobbo, The Hunter, Trapper+

local diagnostic/fix mods were also enabled, but none overrides the affected cooldown action.

not yet reproduced in a clean stock or ACE-only settlement.

System Information:

Windows 10 Home 22H2, build 19045

Intel Core i7-10700F @ 2.90 GHz

31.9 GB RAM

NVIDIA GeForce RTX 4060

NVIDIA driver 595.97