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
This post has been closed. You can still view previous posts, but you can't post any new replies.

CombatMaster Alpha

1585754907
The Aaron
Roll20 Production Team
API Scripter
(Technically, neither of the changes to TokenMod or TokenCondition are released yet, but feel free to share the Gists with the community if you're ready for wider testing, Vic!)
@Victor, yes, sorry, I meant for this command !cmaster --turn,timer=pause A message in chat saying it's now paused or resumed would be handy
Clicking the cog next to a substitution in the Macro & API Setup deletes the substitution instead of allowing to edit. I see now the hover text says Delete, but could the cog be changed to an X instead so the function is more clear?
1585767817
Victor B.
Pro
Sheet Author
API Scripter
I'll change the icons Persephone.  
1585767852
Victor B.
Pro
Sheet Author
API Scripter
@The Aarron, thanks.  I'll post up once I've had a chance to work more closely with Token Mod
1585789783

Edited 1585789921
Found and interesting bug. Seems to happen only when a single token is in the initiative and delay is chosen  then clicking on the check to advance the turn. While I do not think that will come up to open might want to trap it so it does not cause the api to crash. RangeError: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded at RegExp.exec (<anonymous>) at RegExp.test (native) at ac (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:71) at $b (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:36:239) at mc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:40:370) at $a.t.remove (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:26:44) at $a.t.remove (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:26:133) at $a.t.remove (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:26:133) at $a.t.remove (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:26:133) at Ua.t.remove (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:21:402) at O.t.J (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:40:559) at O.t.Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:40:752)
Also noticed an aesthetic issue when turns are announced even if a token is hidden on the gm layer it still announces it turn to the chat window when its turn comes up in init order. It might be good to have it skip announcing that token/npc/player when its on the Gm layer. 
Mark (GM) said: Also noticed an aesthetic issue when turns are announced even if a token is hidden on the gm layer it still announces it turn to the chat window when its turn comes up in init order. It might be good to have it skip announcing that token/npc/player when its on the Gm layer.  Seconding this request.
One Feature I noticed that did not come over  from combat tracker that I think is useful is the ability to close the tracker window with out it clearing the state of the combat. I can see cases where combats will run long and have to carry over to another session. While not stopping CM and not closing the tracker window will keep the current state, however its all to easy for GM to forget and get click happy and close it by mistake. The option to clear the tracker on close to stop should be config option.
There is a clear condition when close setting, I believe under condition or status.
1585834749

Edited 1585834946
Kilter said: There is a clear condition when close setting, I believe under condition or status. Thanks for the tip. Indeed there is but correct me if I am wrong this just clears the token statuses. What I am talking about it is this: (picture of CombatTracker). The stop on close , currently CombatMaster clears all tokens from the tracker if you close it as it stops the Combat Master.  In any case probably not a huge concern for some but I suspect there are cases where this is handy not stop combat master such as the case I described earlier.  Again over all great work victor!.
1585835691
Victor B.
Pro
Sheet Author
API Scripter
@mark, I'll trap the API crash.  Please look closely, when a token is on GM layer it announces to GM only not the players.  There's an issue with closing the turnorder and maintaining state.  The turnorder itself is not in session state.  In order for that to happen, I'd have to put the turnorder in session state and then add a mechanism to tell CM that you want to restore the turnorder vs. starting a new one.  I'll add that to the list but that's quite a bit of work.  
Victor B. said: @mark, I'll trap the API crash.  Please look closely, when a token is on GM layer it announces to GM only not the players.  There's an issue with closing the turnorder and maintaining state.  The turnorder itself is not in session state.  In order for that to happen, I'd have to put the turnorder in session state and then add a mechanism to tell CM that you want to restore the turnorder vs. starting a new one.  I'll add that to the list but that's quite a bit of work.   No worries I do not think its critical as of yet, I personally used it the way I described in CT as it was useful, but that maybe more of an edge case than the norm. The work around is simply do not close it and the CM should not stop so far as I have tested. I am not sure how Robin handled it but a simpler suggestion would be is that if the tracker is closed it simply does not turn off CM vs having it restore a session state. Again thanks for your work. 
1585841538

Edited 1585841758
Victor B.
Pro
Sheet Author
API Scripter
@everyone, Token Condition is fully integrated.  Token Condition enables you to create light sources, mounts or anything else you can think of. Enter the Token Condition char name into CM as the icon.  Use the CM menu to select individual or group icons and assign the token condition to the selected tokens.  These token conditions will follow the token as you move around the map.  I'll provide some screen shot examples in a bit.   @everyone, I need some sample token mod commands again that you are doing.  I haven't used Token Mod much (yet) and would like to know how you are using it to insure full integration
1585842383
Victor B.
Pro
Sheet Author
API Scripter
@mark, after I get Token Mod integrated I'm going to add a Hold Combat Button.  This will save the turnorder in session state and not stop combat.  It will bring down the turnorder.  When you restart a held combat it will restore the turnorder and start up combat where it was left off
1585845374

