Skip to content

V13.2.1 LibWrapper Bug Fix

Choose a tag to compare

@GnollStack GnollStack released this 10 Jan 08:00
· 45 commits to main since this release
2debbe4

Squad Combat Initiative v13.2.1

Foundry VTT Compatibility: v13+
D&D 5e System: 5.2.4+

Bug fix release addressing group initiative not being applied correctly when using Foundry's "Roll All" or "Roll NPC" buttons.

Bug Fixes

  • Fixed group initiative not applying to all groups during bulk rolls: When clicking "Roll All" or "Roll NPC", only the first group would receive properly staggered initiative values. Subsequent groups displayed raw rolled values instead of the averaged/staggered format. Root cause was the libWrapper hooks targeting the base Combat class instead of dnd5e's Combat5e subclass.

  • Fixed race condition when creating groups with selected tokens: New combatants added to a group could briefly have "ungrouped" status before being assigned to the correct group, causing initiative finalization to be skipped. Group assignment now happens atomically during combatant creation.

Technical Details

  • libWrapper now correctly targets dnd5e.documents.Combat5e.prototype.rollAll and rollNPC instead of the base Combat.prototype methods
  • Added _bulkRollInProgress flag to prevent individual updateCombatant hooks from racing with batch processing
  • Combatants created via "Add Group" dialog now receive their groupId flag in the initial createEmbeddedDocuments call rather than a separate update