mortgarra
July 31st, 2017, 04:40
I wrote an extension to implement a Combat Timer within Fantasy Grounds (see https://www.fantasygrounds.com/forums/showthread.php?30856-Combat-Timer-Extension-(v-0-0-1)).
My extension requires that, when the turn order changes, I receive a notification callback that a new actor's turn has arrived so I can reset the current timer and begin ticking. Advancing through the turn orders using the "Next Actor" button works fine, however if the GM directly drags the turn order "flag" to a new character, I receive no such notification. The problem is that the onDrop handler for the turn order flag (in ct_active.lua) directly calls the CombatManager.requestActivation function (implemented within scripts/manager_combat.lua), which bypasses all of the custom event handlers that an extension could register against (setCustomRoundStart, setCustomTurnStart, setCustomTurnEnd, setCustomInitChange, setCustomCombatReset).
I request that Fantasy Grounds invoke a notification handler when the active Actor changes.
My extension requires that, when the turn order changes, I receive a notification callback that a new actor's turn has arrived so I can reset the current timer and begin ticking. Advancing through the turn orders using the "Next Actor" button works fine, however if the GM directly drags the turn order "flag" to a new character, I receive no such notification. The problem is that the onDrop handler for the turn order flag (in ct_active.lua) directly calls the CombatManager.requestActivation function (implemented within scripts/manager_combat.lua), which bypasses all of the custom event handlers that an extension could register against (setCustomRoundStart, setCustomTurnStart, setCustomTurnEnd, setCustomInitChange, setCustomCombatReset).
I request that Fantasy Grounds invoke a notification handler when the active Actor changes.