Edited 1585845521
Dumbhuman
Pro
Marketplace Creator
Victor, I just wanted to say thank you for all the work you're doing on this script to squash bugs and add more and more features.  I mean, right after telling us that you're giving us all ponies (via TokenCondition mounts) you tell us about even more stuff coming up. As far as sample TokenMod commands go, most of mine would likely be referenced by a MacroCharacter sheet, but off the top of my head the most common one is probably for the Blinded condition. On entering the Blinded condition: !token-mod --set hassight|no And then upon exiting the Blinded condition: !token-mod --set hasssight|yes Another good one to use would be for the Enlarge/Reduce spell.  So you'd end up with an Enlarged condition which applies the following command on entering it: !token-mod --set scale|*2 And the following command on exiting the Enlarged condition: !token-mod --set scale|/2 For the Reduced condition, those two would be reversed. If you want to test the more user-friendly multi-line syntax, here's a much less universal one that I'd like to use for the Hasted condition (because I usually put AC in bar 2 and speed in bar 1).  On entering the Hasted condition: !token-mod {{ --set bar1_value|*2 bar1_max|*2 bar2_value|+2 }} On exiting the Hasted condition: !token-mod {{ --set bar1_value|/2 bar1_max|/2 bar2_value|-2 statusmarkers|interdiction }} That last part of the above command would be my attempt to add the Incapacitated condition by applying the status marker for it.  I'm hoping that TokenMod integration will allow CombatMaster to respond to status markers added in that fashion (both in and out of combat) and apply the necessary condition tracking, but if I'm wrong about that, please let me know.
Victor B. said: @everyone, I need some sample token mod commands again that you are doing.  I haven't used Token Mod much (yet) and would like to know how you are using it to insure full integration I would like to apply this at the beginning of each turn: !token-mod --set statusmarkers|all-for-one KC . said: Victor, I just wanted to say thank you for all the work you're doing on this script to squash bugs and add more and more features.   +1 :)
Yes, Victor, thank you so much! This script is already a treasure, even in alpha, and I can't wait to see how it evolves going forward. Being able to FINALLY use custom status markers with conditions in a robust combat tracking system is a delight. Thank you again for your hard work and responsiveness.
1585864434

