Skip to content

feat(ConditionTracker): Version 1.1.0 Release#2224

Open
steverobertsuk wants to merge 32 commits into
Roll20:masterfrom
steverobertsuk:sr/condition-tracker-v1-1
Open

feat(ConditionTracker): Version 1.1.0 Release#2224
steverobertsuk wants to merge 32 commits into
Roll20:masterfrom
steverobertsuk:sr/condition-tracker-v1-1

Conversation

@steverobertsuk
Copy link
Copy Markdown
Contributor

[1.1.0] - 2026-05-15 · Milestone

Added

  • Persistent Effects System (Saved Effects): Store long-term conditions (curses, diseases, poisons, hidden debuffs) in script state outside the Turn Tracker. Saved effects persist across sessions and can be optionally promoted into the Turn Tracker when combat begins (#7, #14).
    • Three visibility modes: public (full label visible in Turn Tracker and chat), masked (vague public label shown to players; full details whispered to GM), and gm (no Turn Tracker row; GM-whisper only when affected token reaches the top of initiative).
    • !condition-tracker --saved commands: --saved (view list), --saved add (guided wizard), --saved edit <id>, --saved remove <id>, --saved promote <id> --visibility public|masked|gm, --saved snooze <id> --scope turn|rounds|combat --rounds <n>, --saved snooze-clear <id>.
    • GM reminder system: When a token with gm or masked saved effects reaches the top of the Turn Tracker, the GM receives a whispered reminder listing hidden effects with inline action buttons. Duplicate reminders within the same turn are suppressed via a stable turn-key.
    • Snooze controls: Suppress GM reminders for this turn, 1 round, 3 rounds, or the remainder of the current combat. Combat snoozes are automatically cleared when the Turn Tracker empties.
    • Saved promotion: Copies (does not move) a saved effect into the Turn Tracker. Public and masked entries create visible tracker rows; GM-only entries confirm stored tracking without creating a row.
    • Token-deletion cleanup: Removing a token from the board now prunes all associated saved effects in addition to active tracked conditions.
  • Marker picker (--config marker-pick): Added !condition-tracker --config marker-pick <condition> which whispers a visual card showing every campaign token marker as a 28×28 icon button. Clicking any button immediately sets that marker for the given condition — no need to look up marker names manually. The currently configured marker is highlighted in the picker. (#16).
  • Marker clear (--config marker-clear): Added !condition-tracker --config marker-clear <condition> to remove a custom marker mapping for a condition, restoring the system default or leaving the slot unset.
  • Custom marketplace marker support: --config marker now resolves custom marketplace marker names (e.g. 005-Unconscious) to their full name::id tag format automatically via Campaign().get('token_markers'). Passing the full name::id tag form directly is also supported.
  • Full locale support: All 24 supported languages updated with new translation keys across the 1.1.0 feature set, including saved effects UI, commands, and help handout.
  • !condition-tracker --report-token command: Added GM-only per-token condition reporting for selected tokens, including conditions applied to and conditions sourced by each token (#8).
  • Multi-system condition profiles: Added game-system-driven condition lists and default marker mappings with gameSystem configuration support (including dnd5e, dnd4e, dnd35, pathfinder1e, pathfinder2e, starfinder, and many additional systems) (#9).
  • Name-based token references in direct apply commands: --source, --target, and --subject now accept token ids, exact token names, exact linked character names, and unique partial name matches (#10).
  • ConditionTrackerSaved and ConditionTrackerClassify macros: Auto-installed for all GM players alongside the wizard, multi-target, and report-token macros (#12).
  • Actor Classification System: Cross-system token classification engine that reliably identifies PCs, NPCs, and ignored tokens in a deterministic order (#11).
    • Detection order: token-level state override → character ct_mod_actor_type attribute → unlinked-token eligibility check → game-system sheet adapter → generic NPC attribute scan → controlledby fallback.
    • Unlinked tokens (map pins, spell templates, scenery) are classified as ignored by default and excluded from the wizard token picker.
    • Game-system adapters for dnd5e, dnd4e, dnd35, pathfinder1e, pathfinder2e, and starfinder read the sheet's native NPC attribute for automatic detection.
    • Generic NPC attribute scan checks npc, is_npc, npcflag, sheet_type, and character_type as a fallback for unsupported sheets.
  • !condition-tracker --classify command: Explicitly override a token's actor type for selected tokens (#13).
    • --classify pc|npc|ignored — mark selected tokens permanently.
    • --classify auto — remove the override and restore automatic detection.
    • --classify show — diagnostic whisper showing classification, source, and reason for each selected token.
    • --scope character (default) — writes the override to the character's ct_mod_actor_type attribute; persists across all tokens that share the character sheet.
    • --scope token — writes a token-level override to script state; useful for unlinked tokens or per-token overrides on shared sheets.

Changed

  • Name resolution for direct token references is now case-insensitive and exact-match-first, with partial matching used as a fallback.
  • Ambiguous name matches now return a clear guidance message listing candidate tokens and recommending a more specific name or token id.
  • Help and handout content now include copy-ready examples for name-based direct apply usage.
  • isPlayerToken() now delegates entirely to the new classifyToken() engine, applying override and adapter logic consistently everywhere the function is called (wizard token picker, zero-HP cleanup prompts, token-change events).
  • The wizard token picker now excludes ignored tokens. Previously, unlinked tokens with names appeared in the NPC column; they are now hidden unless explicitly classified as pc or npc.
  • Added enablePostApplyMacroButtons configuration support to optionally show macro-creation action buttons in post-apply GM whispers.

Developer

  • Build pipeline now runs a prebuild version bump step (scripts/bump-version.mjs) that auto-increments the trailing numeric segment in script.json (e.g. 1.1.0.beta-3.41.1.0.beta-3.5; plain semver falls back to patch increment). To set an explicit version use npm run set-version -- <version> and then build via node scripts/build.mjs to skip the auto-bump.
  • scripts/build.mjs now synchronizes package.json version to script.json before bundling, keeping package metadata aligned with release metadata.
  • Build output formatting is now integrated into the build step: the primary generated bundle is formatted once with Prettier, then copied into the versioned release folder.
  • Watch-mode rebuilds now use the same post-build formatting and versioned-copy behavior for consistent generated artifacts.

…public chat messaging, and added a report on token condition status

- Implemented profiles for Savage Worlds, Shadowrun, Shadow of the Demon Lord, Starfinder, Star Wars RPG (FFG), Stars Without Number, Traveller, Vaesen, Vampire: The Masquerade, Warhammer Fantasy Roleplay 4e, Warhammer 40,000 RPG, Warhammer Age of Sigmar: Soulbound, Werewolf: The Apocalypse, and Worlds Without Number.
- Each profile includes standard conditions, condition data, default markers, custom effect types, and labels.
- Enhanced validation by adding a function to validate game system IDs against a predefined list of valid systems.
- Added option to suppress public chat messaging
- Added a report on token condition status

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
- Added savedEffects.js to handle creation, retrieval, updating, and removal of saved effects.
- Introduced SavedEffect type definition for better type safety.
- Implemented functions to manage saved effects for tokens, including adding, updating, and removing effects.
- Created savedEffectsCommands.js to handle chat commands related to saved effects, including adding, editing, and promoting effects.
- Implemented user-friendly menus for managing saved effects in chat.
- Added snooze functionality for saved effects, allowing temporary suspension of reminders.
- Enhanced state management in state.js to initialize saved effects storage.
…te management

- Introduced functions to get, set, and clear token-level actor type overrides in the state.
- Enhanced ensureState to initialize actorOverrides and tokens if they do not exist.
- Updated MACRO_DEFINITIONS to include a new classify macro.
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… across multiple locales

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…yer controlled characters

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… string values correctly

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…ecks for tokens on the objects layer

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… names and IDs

- Updated README.md to include the new ConditionTrackerClassify macro.
- Modified TESTING.md to verify the existence of the new macro.
- Enhanced actor classification logic in actorClassification.js for better token eligibility checks.
- Improved command handling in commands.js to support token reference resolution by id, exact name, or partial name.
- Added new validation messages for ambiguous and not found token references in validation.js.
- Introduced examples section in handout.js and localized examples for user guidance.
- Refactored savedEffectsCommands.js to streamline imports and improve code organization.
…s to track pruned keys during synchronization

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…readability and organization

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…mat output during build

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…os and parser for improved command handling and state management

- Moved DEFAULT_CLASSIFY_MACRO_BODY import to maintain consistency.
- Enhanced logMacroSyncResult for better readability.
- Removed unused macroExists function.
- Added extractConditionTrackerCommand to support whisper-wrapped commands.
- Updated parseCommand to utilize the new command extraction method.
- Introduced enablePostApplyMacroButtons option in the configuration.
- Implemented last-apply payload storage and retrieval functions.
- Reorganized system imports for better clarity and structure.
…eveloper guide with versioning instructions, and add set-version script to package.json

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…e MOD_FILE_MAP with new scripts and package.json updates

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… functions for improved readability and maintainability

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…larity and improved documentation

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…er handling of custom marker sets

Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
- Updated CHANGELOG.md to reflect the release date change and added issue reference for marker picker feature.
- Changed versioning in ConditionTracker.js, package.json, and script.json to 1.1.0.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant