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

Josh M. said: Okay, I have a new issue. The marker that's supposed to be around the tokens just isn't there, and no amount of resetting or deleting and re-adding the script will fix it. And when I try to change it to a different image it just bugs out the script. I like the default marker, any idea why it's not working? Try using the url below when you try to manually change the turn marker image in the chat config interface and let me know if that works. Roll20 will only accept image urls that are stored on their servers, not ones that have an imgur url or something like that. It's a bit annoying but there are ways to navigate it. <a href="https://s3.amazonaws.com/files.d20.io/images/52550079/U-3U950B3wk_KRtspSPyuw/thumb.png?1524507826" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/52550079/U-3U950B3wk_KRtspSPyuw/thumb.png?1524507826</a>
1559697535
Victor B.
Pro
Sheet Author
API Scripter
Josh, you need to have the player ribbon on the page you are using for the token marker to work.&nbsp; If you are looking at another page, it won't work.&nbsp; The player ribbon is that red thingy that you drag onto a page to show it to players.&nbsp;&nbsp;
Thanks, that was what the issue was! Now I have one more question: If I'm a player in a friend's game, is it possible for me to be able to use macros/commands to bring up the conditions so I can apply them to my own token? Using a macro with !ct conditions or !ct show doesn't do anything when I'm joined as player. Thanks!
1560204880
Victor B.
Pro
Sheet Author
API Scripter
Yes, that's a roll20 configuration I believe for the GM to allow players to edit their own tokens.&nbsp; Then yes you can.&nbsp; Try though, I don't think CT is editing for GM launched commands.&nbsp; If that is the case then your command will be rejected.&nbsp; Should work
1560204884

Edited 1560204905
Victor B.
Pro
Sheet Author
API Scripter
A new version of combat tracker and status info are deployed to my git.&nbsp; In Combattracker, added support to detect and auto roll ADVANTAGE init for OGL D&amp;D 5e sheets.&nbsp; Fixed a couple of small issues.&nbsp; In Statusinfo, the script was getting invoked incorrectly by any API being launched.&nbsp; This was causing intermittent failures of the API Server.&nbsp; CombatTracker v0.2.94&nbsp; Statusionfo v0.3.12 <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a>
1560240879

Edited 1560242940
Ravenknight
KS Backer
Great work Victor!&nbsp; Everything is working but I have some problems with the symbols. Not sure if it belongs here or in the Statusinfo thread. When I add a condition to a token with a duration of: 10 and direction of: -1 the symbol won't show on the token at all. If added at Duration: 9 and direction: -1 the symbol will show but the number on the symbol will stay the same even if the duration is ticking down. My Status macro: !ct add ?{Condition|Concentration,Concentration|Blinded,Blinded|Charmed,Charmed|Deafened,Deafened|Dodge,Dodge|Downed,Downed|Frightened,Frightened|Grappled,Grappled|Hidden,Hidden|Paralyzed,Paralyzed|Petrified,Petrified|Poisoned,Poisoned|Prone,Prone|Restrained,Restrained|Stunned,Stunned|Unconscious,Unconscious} ?{Duration|10} ?{Direction|-1} ?{Message|} Edit: Unsure if this is related to this bug or not? But this error is not present in ver: 0.2.7 <a href="https://app.roll20.net/forum/post/7462454/status-markers-not-appearing/?pageforid=7522731#post-7522731" rel="nofollow">https://app.roll20.net/forum/post/7462454/status-markers-not-appearing/?pageforid=7522731#post-7522731</a>
1560254701
Victor B.
Pro
Sheet Author
API Scripter
I'll take a look
1560272104

