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

1566027026
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.
1566046632
Victor B.
Pro
Sheet Author
API Scripter
I've removed message strings.  How were you using them?  
Messages were typical with a quick note or funny saying for by group.
1566047670

Edited 1566048009
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.  
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
1566084521
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.
1566090119

Edited 1566090273
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.  
It stayed with the condition. 
1566091802
Victor B.
Pro
Sheet Author
API Scripter
Did it display on announce turn?  Where did you see it?  
In Chat with the turn announcement 
1566093688

Edited 1566093862
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.  
It is not a must have for me but it was a nice feature that was available. 
1566095210

Edited 1566095246
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.  
1566117752
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. 
1566133739
Victor B.
Pro
Sheet Author
API Scripter
I see, I'll look into it.  
It's very handy in D&D to know the origin of some effects. Other systems not so much.
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").  
1566478531
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.
1566503984
Victor B.
Pro
Sheet Author
API Scripter
I'll try that out and figure out what's happening
1566519875
Victor B.
Pro
Sheet Author
API Scripter
Fixed a couple of issues with Roll Init every round.&nbsp; 1.1.7 Beta is here&nbsp; <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a>
1566624690

Edited 1566624729
Mik Holmes
Pro
Marketplace Creator
The error I'm getting most often is&nbsp;Cannot read property 'direction' of undefined. This happens when I call !ct add something, even when it's&nbsp; 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 &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 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 EDIT: &nbsp;Instantly solved it by making sure I capitalized it correctly ('!ct add Prone' instead of 'prone')
1566651971
Victor B.
Pro
Sheet Author
API Scripter
Commands are space sensitive, so !ct add Prone 1 0&nbsp; will work.&nbsp; Have an extra space ANYWHERE in that command and it will not work.&nbsp;
1566771955

Edited 1566772011
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. &nbsp; &nbsp; &nbsp;
1566772542
Victor B.
Pro
Sheet Author
API Scripter
I need to add reset marker into it.&nbsp;&nbsp;
Victor B. said: I need to add reset marker into it.&nbsp;&nbsp; Thanks alot for the work you're putting into this. I'm absolutely in love with CT(/SI)!
1566906008
Victor B.
Pro
Sheet Author
API Scripter
Marker is now going to correct location when rerolling init each round.&nbsp; 1.1.8 Beta is here&nbsp; <a href="https://github.com/vicberg/Combattracker" rel="nofollow">https://github.com/vicberg/Combattracker</a>
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?
1567052406
Victor B.
Pro
Sheet Author
API Scripter
Hmmm, Supposedly you can.&nbsp; But I've never tested it.&nbsp; So the fact that it's bombing says there's an issue.&nbsp; Reset to the regular marker image for the short term and post the hyperlink to me in PM to the marker you want.&nbsp; I'll see what the issue is.&nbsp;&nbsp;
I am having the same issue as @The Dungeon Master, using the following token:&nbsp; <a href="https://s3.amazonaws.com/files.d20.io/images/87591259/qsKoxY_MOdJo5GmhuEWySQ/max.png?1564254253" rel="nofollow">https://s3.amazonaws.com/files.d20.io/images/87591259/qsKoxY_MOdJo5GmhuEWySQ/max.png?1564254253</a> 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.
1567291369
Victor B.
Pro
Sheet Author
API Scripter
I'll take a look
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!&nbsp; 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!&nbsp; 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.
1567454383
Victor B.
Pro
Sheet Author
API Scripter
You need to reset your combat state.&nbsp; That's a must.&nbsp; I tried to make it backward compatible, but you're running an old version.&nbsp;&nbsp;
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?
1567466575

Edited 1567468684
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?&nbsp; 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?
1567472511
Victor B.
Pro
Sheet Author
API Scripter
@Bobbins make sure you drag the player ribbon to the page you are on.&nbsp; The marker won't move otherwise.&nbsp; @Mike, use the menu to add the command and then up arrow in the chat to see the command that was issued.&nbsp; If direction is set to 0 it won't move.&nbsp; Set direction to -1 in order for it to countdown.&nbsp;&nbsp;
Amazing, thankyou Victor!
can anyone help me out with the command to show this?&nbsp; I thought it used to be !CT SHOW, but now I dont get the option to remove the conditions..&nbsp; Any tips or workarounds in terms of quickly removing certain conditions?
1567615696

Edited 1567777224
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: &nbsp;After extensive troubleshooting it was found to be another script that was causing the conflict.
1567658317
Victor B.
Pro
Sheet Author
API Scripter
Hmm, I haven't looked at show conditions in a while.&nbsp; There may be an issue.&nbsp;&nbsp; @papawhiskey11, can you invite me to your game so I can see what's happening?&nbsp; That's really really strange.&nbsp;&nbsp;
1567699514
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
This is still compatible with the StatusInfo script in the same Github??
StatusInfo is a part of it. using both at the same time will cause issues.
1567707608
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
Is the export/import function broken?
1567711777
SᵃᵛᵃǤᵉ
Sheet Author
API Scripter
I have a crapload of favorite conditions. Any way to hide/show those with a button or a command?
1567725627

Edited 1567725670
Victor B.
Pro
Sheet Author
API Scripter
The favorites icon.&nbsp; Click on the star icon and it will change the condition to a favorite.&nbsp; When looking at favorites, click on that icon again and it will switch back to the all conditions.&nbsp; Once you've started combat, look for either a star or a globe icon at the top.&nbsp; Click on either one to switch back and forth between favorites and all&nbsp;&nbsp; Import/export is working.&nbsp;&nbsp;
1567867427

Edited 1567867458
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 ^.^
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 &nbsp; &nbsp; at handleGraphicMovement (apiscript.js:3720:33) &nbsp; &nbsp; at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:65:16) &nbsp; &nbsp; at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:151:1), &lt;anonymous&gt;:70:8) &nbsp; &nbsp; at TrackedObj.set (/home/node/d20-api-server/api.js:1020:14) &nbsp; &nbsp; at updateLocalCache (/home/node/d20-api-server/api.js:1318:18) &nbsp; &nbsp; at /home/node/d20-api-server/api.js:1502:11 &nbsp; &nbsp; at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 &nbsp; &nbsp; at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) &nbsp; &nbsp; at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) &nbsp; &nbsp; at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) &nbsp; &nbsp; at Rd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425)