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

[Script] CombatTracker

Ken said: I just tried the new version of CT, and !ct sort is working great for me with no errors; sandbox is still up and running after. I did not try "skip custom items" though Same! Thanks Robin!
1540895792
Robin
API Scripter
The error is indeed thrown by Mark, I thought it had something to do with how I handled the Turnorder, and changed that in the "fix" I added to the Gist. But apparently it isn't fixed. I will try to look into it some more.
1540896799

Edited 1540896947
Robin said: The error is indeed thrown by Mark, I thought it had something to do with how I handled the Turnorder, and changed that in the "fix" I added to the Gist. But apparently it isn't fixed. I will try to look into it some more. I sent a PM to Aaron about the issue too...
Not sure if this is something you'd be interested in taking up but I'm trying to get a combat tracker that requires no API calls working. Your combat tracker plus statusinfo is really getting close. How I'm thinking it would work would be like this: Player adds a status icon to their token. If that status has been configured as a favorite (ie blinded) then it also automatically gets created in combat tracker with the default duration etc. If the player removes that icon then it gets removed from combattracker. This way there are no manual api calls required its all handled with the normal interaction of the token. Whenever you add a status the controller could be sent a message with the edit prompt to change any of the details that they wanted to update. If you add a status that doesn't have an entry then they would get the edit prompt for that as well. That way if you add something that isn't a favorite or has a different duration you're immediately given the little menu to make changes rather than having to go in through additional api calls. If they don't fill in any details then it just remains a basic status icon and nothing is created in the tracker for it. Just wanted to put this out there to see if it is something you'd be willing to work towards. I know at my games at least we have several players that no matter how many macros I setup for them, they can never remember how to do these kinds of things. So if they only have to interact with their token or the prompts they get in chat I think they'd finally be able to understand. 
1540919085
GiGs
Pro
Sheet Author
API Scripter
The traditional way to do this is to set up a macro, that does both steps: Click the macro button, get a dropdown which asks for which status, and then It runs a TokenMod command or Robin's Status script to add the status to the token It runs CombatTracker to add the condition there. Once you have the macro set up, this is usually easier and more seamless than adding the status manually without API calls. It's easy for players-  they don't need to know how anything works in roll20, they just have to pick an option from a list. And they cant manage that, its easy for the GM to do it for them.
1540958278
The Aaron
Pro
API Scripter
Dethelm said: Robin said: The error is indeed thrown by Mark, I thought it had something to do with how I handled the Turnorder, and changed that in the "fix" I added to the Gist. But apparently it isn't fixed. I will try to look into it some more. I sent a PM to Aaron about the issue too... I’ll try and take a look at this shortly... afraid the new job is keeping me quite busy...
1540975282
Robin
API Scripter
G G said: The traditional way to do this is to set up a macro, that does both steps: Click the macro button, get a dropdown which asks for which status, and then It runs a TokenMod command or Robin's Status script to add the status to the token It runs CombatTracker to add the condition there. Once you have the macro set up, this is usually easier and more seamless than adding the status manually without API calls. It's easy for players-  they don't need to know how anything works in roll20, they just have to pick an option from a list. And they cant manage that, its easy for the GM to do it for them. At this moment this is indeed the easiest method to get that working.
I'm having the same error Tom was having earlier - I give the same status to multiple tokens with a countdown duration, but then when the active player advances, it counts down 1 as if a round had passed.  I'm using the latest versions of both CombatTracker and Status from Github. Using the 5e Shaped sheet, if that has anything to do with anything.
Is it possible to show the players which conditions a selected token has - other than when it's the tokens turn? I use many situational conditions which I cannot provide in a list for StatusInfo. So marking the token with said script is not an option. (I use it for the standard ones, though.)
Robin said: G G said: The traditional way to do this is to set up a macro, that does both steps: Click the macro button, get a dropdown which asks for which status, and then It runs a TokenMod command or Robin's Status script to add the status to the token It runs CombatTracker to add the condition there. Once you have the macro set up, this is usually easier and more seamless than adding the status manually without API calls. It's easy for players-  they don't need to know how anything works in roll20, they just have to pick an option from a list. And they cant manage that, its easy for the GM to do it for them. At this moment this is indeed the easiest method to get that working. Yup, understood currently this is the way to go and is what I'm using. I'm proposing what I think should be the next step. Remove needing to build macros to call all that. StatusInfo is already watching for status changes on a token. Have it automatically add them in combat tracker if it was defined as a favorite. Pick up the stack count if you create a status with a number and use that as the duration. Then send a chat message to fine tune anything about the status if required to the token controller. This removes a lot of extra steps for the player/GM. I'm working on something to do this, but my JavaScript skills are pretty minimal yet, so was just throwing this out as an idea for how this could continue to evolve. 
1541025850
Robin
API Scripter
Danii said: Is it possible to show the players which conditions a selected token has - other than when it's the tokens turn? I use many situational conditions which I cannot provide in a list for StatusInfo. So marking the token with said script is not an option. (I use it for the standard ones, though.) Not at the moment, maybe in the future. Kevin S. said: Robin said: G G said: The traditional way to do this is to set up a macro, that does both steps: Click the macro button, get a dropdown which asks for which status, and then It runs a TokenMod command or Robin's Status script to add the status to the token It runs CombatTracker to add the condition there. Once you have the macro set up, this is usually easier and more seamless than adding the status manually without API calls. It's easy for players-  they don't need to know how anything works in roll20, they just have to pick an option from a list. And they cant manage that, its easy for the GM to do it for them. At this moment this is indeed the easiest method to get that working. Yup, understood currently this is the way to go and is what I'm using. I'm proposing what I think should be the next step. Remove needing to build macros to call all that. StatusInfo is already watching for status changes on a token. Have it automatically add them in combat tracker if it was defined as a favorite. Pick up the stack count if you create a status with a number and use that as the duration. Then send a chat message to fine tune anything about the status if required to the token controller. This removes a lot of extra steps for the player/GM. I'm working on something to do this, but my JavaScript skills are pretty minimal yet, so was just throwing this out as an idea for how this could continue to evolve.  hm, will see what I can do for the future updates.
1541121039