Edited 1560272329
Victor B.
Pro
Sheet Author
API Scripter
The issue is that duration wasn't being displayed in prior versions.&nbsp; In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.&nbsp; That's something I added.&nbsp; So, if you manually assign a condition&nbsp;icon to a token, you can enter the numbers 0 through 9, and you'll see that number in red super-imposed over the icon you just assigned.&nbsp; However, you can't enter a 2 digit number.&nbsp; Roll20 won't accept that.&nbsp; Your duration of 10 was being rejected by Roll20 and the icon not displayed.&nbsp; I've added a configuration to the config menu.&nbsp; Display Duration.&nbsp; Set to true or false.&nbsp; Set to false if you are using a 2 digit duration.&nbsp; The icon will display and the countdown will start if you have a negative duration but the actual duration will not display over the condition icon.&nbsp; &nbsp; To set this value, type !ct config in your chat menu. I've done minimal testing so if there's an issue, let me know. Version 0.3.0 of Combattracker <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a>
Victor B. said: The issue is that duration wasn't being displayed in prior versions.&nbsp; In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.&nbsp; That's something I added.&nbsp; So, if you manually assign a condition&nbsp;icon to a token, you can enter the numbers 0 through 9, and you'll see that number in red super-imposed over the icon you just assigned.&nbsp; However, you can't enter a 2 digit number.&nbsp; Roll20 won't accept that.&nbsp; Your duration of 10 was being rejected by Roll20 and the icon not displayed.&nbsp; I've added a configuration to the config menu.&nbsp; Display Duration.&nbsp; Set to true or false.&nbsp; Set to false if you are using a 2 digit duration.&nbsp; The icon will display and the countdown will start if you have a negative duration but the actual duration will not display over the condition icon.&nbsp; &nbsp; To set this value, type !ct config in your chat menu. I've done minimal testing so if there's an issue, let me know. Version 0.3.0 of Combattracker <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a> Thanks Victor!&nbsp; Seems to work just fine now.
Victor B. said: The issue is that duration wasn't being displayed in prior versions.&nbsp; In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.&nbsp; That's something I added.&nbsp; So, if you manually assign a condition&nbsp;icon to a token, you can enter the numbers 0 through 9, and you'll see that number in red super-imposed over the icon you just assigned.&nbsp; However, you can't enter a 2 digit number.&nbsp; Roll20 won't accept that.&nbsp; Your duration of 10 was being rejected by Roll20 and the icon not displayed.&nbsp; I've added a configuration to the config menu.&nbsp; Display Duration.&nbsp; Set to true or false.&nbsp; Set to false if you are using a 2 digit duration.&nbsp; The icon will display and the countdown will start if you have a negative duration but the actual duration will not display over the condition icon.&nbsp; &nbsp; To set this value, type !ct config in your chat menu. I've done minimal testing so if there's an issue, let me know. Version 0.3.0 of Combattracker <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a> Hey Victor, I doubt that this is important but I do believe it's possible to spread out multi-digit numbers over copies of the same status symbol on a token if that would work as a way to show conditions that last longer than 9 rounds. An example can be found in this script that is used to display info like a token's altitude: <a href="https://github.com/blawson69" rel="nofollow">https://github.com/blawson69</a> I haven't messed around with Status Info much though so I'm not sure what any of the far reaching ramifications would be if you tried to let a condition create multiple status markers. Also thanks again for picking up the slack on these scripts since Robin is MIA, you're doing a great job!
1560311707

