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

I'm sorry to have to ask this, but can someone direct me to a comprehensive readme on how to use all the commands and features in CombatTracker? I really like it and want to start using it, but there's a lot to get a handle on. The readme on github is just a few sentences dealing with installation.
Install it, then you'll have a full set of instructions below it when selected on the API Scripts Screen
1576464406

Edited 1576464601
Victor B.
Pro
Sheet Author
API Scripter
NOOOO.  Yes for the Combat Tracker on Roll20 Github.  That one is old and has multiple issues and will crash your API server.  Use it if you wish.  The one I developed is a combination of Combat Tracker and Status Info.  I've kept the commands the same, but there's no guarantee that the commands haven't changed slightly.   The best way to find out how to structure the command is to use my version on Github, install it and USE THE MENUS, (I'm sorry for all the macro users), click the up arrow after using the menu to do whatever you are doing and that command will show up in chat.  Copy that command to do whatever you want to do in macros.   I haven't had time for a comprehensive help and I'm not posting my version as of yet to Roll20.  Better yet, abandon ye macros (I know, blasphemy) and use the menus.  That why I developed this.  
Victor B. said: NOOOO.  Yes for the Combat Tracker on Roll20 Github.  That one is old and has multiple issues and will crash your API server.  Use it if you wish.  The one I developed is a combination of Combat Tracker and Status Info.  I've kept the commands the same, but there's no guarantee that the commands haven't changed slightly.   The best way to find out how to structure the command is to use my version on Github, install it and USE THE MENUS, (I'm sorry for all the macro users), click the up arrow after using the menu to do whatever you are doing and that command will show up in chat.  Copy that command to do whatever you want to do in macros.   I haven't had time for a comprehensive help and I'm not posting my version as of yet to Roll20.  Better yet, abandon ye macros (I know, blasphemy) and use the menus.  That why I developed this.   Will do, thank you!
I guess I was unaware that the roll20 version was different. I've been using the roll20 version just fine with StatusInfo
1576608958

