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

June 04 (5 years ago)


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.

https://s3.amazonaws.com/files.d20.io/images/52550079/U-3U950B3wk_KRtspSPyuw/thumb.png?1524507826

June 05 (5 years ago)
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.  If you are looking at another page, it won't work.  The player ribbon is that red thingy that you drag onto a page to show it to players.  

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!

June 10 (5 years ago)
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.  Then yes you can.  Try though, I don't think CT is editing for GM launched commands.  If that is the case then your command will be rejected.  Should work

June 10 (5 years ago)

Edited June 10 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

A new version of combat tracker and status info are deployed to my git.  In Combattracker, added support to detect and auto roll ADVANTAGE init for OGL D&D 5e sheets.  Fixed a couple of small issues.  In Statusinfo, the script was getting invoked incorrectly by any API being launched.  This was causing intermittent failures of the API Server. 

CombatTracker v0.2.94 

Statusionfo v0.3.12

https://github.com/vicberg/Combattracker

June 11 (5 years ago)

Edited June 11 (5 years ago)
Ravenknight
KS Backer

Great work Victor! 

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

https://app.roll20.net/forum/post/7462454/status-markers-not-appearing/?pageforid=7522731#post-7522731

June 11 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'll take a look

June 11 (5 years ago)

Edited June 11 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

The issue is that duration wasn't being displayed in prior versions.  In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.  That's something I added.  So, if you manually assign a condition 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.  However, you can't enter a 2 digit number.  Roll20 won't accept that.  Your duration of 10 was being rejected by Roll20 and the icon not displayed.  I've added a configuration to the config menu.  Display Duration.  Set to true or false.  Set to false if you are using a 2 digit duration.  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.   

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

https://github.com/vicberg/Combattracker

June 11 (5 years ago)
Ravenknight
KS Backer


Victor B. said:

The issue is that duration wasn't being displayed in prior versions.  In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.  That's something I added.  So, if you manually assign a condition 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.  However, you can't enter a 2 digit number.  Roll20 won't accept that.  Your duration of 10 was being rejected by Roll20 and the icon not displayed.  I've added a configuration to the config menu.  Display Duration.  Set to true or false.  Set to false if you are using a 2 digit duration.  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.   

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

https://github.com/vicberg/Combattracker

Thanks Victor! 

Seems to work just fine now.

June 11 (5 years ago)


Victor B. said:

The issue is that duration wasn't being displayed in prior versions.  In systems such as Warhammer you can get 4 blinded conditions and you want to see the 4 over the blinded icon.  That's something I added.  So, if you manually assign a condition 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.  However, you can't enter a 2 digit number.  Roll20 won't accept that.  Your duration of 10 was being rejected by Roll20 and the icon not displayed.  I've added a configuration to the config menu.  Display Duration.  Set to true or false.  Set to false if you are using a 2 digit duration.  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.   

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

https://github.com/vicberg/Combattracker

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:
https://github.com/blawson69
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!


June 12 (5 years ago)

Edited June 12 (5 years ago)
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.


June 12 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Ok, another edit I need to put in.  I'll check it out.  

June 12 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Connor, I'm not sure I want to go there.  Displaying the same icon twice or trying to adjust the token to fit it in strikes me as square peg into round hole.  If roll20 is rejecting it, then don't display it.  I'm fine with that until such time that roll20 changes things.  

Right now, there's enough complexity with Robin's scripts to get them completely stable and fool proof.  

June 12 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'm actually not going to fix this issue Ravenknight.  The next evolution is to combine both of these scripts into one, which will resolve the problem you reported.  Combattracker doesn't manage conditions/tokens well and Statustracker manages conditions/tokens very well but doesn't track anything.  So combining the two makes a lot of sense.  Plays into each other's strengths.  

I'll start working on that tonight.  



Victor B. said:

I'm actually not going to fix this issue Ravenknight.  The next evolution is to combine both of these scripts into one, which will resolve the problem you reported.  Combattracker doesn't manage conditions/tokens well and Statustracker manages conditions/tokens very well but doesn't track anything.  So combining the two makes a lot of sense.  Plays into each other's strengths.  