Edited 1560312078
Ravenknight
KS Backer
Played around with the latest release and noticed an issue. Adding a condition that's not listed in the Conditions Config breaks the API. This also applies to Favorites. .&nbsp;
1560313240
Victor B.
Pro
Sheet Author
API Scripter
Ok, another edit I need to put in.&nbsp; I'll check it out.&nbsp;&nbsp;
1560313477
Victor B.
Pro
Sheet Author
API Scripter
Connor, I'm not sure I want to go there.&nbsp; Displaying the same icon twice or trying to adjust the token to fit it in strikes me as square peg into round hole.&nbsp; If roll20 is rejecting it, then don't display it.&nbsp; I'm fine with that until such time that roll20 changes things.&nbsp;&nbsp; Right now, there's enough complexity with Robin's scripts to get them completely stable and fool proof.&nbsp;&nbsp;
1560382034
Victor B.
Pro
Sheet Author
API Scripter
I'm actually not going to fix this issue Ravenknight.&nbsp; The next evolution is to combine both of these scripts into one, which will resolve the problem you reported.&nbsp; Combattracker doesn't manage conditions/tokens well and Statustracker manages conditions/tokens very well but doesn't track anything.&nbsp; So combining the two makes a lot of sense.&nbsp; Plays into each other's strengths.&nbsp;&nbsp; I'll start working on that tonight.&nbsp;&nbsp;
Victor B. said: I'm actually not going to fix this issue Ravenknight.&nbsp; The next evolution is to combine both of these scripts into one, which will resolve the problem you reported.&nbsp; Combattracker doesn't manage conditions/tokens well and Statustracker manages conditions/tokens very well but doesn't track anything.&nbsp; So combining the two makes a lot of sense.&nbsp; Plays into each other's strengths.&nbsp;&nbsp; I'll start working on that tonight.&nbsp;&nbsp; Looking forward to this. Any chance that you will add it to quick install then? Regarding the number-overlay for remaining duration, I remember another mod displaying the number if/when the duration became 9 or less. Think it was TrackerJacker, but I might be wrong. If you do not have enough work to do :), ill risk asking for an additional feature. Playing Pathfinder, players will often ask to delay their initiative when their turn comes up, but at that point, all of their statuses have already ticked, and will tick again when they act at the delayed initiative. Any chance that we could get a command to change duration of all effect on the current token by the inverse direction? Possibly combining it with an option to ask for verification of removing status' with a duration of zero.
Victor, I actually agree with you on that call. I don't think the benefit is at all worth the headache.
1560467637
Victor B.
Pro
Sheet Author
API Scripter
I could see a delay button along with the done button for when the player turn is displayed in chat.&nbsp; Click delay and it resets the player to below the next one up and resets any conditions.&nbsp; Then the player can continue to delay until he finally does his turn.&nbsp;&nbsp;
Victor B. said: I could see a delay button along with the done button for when the player turn is displayed in chat.&nbsp; Click delay and it resets the player to below the next one up and resets any conditions.&nbsp; Then the player can continue to delay until he finally does his turn.&nbsp;&nbsp; That seems like a nice, simple way of doing it.
Hi, my players don' see the box to let them finish their turn. I enabled all the options I think but there is also no macro appearing in their character sheet. Im using the ogl 5e character sheets etc. anything I missed? Fairly new to api and macros so I bet its just a little thing I did not see.
Cleybar . said: Hi, my players don' see the box to let them finish their turn. I enabled all the options I think but there is also no macro appearing in their character sheet. Im using the ogl 5e character sheets etc. anything I missed? Fairly new to api and macros so I bet its just a little thing I did not see. The api output a done button into the chat window, not on the character sheet. The formating should contain a message and an image of their token and say done in the window.
Any update to the crash when applying a condition from Fav list? :) (Mentioned by raven) Love the work btw, CT tracker is absolute boss.
1560891753
Victor B.
Pro
Sheet Author
API Scripter
Not yet, I'm going to remove the add favorite from CT and instead have add condition show the list of status icons (from statusinfo) that you can then assign to a token (in the manner that statusinfo currently allows you to assign icons to tokens).&nbsp; When you assign the icon it will ask for duration and direction and update the token.&nbsp; I'm going to add a remove condition button as well that displays icons and shows which have been assigned to the token so you can remove an icon from a token.&nbsp; Finally, I'm going to add a default duration and direction to each icon you have including a Override option.&nbsp; This will enable you to set a default for an icon and if you turn off override, it will assign the icon and take the default duration/direction without you having to enter them.&nbsp; If you click override, it will enable you to change these values using the defaults to populate the roll query boxes.&nbsp;&nbsp;
This would be a problem. I have different conditions with the same icon. Is it possible to keep this functionality?
1560903152
Victor B.
Pro
Sheet Author
API Scripter
It won't be a problem as long as you name them differently.&nbsp; The current issue with statusinfo display of icons (when you enter !condition) is that you see the icons with no names.&nbsp; So I might add a short name/long name thing so I can put short names (very short) in front of the icons
Oh, ok. Thanks for the awesome work! :)
1561074334
Victor B.
Pro
Sheet Author
API Scripter
All I removing the Macro Button and support from CT.&nbsp; I have no idea what it's doing nor does help say much.&nbsp; I've run across posts asking if it can be used and it's not working, so in interests of simplifying it's going away.&nbsp; If anyone is actually using this to some degree successfully, post now or forever hold your peace.&nbsp;&nbsp;
Victor B. said: All I removing the Macro Button and support from CT.&nbsp; I have no idea what it's doing nor does help say much.&nbsp; I've run across posts asking if it can be used and it's not working, so in interests of simplifying it's going away.&nbsp; If anyone is actually using this to some degree successfully, post now or forever hold your peace.&nbsp;&nbsp; If your talking about the function that will trigger a macro on the active character when it becomes active, I use it from time to time. Scripted dialog on predetermined turns, or checking on various triggers.
Anders said: Victor B. said: All I removing the Macro Button and support from CT.&nbsp; I have no idea what it's doing nor does help say much.&nbsp; I've run across posts asking if it can be used and it's not working, so in interests of simplifying it's going away.&nbsp; If anyone is actually using this to some degree successfully, post now or forever hold your peace.&nbsp;&nbsp; If your talking about the function that will trigger a macro on the active character when it becomes active, I use it from time to time. Scripted dialog on predetermined turns, or checking on various triggers. Also very handy for checking if a power recharge.
1561135054
Victor B.
Pro
Sheet Author
API Scripter
Then that macro logic will remain
thank you
1561305931
Victor B.
Pro
Sheet Author
API Scripter
Making progress.&nbsp; Both scripts combined, setup menus are working and functioning.&nbsp;&nbsp;
Oooh! Looking forward to see it in action! :)
New Bug: With the bugfix for the SendPing function, now all players get moved to where tokens on the gm-layer are when they come up in the turn order. Could you please have a look at this?
1561414350
Victor B.
Pro
Sheet Author
API Scripter
That's not happening with me at all.&nbsp; I'll take a look.&nbsp; What do you mean by moved?&nbsp;&nbsp;
1561457540