Edited 1576608974
I have perhaps an easy or complicated question. I absolutely love that the Combat Tracker pulls my map to the token whose turn it is, but recently a player complained to me about it. This feature is excellent for large scale battles with tons of tokens. The player mentioned that it was a bit sickening to have their screen shift so often during combat. This leads to my question: Is there a configuration setting where the tracker only pulls my (the DM) map to the token location, but does not pull the players' maps?
Sir Lennon said: I have perhaps an easy or complicated question. I absolutely love that the Combat Tracker pulls my map to the token whose turn it is, but recently a player complained to me about it. This feature is excellent for large scale battles with tons of tokens. The player mentioned that it was a bit sickening to have their screen shift so often during combat. This leads to my question: Is there a configuration setting where the tracker only pulls my (the DM) map to the token location, but does not pull the players' maps? Hey Sir Lennon, I don't think there's an option like that in this script but I have a fix for that particular issue. There's a browser extension called the VTT Enhancement Suite that has a lot of quality of life fixes for roll20 you can use. One of them is a feature that does exactly what you want, pulls your personal screen to the token when it's their turn but nobody else. Just install the extension and turn off the map pull in combat tracker and that should help you out!
Testing this script tonight, and I love it so far. One question: what does the Macro menu do? What is the purpose of CT_TURN? Adding this stuff to the old Readme would help, since many of those old commands are still valid.
1576647001
Victor B.
Pro
Sheet Author
API Scripter
No clue.  Probably a half baked idea.  I haven't removed it.  
1576647166
Victor B.
Pro
Sheet Author
API Scripter
Sir Lennon   Yes there is.  There's a center on option.  Try that.  Not sure where it is in the morass, but there is one.  You don't have to have the map center on the next token up
Jay R. said: Testing this script tonight, and I love it so far. One question: what does the Macro menu do? What is the purpose of CT_TURN? Adding this stuff to the old Readme would help, since many of those old commands are still valid. CT_TURN is the name of a macro that will run every time a creature start its turn. Very handy for reload, regeneration and the like. You can also change the name in the macro options. Different creatures can have different macros just as long as they are named CT_TURN.
Wow that is great for Recharge rolls
Oh! That's super useful, the original CT wasn't clear on it's purpose. I've been using a separate script for that same exact effect, so I'm definitely for leaving that feature untouched.
1576718457
Victor B.
Pro
Sheet Author
API Scripter
I won't touch it.  I'm glad to hear it's functional  
Victor B. said: Sir Lennon   Yes there is.  There's a center on option.  Try that.  Not sure where it is in the morass, but there is one.  You don't have to have the map center on the next token up I can't seem to find this option. I would definitely be interested in trying it. Any more guidance on to find this? I'd rather not go through the VTT Enhancement Suite extension if possible.
Here what you need. it is under combat settings
Ravenknight said: Jay R. said: Testing this script tonight, and I love it so far. One question: what does the Macro menu do? What is the purpose of CT_TURN? Adding this stuff to the old Readme would help, since many of those old commands are still valid. CT_TURN is the name of a macro that will run every time a creature start its turn. Very handy for reload, regeneration and the like. You can also change the name in the macro options. Different creatures can have different macros just as long as they are named CT_TURN. Ah, thank you! So basically it's a placeholder for anything you want tied to a creature's start of turn? Will have to investigate this some more.
Victor, currently when setting a marker for a condition it gives a drop-down query with a list of all the default markers. With the custom marker feature in the works, could you change that to a fill-in query?
Seph said: Victor, currently when setting a marker for a condition it gives a drop-down query with a list of all the default markers. With the custom marker feature in the works, could you change that to a fill-in query? Seconding this request!
Looks like that'll be more complicated than I thought. I didn't realize that the script uses the name and image of each marker separately, and doesn't just pull the image from whatever name you enter. Seems that using custom markers would require each user setting their own script with all the markers they're using.
Hey,  since a couple weeks now I get the following error whenever I try to use combattracker via initiative. It then disables all my other scripts. Issue persists when it's the only API running as well, with all other scripts deleted. I have tried using the roll20 version and the vicberg 1.1.10 version. TypeError: type.indexOf is not a function TypeError: type.indexOf is not a function at spawnFx (/home/node/d20-api-server/api.js:2847:11) at spawnFxBetweenPoints (/home/node/d20-api-server/api.js:2986:3) at doFX (apiscript.js:8940:9) at doTurnorderChange (apiscript.js:8906:13) at handleTurnorderChange (apiscript.js:9913:13) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1023:14) at updateLocalCache (/home/node/d20-api-server/api.js:1321:18) at /home/node/d20-api-server/api.js:1611:7
This looks like you have the FX turned on for combat tracker. Have you tried turning it off until Victor can take a look? Wolfie said: Hey,  since a couple weeks now I get the following error whenever I try to use combattracker via initiative. It then disables all my other scripts. Issue persists when it's the only API running as well, with all other scripts deleted. I have tried using the roll20 version and the vicberg 1.1.10 version. TypeError: type.indexOf is not a function TypeError: type.indexOf is not a function at spawnFx (/home/node/d20-api-server/api.js:2847:11) at spawnFxBetweenPoints (/home/node/d20-api-server/api.js:2986:3) at doFX (apiscript.js:8940:9) at doTurnorderChange (apiscript.js:8906:13) at handleTurnorderChange (apiscript.js:9913:13) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1023:14) at updateLocalCache (/home/node/d20-api-server/api.js:1321:18) at /home/node/d20-api-server/api.js:1611:7
1577386032
Victor B.
Pro
Sheet Author
API Scripter
Seph, custom images depends on how Roll20 will implement them.  My guess is that they will be stored in the same campaign object as the default images.  The key then is image name.  This again depends on how Roll20 will allow for upload.  Could be there's a generic way to return default and custom objects.  We'll see
Yeah, I tried it out in the dev server. I copied the command for setting a marker to a condition, then replaced the query with the name of one of the markers I uploaded. Each time I tried, the script set only the name as the condition's marker, rather than the image itself. Looking at the script, it seems like the link between marker name and image is written into the script itself. Originally I assumed the script just searches for the marker image with the provided name, but that's apparently not the case.
1577455650

Edited 1577457441
Victor B.
Pro
Sheet Author
API Scripter
I've never looked closely at the icon processing.  From what I'm seeing it's PNG file containing all status images and Robyn is simply pointing at the position of each icon within that single file.  So he's basically parsing the icons out of the file.  For the circular colors, those are being set manually and for the red X (dead) that's simply CSS.  So there's nothing dynamic about the current processing.  Right now, I have no idea how custom icons will be accessible. Judging on how hard wired the default icons are, I'm not holding much hope.   FYI, I've startrf redoing the commands for the next version.  I've decided to publish an entirely new version to Roll20 Github and I'll have a wiki for it.   Also I've heard that trackerjacker might be able to do something.  Since I'm redoing this, I might try to leverage it.  
1578335261

