Repository navigation
V13.2.1 LibWrapper Bug Fix
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
Combatclass instead of dnd5e'sCombat5esubclass. -
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.rollAllandrollNPCinstead of the baseCombat.prototypemethods - Added
_bulkRollInProgressflag to prevent individualupdateCombatanthooks from racing with batch processing - Combatants created via "Add Group" dialog now receive their
groupIdflag in the initialcreateEmbeddedDocumentscall rather than a separate update