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 and new Token Markers

Here's what I want. (Using Beyond20, so I know it won't be automated) I want a Concentration API that I click. Then the API adds a Concentration Marker from a non-default set. And then when the token takes damage, the API reminds the caster to roll a Concentration check.  How do I make this happen?
1588364484
The Aaron
Roll20 Production Team
API Scripter
I think that's possible with the Concentration Script.  It has integration with the 5e OGL sheet, but that's not required.
This is what I get when I use the Concentration Script. For reference, the error message generated was:  ReferenceError: character_name is not defined ReferenceError: character_name is not defined at addConcentration (apiscript.js:18940:52) at msg.selected.forEach.s (apiscript.js:18912:33) at Array.forEach (native) at handleInput (apiscript.js:18910:42) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1648:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546)
1588366977

Edited 1588367110
I think that’s Aaron’s fault... Do you use token Fate?  Try turning it off.   I’m just cramming, Aaron.  I have nothing but love for you brother...
1588368335
The Aaron
Roll20 Production Team
API Scripter
Ha!&nbsp; That one's not actually me. =D Give this corrected version a try:&nbsp; <a href="https://gist.github.com/shdwjk/ad3e10e7c46597e90e31c533c9044783" rel="nofollow">https://gist.github.com/shdwjk/ad3e10e7c46597e90e31c533c9044783</a>
That concentration api can be set to use non standard markers, but you need to look at the token of handout for token mod to see what the actual name of the token marker is and then manually make the change in the script.
I came here to ask that. Where do I make that change?
Line 447 of the code that Aaron posted above. &nbsp;I had a little trouble with it when I made the change. &nbsp;I don’t remember if I had to enter the menu in game to make sure it took or if I had to reload the game. &nbsp;Let me know if you have trouble with it and I’ll try to help.
Yep, you have to make the changes to the Concentration script manually. I did it a few days ago and it's been fine.
Ok, so I made that change and it adds my Concentration icon. But that's it. Now it doesn't remind you to roll the Con save when you take damage. Thoughts?
This one doesn't remind, it should just make the roll.&nbsp; Not sure about the dynamics of your game.&nbsp; If you're using a macro rather than triggering the spell on the spell page by some means for instance.&nbsp; As far as I know, this API recognizes when you trigger a spell with the concentration tag.&nbsp; It then flags your character as concentrating, and any time you apply damage to the token it rolls a concentration save.
1588445252
Sr. K
Pro
Sheet Author
After making that change in line 447 the script stops auto rolling and each time concentration is called via command adds a new custom marker instead of togglin it, this is not happening before changing that.
1588445819
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I use a much simpler script , originally created by user Three of Swords. Be sure to check the Read Me for setup.
1588450684
Sr. K
Pro
Sheet Author
keithcurtis said: I use a much simpler script , originally created by user Three of Swords. Be sure to check the Read Me for setup. Works great! Thanks. Line 12 also needs some changes in the token mod call to toggle the right marker.
I really appreciate everyone's time. Keith, I changed the marker in Line 1 to "Concentration::1493288"; And my HP bar is line 1. Is there anything else I need to change? Because it's still not working.
Rose are you using Keith's Script or the one Aaron put up.&nbsp; I realize that I am using an older version of the one Aaron put up.&nbsp; I only changed the name on the one line I told you but had to open the menu and make sure it was set, then it worked fine.&nbsp; Here is a screenshot of the menu and the command to open it.&nbsp; If you use that command with a token selected it toggles the marker on the token, without a token selected it brings up the menu.
1588463992

Edited 1588464015
I've used the one that Keith put up before as well and it worked fine for me.&nbsp; I think with it you have to add the marker to a token that is concentrating and then it reminds you if damage is applied to the token that they need to make a save with a message in chat that includes the DC and a button to roll the save.
I tried both. I'm going to remove all my scripts and add them 1 at a time and see what's up. I'll report back. Thank you again for the help.
Removed all API except Token-Mod and each of the scripts below separately. Using only the one Keith put up (&nbsp;I changed Line 1) and Token-Mod, the "Toggle Concentration marker" doesn't work. Using The Aaron's updated Concentration script and Token-Mod, there is no "Toggle Concentration marker" or "Remove Concentration marker."
1588500542

Edited 1588500754
Sr. K
Pro
Sheet Author
PinkRose said: Removed all API except Token-Mod and each of the scripts below separately. Using only the one Keith put up (&nbsp;I changed Line 1) and Token-Mod, the "Toggle Concentration marker" doesn't work. Using The Aaron's updated Concentration script and Token-Mod, there is no "Toggle Concentration marker" or "Remove Concentration marker." For Keith's one go to line 12 and change iconmagic &nbsp;to your custom marker name without :: numbers. "*[Toggle Concentration Marker](!token-mod --sel --set statusmarkers|!iconmagic)*}}" For the Aaron's use !concentration with the token selected to toogle the icon. Make sure you change line 447 using markername::numbers &nbsp;instead of markername[markername::numbers] before you click on the reset button in the !concentartion config menu and restart the API. This was the reason why it didn't work for me before, now it works. Mine looks like this: statusmarker: 'iconmagic::243249',
1588517532

Edited 1588517572
I have the macro on my macro bar with a stop sign emoji as the title. &nbsp;It wipes all token markers. &nbsp;You can even draw a square around the whole battle and use it to wipe all markers from all combatants. !token-mod --set statusmarkers|=dead|-dead
Sr. K, thanks for that specific help. I have Keith's working, except...it only works every other change to the HP bar. So, it must have something to do with an on and off trigger, but Token Marker isn't actually going on and off. And The Aaron's is working just right now.
1588533468
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Well as long as one of them is working. :)
1588533558
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sr. K said: keithcurtis said: I use a much simpler script , originally created by user Three of Swords. Be sure to check the Read Me for setup. Works great! Thanks. Line 12 also needs some changes in the token mod call to toggle the right marker. Thanks. The line 12 note was actually in there, but I forgot that the markup needs a double return to make a new paragraph, so it was lost and the end of the line. I have edited and added some more setup clarification.