Edited 1585864611
A big thanks from me, too! This is one of my most used scripts and makes running my campaigns so much easier! You've put a lot of work into making this script flexible and convenient, and I can't thank you enough. Victor B. said: @mark, after I get Token Mod integrated I'm going to add a Hold Combat Button.  This will save the turnorder in session state and not stop combat.  It will bring down the turnorder.  When you restart a held combat it will restore the turnorder and start up combat where it was left off This is awesome! Will this also be able to save the conditions and their durations? I know that's been a requested feature by some, myself included. In regards to TokenMod, I use a lot of commands similar to what others have shared, such as for Blinded. Another I would like to use is this for Dead marker, where 'tokidentifier' is the substitute for token ID: !token-mod --ids tokidentifier --set bar1_value|0 I'd also like to use TokenMod commands that apply a marker when a certain condition ends (or in some cases, remove a marker when a condition is added), but when a marker is added directly or via TokenMod, it always applies the condition as permanent. For example, I have the Raging condition with default settings of Duration 10, Direction -1, and Override false. I also have the Rage-Cooldown condition with the same defaults. I would like to be able to set the following as the API command that runs when Rage is removed: !token-mod --ids tokidentifier--set statusmarkers|sleepy This would add the Rage-Cooldown condition, ideally with it's default duration of 10. But the current behaviour would add it as permanent.
Just noticed that when a condition is removed from via the turn announce menu, which uses the following CM command, it doesn't run it's assigned API command (or at least doesn't register the character ID substitute in the command). !cmaster --remove,condition=raging,id=-M3yiWYOxAGACpT-Oupm Works fine if removed via the main menu, which uses this command, or when the duration ends. !cmaster --remove,condition=raging
1585918805
Victor B.
Pro
Sheet Author
API Scripter
@persephone, remove a condition using announce player is fixed.  APIs will be called
1585919170
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Out of curiosity, is that a character id or a token id?
@Victor - did u get a chance to check out some of the questions I had? <a href="https://app.roll20.net/forum/post/8126152/combatmaster-alpha/?pageforid=8351648#post-8351648" rel="nofollow">https://app.roll20.net/forum/post/8126152/combatmaster-alpha/?pageforid=8351648#post-8351648</a> I especially wanted to understand the delay turn function's purpose?
1585923376

Edited 1585923399
Victor B.
Pro
Sheet Author
API Scripter
@Wolf, not yet.&nbsp; I've got a bit more work on Combat Master before I start looking at concentration, etc.&nbsp; Delay turn shifts that person down in the turnorder so they choose to wait before acting
Victor B. said: @Wolf, not yet.&nbsp; I've got a bit more work on Combat Master before I start looking at concentration, etc.&nbsp; Delay turn shifts that person down in the turnorder so they choose to wait before acting hmmm ... wish there was a way to turn that feature off for two reasons: 1. It's not a feature I would ever use 2. I've got curious players who believe if something is there, they should be able to use it.
1585923843

Edited 1585927256
Victor B.
Pro
Sheet Author
API Scripter
Version 2.02 found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> .&nbsp; I'lll publish to the Roll20 Repo on Sunday, it should be available for subscription by Tuesday Fixed - Import issue when you've added API calls - Extra Parenthesis when setting a default message - Removing Markers had an issue - Making an API call when removing a condition via the announce player - Invalid turnorder API call causing failure New Functionality - Token Condition integration. You'll temporarily need source here prior to commit to Roll20 Repo on Tuesday&nbsp; <a href="https://gist.github.com/shdwjk/388626529aa7b5577c66d95f91de59eb" rel="nofollow">https://gist.github.com/shdwjk/388626529aa7b5577c66d95f91de59eb</a> - Token Mod integration.&nbsp; You'll temporarily need source here prior to commit to Roll20 Repo on Tuesday&nbsp; <a href="https://gist.github.com/shdwjk/cedbf709b6fa6305afcb07c6757ea4be" rel="nofollow">https://gist.github.com/shdwjk/cedbf709b6fa6305afcb07c6757ea4be</a> - FURTHERMORE, for Token Mod, you'll need to add a new substitution called PlayerID (and whatever string you want).&nbsp; It will be replaced with GM Player ID and you'll need to add this syntax to all Token Mod calls from CM --api-as &lt;player id substitution string&gt; Not Fixed: - beginning of turn api calls actually running at beginning of turn - beginning of combat/end of combat API calls (new functionality) - hold combat (new functionality) - other scripts (concentration, etc) - replace Roll Query Token Condition Name entry with a drop down containing all Token Conditions in game - update help
1585923954
Victor B.
Pro
Sheet Author
API Scripter
@wolf, I'm going to leave.&nbsp; Simply don't use it.&nbsp; The script is already getting very large due to all the requests.&nbsp; I need to start limiting.&nbsp;&nbsp;
Trying to run Combastmaster... Kinda new to APIs and Scripts. Is there any documentation, other than ---help in chat? I am getting some strange characters in chat from it: Also when I try to configure it via !cmaster ---main it only shows conditions?!
1585925585

Edited 1585925860
Victor B.
Pro
Sheet Author
API Scripter
@kim, It's escaping the apostrophes.&nbsp; Sigh.&nbsp; You've got a strange situation going right now.&nbsp; Delete the script you have installed.&nbsp; Look at my previous post with the hyperlinks and download that.&nbsp; Put is in as a new script (not a Roll20 subscription)
Victor B. said: It's escaping the apostrophes.&nbsp; Sigh.&nbsp; Way down on the list Which characters seem to be missing here? Is this documentation available somewhere else? Didn't find any on your github.&nbsp; How can I enter the main menu? !cmaster ---main only brings up conditions (see above)
1585925916
Victor B.
Pro
Sheet Author
API Scripter
Nope, that's it.&nbsp; And it's out of date.&nbsp; Remove the subscription to Roll20.&nbsp; Go to my prior post and download that version (click the raw button before copying).&nbsp; Paste into a new script.&nbsp; Try again
1585926232
Victor B.
Pro
Sheet Author
API Scripter
However, API server is down right now.&nbsp;&nbsp;
1585926553

Edited 1585926623
Victor B. &nbsp;said: Paste into a new script.&nbsp; Try again That seem to have fixed it, ty. Tried using it and scripts got disabled due to this: For reference, the error message generated was:&nbsp; ReferenceError: doTurnorderCalls is not defined ReferenceError: doTurnorderCalls is not defined at doTurnorderChange (apiscript.js:2125:13) at delayTurn (apiscript.js:2253:9) at commandHandler (apiscript.js:685:17) at _.each (apiscript.js:552:25) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:547:23) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1648:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560
1585927286
Victor B.
Pro
Sheet Author
API Scripter
@kim, fixed, download again.&nbsp; Surprised that issue has remained around this long.&nbsp;&nbsp;
1585928252

