|
| 1 | +# HealthColors Changelog |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | +Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). |
| 5 | + |
| 6 | +--- |
| 7 | + |
| 8 | +## [2.0.1] – 2026-04-20 |
| 9 | + |
| 10 | +### Fixed |
| 11 | +- Corrected behavior for tokens with health below zero to ensure the "dead" marker is applied consistently. |
| 12 | +- Clamped negative health values to zero for accurate color mapping and consistent visual feedback. |
| 13 | +- Refactored `applyAuraAndDead` to separate dead-marker logic from aura updates, ensuring proper handling of edge cases. |
| 14 | + |
| 15 | +### Changed |
| 16 | +- Updated `percentToHex` to normalize input values, preventing invalid color calculations. |
| 17 | +- Improved code readability and maintainability by restructuring health percentage calculations. |
| 18 | + |
| 19 | +--- |
| 20 | + |
| 21 | +## [2.0.0] – 2026-04-08 |
| 22 | + |
| 23 | +Major modernization and stability refactor of the entire script, consolidating performance improvements, critical bug fixes, and new user control features. This version represents a complete overhaul from the v1.6.x series. |
| 24 | + |
| 25 | +### Added |
| 26 | +- **Respect Manual Overrides** — the script now only updates visual properties (Aura 1) when a token's internal health bar actually changes. This allows for manual customization of colors, radii, and shapes via the token settings dialog without script interference during movement. |
| 27 | +- **Persistent Default Auras** — tokens at 100% health now default to a clean **Green** Aura 1 (at the configured `AuraSize`) to indicate stability. |
| 28 | +- **JSDoc Documentation** — every function is now fully documented with parameter types, return values, and behavioral descriptions to improve maintainability. |
| 29 | +- **Centralized Configuration** — all default state values, FX definitions, and internal parameters are now managed via unified constants. |
| 30 | +- **FX Recovery Commands** — added `!aura reset-fx` (rebuild default heal/hurt custom FX objects) and `!aura reset-all` (restore all settings to defaults + rebuild default FX + force update). |
| 31 | +- **Public Settings Snapshot** — setting-changing `!aura` commands now post a read-only settings panel to game chat for table visibility. |
| 32 | +- **Aura Detail Commands** — added `!aura a1shape`, `!aura a1tint`, `!aura a2size`, `!aura a2shape`, and `!aura a2tint` to adjust displayed Aura 1/Aura 2 detail values from chat. |
| 33 | +- **Settings Output Command** — added `!aura settings` to post the current settings snapshot to game chat on demand. |
| 34 | + |
| 35 | +### Changed |
| 36 | +- **`_` (Underscore) dependency** — no longer required. |
| 37 | +- **`buttonColor` function** — legacy function completely removed after |
| 38 | + verifying no external or internal dependencies; superseded by `nameBtn`. |
| 39 | +- **Tautological FX condition** `(UseBlood !== "OFF" || UseBlood !== "NO")`. |
| 40 | +- **`!aura on/off` semantics** — now explicitly sets global enabled state instead of toggling on `on`. |
| 41 | +- **Schema version** — bumped to `1.1.0` to reflect incremental state/data migration changes in the v2.0.0 line. |
| 42 | + |
| 43 | +### Fixed |
| 44 | +- Consistent casing for `checkInstall` and `handleToken` throughout. |
| 45 | +- Initialization of `OneOff` state key to prevent `undefined` collisions. |
| 46 | +- Corrected logic in `playDeath` to ensure jukebox tracks are properly stopped before restarting. |
| 47 | +- Page scale calculation and aura radius math standardized for better precision. |
| 48 | +- Heal and hurt FX color assignment now resolves `startColour`/`startColor` and `endColour`/`endColor` consistently, preventing gray/white fallback artifacts. |
| 49 | +- Default heal/hurt FX random color channels are explicitly neutralized during spawn preparation to preserve configured color fidelity. |
| 50 | +- Added a fallback spawn path that updates and triggers default custom FX by id (`spawnFx`) when definition-based spawning renders colors inconsistently. |
| 51 | +- Tuned default heal/hurt particle profile values for clearer saturation and reduced washed-out appearance in experimental sandboxes. |
| 52 | +- `!aura bar` now validates `1|2|3`, whispers confirmation on change, and immediately runs a full sync to apply the new bar selection. |
| 53 | +- Tokens with no `max` value on the configured bar now have aura/tint cleared, preventing stale health indicators. |
| 54 | +- Configuration output now explicitly includes Aura 2 detail rows in both the GM menu and public settings snapshot. |
| 55 | +- Prevented duplicate settings output: setting-changing commands now publish a single game-chat snapshot instead of both GM and public panels. |
| 56 | +- Aura 2 output values are now sourced from state-backed defaults (`Aura2Size`, `Aura2Shape`, `Aura2Color`) instead of hardcoded labels. |
| 57 | +- Added Aura 1 Shape/Tint rows to settings output and backed them with default state values (`Aura1Shape`, `Aura1Color`). |
| 58 | +- Default heal/hurt custom FX definitions are now synchronized proactively on install/reset and when FX colors change, preventing delayed/stale visual updates after color edits or token lifecycle events. |
| 59 | + |
| 60 | + |
| 61 | +--- |
| 62 | + |
| 63 | +## [1.6.1] – 2020-08-20 |
| 64 | + |
| 65 | +- Maintenance release. Bug fixes and minor state schema updates. |
| 66 | + |
| 67 | +## [1.6.0] – 2020-08-19 |
| 68 | + |
| 69 | +- Added per-character `USEBLOOD` attribute support for custom FX colours and named custom FX overrides. |
| 70 | + |
| 71 | +## [1.5.1] – Earlier |
| 72 | + |
| 73 | +- Added `USECOLOR` per-character attribute to disable aura/tint on individual |
| 74 | + tokens. |
| 75 | + |
| 76 | +## [1.4.1] – Earlier |
| 77 | + |
| 78 | +- Added heal FX support (`-DefaultHeal` custom FX, `HealFX` colour setting). |
| 79 | + |
| 80 | +## [1.3.2] – Earlier |
| 81 | + |
| 82 | +- Aura size setting (`AuraSize`) and `OneOff` mode added. |
| 83 | + |
| 84 | +## [1.3.1] – Earlier |
| 85 | + |
| 86 | +- Death sound FX (`auraDeadFX`) introduced. |
| 87 | + |
| 88 | +## [1.3.0] – Earlier |
| 89 | + |
| 90 | +- NPC/PC split for dead marker and aura percentage threshold. |
| 91 | + |
| 92 | +## [1.2.0] – Earlier |
| 93 | + |
| 94 | +- Initial public release. Basic red-to-green aura/tint health indicator with |
| 95 | + GM menu via `!aura`. |
0 commit comments