Repository navigation
feat(HealthColors): Enhance FX options and One-Click setup - #2341
Open
steverobertsuk wants to merge 9 commits into
Open
steverobertsuk wants to merge 9 commits into
steverobertsuk wants to merge 9 commits into
Conversation
`!aura heal` and `!aura hurt` now accept a Roll20 built-in effect name such as glow-holy or explode-blood, or a custom FX name or id, as well as the existing six-digit hex colour. `default` restores the shipped colour, and unknown values are rejected with a GM warning instead of being silently ignored. Add `!aura listfx` and a List FX menu button that list the campaign's custom FX with their ids and one-click Heal/Hurt set buttons, together with the built-in type and colour reference, restoring the LISTFX helper from the 1.7.1 forum build. Add a per-character USEHEAL attribute that mirrors USEBLOOD; both accept built-in names, custom names, hex colours or comma-separated lists, and USEBLOOD OFF keeps its meaning of no FX at all for that character. Built-in effects spawn by name (directional types via spawnFxBetweenPoints) and play at Roll20's fixed size; colour bursts and custom FX keep the scaled definition path. A configured FX that no longer exists now warns the GM once per setting change rather than on every HP tick, naming the setting or attribute to fix. Closes #5 Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Expose every DEFAULTS setting as a useroption in script.json, named after its state key, so the whole configuration can be set from the Roll20 One-Click install dialog. On startup, checkInstall now reads the script's globalconfig branch and applies the options when their lastsaved stamp is newer than the one cached in state.HealthColors.globalconfigCache, so in-game `!aura` changes survive restarts until the dialog is saved again. Values pass through the existing normalisers, blank values are ignored, the GM is whispered a summary of what changed, and tokens are refreshed. The branch key is matched by normalised name because the script's One-Click name, "Aura/Tint HealthColors", contains punctuation. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…ript.json Replace the coarse modifies entries with the graphic, character, attribute, custfx, jukeboxtrack and Campaign properties the script actually reads and writes, following the convention used by Condition Tracker. dependencies stays empty because TokenMod is optional, and no conflicting scripts are known. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Add a Heal & Hurt FX section describing the three accepted formats, the built-in type and colour vocabulary, `!aura listfx` and the USEBLOOD and USEHEAL overrides, and a One-Click Install Options section explaining when options are applied. Update the command reference and the troubleshooting notes, and record the 2.3.0 changes in the changelog. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Add TESTING.md, a live Roll20 checklist in the Condition Tracker style. It covers startup, aura and tint colouring, thresholds and palettes, PC/NPC and nameplate toggles, one-off tokens, heal and hurt FX with the per-character overrides, Death Save Integration on the 2014 and Beacon sheets, One-Click options, third-party HP changes, resets and non-GM permissions. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Bump the header, VERSION and UPDATED constants, move 2.2.1 into the previous versions list in script.json, and add the 2.3.0 snapshot, which is byte-identical to the root script. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
A newly placed token stayed uncoloured until a setting was toggled when its health bar only became usable after the token existed. This was reported on the Roll20 forum with the 5e Shaped sheet, which calculates HP max from the sheet after the token is placed. handleToken treated a change that only altered the bar's max, its attribute link, or the token's character as nothing relevant and skipped it, and the change:attribute listener ignored changes to an attribute's max. Both paths now re-evaluate the token silently, with no FX, so the aura or tint appears as soon as the bar is populated. The attribute path is needed because the previous-value snapshot on attribute-driven change:graphic events is not reliable. Record the fix in the changelog, add the matching steps to TESTING.md, and refresh the 2.3.0 snapshot so it stays byte-identical to the root script. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Roll20 renamed its sandboxes in September 2026: "Experimental" is now Mod Script Sandbox v1.5 and "Default" is v1.0, with v1.5 the default for games that never chose one. The same update exposes the running version as a plain property, Campaign().sandboxVersion, on both sandboxes, so the script no longer has to tell the GM it cannot know which one it is on. Add getSandboxVersion, isBeaconCapableSandbox and describeSandbox, report the version in the startup log, the GM menu footer and !aura deathsaves debug, and make the one-time Beacon death-save notice sandbox-aware: it is skipped on v1.5 or later, names the running version on v1.0 with the new menu path, and only asks the GM to check the startup banner when the version is not reported. Reword the README, TESTING.md, the One-Click description and the changelog to the new sandbox names, declare the Campaign.sandboxVersion read in script.json, and refresh the 2.3.0 snapshot so it stays byte-identical to the root script. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
The Death Save Integration block of the GM menu always carried the "Beacon sheets need Mod Script Sandbox v1.5" note, which is redundant on a v1.5 game. Move it into sandboxDeathSaveIntegrationNote, which returns nothing when the sandbox reads Beacon values live and the note with the running version on v1.0 or when the version is not reported, matching the one-time GM whisper. Adjust the README, TESTING.md and changelog wording to match, and refresh the 2.3.0 snapshot so it stays byte-identical to the root script. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Version 2.3.0 of HealthColors enhances particle effect customisation, streamlines installation with One-Click options, and improves token display reliability. The full changelog of this version is listed below.
Added
!aura heal <effect>and!aura hurt <effect>now accept a Roll20 built-in effect name (e.g.glow-holy,explode-blood,splatter-blood) or a custom FX name/id from the campaign's Effects menu, as well as the existing 6-digit hex colour.!aura heal default/!aura hurt defaultrestore the shipped colours. (#5)!aura listfx(and a List FX button in the GM menu) that lists the campaign's custom FX with their ids and one-click Heal / Hurt set buttons, plus a reference of the built-in<type>-<colour>effect names — restoring theLISTFXhelper from the 1.7.1 forum build.USEHEALattribute mirroringUSEBLOOD:DEFAULT(use the global setting),OFF/NO(no heal FX for that character), a hex colour, or a comma-separated list of built-in and/or custom effect names.!aura settingssnapshot now show the chosen heal/hurt effect (colour swatch for hex values, the effect name otherwise).useroptions. Options are applied on first install and whenever the dialog is saved again (tracked instate.HealthColors.globalconfigCache.lastsaved), so in-game!aurachanges are not overwritten on every restart.!aura reset/!aura reset-allreturn to the One-Click values.script.jsonnow declares the objects and properties the script reads and writes at property level (graphic.*,character.*,attribute.*,custfx.*,jukeboxtrack.*,Campaign.token_markers).Changed
USEBLOODnow accepts Roll20 built-in effect names alongside custom FX names and hex colours.OFF/NOkeep their long-standing meaning of disabling all HealthColors FX for that character and are now matched case-insensitively.!aura heal/!aura hurtare rejected with a GM warning instead of being silently ignored, and the previous setting is kept.Campaign().sandboxVersion, logs it at startup, reports it in!aura deathsaves debug, and only shows the Beacon sheet note in the GM menu and the one-time GM whisper when the game is on v1.0 (or the version cannot be determined).Fixed
change:attributelistener ignored changes to an attribute's max. Both paths now re-evaluate the token (silently, with no FX) so the aura or tint appears as soon as the bar becomes usable.Signed-off-by: Steve Roberts steve@shadowcomputers.co.uk