Edited 1585928445
Victor B. said: @kim, fixed, download again.&nbsp; Surprised that issue has remained around this long.&nbsp;&nbsp; I did download and install the latest commit from github. Now, the menu is broken again: ---main only shows the conditions, yet again:&nbsp; edit: also, unfortunately, when trying out the built-in turn order, yet another error appears: For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at turnorder.forEach (apiscript.js:2690:59) at Array.forEach (native) at doRoundCalls (apiscript.js:2687:19) at doTurnorderChange (apiscript.js:2125:13) at nextTurn (apiscript.js:2267:9) at commandHandler (apiscript.js:682:17) at _.each (apiscript.js:552:25) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:547:23) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16)
Being super new to APIs I loaded this and figured out how to do the options, how do I engage it so it effects the combat.&nbsp; Like how do I start the combat I guess would be the real question&nbsp;
1585928860
Victor B.
Pro
Sheet Author
API Scripter
@kim, invite me to your game and once I'm in please promote me to GM.&nbsp;&nbsp;
1585928899
Victor B.
Pro
Sheet Author
API Scripter
Bring up the CM menu !cmaster --main, highlight some tokens and click the right arrow button.&nbsp; Hold your mouse over the buttons to figure out what they do
1585928936
Victor B.
Pro
Sheet Author
API Scripter
No don't read from Turn_Tracker.&nbsp; That's an entirely different API
1585929374

Edited 1585929566
Ravenknight
KS Backer
Joey V. said: Being super new to APIs I loaded this and figured out how to do the options, how do I engage it so it effects the combat.&nbsp; Like how do I start the combat I guess would be the real question&nbsp; When you have the initiative setup you just run !cmaster --main, mark the tokens involved in said combat and press the "play" symbol on top of the menu. Oh, you can also mark the tokens and run:&nbsp;!cmaster --turn,start&nbsp;
1585929786
Victor B.
Pro
Sheet Author
API Scripter
Kim's good to go.&nbsp;&nbsp;
Victor B. said: Kim's good to go.&nbsp;&nbsp; No idea what you did, but you fixed it. Thanks man, great work &lt;3
1585930656
Victor B.
Pro
Sheet Author
API Scripter
Nothing actually.&nbsp; I don't think you were launching it correctly.&nbsp; Use the macro I created for you.&nbsp;&nbsp;
1585931177

Edited 1585933137
It's somehwat broken again ... I started combat the way you showed me (btw, no markers showed up for active / next player) and it kinda worked. Until I ended combat and: No macros in my game, did you save it? ;-) Here's what happened when I tried adding a condition. Restart fixed it, just letting you know: For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at addConditionToToken (apiscript.js:1494:29) at selectedTokens.forEach.token (apiscript.js:1425:12) at Array.forEach (native) at addCondition (apiscript.js:1423:25) at commandHandler (apiscript.js:755:17) at _.each (apiscript.js:552:25) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:547:23) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8)
1585932956
Victor B.
Pro
Sheet Author
API Scripter
So TheAaron just informed me that when one person creates a macro it must be shared even with another GM in game.&nbsp; So that explains Kim why you couldn't see my macro.&nbsp;&nbsp;
1585933702
Victor B.
Pro
Sheet Author
API Scripter
And Kim, the command to launch CM is !cmaster --main
1585936039

Edited 1585936858
Victor B.
Pro
Sheet Author
API Scripter
Version 2.03 found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> .&nbsp; I'lll publish to the Roll20 Repo on Sunday, it should be available for subscription by Tuesday Fixed - introduced a bug when adding token condition logic cause script to fail - Beginning of Round APIs now launching at beginning of round.&nbsp;&nbsp; New Functionality - Token Condition integration. You'll temporarily need source here prior to commit to Roll20 Repo on Tuesday&nbsp; <a href="https://gist.github.com/shdwjk/388626529aa7b5577c66d95f91de59eb" rel="nofollow">https://gist.github.com/shdwjk/388626529aa7b5577c66d95f91de59eb</a> - Token Mod integration.&nbsp; You'll temporarily need source here prior to commit to Roll20 Repo on Tuesday&nbsp; <a href="https://gist.github.com/shdwjk/cedbf709b6fa6305afcb07c6757ea4be" rel="nofollow">https://gist.github.com/shdwjk/cedbf709b6fa6305afcb07c6757ea4be</a> - FURTHERMORE, for Token Mod, you'll need to add a new substitution called PlayerID (and whatever string you want).&nbsp; It will be replaced with GM Player ID and you'll need to add this syntax to all Token Mod calls from CM --api-as &lt;player id substitution string&gt; Not Fixed: - beginning of combat/end of combat API calls (new functionality) - hold combat (new functionality) - other scripts (concentration, etc) - replace Roll Query Token Condition Name entry with a drop down containing all Token Conditions in game - update help
Does anyone have Macros for Combat Manager&nbsp;
@Victor, do you know if it matters where the --api-as syntax goes in the TokenMod command?