Repository navigation
V13.4.0 Better Squad Management & Initiative Ties
Squad Combat Initiative v13.4.0
Foundry VTT Compatibility: v13+ (verified 13.351)
D&D 5e System: 5.1.0+ (verified 5.2.5)
This release merges the features, polish, and bug fixes from 13.3.1 and 13.4.0. It brings major quality-of-life additions for visibility control and group management, alongside smarter initiative tie-breaking, a better GM experience, and vital code maintenance.
What's New
- Unified Visibility Sync: Canvas token visibility and the combat tracker are now kept in sync. Hiding a token on the canvas (right-click → hide) automatically hides it from the tracker, and vice versa. A new Visibility Sync Mode setting controls this behavior:
- Bidirectional (default) — changes in either place propagate to the other.
- Tracker Only — the group toggle controls tracker visibility; canvas tokens are unaffected.
- None — fully independent, matching older behavior.
- Edit Group Dialog: Right-clicking a group header now includes an Edit Group option that opens a dialog to change the group's name, icon, and color in one place — including a file browser for picking icons. (Previously, renaming required a separate context menu option and icon/color changes had no in-encounter UI).
- Configurable Default Group Pin State: A new module setting — "Pin New Groups by Default" — controls whether newly created groups start pinned. Previously, this was hardcoded to always-pinned. Existing groups are unaffected.
Improvements
- Smarter Initiative Tie-Breaking: When two groups share the same average initiative, the turn order is now resolved by total initiative (sum of all raw rolls), then by average DEX modifier. Previously, ties fell back to an arbitrary group ID comparison.
- Richer Initiative Chat Card: The GM-only initiative summary card now includes the group name, icon, and group initiative at the top of the card. It also includes a stats row showing total rolls, high/low roll, average DEX modifier, and member count. The member table now features token portraits and DEX modifiers per combatant.
- Input Validation Feedback: Setting a group initiative via the context menu or the inline double-click editor now shows a warning notification when a non-numeric value is entered, rather than silently failing.
- Token Highlight Cleanup: Group hover highlights on canvas tokens are now properly cleared when changing scenes or ending a combat. Previously, a highlight could persist if the mouse never left a group header before a scene transition.
Bug Fixes
- Context Menu Responsiveness: Fixed context menus disappearing after any turn change. The context menu was previously only bound once per combat session, causing DOM replacements on re-render to leave right-clicks unresponsive.
- Context Menu Duplication: Fixed the context menu being re-created on every combat tracker render, which could cause duplicate entries to accumulate over a long session.
- Double-Click Crash Fix: Fixed a crash (
getBoundingClientRect of undefined) caused by right-clicking a group header twice in quick succession. Multiple rapid renders could stack duplicate ContextMenu instances on the same element; each one now gets exactly one instance. - Codebase Cleanup (Magic Numbers): Fixed the
0.1group rank offset and other numeric constants being scattered as "magic numbers" throughout the code. All calculation values are now centralized in aCONSTANTSobject and named descriptively.