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

August 17 (5 years ago)
Mik Holmes
Pro
Marketplace Creator
Sorry if I missed this, but in this new version, there's no message string that can be appended when adding conditions to tokens? Skimming the code it seems removed, but maybe there is a note about new !ct add syntax that I don't know about.
August 17 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I've removed message strings.  How were you using them?  

August 17 (5 years ago)

Messages were typical with a quick note or funny saying for by group.

August 17 (5 years ago)

Edited August 17 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'll look at possibly adding them back in.  My goals with CT when I started this were to remove the bugs and enable CT to manage conditions, duration, direction within a single spot by quickly adding and removing those conditions, and have CT track the durations and directions over the course of combat.  The original CT and SI scripts did parts of each, but neither very well together.  CT did some parts, but not enough.  SI did others, but not enough, which is why I combined them.  Messages weren't core to this, just a nice extra, which is why I removed it.  

August 17 (5 years ago)
Ravenknight
KS Backer


Kilter said:

Messages were typical with a quick note or funny saying for by group.


I usually write from where the condition originated. Grappled - Orc 2

August 17 (5 years ago)
Mik Holmes
Pro
Marketplace Creator

Like Ravenknight, I typically used them for the condition's origin, or as reminders for save at end/start of turn. They aren't fully necessary, but they were useful in combats where a lot of monsters had concentration spells that needed to be tracked separately.

August 18 (5 years ago)

Edited August 18 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Hmmm....it's another level of complication, which is why I removed it.  I don't personally use message at all.  I'd say that concentration should be a condition you place on the token so you know.  Find a color or unused icon.  And it's simple to add to the token.  My issue with messages is that they show once in chat and then are lost.  Perhaps I'm wrong on that.  Did messages show up on all player announcements?  

I'm still not feeling the need.  

August 18 (5 years ago)

It stayed with the condition. 

August 18 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter
Did it display on announce turn?  Where did you see it?  
August 18 (5 years ago)

In Chat with the turn announcement 

August 18 (5 years ago)

Edited August 18 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Is this REALLY critical to running your game.  I don't want to add functionality and testing for something isn't absolutely critical.  I've accomplished the goals.  I haven't had bug reports in a few weeks.  I don't want add this unless people tell me they HAVE to have it.  

August 18 (5 years ago)

It is not a must have for me but it was a nice feature that was available. 

August 18 (5 years ago)

Edited August 18 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Unless someone tells me this is mission critical, I'll come around to it later.  There's another level to this script, specifically integration with Token Mod, to make this more robust, which will come later, when I'm ready to do that.  As of right now, I'm ready to move this out of beta and into general release.  The integration with Token Mod and the re-addition of messages will occur then.  

August 18 (5 years ago)
Mik Holmes
Pro
Marketplace Creator

It's not mission critical, just a nice feature. The concentration condition wasn't the issue, it was more, say there's three hags who have cast their own Hold Person spell, but one of them drops it. Previously, I could hit !ct show and see that Witch A has "Concentration 4 hold person on rogue."

But again, it's unnecessary, so if it's not trivial to add, don't worry about it. 

August 18 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I see, I'll look into it.  

August 18 (5 years ago)
Ravenknight
KS Backer

It's very handy in D&D to know the origin of some effects. Other systems not so much.

August 21 (5 years ago)



Got this error (twice) last night during a game, not full sure it is tied to this or just the concentration script. Figured I would post here as this is the only script updated lately.


Most often, but not always, the top line of a stack trace is the originator of the error.  In this case, it does look like it is the Concentration script ("at handleConcentrationSpellCast").  

August 22 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter
It is the concentration script which I haven't taken on yet.  
I'm running the 1.6.2 CT now but I have an issue with reroll init every round.
Namely, it puts the person with the highest init that round as the last turn to go for some reason. Every time.
August 22 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'll try that out and figure out what's happening

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

Fixed a couple of issues with Roll Init every round.  1.1.7 Beta is here https://github.com/vicberg/Combattracker

August 24 (5 years ago)

Edited August 24 (5 years ago)
Mik Holmes
Pro
Marketplace Creator

The error I'm getting most often is Cannot read property 'direction' of undefined. This happens when I call !ct add something, even when it's  set with a default direction and duration.

TypeError: Cannot read property 'direction' of undefined
TypeError: Cannot read property 'direction' of undefined
at verifyCondition (apiscript.js:9094:29)
at addCondition (apiscript.js:9007:13)
at tokens.forEach.token (apiscript.js:8964:12)
at Array.forEach (native)
at addCommand (apiscript.js:8957:17)
at handleInput (apiscript.js:8876:9)
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 /home/node/d20-api-server/api.js:1634:12
at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560

EDIT: Instantly solved it by making sure I capitalized it correctly ('!ct add Prone' instead of 'prone')

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

Commands are space sensitive, so !ct add Prone 1 0  will work.  Have an extra space ANYWHERE in that command and it will not work. 

August 25 (5 years ago)

Edited August 25 (5 years ago)

Hey again!
The reroll init every round changed slightly in the 1.1.7 Beta version but the orange and green markers are still bugged for me.
Let me illustrate with four pictures advancing initiative.
Notice how the init randomization (new round between pictures 2 and 3) works, but the markers don't move. When I then advance init one more step, the markers correct themselves and it works until the next round.

     

August 25 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I need to add reset marker into it.  


Victor B. said:

I need to add reset marker into it.  