Edited 1541122425
I seem to be having an issue with CombatTracker and StatusInfo not getting along. I'm running latest versions. StatusInfo: Version: 0.3.11 ( link ) CombatTracker: Version: 0.2.6 ( link ) However, when I run, I get the error:  Please update  StatusInfo  to the latest version. And they don't get along after that.  EDIT: found this line in combat tracker code: if(!StatusInfo.version || StatusInfo.version !== "0.3.8"){
Request: I'd like players to be able to see the menu when you use the !condition command on Tokens, so they can use that command to see what conditions are on the token, and apply and remove conditions. Right now, it GM whispers the menu.  Thank you!
I'm having a problem with the image the tracker uses. My Scripts: *ChatSetAttr *TokenMod *GroupCheck *TokenNameNumber Shaped Companion Script *StatusInfo *CombatTracker *DeathTracker *HTMLBuilder *Welcome Package Apply Damage - complements GroupCheck RollTable The '*' denotes the OneClick versions I also using the OneClick Shaped Sheet Problem: So far I have not been able to see the Marker Img on a token when advancing through initiate. I tried the default image and a custom image, but get nothing. The timer under the token works, the special effect works, but no marker image. There are no errors in the API Console and the Marker Img shows up in the config menu. Secondary question : Is there a way to roll initiative for a group of tokens without starting the tracker? There are time that I have to roll initiative for multiple groups due to placements or on different layers and would prefer to not have the timer start counting until I'm ready for combat to fully start.
@BP: Ran into the same problem recently. Do you have the player-ribbon on the same page you try the combat marker? Does not work otherwise.
Yup that was it. Thanks @Danii
Feature request: Make the Marker Img work on pages other then where the page marker is. This would be useful in split combat where the party is separated across pages.
1541404704
Robin
API Scripter
I will look at the requests asap.
1541457053
Mik Holmes
Pro
Marketplace Creator
This script is awesome. With StatusInfo, it's sped up my game a ton. I started using it because I wanted it to remind me of statuses in the chat when a turn came up, and started using the other features because it worked so well.  One question, is it intended that assigning a status via CombatTracker's conditions menu doesn't output the StatusInfo chat dialog for that status? I can't find a config option detailing it.
1541495723
Robin
API Scripter
Mik Holmes said: This script is awesome. With StatusInfo, it's sped up my game a ton. I started using it because I wanted it to remind me of statuses in the chat when a turn came up, and started using the other features because it worked so well.  One question, is it intended that assigning a status via CombatTracker's conditions menu doesn't output the StatusInfo chat dialog for that status? I can't find a config option detailing it. Thanks! I need to check that functionality indeed, since last update it doesn't always show the StatusInfo descriptions.
1541495754

Edited 1541497970
Robin
API Scripter
Update v0.2.7 Send&nbsp; !ct show &nbsp;to players by adding&nbsp; p , eg.&nbsp; !ct show p . Better gmlayer hiding for the marker. No announcement when the timer runs out on a gmlayer token. Optionally use "next" marker. Bugfixes. <a href="https://github.com/RobinKuiper/Roll20APIScripts/tree/master/CombatTracker" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/tree/master/CombatTracker</a>
I use both CombatTracker and Status info. I use !ct conditions for adding new conditions to a token. I create new conditions via StatusInfo, and does not use CombatTrackers favorite feature. I often use !ct show to end conditions early, or get a reminder on the effect on a given condition. I mainly play pathfinder on Roll20, and my players love to delay their action (setting their initiative to any value lover than their current value. I have a few request, that I hope you would take a look at: 1) Enable me to edit the remaining duration via the !ct show command. Currently I believe I have to end the condition, and then re-add it with the updated duration. Overwriting does not seem to work. 2) For the selected token(s), add the reverse direction to duration for all conditions. This would solve a problem when the active character choose to delay his action. Currently, all his conditions will tick twice, once when he choose to delay, and once again when he activates on his new, lower initiative score on the same turn. The command could be something like !ct backtrack. Still a fan of your work, and happy to see you back and active.
1541503998

