Repository navigation
feat(ConditionTracker): Enhance Advantage/Disadvantage and add presets - #2337
Merged
nmbradley merged 17 commits intoOct 13, 2026
Merged
Conversation
…trings
Strings made up only of placeholders and punctuation, such as {source} {verb} {target}., were sent for translation with their placeholders masked. The translation service translated the mask tokens themselves, so the placeholders could not be restored and literal text such as PLATZHALTER0TOKEN ended up in the locale files.
- Skip translation when nothing translatable remains after masking.
- Reject any translation that loses a placeholder, keep the English text and log a warning.
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… locales The German, Afrikaans, Italian, Polish and Korean locale files contained translated mask tokens (for example PLATZHALTER0TOKEN) in place of their placeholders, so apply announcements, no-by rows and the Korean 0 HP title printed that text literally. Restore the affected templates to their placeholder form. They contain no translatable words, so they match the English source. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…t headings
The standard conditions heading used a {system} placeholder in English but was hard-coded to D&D 5e in every other locale, so the handout named the wrong system whenever another game system was configured.
Replace the hard-coded name with the {system} placeholder in all translated locales.
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…message The Spanish macro-reinstalled message still named only the wizard and multi-target macros. Add the report-token, saved and classify placeholders so it matches the English source. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
The self-target Turn Tracker template was the only display template without the {emoji} placeholder, so rows such as a creature knocking itself prone appeared without their condition emoji.
Add the placeholder to the template in every locale.
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Effects such as Help and Dodge end when the source creature's next turn begins, which the end-of-turn options could only approximate by running a full turn too long. - Add the turnStart duration type and the Start of source next turn option. - Expire turnStart conditions as soon as their anchor token reaches the top of the Turn Tracker, and exclude them from end-of-turn decrements. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…cker Turn-anchored durations showed a bare 2 or 1 in the pr column, which reads like an initiative value. Round counts still show the rounds remaining. Turn-anchored durations now show an hourglass, and single-use effects show a use marker. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… the Help preset Add the templates, wizard prompts, messages and handout rows used by the any-attacker advantage model, reason labels, single-use tracking, the start-of-turn duration and the Help preset. New handout rows are appended so that existing translated rows keep their positions. Other locales fall back to English for the new keys until the locale sync is run. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…nd single use Advantage and Disadvantage could only say that one creature has it against another, which cannot express Help, Faerie Fire or Dodge, where whoever attacks the target benefits. - Add --attacker any, where the source is the creature granting the effect and the row is anchored under the target. - Add --reason for a label such as Help, and --once for effects used up by the next attack. - Word rows, apply messages and removal messages for the new forms, including a used announcement. - Let a record name the token carrying its marker, so advantage held by one creature is marked on that creature. - Reject the new options on other condition types. - Move the start-of-turn option next to the other turn-anchored durations. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…preset The generic Subject, Source and Target prompts led the GM to pick the helper as the creature that has advantage. Advantage and Disadvantage now ask who has it (with an Any attacker option), who granted it, against whom, and how many attacks it covers. - Add --preset help, which pre-fills any-attacker advantage, single use, the Help reason and the start-of-turn duration so only the helper and the target are picked. Presets are offered at the top of the condition step. - Add --used and a Mark as Used button in the apply summary and removal menu for single-use effects. - Offer the Start of source next turn duration in the wizard and describe it in summaries. - Carry the chosen subject through the duration and details steps and into created macros. It was previously dropped before the effect was applied. - Refresh an identical effect when it is re-applied instead of rejecting it as a duplicate, so the same Help can be given again each round. - Place the marker for advantage held by one creature on that creature. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…set and new durations - README: describe the advantage wizard prompts, the Help preset, the new command options, row wording, pr column markers and refresh-on-reapply behaviour. - TESTING: add a manual checklist for advantage, Help and single-use effects, and update the duplicate and duration checks. - DEVELOPERS and MOD_FILE_MAP: cover the turnStart duration, the presets module and the extra advantage record fields. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
- Add the 1.2.0 changelog entry. - Set the version to 1.2.0 in script.json and package.json, and list 1.1.0 under previous versions. - Correct the subjectPromptBypass option description to include Advantage and Disadvantage. - Regenerate ConditionTracker.js and add the 1.2.0 release bundle. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… row Roll20 advances the Turn Tracker one row at a time, so a condition row sits at the top between two token turns. The handler recorded that as nobody's turn and then ignored the next token reaching the top, so start-of-turn expiry (such as the Help preset) never fired when the preceding row was a condition row. Detect the turn ending and the turn starting separately. End-of-turn and round durations are unchanged. Saved-effect reminders now also fire for a token whose turn follows a condition row. Rebuild the bundle and the 1.2.0 snapshot. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
… locales prettier.format() does not read .prettierrc.json on its own, so the locale sync wrote files with Prettier's defaults: double quotes, an 80-column width and default trailing commas. Resolve the project config for each locale file and pass it to the formatter so generated locales match the rest of the source. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
…uests The locale sync only retried timeouts. Any other failure, such as rate limiting or a network error, fell back to the English string without logging anything, so a run could leave a locale untranslated with no indication why. Retry every failed request with a logged warning, and log an error naming the string kept in English once the retries are exhausted. Signed-off-by: Steve Roberts <steve@shadowcomputers.co.uk>
Add the strings introduced for any-attacker advantage, reasons, single-use effects, the Help preset and the start-of-source-turn duration to all 23 non-English locales. Generated with the locale sync script. Example commands that the translator would have altered are kept in English. 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.
Enhances Advantage/Disadvantage tracking with new options, introduces an intuitive preset system, and refines Turn Tracker displays.
Added
--attacker any): Allows tracking effects that apply to any creature attacking a target (e.g., Help, Faerie Fire, Dodge). The source is the creature granting the effect, the Turn Tracker row is placed under the target, and the marker is on the target.--reason): Provides an optional label for Advantage/Disadvantage effects, displayed in the row and chat (e.g.,Help).--once true|false): Marks an Advantage/Disadvantage to be consumed after the next attack. Displays1×in the Turn Tracker's 'pr' column and presents a Mark as Used button in the apply summary and removal menu.--usedcommand: Removes a single-use effect and announces it as consumed, rather than simply removed.Start of source next turnduration: A new duration type that expires as soon as the source token's next turn begins, ideal for effects like Help or Dodge.--preset help): Introduces pre-configured effect setups. TheHelppreset automatically configures any-attacker Advantage, single-use, with aHelpreason and start-of-turn duration. Presets are conveniently listed at the top of the wizard's condition step for supported systems.Changed
⏳in the Turn Tracker's 'pr' column for better clarity, while round counts continue to show the remaining rounds.Fixed
de,af,it,pl, andko) that previously displayed literal mask tokens in chat.{system}) instead of a hardcodedD&D 5ein non-English locales.Developer
scripts/sync-locales.mjsscript has been improved to prevent placeholder-only strings from being sent for translation and rejects any translation that alters placeholders, reverting to the English text.Signed-off-by: Steve Roberts steve@shadowcomputers.co.uk