
I understand. Drag and drop is an easy enough workaround for this. Might be worth having a note in the readme.md so users won't get confused if they try delaying the last token's turn.
I understand. Drag and drop is an easy enough workaround for this. Might be worth having a note in the readme.md so users won't get confused if they try delaying the last token's turn.
Just a note on delaying in Pathfinder, if it is usedful. You can only delay to an initiative later on the current turn, but you can instead spend your turn to increase your initiative by 20.
Anders said:
Just a note on delaying in Pathfinder, if it is usedful. You can only delay to an initiative later on the current turn, but you can instead spend your turn to increase your initiative by 20.
Not to derail the thread, but I can't find any ruling on that. There is this, however:
If you take a delayed action in the next round, before your regular turn comes up, your initiative count rises to that new point in the order of battle, and you do not get your regular action that round. [Source]
This is similar to the situation I described earlier, but since Pathfinder seems to be an outlier in delaying causing your initiative to change, there likely won't be a reason for CombatTracker to change initiative for users.
Besides, I was mainly trying to understand why the script can't delay the last token in turn order the way it does other tokens. Victor helped me get it, though :)
@professor, you're game is working again. New release 1.0.15 Beta here https://github.com/vicberg/Combattracker
Fix an issue with setting defaults causing the announce conditions issue
Import/Export is working.
Thank you! I find I still get an error when I set Show Initiative to True (my players are paranoid and insist I have to let them see their rolls if I use CT )
ReferenceError: initiativeRoll1 is not defined
ReferenceError: initiativeRoll1 is not defined
at selectedTokens.forEach.token (apiscript.js:626:46)
at Array.forEach (native)
at rollInitiative (apiscript.js:590:24)
at startCombat (apiscript.js:440:13)
at handleInput (apiscript.js:154:6)
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
at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147)
New release 1.0.16 Beta here https://github.com/vicberg/Combattracker
Fixed an issue with setting of conditions with override = false (no roll queries. Assigns the duration and direction directly from the condition)
Neither of my players could interact with the delay or done buttons.
While bringing in new players to test tonight I got this error:
TypeError: Cannot read property 'id' of undefined
TypeError: Cannot read property 'id' of undefined
at handleGraphicMovement (apiscript.js:1757:29)
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 is a more minor issue but the initiative rolls are appearing after the turn announcement for the first token in the round:
@profressor, you do excel at breaking this.
I'm thinking I need to be one with a few of your players so I can see what's happening in the logs. Set a time tomorrow night if you can and let's bang this out. HandleGraphicMovement has been a problem before I started fixing these scripts. I'm going to need to heavily log why it's failing
Testing 1.0.17, still having this issue where, when selecting multiple tokens then starting combat with the script, it starts on Round 2, and sometimes the script treats the wrong token as being first in the turn order (it does sometimes get it right; not sure why).
Import seems to work just fine, but while the script is enabled I can't manually add a status icon to a token. Clicking the icon causes it to briefly appear on the token before disappearing (the icon remains highlighted in the selection). The associated condition doesn't get announced by the script. This doesn't happen with the StatusInfo script. Icons can be applied normally when this script is disabled. After re-enabling it, the only change is that the conditions are now announced in chat. The added conditions aren't shown in turn announcement or when I use the show function. Here's the API output when testing this:
"Defaults"
"CombatTracker Ready! Command: !ct"
"Handle Status Marker Change"
"New Statuses:bolt-shield"
"Old Statuses:"
"Add Condition"
"Token:-LjE9yautiV8a0CWMF-B"
"Name:confused"
"Remove Condition"
"Name:confused"
"Combat Conditions"
{"id":"-LjE9yautiV8a0CWMF-B","name":"entangled","icon":"fishing-net","duration":null,"direction":null}
{"id":"-LjEA0Wfj4Nt1s4KQyLP","name":"fascinated","icon":"half-haze","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"deafened","icon":"edge-crack","duration":null,"direction":null}
"Duration:undefined"
"Direction:undefined"
"Send Condition To Chat"
"Combat Conditions"
{"id":"-LjE9yautiV8a0CWMF-B","name":"entangled","icon":"fishing-net","duration":null,"direction":null}
{"id":"-LjEA0Wfj4Nt1s4KQyLP","name":"fascinated","icon":"half-haze","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"deafened","icon":"edge-crack","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"confused","icon":"bolt-shield","duration":null,"direction":null}
"Handle Status Marker Change"
"New Statuses:bolt-shield@NaN,half-haze"
"Old Statuses:bolt-shield@NaN"
"Add Condition"
"Token:-LjE9yautiV8a0CWMF-B"
"Name:fascinated"
"Remove Condition"
"Name:fascinated"
"Combat Conditions"
{"id":"-LjE9yautiV8a0CWMF-B","name":"entangled","icon":"fishing-net","duration":null,"direction":null}
{"id":"-LjEA0Wfj4Nt1s4KQyLP","name":"fascinated","icon":"half-haze","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"deafened","icon":"edge-crack","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"confused","icon":"bolt-shield","duration":null,"direction":null}
"Duration:undefined"
"Direction:undefined"
"Send Condition To Chat"
"Combat Conditions"
{"id":"-LjE9yautiV8a0CWMF-B","name":"entangled","icon":"fishing-net","duration":null,"direction":null}
{"id":"-LjEA0Wfj4Nt1s4KQyLP","name":"fascinated","icon":"half-haze","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"deafened","icon":"edge-crack","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"confused","icon":"bolt-shield","duration":null,"direction":null}
{"id":"-LjE9yautiV8a0CWMF-B","name":"fascinated","icon":"half-haze","duration":null,"direction":null}
"Handle Status Marker Change"
"New Statuses:half-haze@NaN"
"Old Statuses:bolt-shield@NaN,half-haze@NaN"
"Handle Status Marker Change"
"New Statuses:"
"Old Statuses:half-haze@NaN"
You aren't running both status info and new combat tracker at same time right? They will cross into each other and cause varied problems
New release 1.0/18 Beta here https://github.com/vicberg/Combattracker
Fixed the issue with players not able to click delay and done buttons
Victor B. said:
You aren't running both status info and new combat tracker at same time right? They will cross into each other and cause varied problems
Correct, I'm only running your CombatTracker v 1.0.17 at the moment. No other scripts.
I'm going to test if TokenMod will add them without them disappearing, as that's how I normally add status icons anyway.
UPDATE: Same results. Icon disappears, but is highlighted in selector, and condition is announced to chat, but the tracker doesn't treat the token as having that condition.
Yes, bad. I didn't change the launch command !condition. So both scripts running at same time, the !condition command will launch both scripts, one stepping on the other.
Seph, is all this happening in the game I'm invited to? If so, I'll jump in tomorrow and take a look. I may want you involved also. I'm also going to put in pathfinder support for the turnorder and set the delay on the last turn to just under the first person going in the next turn. I'll only auto sort if auto sort is turned on. I'm going to add a button to tracker to auto sort initiative so you an auto sort even if the config is turned off. So this should meet the pathfinder requirements.
Victor B. said:
Yes, bad. I didn't change the launch command !condition. So both scripts running at same time, the !condition command will launch both scripts, one stepping on the other.
Seph, is all this happening in the game I'm invited to? If so, I'll jump in tomorrow and take a look. I may want you involved also. I'm also going to put in pathfinder support for the turnorder and set the delay on the last turn to just under the first person going in the next turn. I'll only auto sort if auto sort is turned on. I'm going to add a button to tracker to auto sort initiative so you an auto sort even if the config is turned off. So this should meet the pathfinder requirements.
That's fantastic! Thank you for figuring out how to support that! And yes, it's that same game. I should be free most of the day after 2 pm PT.
More info (I test things for several people because I am good at breaking them!) . This appeared when I tried to start combat. I did it twice to make sure it was the same error each time. This one is an odd one. There is no error in the API output however, when I try and hit Delay or Done for a token it brings up the CT menu again. This did NOT happen if the token's turn timed out and moved to the next token.
Here is the output:
TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at selectedTokens.forEach.token (apiscript.js:495:44) at Array.forEach (native) at verifySetup (apiscript.js:491:24) at startCombat (apiscript.js:433:20) at handleInput (apiscript.js:156:6) 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 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "Starting webworker script..." "Loading 616 translation strings to worker..." "Defaults" TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at handleGraphicMovement (apiscript.js:1759:29) 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) Restarting sandbox due to script changes... Previous shutdown complete, starting up... Spinning up new sandbox... "Starting webworker script..." "Loading 616 translation strings to worker..." "Defaults" "CombatTracker Ready! Command: !ct" [] "ct" undefined "In Combat Tracker" "default" [] "ct" undefined "In Combat Tracker" "default" ["b"] "ct" "start" "In Combat Tracker" "Start Combat" {"_id":"-Ljv99Gpf-rYUQNS8zTW","_type":"graphic"} {"_id":"-Ljv99l42eBfWk9Jb_7Y","_type":"graphic"} "Reset Marker" "Token Id:-Ljv99Gpf-rYUQNS8zTW" "Token Page:-Lhq0fQRMwbV7286c2Dt" "Add to Turnorder" "Token Id:-Ljv99l42eBfWk9Jb_7Y" "Token Page:-Lhq0fQRMwbV7286c2Dt" "Add to Turnorder" "Turn Order Change" "ID:-Ljv99Gpf-rYUQNS8zTW" "Announce Condition" "Token ID:-Ljv99Gpf-rYUQNS8zTW" "Handle Turnorder Change" [] "ct" "delay" "In Combat Tracker" "default" ["b"] "ct" "next" "In Combat Tracker" "default" ["b"] "ct" "stop" "In Combat Tracker" "Stop Combat" ["b"] "ct" "start" "In Combat Tracker" "Start Combat" {"_id":"-Ljv99Gpf-rYUQNS8zTW","_type":"graphic"} {"_id":"-Ljv99l42eBfWk9Jb_7Y","_type":"graphic"} "Reset Marker" "Token Id:-Ljv99Gpf-rYUQNS8zTW" "Token Page:-Lhq0fQRMwbV7286c2Dt" "Add to Turnorder" "Token Id:-Ljv99l42eBfWk9Jb_7Y" "Token Page:-Lhq0fQRMwbV7286c2Dt" "Add to Turnorder" "Turn Order Change" "ID:-Ljv99l42eBfWk9Jb_7Y" "Announce Condition" "Token ID:-Ljv99l42eBfWk9Jb_7Y" "Handle Turnorder Change" [] "ct" "next" "In Combat Tracker" "default" "Next Turn" "Turn Order Change" "ID:-Ljv99Gpf-rYUQNS8zTW" "Announce Condition" "Token ID:-Ljv99Gpf-rYUQNS8zTW" [] "ct" "delay" "In Combat Tracker" "default"
There's definitely a strange issue surround token selection. It's intermittent and has to be something to do with Roll20. I've encountered same issues in old version of CT. Just sometimes token selection goes out to lunch
Victor B. said:
@seph, sorry I got busy today. I'll jump on tomorrow.
No worries, you wanted me online when you're testing the issues out? I should be free most of tomorrow. I can add you on discord if you like, so you can message me directly when you are online
Yes, I did have tokens selected when I started combat when this happened. I just double checked and got the same result.
Playing with 1.0.18 tonight and I'm seeing the same issue as ProfessorBadger - clicking Done or Delay brings up the menu rather than moving on. Also, the conditions don't seem to work beyond adding the icon to the token and displaying the description as it is added. It seems to ignore any duration and is never mentioned in chat again.
New release 1.0.20 Beta here https://github.com/vicberg/Combattracker
Fixed
- Delay and done button
- Support for Pathfinder put in
- Edit added when a status isn't setup right (no direction or duration assigned)
- Fixed issue where manually assigning a status icon to the token via Roll20 (not CT) was causing status icon to disappear
1.0.20 did not have the problem with the menu returning. I did have the Handle Graphic Movement error. I had just selected all four tokens by dragging a box around and started a mock combat. I then stopped the combat and then (while keeping the same tokens selected) restart the combat.
TypeError: Cannot read property 'id' of undefined
TypeError: Cannot read property 'id' of undefined
at handleGraphicMovement (apiscript.js:1793:29)
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)
Testing it out again, everything seems to be working as intended, I think! Some things I was wondering about:
I am fixing that handleGraphicMovement error once and for all.
1.0.21 is ready here https://github.com/vicberg/Combattracker
Put in code that hopefully prevents that handleGraphicMovement error. Seems like somehow, something else is getting selected, a nargle or something, that is causing that process to bomb. Anyone who says they love javascript is truly a masochist. (Sorry, The Aaron).
@Professor, thank you for amazing feat of breaking this. I left you with a little gift. Click on the Roll20AM macro in your game and then click on playlists.
@Seph, you can set direction to 0 and duration to 1. This will basically add the status icon and then do nothing with it. If you set override to true, then it should only display those roll queries for conditions within CT. What do you mean by disable the ping? As far as stopping combat goes, I tend to run big combats and it's a real pain to have to go onto tokens and remove the icons. Stopping combat cleans everything off. I'm guessing I can add a command to control that under status setup.
@seph, I need to know what you don't want cleaned out at end of combat. You want the icons to remain on the token?
Victor B. said:
@Seph, you can set direction to 0 and duration to 1. This will basically add the status icon and then do nothing with it. If you set override to true, then it should only display those roll queries for conditions within CT. What do you mean by disable the ping? As far as stopping combat goes, I tend to run big combats and it's a real pain to have to go onto tokens and remove the icons. Stopping combat cleans everything off. I'm guessing I can add a command to control that under status setup.
Can't wait to test out 1.0.21! And thanks for the info!
When a turn starts, the token gets pinged (as in holding left click). Just curious if there's a way to center on the token without that ping. Not a big issue though. I actually just remembered I have an extension that does just that, haha.
And if it isn't too much trouble to add that option, I personally prefer leaving icons on tokens after combat, as some conditions remain relevant/active even when combat ends.
Excellent work, Victor. And I agree with Seph. Sometimes a condition lasts longer then just one combat. Certain spells for example. Being able to track them through the next combat is a great boon.
@seph, but for how long? These conditions have a time limit? Why stop combat if you want them to persist?
@Ravenknight, This gets tricky. Do I continue to track the conditions or wipe them out and keep the icon on the token so you then manage how long it lasts?
By the way, are you still planning to look into adding these features?
Victor B. said:
- Add support for NPC vs Character token display in chat (NPC goes to GM, character displays to all players)- Add support for coloring the timer
Doubtful right now. I want to finish this off and get it stable so I can start on a UI for tokenmod.
Victor B. said:
@seph, but for how long? These conditions have a time limit? Why stop combat if you want them to persist?
I personally just want the icons to remain, the script doesn't necessarily need to remember the duration. I guess I could keep the tracker open, but some conditions might last minutes instead of rounds, and combat may end before the condition runs out. There's also conditions like exhaustion that may remain until the character rests, which often can't happen immediately after combat.
I'm highly doubtful I'll put this in. When combat ends, add back the icons that you need. Or keep combat open. You don't need to actually follow the turn order
Fair enough, you've already been working a lot on this. I don't want to add anything troublesome to your workload.
Okay, last question on the matter, I promise, because I just thought of this :p
Can I adjust anything on lines 466-484 in my own copy of the script that will prevent Stop Combat from removing status markers? Or is that function more complicated than I think it is?
I only ask because I use some icons for things other than conditions (such as triggers for other scripts) and I realized that stopping combat removes icons from all tokens on the page. Not just the ones involved in combat. And I figure I can just make the adjustment directly instead of asking you to add yet another configuration
Victor B. said:
@Ravenknight, This gets tricky. Do I continue to track the conditions or wipe them out and keep the icon on the token so you then manage how long it lasts?
I was hoping for conditions without direction or duration to remain. That's how I track spells with long duration in 0.2.7 and it's very handy for D&D considering Concentration.
@Seph
Will the script remove all status icons when combat ends? Not just the conditions added from the script? I think I misunderstood something.
Just wanted to say thanks very much to Victor for all the hard work on this Project... its taken a little while for me but it seems to be functioning precisely as intended!
I've managed to import the brilliant Poltergeisha 5e relevant Conditions, 24 in total.. from
https://gist.github.com/poltergeisha/459cd75a433163fc141034c9a116fb76
it wont do the duration, direction etc in its raw form so if anyone wants to save some time with the version already formatted for import, please message me!