Edited 1578335314
Victor B.
Pro
Sheet Author
API Scripter
I'm in the process of converting over all the commands to the new format.  All commands will start with !ct and as an example for adding a condition to a token: !ct --add,condition=prone,duration=2,direction=-1,message=whatever.   All conditions will have a default message and there will be a configuration option to not use messages at all so the roll query for messages will or will not show up when assigning a condition for those who do not use messaging I'm working with theAaron right now to integrate CT with tokenmod and the new tokencondition as well as groupinit.  He may need to make a few minor changes to support this.  A lot of people use group init, so enabling that API to roll init instead of the internal CT process will support those users.  Roll20 is changing it's status/icon processing for custom icons, I can leverage tokenmod and tokencondition (either/both) to support that.  Finally I'm putting stubs in for tokenmod so you can call it when assigning or removing tokens, such as moving a token to the GM layer upon death, etc.  
1578335530

Edited 1578335763
Victor B.
Pro
Sheet Author
API Scripter
Also being added are requests to not center the map on a token in the GM layer, (called auto pull currently and being changed to center map on token).  A few commands are being removed because they weren't being used.  Also looking into the Macro calls/Do FX for the sounds.  I 'll put a stub in for Roll20 as well as supporting doFX when adding conditions.   All that being said, I'm going to rename combattracker to CombatTrackerV2 and hope Roll20 accepts it along side current CombatTracker/StatusInfo and then create a wiki for this new version
Can't wait for CT V2.0!
1578366924
The Aaron
Roll20 Production Team
API Scripter
Changes to GroupInitiative Submitted:&nbsp;&nbsp;<a href="https://app.roll20.net/forum/permalink/8032581/" rel="nofollow">https://app.roll20.net/forum/permalink/8032581/</a>
Apologies if this has already been asked! Do the red and green combat turn markers already come with the script, or do we need to add the URLs? Combat Tracker works as expected (it's certainly a massive upgrade, and very appreciated!); however, the turn markers do not appear around the tokens in combat.&nbsp; Additionally, is it possible to break initiative ties? I use the Shaped sheet and configured it to always break ties. The Shaped sheet has an initiative attribute and a separate "break ties" attribute. In this scenario, would it be better to roll initiative without Combat Tracker, then initiate combat? Thank you!
You have to make sure that your are on the player tab map when running the API otherwise it will seem like it isn't working.
1578546282
Victor B.
Pro
Sheet Author
API Scripter
I've put in support for Group Initiative (thanks to TheAaron for the changes to support this).&nbsp; You can use that and CT will call group-init to roll init which can break ties I believe.&nbsp; I'll consider adding a break ties attribute as well.&nbsp; Yes you must be on the player page (drag that red ribbon to the page you are using) otherwise the markers won't work.&nbsp; I forgot about that myself today and thought I had a bug for the longest time.&nbsp; Uggg
Aha! I never thought to move the player ribbon. The simplest solution is the solution I never considered. Thank you for your help! Group Initiative to break ties -- will do. Thanks again!
Victor B. said: I've put in support for Group Initiative (thanks to TheAaron for the changes to support this).&nbsp; You can use that and CT will call group-init to roll init which can break ties I believe.&nbsp; I'll consider adding a break ties attribute as well.&nbsp; How do you call group-init? I had to create a macro for it, running !group-init first, then creating a button on the chat for !ct start to start the combat.
Victor B. said: I've put in support for Group Initiative (thanks to TheAaron for the changes to support this).&nbsp; You can use that and CT will call group-init to roll init which can break ties I believe.&nbsp; I'll consider adding a break ties attribute as well. Is the GroupInit support reflected in the github build? The .js I'm seeing right now was updated 14 days ago.
1578588841
Victor B.
Pro
Sheet Author
API Scripter
Nothing has been posted yet.&nbsp; I'm still working on CT version 2.&nbsp; Group Init will be configured via Group Init and I've got a configuration to use Group Init instead of rolling initiative within CT.&nbsp; Group init is then called when starting CT.&nbsp;&nbsp;
So, Victor, they are going to work together?
1578591394

Edited 1578592687
Victor B.
Pro
Sheet Author
API Scripter
Yes, CT will call Group Init.&nbsp; Configure Group Init however you want.&nbsp; CT will also retain it's own method of rolling initiative.&nbsp; CT will also make calls out to token builder by condition, so you can do various affects when a condition is assigned and will integrate with TheAaron's new TokenCondition for custom status icons.&nbsp; I'm also putting API calls out to FX and Roll20AM when assigning conditions or when changing the turnorder.&nbsp; The macro functionality will remain as is and that's invoked when changing the turnorder.&nbsp;&nbsp; Also as part of the command structure is changing completely.&nbsp; It will now be !ct --add,condition=prone,duration=6,direction=-1,message=whatever.&nbsp; Messages will be supported now.&nbsp;&nbsp;
1578594808
Kraynic
Pro
Sheet Author
Sounds good!
Victor B. said: Yes, CT will call Group Init.&nbsp; Configure Group Init however you want.&nbsp; CT will also retain it's own method of rolling initiative.&nbsp; CT will also make calls out to token builder by condition, so you can do various affects when a condition is assigned and will integrate with TheAaron's new TokenCondition for custom status icons.&nbsp; I'm also putting API calls out to FX and Roll20AM when assigning conditions or when changing the turnorder.&nbsp; The macro functionality will remain as is and that's invoked when changing the turnorder.&nbsp;&nbsp; Also as part of the command structure is changing completely.&nbsp; It will now be !ct --add,condition=prone,duration=6,direction=-1,message=whatever.&nbsp; Messages will be supported now.&nbsp;&nbsp; Wow, so much to look forward to. Thank you!
1578671882

Edited 1578671943
Victor B. said: CT will also make calls out to token builder by condition, so you can do various affects when a condition is assigned and will integrate with TheAaron's new TokenCondition for custom status icons. Are you looking into compatibility with the new built in custom status markers as well, or will CT shift to only using TheAaron's TokenCondition script? Victor B. said: Also as part of the command structure is changing completely.&nbsp; It will now be !ct --add,condition=prone,duration=6,direction=-1,message=whatever.&nbsp; Messages will be supported now. Will the message function allow for plain text only, or could it be used for calling a macro or API command? And does a message override a conditions description? It could be useful to set a message for a given condition that activates a command or macro for scripts like TokenMod or ChatSetAttr. I'm excited to try out all the new changes :)
1578672881
Victor B.
Pro
Sheet Author
API Scripter
@Mark (GM), I turned on FX and it's working.&nbsp; You are referencing a non-existent FX.&nbsp; You need to change your FX
1578673446

Edited 1578673521
Victor B.
Pro
Sheet Author
API Scripter
@Seph,&nbsp; TheAaron is changing TokenCondition so I can leverage it.&nbsp; He's also working on a new API called TokenMarker which will provide an API interface to custom tokens.&nbsp; Both will be supported.&nbsp;&nbsp; Message is only for messages.&nbsp; I'm putting in code to allow you to call tokenmod/tokencondition/tokenmarker/fx/Roll20AM for each status.&nbsp; When the status is assigned to the token, one or more of these will get invoked.&nbsp;&nbsp;
That wasn't for me :) I had responded to wolfie's issue which is just above my response easy to miss though.&nbsp; Victor B. said: @Mark (GM), I turned on FX and it's working.&nbsp; You are referencing a non-existent FX.&nbsp; You need to change your FX
Is it possible to let the players use the "!ct add" command? I created a big macro with all the conditions thinking they could and i guess only the DM can.
Is there any way to stop it from showing the list twice every time I use !ct?
1578809026
Victor B.
Pro
Sheet Author
API Scripter
@Graff, that's prob a bug in how I implemented allowing players to allow changes to statuses.&nbsp; Set player toggle to off for right now and let me know if that fixes the problem. I'm fixing this in next version @Lucas, yes, related to Graffs issue.&nbsp; I'm changing the way that players can assign conditions.&nbsp;&nbsp;
1578810868

Edited 1578810922
@Victor thank you for the fast reply. How I ended up fixing it for now is I set player toggle to gm. It wasn't even originally an option. Original options were true/false and an blank option. I set it to the blank option and when that didn't fix, I went to change it again but now it had the options "all" and "gm". So weird.
@Victor B. Got it. Keep it up with the good work, will wait for the new version.