Edited 1561457706
When you get to the next turn order, the orange circle goes to the next token and the map is centered on it. Previously the tokens on gm-layer would not be centered for the players, just for the gm. since the last update from roll20, all players maps are centered on those tokens, giving away their position.&nbsp; Edit: Come to think about it... I am not sure if the players maps were moved at all before the update. They seemed quite shocked when it happened yesterday.&nbsp;
Danii said: When you get to the next turn order, the orange circle goes to the next token and the map is centered on it. Previously the tokens on gm-layer would not be centered for the players, just for the gm. since the last update from roll20, all players maps are centered on those tokens, giving away their position.&nbsp; Edit: Come to think about it... I am not sure if the players maps were moved at all before the update. They seemed quite shocked when it happened yesterday.&nbsp; It's a new update from Roll20 that cause this, not the script. :/. My players became very annoyed and we ended up with turning the ping off.
Well, it's not a priority. As Ravenknight said it can be turned off. And the combined script sounds very promising. I just wanted to let you know this part of the script isn't working as intended.&nbsp;
1561603301

Edited 1561603438
Victor B.
Pro
Sheet Author
API Scripter
Here's some early look and feels.&nbsp; I might add more color or bold.&nbsp;&nbsp; This is new functionality.&nbsp; On a condition you can specify defaults so when you add the condition to the token, the values are pre-loaded.&nbsp; If it's a condition that never changes, you can set override to false and it will assign the token without any roll queries being displayed (using the defaults).&nbsp; &nbsp;&nbsp; The conditions list shows what defaults you've assigned to each token (with an N being None). Finally the tracker menu has been simplified and you conditions will display within the tracker so you can highlight a token and assign conditions to it.&nbsp; Think of making the icon display into a list with names so you don't have to mouse over to figure out the token.&nbsp; Takes up more real estate but probably worth it
Looks super nice, and should ease setup and game play. Regarding the "Combat Tracker Menu" and the condition icons, I would prefer a list of names, or at least instant mouse-over response. Alternatively, you can have us mark a condition to show up on a short-list in the menu (favorite), and have a way to expand the list of conditions to include all. Does the menu have a button linking to setup, and/or directly to where we create/edit conditions? I would prefer if use a single macro to access all on offer. The formatting looks fine, and I am looking forward to test it out.
1561637465
Victor B.
Pro
Sheet Author
API Scripter
Ask and ye shall....I agree.&nbsp; I like this better
1561637689
Victor B.
Pro
Sheet Author
API Scripter
I'm going to keep all edit buttons outside of the tracker menu.&nbsp; !ct config will give access to all setup functions including conditions.&nbsp; As far as a favorites is concerned, I was going to drop that functionality and go with the above.&nbsp; Simple is more stable.&nbsp; But if a case is made that I have 50 conditions, then I might add that back in.&nbsp; Real estate is the key.&nbsp; The less it uses the better.&nbsp;&nbsp;
1561638554