Edited 1541511536
Thanks! :D Robin said: Send&nbsp; !ct show &nbsp;to players by adding&nbsp; p , eg.&nbsp; !ct show p Edit: Will this be pushed to the one-click-install-scripts?
The newest CombatTracker says statusinfo is not installed (have the latest statusinfo from github), possible update for status info soon?
1541520006
Robin
API Scripter
Danii said: Thanks! :D Robin said: Send&nbsp; !ct show &nbsp;to players by adding&nbsp; p , eg.&nbsp; !ct show p Edit: Will this be pushed to the one-click-install-scripts? I will soon push all the updates (from other scripts) to the one-click again. Not sure when it will be processed tho. John V. said: The newest CombatTracker says statusinfo is not installed (have the latest statusinfo from github), possible update for status info soon? Wrong versioning indeed, sorry, just changed it: <a href="https://github.com/RobinKuiper/Roll20APIScripts/tree/master/CombatTracker" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/tree/master/CombatTracker</a>
1541875391

Edited 1541915431
Hey all, So last week everything was going great before I or one of my players must have done something to royally screw this up. CombatTracker still works in my other games, but for some reason I can't get it to work on one of my games. In that one's API Script section, it reads: For reference, the error message generated was: TypeError: Cannot read property 'id' of null TypeError: Cannot read property 'id' of null at turnorder.forEach.turn (apiscript.js:9172:20) at Array.forEach (native) at checkMarkerturn (apiscript.js:9171:19) at getOrCreateMarker (apiscript.js:9137:19) at resetMarker (apiscript.js:8800:22) at startCombat (apiscript.js:8725:9) at handleInput (apiscript.js:8366:17) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 I've gone ahead and totally removed CombatTracker only for it to break again. Any idea? On a fresh re-add of CombatTracker, I can open the config menu. I reset all settings with the reset button (I believe). Everything is fine until I select a token and click Start Combat. Once that happens, my other screen shows the error above popping up immediately. Edit: Never found a real fix. I just made a new game and transmogged everything over into it.
1542003256
Robin
API Scripter
Is this with the newest version (0.2.7) of CT?
1542065143

