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

Looking for an API that keep tracks of status on rounds

example A) Warlock cast Hex - it has Concentration and last for 1 minute (10 rounds).  1) I would like an API to turn on when I or my player applies the HEX status marker on the mob, informing me OR enters my turn tracker w/ X rounds of Hex. AND 2) I would like an API to also inform me when my player takes damage - it triggers a concentration check notification. ***note: Imagine using Aura/Tint API or Bloodied & dead API - when the warlock takes damage and the player subtracts HP - a pop-up box opens up telling them to do a concentration check/constitution saving throw. Upon Failure - it auto removes their hex spells status marker & from the turn order tracker.
I believe the script  Tracker Jacker will handle #1. As for #2, I don't believe anyone has posted a script to handle that.  I have one that I wrote for personal use, but it doesn't remove status markers.  It just reminds you to make the Con Save.  I included it below.  Feel free to use it if you wish. A couple of notes: As stated, all it does is remind you to make the Con Save.  It does not remove any status markers. I use the Overdrive status marker on tokens to indicate they are Concentrating.  If you want to use a different marker, change overdrive below to something else. var TOKEN_CONCENTRATING_STATUS_MARKER = "status_" + "overdrive"; on("change:graphic:bar1_value", function(obj, prev) {     if (obj.get(TOKEN_CONCENTRATING_STATUS_MARKER)) {         var playerPage = Campaign().get("playerpageid");         var tokenPage = obj.get("_pageid");         if (prev["bar1_value"] > obj.get("bar1_value")) {             var final_conc_DC = 10;             var calc_conc_DC = (prev["bar1_value"] - obj.get("bar1_value")) / 2;             if (calc_conc_DC > final_conc_DC) {                 final_conc_DC = Math.floor(calc_conc_DC);             }                          sendChat("TokenDamage", "Make a Concentration Check DC " + final_conc_DC + ".");         }     } });
Okay - Trackerjacker def fills #1 Now - I read that thread and I attempted to change the Tracker Image and continue to fail. I have used jpg, png.. I used 200x200 and different sizes.. I can't seem to change the tracker image. Image I want is:&nbsp; <a href="http://orig01.deviantart.net/26c5/f/2012/221/6/6/h" rel="nofollow">http://orig01.deviantart.net/26c5/f/2012/221/6/6/h</a>...
1514654719

Edited 1514654940
As for Concentrating status marker - any code.. I am not savvy with API - so I am uncertain what I need to do once I applied the API script to the game... any commands? EDIT nevermind - figured it out - that does almost exactly what I want... when they subtract HP - it triggers the notification - awesome!
Nover C. said: As for Concentrating status marker - any code.. I am not savvy with API - so I am uncertain what I need to do once I applied the API script to the game... any commands? EDIT nevermind - figured it out - that does almost exactly what I want... when they subtract HP - it triggers the notification - awesome! Yeah, sorry.&nbsp; I didn't say it ran upon taking damage when the token was marked as concentrating. As for changing the tracker image, I can't help you much there.&nbsp; I don't use Tracker Jacker.&nbsp; I just know it exists and should do what you want.
yeah I figured it out - has to be renamed to "thumb.png"
Hrmmm - Curious - Anyone knows how to add a button/feature in this script for players to click "EoT" like Aaron's "Turn Marker" does?
1514683717
Kirsty
Pro
Sheet Author
I made a macro assigned to "All Players" and made it a token action. In the macro, all you need is !eot and then the players can select their token to have the button appear. As a bonus, this will also apply to your npc tokens.
1515051363

Edited 1515054240
Ravenknight
KS Backer
Three of Swords said: I believe the script&nbsp; Tracker Jacker will handle #1. As for #2, I don't believe anyone has posted a script to handle that.&nbsp; I have one that I wrote for personal use, but it doesn't remove status markers.&nbsp; It just reminds you to make the Con Save.&nbsp; I included it below.&nbsp; Feel free to use it if you wish. A couple of notes: As stated, all it does is remind you to make the Con Save.&nbsp; It does not remove any status markers. I use the Overdrive status marker on tokens to indicate they are Concentrating.&nbsp; If you want to use a different marker, change overdrive below to something else. var TOKEN_CONCENTRATING_STATUS_MARKER = "status_" + "overdrive"; on("change:graphic:bar1_value", function(obj, prev) { &nbsp; &nbsp; if (obj.get(TOKEN_CONCENTRATING_STATUS_MARKER)) { &nbsp; &nbsp; &nbsp; &nbsp; var playerPage = Campaign().get("playerpageid"); &nbsp; &nbsp; &nbsp; &nbsp; var tokenPage = obj.get("_pageid"); &nbsp; &nbsp; &nbsp; &nbsp; if (prev["bar1_value"] &gt; obj.get("bar1_value")) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var final_conc_DC = 10; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; var calc_conc_DC = (prev["bar1_value"] - obj.get("bar1_value")) / 2; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; if (calc_conc_DC &gt; final_conc_DC) { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; final_conc_DC = Math.floor(calc_conc_DC); &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; sendChat("TokenDamage", "Make a Concentration Check DC " + final_conc_DC + "."); &nbsp; &nbsp; &nbsp; &nbsp; } &nbsp; &nbsp; } }); Hi, Three of Swords, I've tried to change this into using bar3 but if I just change the text above from bar1 to bar3 it doesnt function. What am I missing?&nbsp; Never mind. I'm a moron. :P And the script is great! Thank you very much.
I'm glad that some of you found use for that script.&nbsp; My group used to forget about Concentration all the time until I wrote it.&nbsp; For those of you who are anal about your code, the following lines are not necessary: var playerPage = Campaign().get("playerpageid"); var tokenPage = obj.get("_pageid"); I forgot to remove them.&nbsp; My version of the Concentration script displays text on the screen rather than chat.&nbsp; So it needs them.