I'll start working on that tonight.  



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.



June 13 (5 years ago)

Victor, I actually agree with you on that call. I don't think the benefit is at all worth the headache.


June 13 (5 years ago)
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.  Click delay and it resets the player to below the next one up and resets any conditions.  Then the player can continue to delay until he finally does his turn.  


Victor B. said:

I could see a delay button along with the done button for when the player turn is displayed in chat.  Click delay and it resets the player to below the next one up and resets any conditions.  Then the player can continue to delay until he finally does his turn.  


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.

June 18 (5 years ago)
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).  When you assign the icon it will ask for duration and direction and update the token.  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.  Finally, I'm going to add a default duration and direction to each icon you have including a Override option.  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.  If you click override, it will enable you to change these values using the defaults to populate the roll query boxes.  

This would be a problem. I have different conditions with the same icon. Is it possible to keep this functionality?

June 19 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

It won't be a problem as long as you name them differently.  The current issue with statusinfo display of icons (when you enter !condition) is that you see the icons with no names.  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! :)

June 20 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

All I removing the Macro Button and support from CT.  I have no idea what it's doing nor does help say much.  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.  If anyone is actually using this to some degree successfully, post now or forever hold your peace.  


Victor B. said:

All I removing the Macro Button and support from CT.  I have no idea what it's doing nor does help say much.  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.  If anyone is actually using this to some degree successfully, post now or forever hold your peace.  


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.

June 21 (5 years ago)
Ravenknight
KS Backer


Anders said:


Victor B. said:

All I removing the Macro Button and support from CT.  I have no idea what it's doing nor does help say much.  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.  If anyone is actually using this to some degree successfully, post now or forever hold your peace.  


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.


June 21 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Then that macro logic will remain

thank you

June 23 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Making progress.  Both scripts combined, setup menus are working and functioning.  


June 23 (5 years ago)
Ravenknight
KS Backer

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?

June 24 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

That's not happening with me at all.  I'll take a look.  What do you mean by moved?  

June 25 (5 years ago)

Edited June 25 (5 years ago)

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. 

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. 

June 25 (5 years ago)
Ravenknight
KS Backer


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. 

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. 

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. 

June 27 (5 years ago)

Edited June 27 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Here's some early look and feels.  I might add more color or bold.  

This is new functionality.  On a condition you can specify defaults so when you add the condition to the token, the values are pre-loaded.  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).    

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.  Think of making the icon display into a list with names so you don't have to mouse over to figure out the token.  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.

June 27 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Ask and ye shall....I agree.  I like this better


June 27 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'm going to keep all edit buttons outside of the tracker menu.  !ct config will give access to all setup functions including conditions.  As far as a favorites is concerned, I was going to drop that functionality and go with the above.  Simple is more stable.  But if a case is made that I have 50 conditions, then I might add that back in.  Real estate is the key.  The less it uses the better.  

June 27 (5 years ago)

Edited June 27 (5 years ago)
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.  So you can toggle between favorites and all conditions.  Then under the status setup menu, I'll add another option that enables you to display favorites or all conditions by default.  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  

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

https://github.com/vicberg/Combattracker


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 <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>:65:16)
    at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:151:1), <anonymous>: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!

June 29 (5 years ago)

Edited June 29 (5 years ago)
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).  Then you boot me when problem is found.  Another person reported the same issue and I'm highly interested in finding out what is causing it. 

PM me an invite if you could.  

June 29 (5 years ago)

https://gist.github.com/shdwjk/8ae38733afca0b706f7ad8c05ff4c802
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.


June 29 (5 years ago)

Edited June 29 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Awesome.  Robin put in many many changes in 0.2.7  which are currently showing up in beyond compare (comparing the most recent CT to aaron's version).  I'll figure out what aaron changed.  


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).  Then you boot me when problem is found.  Another person reported the same issue and I'm highly interested in finding out what is causing it. 

PM me an invite if you could.  


Invite sent. Thank you for the help!

June 29 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

The problem wasn't a token lock.  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.   I noticed in the aarons version that that code didn't exist.  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.  

Thanks to The Aaron for this and to Kilter for making me aware of it.