Edited 1542065460
Just want to confirm the correct way to use Combat Tracker: GM starts combat using !ct start (optionally selecting NPC tokens) Players roll initiative from their sheets (could occur before number 1.) Turns proceed using !ct next or the Done button in chat Round ends and new round starts My players like to reroll initiative each round (since it's so easy in Roll20), if I select that option in CT, does it automatically reroll for every combatant in the turn order? If players reroll initiative themselves will it mess up the turn order? edit: I did some testing and it seems to work OK. We were having weird issues with the turnorder last night when we played, but possibly due to the fact the initiative spanned 2 maps?
Is it possible to have the Combat Tracker roll initiative with advantage? I got a revised ranger in one of my groups.
1542229547
Mik Holmes
Pro
Marketplace Creator
I'd like to have an advantage check on reroll also. Even if we'd need to manually set a custom attribute flag on those characters. In the meantime, my workaround is to include a roll in my combat start macro for our revised ranger. Soon our Barbarian will be getting feral instinct&nbsp; !ct start /desc Ellia has advantage on initiative rolls. Compare this result to Ellia's initiative, and use this if higher. [[1d20+ @{Ellia|initiative_bonus}]] /desc Ellia has advantage on attack rolls against targets that haven't acted.
You can set the 5eOGL char sheet to roll Init with advantage, but I have no idea if Combat Tracker is respecting that, because the actual initiative rolls are hidden.&nbsp;
Ravenknight said: Is it possible to have the Combat Tracker roll initiative with advantage? I got a revised ranger in one of my groups. At the moment, the official script doesn't roll advantage. But if you are using the 5e OGL character sheet I have a custom edit to the sheet that allows for rolling with advantage. I could also make it work with other sheets too, but you'd have to manually add a custom attribute to the characters that roll with adv. Just let me know if you'd like me to send it to you!
Connor said: Ravenknight said: Is it possible to have the Combat Tracker roll initiative with advantage? I got a revised ranger in one of my groups. At the moment, the official script doesn't roll advantage. But if you are using the 5e OGL character sheet I have a custom edit to the sheet that allows for rolling with advantage. I could also make it work with other sheets too, but you'd have to manually add a custom attribute to the characters that roll with adv. Just let me know if you'd like me to send it to you! I sent you a PM Connor. Thanks.
Wouldn't it benefit everyone? Why not just post here so we all can see your idea?
Jerry F. said: Wouldn't it benefit everyone? Why not just post here so we all can see your idea? Sorry for the late reply! I've had a busy time lately. Here's a link to an edited version of Robin's CombatTracker script that should allow for rolling with advantage. There's also a few other small edits like I changed it so if you announce rolls in chat each message includes a picture of the character's token. It's not exactly elegant code, but it works! In order to work you have to be using the 5e OGL sheet for DnD 5e and you need to make sure to mark that for the characters that roll with advantage&nbsp; you have their Initiative Style in the settings tab of the character sheet set to "Advantage". Just go to the link below and copy the text into a new custom API script for your game and save it (and make sure to disable the regular CombatTracker script). <a href="https://paste2.org/2gFvKNdG" rel="nofollow">https://paste2.org/2gFvKNdG</a>
Your changes works fine Connor with one exception. The first character in each round are displayed twice in chat and hence have any conditions reduced twice. Is this something you have encountered or is it a problem on my end?
Ravenknight said: Your changes works fine Connor with one exception. The first character in each round are displayed twice in chat and hence have any conditions reduced twice. Is this something you have encountered or is it a problem on my end? Hmm, I haven't encountered that yet. But I may have just made a simply error when transferring my code changes to the newest version of the script. Give me a bit and I'll look into it.
Sesserdrix said: Hey all, So last week everything was going great before I or one of my players must have done something to royally screw this up. CombatTracker still works in my other games, but for some reason I can't get it to work on one of my games. In that one's API Script section, it reads: For reference, the error message generated was: TypeError: Cannot read property 'id' of null TypeError: Cannot read property 'id' of null at turnorder.forEach.turn (apiscript.js:9172:20) at Array.forEach (native) at checkMarkerturn (apiscript.js:9171:19) at getOrCreateMarker (apiscript.js:9137:19) at resetMarker (apiscript.js:8800:22) at startCombat (apiscript.js:8725:9) at handleInput (apiscript.js:8366:17) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1634:12 I've gone ahead and totally removed CombatTracker only for it to break again. Any idea? On a fresh re-add of CombatTracker, I can open the config menu. I reset all settings with the reset button (I believe). Everything is fine until I select a token and click Start Combat. Once that happens, my other screen shows the error above popping up immediately. Edit: Never found a real fix. I just made a new game and transmogged everything over into it. Robin said: Is this with the newest version (0.2.7) of CT? In case anyone else has this problem, I fixed it by deleting (not overriding) Status Info, Combat Tracker and Concentration and re-adding them. Every time I just updated the code I got the same error.
1542485283

Edited 1542528030
Ravenknight
KS Backer
Connor &nbsp;said: Ravenknight &nbsp;said: Your changes works fine Connor with one exception. The first character in each round are displayed twice in chat and hence have any conditions reduced twice. Is this something you have encountered or is it a problem on my end? Hmm, I haven't encountered that yet. But I may have just made a simply error when transferring my code changes to the newest version of the script. Give me a bit and I'll look into it. Edit: Found the problem. *YEY!* - apperantly leaving Auto-sort on creates this effect. :) Now I got it running and advantage to work. Thanks again Connor (and Robin!)
1542758734
Mik Holmes
Pro
Marketplace Creator
In the next update, will there be a fix to StatusInfo not being called from CombatTracker add conditions? I'm setting up a conditions dropdown macro, so I can easily call StatusInfo manually, but if a fix is in the cards, I'll hold off. It's not exactly a gamebreaking bug, but would be nice!&nbsp;
Mik Holmes said: In the next update, will there be a fix to StatusInfo not being called from CombatTracker add conditions? I'm setting up a conditions dropdown macro, so I can easily call StatusInfo manually, but if a fix is in the cards, I'll hold off. It's not exactly a gamebreaking bug, but would be nice!&nbsp; You can file it as an issue here&nbsp; <a href="https://github.com/RobinKuiper/Roll20APIScripts/issues/new?title=%5BCombat%20Tracker%5D%20your%20text%20here" rel="nofollow">https://github.com/RobinKuiper/Roll20APIScripts/issues/new?title=%5BCombat%20Tracker%5D%20your%20text%20here</a> This way, it will not get lost and you will get a notification if it is included in the next release.
1542831864
Mik Holmes
Pro
Marketplace Creator
Oh, thanks! Sorry, I didn't know there was a place to report.
Ravenknight said: Connor &nbsp;said: Ravenknight &nbsp;said: Your changes works fine Connor with one exception. The first character in each round are displayed twice in chat and hence have any conditions reduced twice. Is this something you have encountered or is it a problem on my end? Hmm, I haven't encountered that yet. But I may have just made a simply error when transferring my code changes to the newest version of the script. Give me a bit and I'll look into it. Edit: Found the problem. *YEY!* - apperantly leaving Auto-sort on creates this effect. :) Now I got it running and advantage to work. Thanks again Connor (and Robin!) I'm glad you found a way around it! I don't actually use CombatTracker or StatusInfo to track conditions, I use a modified version of TrackerJacker, so I didn't necessarily run into that issue on my own. Does the turnorder still sort itself even when you set Autosort to off or do you have to manually put it in order now?
Connor said: Ravenknight said: Connor &nbsp;said: Ravenknight &nbsp;said: Your changes works fine Connor with one exception. The first character in each round are displayed twice in chat and hence have any conditions reduced twice. Is this something you have encountered or is it a problem on my end? Hmm, I haven't encountered that yet. But I may have just made a simply error when transferring my code changes to the newest version of the script. Give me a bit and I'll look into it. Edit: Found the problem. *YEY!* - apperantly leaving Auto-sort on creates this effect. :) Now I got it running and advantage to work. Thanks again Connor (and Robin!) I'm glad you found a way around it! I don't actually use CombatTracker or StatusInfo to track conditions, I use a modified version of TrackerJacker, so I didn't necessarily run into that issue on my own. Does the turnorder still sort itself even when you set Autosort to off or do you have to manually put it in order now? still works. :)&nbsp;
Is it possible to change the font size for the 'Announce Turn' chat output?
Mike said: Is it possible to change the font size for the 'Announce Turn' chat output? Yeah, its a pretty easy thing to change in the code if you need. Its default set to 16 but I lowered it to 14 myself. If you need help to do so you can PM me.
Connor said: Mike said: Is it possible to change the font size for the 'Announce Turn' chat output? Yeah, its a pretty easy thing to change in the code if you need. Its default set to 16 but I lowered it to 14 myself. If you need help to do so you can PM me. Awesome, I got it thanks! It was on line 789.
1543192515
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If you use an extension such as Stylus, you should be able to change that on-the-fly. That way you wouldn't have to worry about editing each release of the script. Mike said: Connor said: Mike said: Is it possible to change the font size for the 'Announce Turn' chat output? Yeah, its a pretty easy thing to change in the code if you need. Its default set to 16 but I lowered it to 14 myself. If you need help to do so you can PM me. Awesome, I got it thanks! It was on line 789.
keithcurtis said: If you use an extension such as Stylus, you should be able to change that on-the-fly. That way you wouldn't have to worry about editing each release of the script. Mike said: Connor said: Mike said: Is it possible to change the font size for the 'Announce Turn' chat output? Yeah, its a pretty easy thing to change in the code if you need. Its default set to 16 but I lowered it to 14 myself. If you need help to do so you can PM me. Awesome, I got it thanks! It was on line 789. Do you have a link to a "best practices/tips" for Stylus with Roll20?
Is the newest version being added to one-click?