Version 2.1.1 is a follow-up update focused on fixing critical bugs related to aura visibility thresholds, settings menu behavior, and stability issues.
Change Log
Added
- Added version 1.7.1 (sourced from the Roll20 forums, never previously submitted to the GitHub repository) so it appears as a selectable previous version in the Roll20 Mod Script Console.
Fixed
- Fixed aura visibility threshold (
Percentage PC/NPC): tokens at or above the configured HP threshold were incorrectly shown a green default aura instead of having the aura hidden. Changed comparison from>=to>and replacedapplyDefaultAura()withclearAuras()in the above-threshold branch so the aura correctly disappears when a token’s HP is not below the threshold. Also added a guard so a threshold of0clears the aura rather than treating it as “always show”. (#1) - Fixed
!aurasettings menu after a change: clicking a button and submitting the dialog caused a non-interactive read-only panel (using<span>pills) to appear in public chat instead of re-displaying the interactive GM-whispered menu. Root cause washandleInputcallingshowSettingsInGameChat()on every setting change instead ofshowMenu(). The interactive GM menu is now always shown after a change; the read-only public snapshot remains available via the explicit!aura settingscommand. (#3, #4) - Fixed
!aura percnot refreshing tokens already on the map: changing the HP threshold now immediately re-evaluates all existing tokens viamenuForceUpdate(), so tokens that were visible under the old threshold are correctly cleared (or revealed) without requiring a token move. - Fixed “No FX with name” GM whisper appearing repeatedly when a character’s
USEBLOODattribute is set to a custom custfx name that no longer exists in the campaign (e.g. after a campaign reset or character import). The error message now identifies the character by name so the GM knows whichUSEBLOODattribute to correct. The script also falls back to-DefaultHurtso a visual effect still plays instead of silently doing nothing. (#2)
Changed
- Removed orphaned
applyDefaultAurafunction - it was superseded byclearAuras()in the threshold fix but never deleted. - Removed unused
changedSettingvariable fromhandleInput- it was assigned in ~20 places but never read, asshowMenu()was always called unconditionally at the end of the function. - Token refresh progress messages updated: sender changed from a hardcoded string to
SCRIPT_NAME; text changed from"Fixing N Tokens"/"Finished Fixing Tokens"to"Refreshing N Tokens"/"Finished Refreshing Tokens". handleInputcommand dispatch refactored - 27 switch cases reduced to 5 dispatch-table lookups (TOGGLES,STRINGS,FLOATS,SHAPES,HEXES) plus a 13-case switch for commands with unique behaviour, removing ~100 lines of repetitive boilerplate.showSettingsInGameChatrefactored to reduce cognitive complexity: extractedboolPillandnamePillmodule-level helpers (read-only counterparts to the existingtoggleBtn/nameBtn), replacing 8 repeated inline ternary expressions and an inlinepickNameStyleclosure.- JSDoc corrections: removed stale
@param [update]fromapplyAuraAndDead(parameter was removed in an earlier refactor); correctedspawnDefaultFxByIddescription which falsely claimed to tighten particle profile settings; correctedboolPilldescription (background colour, not text colour); correctedregisterEventHandlerslistingchange:tokeninstead ofchange:graphic; documented the missing British/American colour-key variants onFX_PARAM_DEFAULTS; removed stalepColorreturn-type entry fromresolveTypeConfig.