Thanks alot for the work you're putting into this. I'm absolutely in love with CT(/SI)!

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

Marker is now going to correct location when rerolling init each round.  1.1.8 Beta is here https://github.com/vicberg/Combattracker

So I love this script, however I want to change the Marker Image yet everytime I enter a URL it crashes my sandbox. Help me please?

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

Hmmm, Supposedly you can.  But I've never tested it.  So the fact that it's bombing says there's an issue.  Reset to the regular marker image for the short term and post the hyperlink to me in PM to the marker you want.  I'll see what the issue is.  

August 31 (5 years ago)
Goon
Pro

I am having the same issue as @The Dungeon Master, using the following token: https://s3.amazonaws.com/files.d20.io/images/87591259/qsKoxY_MOdJo5GmhuEWySQ/max.png?1564254253
This same image and URL worked in past sessions, and I have also tried generating a new one for the same file with no success. It still works using the default token.

August 31 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

I'll take a look

September 02 (5 years ago)

Hey guys, sorry its been a while, I jumped from a working v1-0-21 to the current v1-18 beta and it now seems to crash for me, can i asked which version was the last most stable? many thanks for your continued work on this crucial and amazing API! 

Cheers!


Bobbins said:

Hey guys, sorry its been a while, I jumped from a working v1-0-21 to the current v1-18 beta and it now seems to crash for me, can i asked which version was the last most stable? many thanks for your continued work on this crucial and amazing API! 

Cheers!


I'm using the latest beta-version and have run several combats flawlessly. Might be a conflict with one of your other scripts? If you post the crash-output perhaps one of the pros here can help you.

September 02 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

You need to reset your combat state.  That's a must.  I tried to make it backward compatible, but you're running an old version.  

September 02 (5 years ago)

Okay so I dont seem to be able to re-create the crash, which i guess is positive, it DOES seem very stable overall. The only thing i'm struggling with now is the turn marker, in that it appears in the menu, but not over the tokens in the map.. I dont suppose anyone has a useable URL so I can re-enter it?

September 02 (5 years ago)

Edited September 02 (5 years ago)

Just implemented this script and am having some issues with crashing the API whenever the !ct add command is ran to add a status to a token. I even copied/pasted this "!ct add Prone 1 0" from above and still crashed. Can anyone help please? 

Edit: Fixed issue thanks to a post above, capitalization is key. Mine needed to be all lowercase.

I am however having another issue, anytime a condition icon is added via the tokens status icon dropdown the duration is correct but the direction does not change by round nor am I able to remove the status via the !ct menu. Is there a workaround for this?


September 03 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

@Bobbins make sure you drag the player ribbon to the page you are on.  The marker won't move otherwise. 

@Mike, use the menu to add the command and then up arrow in the chat to see the command that was issued.  If direction is set to 0 it won't move.  Set direction to -1 in order for it to countdown.  

September 03 (5 years ago)

Amazing, thankyou Victor!

September 04 (5 years ago)

can anyone help me out with the command to show this? 

I thought it used to be !CT SHOW, but now I dont get the option to remove the conditions.. 

Any tips or workarounds in terms of quickly removing certain conditions?



September 04 (5 years ago)

Edited September 06 (5 years ago)

My apologies if this has already been mentioned, but I couldn't find anything.

When I run the command to stop combat, the turn order clears, closes, and then reopens. Previously the turn order wouldn't reopen, but now it is reopens a blank turn order.

Update 9/5/19: After extensive troubleshooting it was found to be another script that was causing the conflict.

September 05 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Hmm, I haven't looked at show conditions in a while.  There may be an issue.  

@papawhiskey11, can you invite me to your game so I can see what's happening?  That's really really strange.  

September 05 (5 years ago)
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter

This is still compatible with the StatusInfo script in the same Github??

September 05 (5 years ago)

StatusInfo is a part of it. using both at the same time will cause issues.

September 05 (5 years ago)
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter

Is the export/import function broken?

September 05 (5 years ago)
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter

I have a crapload of favorite conditions. Any way to hide/show those with a button or a command?


September 05 (5 years ago)

Edited September 05 (5 years ago)
Victor B.
Pro
Sheet Author
API Scripter

The favorites icon.  Click on the star icon and it will change the condition to a favorite.  When looking at favorites, click on that icon again and it will switch back to the all conditions.  Once you've started combat, look for either a star or a globe icon at the top.  Click on either one to switch back and forth between favorites and all  

Import/export is working.  

September 07 (5 years ago)

Edited September 07 (5 years ago)

Quick Question, not sure if this can be fixed or not.


I'm running a game that's kinda a mix between Forum RPing and combat on Roll20. So when it comes to combat, we are not all online at the same time and people just log in to move when they get the chance to. (Much like the RP aspect, they login and post when they can.)

With both Combat tracker and Status Tracker this creates a small problem. All the text and pictures it send to the chat seem to disappear every time the page is reloaded. So only those logged in at the current moment when it displays a status or the next turn can see it. If someone got a status and it popped up in chat, people logging in after (Or people refreshing the page because Roll20 lags a bit.) will not see that status posted in the chat. Any way of fixing that so it doesn't disappear? Like is there a setting or something I should be toggling?


- Thanks ^.^

September 07 (5 years ago)

Keeping getting this error and double posting of status

Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info...


For reference, the error message generated was: TypeError: Cannot read property 'id' of undefined

TypeError: Cannot read property 'id' of undefined

    at handleGraphicMovement (apiscript.js:3720:33)

    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)