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 .
×
Create a free account

Concentration spell from Script

1625675250

Edited 1625675289
I am using the updated Concentration Script (v0.16) from Robin's GitHub instead of the 1-click I was using and was able to update the Statusmarker to use a custom statusmarker.   All good. But is there a command to remind which Spell the player is Concentrating on?  It does list the spell name when it is first cast and Concentration starts, but is this information stored anywhere for recall later?  When the player takes damage or casts another Concentration spell, it says that Concentration is ended, but not the spellname which is ended. I sometimes find myself wondering, "now which spell is that player Concentrating on?"  And was hoping there was some sort of "!Concentration status" command that would whisper "[Playername] is still concentrating on [Spellname]".  Or when a new spell is cast, "[Playername] stops Concentrating on [Spell1] and is now concentrating on [Spell2]".
1625679834
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You could use ChatSetAttr to write the spell name to a custom attribute on the character sheet. But that would likely require writing the spell name out in a dialog box.
1625687680

Edited 1625687711
timmaugh
Pro
API Scripter
Not sure how you are selecting the spell at the start of the sequence (when you run Concentration), but metascripts would offer a couple of ways to do this. Muler Muler could store the data point in the same command line. Player Centric Version For instance, imagine the player with the character who is concentrating has a Mule named MyMule on the character sheet (let's call the character  CheekyMcGee ). I'll imagine that you are using a roll query to make the selection of spell to concentrate on. In that case, you can store it like this: Imaginary Concentration command line (original): !Concentration --spell|?{Spell|Flaming Down Unders|Dangle Puncher|Clench Bot} Adding Muler Storage: !Concentration --spell|?{Spell|Flaming Down Unders|Dangle Puncher|Clench Bot}{& mule CheekyMcGee.MyMule}set.CheekyMcGee.MyMule.Concentrating = ?{Spell}/set Later, when you wanted to retrieve it, you could get it like this: !{& mule CheekyMcGee.MyMule}get.Concentrating/get{&simple} In a template, that might be: !&{template:default} {{name=CheekyMcGee Concentration}} {{Spell=get.Concentrating/get}}{& mule CheekyMcGee.MyMule}{&simple} GM Centric Version If you, as a GM wanted to keep track of all the spellcasters in your party and what they were concentrating on, you could have a player-public mule character -- we'll call it PartyMule . Then add a Mule ability called Concentration . That one Mule would store the spells each spell caster is currently concentrating on. Each player would need control rights to the character, but then you could use those names in basically the same verbiage as above, except that you would store the variables based on the character names: {& mule PartyMule.Concentration}set PartyMule.Concentration.Cheeky = ?{Spell}/set So you are building a Mule that looks like: Cheeky=Flaming Down Unders Slappy=Dangle Puncher Lizzie PurePants=Dangle Puncher Later, anyone (including the GM) could retrieve the spell Cheeky is concentrating on using: !{& mule PartyMule.Concentration}get.Cheeky/get{&simple} Plugger Plugger could make it even easier. Designate a custom attribute on the sheet (like Keith suggested). Then update it using ChatSetAttr run as a Plugger plugin. Feed ChatSetAttr the name of the spell however you are selecting it. Here, I'll keep using the ?{Spell} roll query: {&eval}!setattr Concentrating|Clench Bot{& /eval} (I forget the exact syntax for CSA, but you get the idea.) Drop that into your command line anywhere, and it should be processed (storing the information and cleaning the command line) before Concentration even sees the message. Later you can retrieve: @{Cheeky|Concentrating}
OK.  Plugger with a custom attribute may be the way to go.  I will play around with this idea. Thanks.