
Anders I did take out the 'show' command, but I can put it back in.
Fixed the issue with show initiative and that issue seemed to cause the max stack exceeded error.
Version 1.0.10 Beta
Victor B. said:
Anders I did take out the 'show' command, but I can put it back in.
I would love to have it back. Fair enough if I have to call it manualy, as it would be another button on the menu.
I would say we use it at least every other turn, but sometimes multiple times per turn.
Everything looks good right now. I will see if I can mess with the settings tomorrow and confirm everything is working in my game. Thank you
Came here to say I was getting the same error as ProfessorBadger and saw you've fixed it already. Confirmed 1.0.10 resolved my issues too. Thanks.
Well I did my best to try and mess it up but everything worked. Only two observations to report:
1. I selected the FX for the turn tracker. Often the holy nova (default) would freeze on the screen and have to catch up. I think this was a Roll20 lag issue though.
2. This is probably on my end, I don't understand how to set the status effects correctly. I saw in the settings "Dir,Dur,Ovr,Fav" but I wasn't sure how to use them. I wanted to add something like Stunned for 4 rounds. I thought I was setting it to last 4 rounds but it always came off in one round.
Most things are working well for me. I haven't tried adding, removing, or importing conditions yet.
Ack, I have the labels wrong. Dir is Direction (2nd item), Dur is duration (1st item), ovr is Override, Fav is Favorite (it's part of favorites). It's an attempt to show you how your conditions are configured.
@Seph, all conditions are supposed to be announced in chat.
For delay, I don't change the initiative. I change the order of the initiative so the person who was "supposed" to go, goes after the next if they delay.
Not sure what you mean by pull option. This may be something new to me.
I can add a parameter to set timer color
I may be calling it the wrong thing, but in the Announcement config menu there's an option to pull the map to each token as its turn starts.
OK I tried to install this on my live game and I got this error:
TypeError: Cannot read property 'config' of undefined
TypeError: Cannot read property 'config' of undefined
at setDefaults (apiscript.js:2201:31)
at Object.checkInstall [as CheckInstall] (apiscript.js:1660:9)
at apiscript.js:2249:19
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 checkForReady (/home/node/d20-api-server/api.js:1438:12)
at /home/node/d20-api-server/api.js:1518:9
at c (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:14:64)
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)
Victor B. said:
I think that's centering and misnamed. So the map centers on the token that's up
Yes, except for the first one in the turn order.
And if I delay the turn of the last token in turn order, it gets pushed to its original placement the next round, instead of being placed after the first token in turn order. This happens even when Auto Sort is disabled.
In the config menu, I can choose whether to have turn announcements whispered. Would it be possible to have only NPC turn announcements whispered, while PC turn announcements are still shown to all players? Currently the only way I can do this is by having the NPC tokens on the GM layer.
I'm afraid that this new version isn't as backward compatible as I had hoped. Professor, try a reset. If you can't get that far, then I'm going to need to add some code to force a reset before the API loads for the first time
Seph, I'd have to be able to determine if a token is NPC or Player. I'm sure there's a fairly easy way, it's just not being done within the code currently.
@seph, I'm running two games today so my availability is in and out. Can you recreate this in the game you invited me to? I just started a combat and it centered on the first token, so I need to see what's happening with you.
@professor, you can always go back to v.0.3.0 if you wish, but if your game isn't coming up quickly, if you can invite me to that game, I can debug what's happening.
Hi Victory, thanks for the quick response. The GM who was scheduled to run last night was ill so did a quick random encounter in my game instead. I added the script as a last minute experiment. I'll keep messing around in my test game and on the live game. I did disable the other scripts I had on the live game. I'll invite you to the live game as well. Here is the error from the most current version:
TypeError: Cannot read property 'hasOwnProperty' of undefined
TypeError: Cannot read property 'hasOwnProperty' of undefined
at setDefaults (apiscript.js:2204:31)
at Object.checkInstall [as CheckInstall] (apiscript.js:1663:9)
at apiscript.js:2252:19
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 checkForReady (/home/node/d20-api-server/api.js:1438:12)
at /home/node/d20-api-server/api.js:1518:9
at c (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:14:64)
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)
@Professor, try this and if it fails, I think I'll need to be invited to that game so I can find out where exactly it's bombing. 1.0.12
Ok my errors might be some weirdness from that game as 1.0.12 and 1.0.11 were both working fine on my copy. So I copied the live game, reinstalled all the scripts one at a time and it seems to be stable. I'll leave the invite for you to join the old live game so you can look around in there, but otherwise that may have been unique.
1.0.13 Beta is available here https://github.com/vicberg/Combattracker
Added
- show command to show the current conditions on the token and remaining duration
- clicking on the condition name within the show condition window will remove the condition from the token
- fix a bug where not all conditions were being displayed when announcing turn or showing conditions
- a new icon on tracker menu (camera) will show conditions on selected tokens
I've got a couple of games to run so I'll be out for a while. We are getting close to a full release. I'm about ready to start battle testing this in a real game. Keep coming with failures or other issues, especially display issues (should not be showing to players and is, etc).
If you've already posted something like that, please post again so I can get a list going.
Thanks for everyone's help testing this. It's a big API and does a lot that I don't personally use.
List so far:
- 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
- Add support for import/export
So I was viewing the screen of one of my players through Discord to make sure he could not see the Combat tracker posts and that looked good (he did not). When I tried to make the initiative rolls show it gave me this error:
ReferenceError: initiativeRoll1 is not defined
ReferenceError: initiativeRoll1 is not defined
at selectedTokens.forEach.token (apiscript.js:2602:46)
at Array.forEach (native)
at rollInitiative (apiscript.js:2566:24)
at startCombat (apiscript.js:2415:13)
at handleInput (apiscript.js:2122: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)
Further testing with one of my players produced a very odd result. This did not result in an API sandbox error or stop the script which is why we found it so strange.
I started combat as normal and he could act. But when he attempted to click on the Done or Delay icons nothing happened. As the GM I could make those work but he could not. Just to make sure I moved maps and put all fresh tokens out. In case it is helpful this is the API screen from when we were testing:
"In Combat Tracker"
[]
"ct"
"next"
"In Combat Tracker"
"Next Turn"
"Turn Order Change"
"ID:-LjdNd9ogjbAwEsvyWIv"
"Announce Condition"
"Token ID:-LjdNd9ogjbAwEsvyWIv"
["b"]
"ct"
"stop"
"In Combat Tracker"
"Stop Combat"
"Stop Combat"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
["b"]
"ct"
"start"
"In Combat Tracker"
"Start Combat"
"Reset Marker"
"Token Id:-LhqBIrp3HOu3n8NOG6r"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-LhqB9fzZk3UuGiBmn19"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-Ljg6DTA5-P3N8XjSFYf"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Turn Order Change"
"ID:-LhqBIrp3HOu3n8NOG6r"
"Announce Condition"
"Token ID:-LhqBIrp3HOu3n8NOG6r"
"Handle Turnorder Change"
[]
"ct"
"next"
"In Combat Tracker"
"Next Turn"
"Turn Order Change"
"ID:-Ljg6DTA5-P3N8XjSFYf"
"Announce Condition"
"Token ID:-Ljg6DTA5-P3N8XjSFYf"
[]
"ct"
"next"
"In Combat Tracker"
[]
"ct"
"next"
"In Combat Tracker"
[]
"ct"
"delay"
"In Combat Tracker"
[]
"ct"
"next"
"In Combat Tracker"
[]
"ct"
"next"
"In Combat Tracker"
[]
"ct"
"delay"
"In Combat Tracker"
"Stop Combat"
"Handle Graphic Movement"
TypeError: Cannot read property 'id' of undefined
TypeError: Cannot read property 'id' of undefined
at handleGraphicMovement (apiscript.js:3722: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)
Restarting sandbox due to script changes...
Previous shutdown complete, starting up...
Spinning up new sandbox...
"Starting webworker script..."
"Loading 616 translation strings to worker..."
"-=> Roll20AM v2.12 <=- [Wed Apr 05 2017 00:26:44 GMT+0000 (UTC)]"
" > Updating Schema to v2.02 <"
" >Roll20AM has had a significant update. The command syntax has changed and any currently existing macros will need to be updated. Please check the **[forum thread](permalink to your release post)**"
" >Stored settings loaded<"
" >Help handout updated<"
"Defaults"
"CombatTracker Ready! Command: !ct"
"-=> Torch v0.8.11 <=- [Thu Mar 30 2017 10:50:46 GMT+0000 (UTC)]"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
"Handle Graphic Movement"
[]
"ct"
undefined
"In Combat Tracker"
"default"
["b"]
"ct"
"start"
"In Combat Tracker"
"Start Combat"
"Reset Marker"
"Token Id:-Ljg73CuCdg0BA_ikhRk"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-Ljg75Q1U0ISCQ_VOUOV"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-Ljg75wOay5Ek8i8IxMj"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Turn Order Change"
"ID:-Ljg73CuCdg0BA_ikhRk"
"Announce Condition"
"Token ID:-Ljg73CuCdg0BA_ikhRk"
"Handle Turnorder Change"
[]
"ct"
"next"
"In Combat Tracker"
"Stop Combat"
"Stop Combat"
["b"]
"ct"
"stop"
"In Combat Tracker"
"Stop Combat"
["b"]
"ct"
"start"
"In Combat Tracker"
"Start Combat"
"Reset Marker"
"Token Id:-Ljg75Q1U0ISCQ_VOUOV"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-Ljg75wOay5Ek8i8IxMj"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Token Id:-Ljg73CuCdg0BA_ikhRk"
"Token Page:-Lhq0fQRMwbV7286c2Dt"
"Add to Turnorder"
"Turn Order Change"
"ID:-Ljg73CuCdg0BA_ikhRk"
"Announce Condition"
"Token ID:-Ljg73CuCdg0BA_ikhRk"
"Handle Turnorder Change"
"Handle Turnorder Change"
OK since I am fantastic at breaking this I was trying to reset all the defaults (I also deleted and reloaded the script) and got this error:
TypeError: Cannot read property 'forEach' of undefined
TypeError: Cannot read property 'forEach' of undefined
at getAnnounceConditions (apiscript.js:2867:38)
at announcePlayer (apiscript.js:2829:23)
at doTurnorderChange (apiscript.js:2722:17)
at startCombat (apiscript.js:2419:9)
at handleInput (apiscript.js:2122: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)
Hey, I've been running these for a bit in a campaign I am running, full disclosure I am using giffygryph's Darker Dungeons sheet, which could lack a supported function in the new model, but with combatTracker version Version 1.0.13 Beta and statustracker Version: 0.3.12 I am getting this with !ct start, not sure if it helps or is irrelevant with the different sheet:
TypeError: state[combatState].conditions.forEach is not a function
TypeError: state[combatState].conditions.forEach is not a function
at getAnnounceConditions (apiscript.js:5806:39)
at announcePlayer (apiscript.js:5768:23)
at doTurnorderChange (apiscript.js:5661:17)
at startCombat (apiscript.js:5358:9)
at handleInput (apiscript.js:5061: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)
Thank you for adding the Show function, and even a button for it in the menu. Basic testing of .13 works just fine, though I havent put it through every config option. Plan to do a session in the upcomming week, and will risk using the beta version then.
Victor B. said:
@seph, I'm running two games today so my availability is in and out. Can you recreate this in the game you invited me to? I just started a combat and it centered on the first token, so I need to see what's happening with you.
Sorry, to clarify: after the first round, when the tracker skips the round counter and begins the turn of the first token in turn order, it doesn't center on that token.
And in case you missed this earlier:
Seph said:
And if I delay the turn of the last token in turn order, it gets pushed to its original placement the next round, instead of being placed after the first token in turn order. This happens even when Auto Sort is disabled.
Is there a way to retain the new turn order when delaying a turn, even if the actual initiative value doesn't change?
@Seph, no. The turn order manipulation is part CT and part Roll20 You can't maintain the same order within the turn order and continue with delay because the next/previous won't work. As far as delaying on the last token, in reality that means you aren't doing anything during the turn, so it starts with next round.
But I do see an issue if you delay on final turn the marker is getting set to that player in the next round. I've got to fix that
@Professor and @Badger, what were you doing when you got the announceCondition error? Starting up combat? Something else?
Victor B. said:
But I do see an issue if you delay on final turn the marker is getting set to that player in the next round. I've got to fix that
Screenshots for further clarity. Here's the turn order:
It's Merisiel's turn, and if she delays:
Once Amiri's turn comes around:
But here's what happens if Amiri delays:
@Seph. I think you need to change the initiative (of the delaying token) in the turn-order window once a token delays, or else it will be sorted back to its old order at the beginning of the next round.
I will test that out, but what's happening here is specifically the last token cannot delay normally. It instead skips that turn altogether.
I assume Amiri's initiative in the example above would need to be changed before her turn is delayed. But aside from that, I don't see a way to delay her turn normally.
New issue, 1.0.13
Combat starts at Round 2. On start, Turn Order shows Ezren at top of the round, CombatTracker treats Amiri as being up (including chat announcement). Moving to next turn repeats Amiri as being up in turn order, correctly this time. This persists with multiple attempts.
EDIT: I should note this is when starting the combat with all tokens selected, before rolling their initiative. This doesn't happen when rolling initiative manually, then starting combat by opening turn order and clicking the next turn button.
Seph I think you're wanting the delaying individual to be at the very top of the next round (because they delayed). It's possible to strip out "Amiri" and put her at top of the next turn. However, that's the initiative order going forward until you either manually adjust the turn order (drag and drop) or sort the turn order via the sort button within the turn order panel.
There's two approaches to delay.
1) To do it the way you are proposing in which "Amiri" goes to the top of the next round but that requires another button into the tracker to sort the initiative order at some point in order to reset to the normal initiative. I have combats with 20 tokens and manually adjusting the initiative order can be time consuming which would be the only recourse if you don't auto-sort or click the turn order sort button
2) By doing nothing in the round, you do NOTHING in the round and therefore lose your turn and go in your normal sequence next round. This is the more typical approach in the many systems I've played. I've rarely run across systems that say if you do nothing in this turn you go first in the next turn.
I'm reluctant to throw too many options into CT because there's already a lot. I'll think about it but I'm most likely going with option 2. There could be an option to control how delay functions but again, more code, more chances for the code to break, more work for the GMs, more work for me.
As far as your last post (with the graphic), I've fixed that issue. Haven't posted it yet.
Victor B. said:
There's two approaches to delay.1) To do it the way you are proposing in which "Amiri" goes to the top of the next round but that requires another button into the tracker to sort the initiative order at some point in order to reset to the normal initiative. I have combats with 20 tokens and manually adjusting the initiative order can be time consuming which would be the only recourse if you don't auto-sort or click the turn order sort button
2) By doing nothing in the round, you do NOTHING in the round and therefore lose your turn and go in your normal sequence next round. This is the more typical approach in the many systems I've played. I've rarely run across systems that say if you do nothing in this turn you go first in the next turn.
I'm sorry, I may be misunderstanding how delay is supposed to work. I'm not suggesting the first point, though. Say there's 4 tokens in the turn order. Token 1 starts its turn and finishes as normal. Token 2 starts its turn, chooses to delay. The script as it currently works moves token 2 behind token 3, so token 3 starts its turn then finishes. Then token 2's turn starts then finishes as normal. Now it's token 4's turn.
If token 4 chooses to delay, this should mean token 1 goes next, then token 4, then 2, then 3, then 1 again, with the remainder of that round going in proper order. Instead, delaying token 4's turn ends the round, and the following round goes in the original order, essentially skipping token 4.
I understand there's probably no way to properly delay token 4 in this scenario without changing its initiative value. But it may be a good idea to at least inform users that the last token in turn order can't delay its turn without manually adjusting its initiative.
(And I don't know the rules on delaying in other systems, but in Pathfinder at least, it means permanently changing place in turn order. If this is an unusual way for delay to work, there's no need to support it in the script.)
On, I see now. Delay at end of turn pushed that player to just under beginning of next turn. Let me think on how I'll handle delay and turn order.
5e D&D handles "delay" very differently than in previous editions. There is no delay, the player has to ready an action and give the trigger. If the action is not triggered, they miss their turn. A common example would be "When one of the goblins gets within melee range I hit it". Since there is no way to move initiative order to account for the trigger event this would just have to be handled outside Combat Tracker.
They would still delay. Yo, Professor, I joined your other game. Promote me to GM so I can figure out this announceCondition issue
Could the delay function be changed so if token 2 delays, instead of pushing token 2 to under token 3 then starting token 3's turn, it starts token 3's turn first then pushes token 2 to under 3? This way, if the last token delays, token 1's turn starts (resetting the turn order) then the last token is pushed to just under token 1.