Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×

[Script, Update] Concentration

1793624236

Edited 1795277137
MidNiteShadow7
Pro
API Scripter
Concentration: Version 1.1.0. You can download it directly from GitHub: <a href="https://github.com/steverobertsuk/roll20-api-scripts/releases/download/Concentration-v1.1.0/Concentration_v1.1.0.zip" rel="nofollow">https://github.com/steverobertsuk/roll20-api-scripts/releases/download/Concentration-v1.1.0/Concentration_v1.1.0.zip</a> The update should reach the One-Click Installer soon. Watch the How-To video: <a href="https://youtu.be/ZcNYj4pKg50" rel="nofollow">https://youtu.be/ZcNYj4pKg50</a> [1.1.0] - 2026-11-21 Brings Concentration up to the standard of the other Mods maintained by MidNiteShadow7. Version 1.0 settings, macros and commands keep working. Fixed Ending concentration posted nothing, so the last line in chat was often the earlier "is now concentrating on …" message, which read as if ending had started it again. Every way concentration ends now says so, and on which spell. Players clicking a reminder's Roll or Advantage button started or ended concentration on whatever token they had selected instead of rolling. The buttons now roll for the GM and the token's players. Damage was compared as text, so a bar going from 10 to 9 was not seen as damage. Bar values are compared as numbers. The One-Click settings on the Mod's page were never read. They now apply on startup when changed. Changing the HP Bar needed a restart. A failed save on one goblin took the marker off every token made from the same sheet. Unlinked tokens now concentrate on their own. Send Reminder To character whispered to the first word of the token's name. Whispers now go to the character by its full name, with a copy to the GM. 5e OGL spell cards that list charname before name gave the caster's name as the spell. Damage dealt by other Mods, such as AlterBars, called for no save, because Roll20 raises no event when a Mod changes a token bar. Concentration now checks the hit points of everyone concentrating shortly after each Mod command, and when a linked hit point attribute changes. Added End messages: "is no longer concentrating on …", "loses concentration on …" after a failed save, and "drops to 0 hit points and loses concentration on …". Spell switching: naming a different spell, or casting another concentration spell from a sheet, switches to it and says so. Putting the marker on or taking it off by hand starts or ends concentration, with a message. End at 0 HP setting (on by default): concentration ends without a save at 0 hit points. Save DCs stop at 30, as in the 2024 rules. end and status commands, with End buttons on the status card; help and journal . Concentration - Help and Concentration - Command Deck handouts (GM only). Custom token markers can be the Status Marker; changing it moves the marker on concentrating tokens. Commands from other Mods (playerid API ) are accepted, and a globalThis.Concentration API ( isConcentrating , spellOf , start , end , list ). Translations into 24 languages, with a Language setting. D&amp;D 2024 spell cards use the message's character ID when Roll20 provides it. Deleting a concentrating token ends its concentration; new linked tokens of a concentrating character get the marker; pasted marked tokens are tracked. Security Spell cards only start concentration for characters the sender controls (or from the GM and other Mods); version 1.0 let anyone mark any character by posting a card with its name. Changed A D&amp;D 2024 card that only mentions concentration in its text can start concentration but no longer counts as casting a concentration spell over an existing one. Repeated cards for the current spell are ignored. New chat cards in the same style as the other Mods, with the settings as buttons in one card. reset asks for confirmation and keeps who is concentrating. Source split into ES modules under src/ , bundled with Rollup; Node tests run the bundle against a Roll20 stub. docs/ folded into README.md , TESTING.md and DEVELOPERS.md .
1793835624

Edited 1793929697
MidNiteShadow7
Pro
API Scripter
I have created a how-to video for the Concentrate mod, and you can view it on YouTube: <a href="https://youtu.be/ZcNYj4pKg50" rel="nofollow">https://youtu.be/ZcNYj4pKg50</a> In this video: • Getting started: the Command Deck handout in the Journal, and the settings menu in chat (!concentration) • Marking a caster with `!concentration` and the spell's name, and switching to a different spell • Casting a concentration spell from the D&amp;D 2024 sheet: the marker goes on by itself, no command needed • Taking damage: the save is rolled straight away (DC 10, or half the damage if that's higher), and a failure takes the marker off • Dropping to 0 hit points ends concentration with no save • Advantage on concentration saves, as War Caster gives • Rolling saves yourself: a reminder with the DC, and Roll and Advantage buttons • Who sees it: everyone, just the GM, or the character's player • Status: everyone who's concentrating, and on what, with an End button for each • Ending concentration with the command or by taking the marker off • Translations: 24 languages for the cards and handouts Chapters: 0:00 Intro 0:21 Concentration 0:28 What Does It Do? 1:00 Getting Started 1:46 Casting From the Sheet 2:16 Taking Damage 2:47 Advantage 3:12 Rolling Yourself 3:27 Who Sees It? 3:54 Who Is Concentrating? 4:07 Ending Concentration 4:20 Translations 4:41 More
The Roll20 wiki now has a page for Concentration 1.1.0: <a href="https://wiki.roll20.net/Script:Concentration" rel="nofollow">https://wiki.roll20.net/Script:Concentration</a> It covers the marker, Constitution saves, start, switch and end messages, sheet support and every command.
Hey MidNite. Thanks for updating the macro. Was just trying it out and found that having the hit points deducted by the script Alterbars does not trigger the Concentration roll. Is it possible to have this added in the next update? Thanks for all the work you are doing for the community.
Hi Ed, Thanks for reporting this. You were right: damage dealt with AlterBars never called for a Concentration save. Roll20 doesn't raise an event when one Mod changes a token's bar, so Concentration never saw the hit points drop. This is fixed in Concentration 1.1.0, released today. Concentration now checks the hit points of everyone who is concentrating shortly after each Mod command. It also checks whenever a linked hit point attribute changes. So damage from AlterBars, or from any other Mod, calls for a save within about 2 seconds. Healing doesn't call for a save, and damage entered in the bar bubble still gives exactly one save, not two. I tested it with AlterBars 2.0.5 on unlinked NPC tokens and on tokens linked to a 2014-style HP attribute, and both rolled the save at the right DC. One thing to be aware of: AlterBars can't change a D&amp;D 2024 sheet token whose bar is linked to the sheet's hit points. It reports the damage in chat, but the hit points don't change. That's a limitation of AlterBars, which hasn't been updated since 2017, so Concentration can't see anything. Unlinked 2024 tokens work fine. Until Roll20 merges 1.1.0 into the One-Click library, you can install it from GitHub: <a href="https://github.com/steverobertsuk/roll20-api-scripts/releases/download/Concentration-v1.1.0/Concentration_v1.1.0.zip" rel="nofollow">https://github.com/steverobertsuk/roll20-api-scripts/releases/download/Concentration-v1.1.0/Concentration_v1.1.0.zip</a> There's more on the project page: <a href="https://midniteshadow.online/projects/roll20-mods/concentration/" rel="nofollow">https://midniteshadow.online/projects/roll20-mods/concentration/</a> I've edited the release info in this thread's OP to reflect the additional fix. Let me know how you get on. Steve
Hey MidNite. &nbsp;Thanks. Greatly appreciate all the time and effort.