Edited 1561638982
Victor B.
Pro
Sheet Author
API Scripter
What I think I'm going to do for favorites is I'll add a toggle button along with the start/stop, next turn/previous turn, pause timer, stop timer pictos buttons.&nbsp; So you can toggle between favorites and all conditions.&nbsp; Then under the status setup menu, I'll add another option that enables you to display favorites or all conditions by default.&nbsp; On conditions setup menu (the menu that shows all your conditions in a list) , I'll add another pictos button to each condition to enable you to add or remove from favorites&nbsp;&nbsp;
This looks really nice! I vote for a favorites-option. I use this to track magic effects too and there are a ton of them in my game. :) Thank you Victor for your awesome work!
Seems like a sensible solution. Cannot wait to adopt it.
Victor B. said: Version 0.3.0 of Combattracker <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a> I'm getting an error with this script that I can't seem to pin down. TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at handleGraphicMovement (apiscript.js:7644:28) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1020:14) at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) at /home/node/d20-api-server/api.js:1502:11 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) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) This occurs whenever I move a token, player or npc. Dragging tokens from my journal is fine, selecting tokens is fine. Just trying to move them breaks the API as far as I can tell. I appreciate any help you can send my way!
1561812968

Edited 1561813013
Victor B.
Pro
Sheet Author
API Scripter
Robert, best way to determine the issue is to invite me to game and once invited, then promoted to GM (so I have access to the API).&nbsp; Then you boot me when problem is found.&nbsp; Another person reported the same issue and I'm highly interested in finding out what is causing it.&nbsp; PM me an invite if you could.&nbsp;&nbsp;
<a href="https://gist.github.com/shdwjk/8ae38733afca0b706f7ad8c05ff4c802" rel="nofollow">https://gist.github.com/shdwjk/8ae38733afca0b706f7ad8c05ff4c802</a> Arron has updated 2.5 to fix the issue for most of the problem with that. Just don't use tokenlock at the moment. Maybe some other scripts.
1561820074

Edited 1561820495
Victor B.
Pro
Sheet Author
API Scripter
Awesome.&nbsp; Robin put in many many changes in 0.2.7&nbsp; which are currently showing up in beyond compare (comparing the most recent CT to aaron's version).&nbsp; I'll figure out what aaron changed.&nbsp;&nbsp; Thanks
Victor B. said: Robert, best way to determine the issue is to invite me to game and once invited, then promoted to GM (so I have access to the API).&nbsp; Then you boot me when problem is found.&nbsp; Another person reported the same issue and I'm highly interested in finding out what is causing it.&nbsp; PM me an invite if you could.&nbsp;&nbsp; Invite sent. Thank you for the help!
1561828092
Victor B.
Pro
Sheet Author
API Scripter
The problem wasn't a token lock.&nbsp; The problem was that it was trying to find the object for the next character in turn order for the next image functionality, which is that green circular icon that goes around the next guy up.&nbsp; &nbsp;I noticed in the aarons version that that code didn't exist.&nbsp; So, for right now, if you are getting that problem don't use next image until I figure out why that code is bombing out.&nbsp;&nbsp; Thanks to The Aaron for this and to Kilter for making me aware of it.&nbsp;&nbsp;