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 .
×
Advertisement Create a free account

CombatMaster 2.0

1619791477
Lucas X.
Translator
I hope this wasn't already asked before: Is there a way to not show the whole conditions when it's your turn? I use the 2.32 version
1619822827
Victor B.
Pro
Sheet Author
API Scripter
When the player is up the condition is displayed.  Click on the condition name I believe and it will show condition in chat.  
1620048557

Edited 1620049013
Ross
Pro
EDIT: I saw in another comment that the Player Ribbon has to be on the page in order for these to work. Think I got it figured out now.  I am having some trouble with this. The turn marker (circle around the token) is not showing. I can apply conditions, but they do not count down and turn off after the appropriate amount of turns. I have reset the API sandbox, no luck. Do I need some additional scripts in order for these features to work?
Using the latest version. I get an error as soon as I call the help command.  TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at showHelp (apiscript.js:24511:82) at commandHandler (apiscript.js:20881:7) at apiscript.js:20608:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-node-f.cjs:1323:7) at inputHandler (apiscript.js:20603:23) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16) at Object.publish (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:70:8) at /home/node/d20-api-server/api.js:1663: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)
I don't think there is a help command anymore. I'm not sure where people keep seeing that, but that documentation needs to be updated. The command for the main menu is !cmaster --main and for the help handouts you click the info button in the upper right corner of a chat menu.
1620240444

Edited 1620240600
Is there a way to have CM run a script when a condition is applied?  I.E. I want to run !token-mod --off has_bright_light_vision When the blinded condition is applied to a token and  !token-mod --off has_bright_light_vision when it is finished. Or is there a way to query the status of a token? Also, is there an example of calling an API from the TurnOrder Setup?  I have tried but I get errors when I try.
@Darryn you'll need to set up ID substitutions in the Macro & API settings menu first (click the info button for the help handout for that menu). Then in the condition's setup menu you'll see 2 buttons labeled Add APIs and Remove APIs. Use the substitutions you define to build the commands, like in this example . I recommend flipping the limit field of vision setting instead of turning off vision, that way the players can still see their own tokens.
1620266729
Persephone said: @Darryn you'll need to set up ID substitutions in the Macro & API settings menu first (click the info button for the help handout for that menu). Then in the condition's setup menu you'll see 2 buttons labeled Add APIs and Remove APIs. Use the substitutions you define to build the commands, like in this example . I recommend flipping the limit field of vision setting instead of turning off vision, that way the players can still see their own tokens. Thank you!  That was the parts I was missing
Based on this report I found two places in CombatMaster that do not properly check this situation and have submitted a fix and requested a pull request for version 2.41.
1620397622
Victor B.
Pro
Sheet Author
API Scripter
I read the post.  I'll get it fixed.  Anything special about your setup that I need to be aware of.  That clear token status has been working for me.  
1620433728
Hi victor ! I have combatmaster installed (v 2;40). Great API by the way !! I have set up a few conditions and it works fine! In my game I have some spells (actually powers would be more appropriate) that can set conditions based on a success margin for duration However it seems that cm overides the duration value that I pass on TokenMod with the one stored in condition duration. How could I tell combatmaster to let TokenMod overide it ? (I tried setting overide to false but didn't work !)
1620623743
Victor B.
Pro
Sheet Author
API Scripter
Folks, I'm going to be swamped for the next year plus.  Multiple projects.  Though I'll be making big money, I will not have time to support this going forward.  If anyone would like to support this and take it forward, PM me.  
Victor B. said: Folks, I'm going to be swamped for the next year plus.  Multiple projects.  Though I'll be making big money, I will not have time to support this going forward.  If anyone would like to support this and take it forward, PM me.   Happy for you that you've got projects that will pay you well, Victor, though of course sad that you won't be able to keep supporting CombatMaster. I really hope someone can take it over! It's one of my essential Roll20 scripts.
Thanks for all your work on CM, Victor, and congrats on your new opportunities!
1620864414
Thank you for the work you have done on the script and good luck on your new opportunities, sounds exciting!
1620892463
It's time to move the player ribbon to real life! Thanks for your work Victor
1000 Thanks Victor for all you dedication to this brilliant script! 
1621058134
Victor B.
Pro
Sheet Author
API Scripter
Thank you everyone.  I haven't had anyone willing to step up and support it.  It's pretty solid right now with some minor issues.  I'd love someone to step up.  
1621099964

Edited 1621099992
Nick
Pro
Having trouble with the newest version of CombatMaster. I have the Roll20 module for Lost Mines of Phandelver installed, and the only other API script I have is a DnDBeyond character import sheet. I'm only using the tokens that come with the module, including the pre-built characters, and I'm using a clean install of CombatMaster with no settings changed. When I highlight any two character or monster tokens and start combat through the CombatMaster main menu, I get the following error: If I drop two new blank tokens from my art library and start combat with them, combat starts successfully, but when I try to end combat I get the following error: I feel like I must be missing something very obvious since these are basic functions of the API. From what I can tell the start combat error comes from the sortTurnOrder function at line 2057 but I am not a programmer. Any help is appreciated. Thanks!
@Nick, first thing to check is that the Player Ribbon is on the page you're trying to start combat on. If not, move it to the page you're on and try again, see if that fixes anything. Second thing to try is disabling the other scripts you have installed and test again, in case those are causing some conflict. Can you provide screenshots of the tokens that you're testing with, their settings, and that page's settings?
@Victor, I don't think I have quite enough experience with JavaScript yet to maintain/update the script, but I'll still try to help people troubleshoot when I can! Might take a crack at a few adjustments if I get more free time soon, and if they go smoothly I'd gladly share them here.
1621123758
Nick
Pro
@Persephone I did not have the player ribbon on the right map, so that's one problem solved! However I still get the exact same error when trying to start combat even with the player ribbon on the correct page. I've checked the following: the player token is assigned to their character, they are the only controller of their token, the player is logged in to roll20, the player is in the current map, they have the correct initiative_bonus stat, clean install of CombatMaster with default settings copied from the raw page on git. I'm still using the built in tokens and characters. I suppose the next thing to try is make a brand new project and go from there.
1621189143

Edited 1621194810
Nick
Pro
Everything works perfectly fine in a brand new game with some new tokens, all I had to do was assign a character to them and add the initiative_bonus attribute to their character and no issues. That said, I am still having the exact same bugs as above when I try to use CombatMaster with any of the tokens from the Lost Mines of Phandelver module from roll20. I tried copying my Phandelver game this time without using character sheets. No other scripts are active, I created two brand new tokens, two brand new characters, and gave them the initiative_bonus stat (basically trying to follow the exact same steps that made it work in a brand new game) and it does NOT work in the Phandelver campaign. Still not sure what the issue is, any help is greatly appreciated! EDIT: Further investigation, I am unable to roll initiative on any characters using the character sheet, through right clicking on a token and selecting Add Turn, or through using the macro commands listed in the Macro wiki page for rolling initiative "/roll 1d20 + 5 &{tracker}", no roll shows up in the log and no turns are added to the tracker. Basically I can't roll initiative using the Turn Tracker using any methods. Is there some setting that prevents this? It all works fine in a new empty project but not in the Phandelver module. If I create a brand new Phandelver module game rolling initiative and CombatMaster work fine. What setting in my existing game would possibly prevent initiative from being rolled?
1621273737
I am having an issue with the Turn order setup.  I have a macro on the character sheet called CT_TURN. It is setup to regenerate health at the start of the monster's turn !token-mod --set bar1_value|+[[{10,@{selected|bar1|max}-@{selected|bar1}}dh1]] I am getting this error when the macro is run I've also tried this, but with the same effect.  I thought I had this working at one time, but for some reason I can't figure this out now :(
@Nick that sounds like it may be an issue with how the characters/tokens in that module are set up. I don't own that module and haven't had this issue with any that I do. Feel free to PM me an invite link to a game you make with that module and I could take a closer look at what might be causing the issue. @Darryn you're missing the needed syntax and ID substitutions for commands used by CM. There's at least one example on page 10 of this thread. Use that as a reference to change the macro, then let me know if you're still having trouble with it.
1621399194

Edited 1621399936
Yeah I tried that also (you recommended that in another post to me :) ) So I tried this {{!token-mod {{--ids tokenidsubstitution}} {{--set bar1_value|+[#[{10,@{selected|bar1|max}-@{selected|bar1}}dh1]#]}} }} Which then displays this: I also tried this (no #'s) {{!token-mod {{--ids tokenidsubstitution}} {{--set bar1_value|+[[{10,@{selected|bar1|max}-@{selected|bar1}}dh1]]}} }} And that creates an error Lastly I tried this (removed the {{...}} around the !token-mod call) !token-mod {{--ids tokenidsubstitution}} {{--set bar1_value|+[#[{10,@{selected|bar1|max}-@{selected|bar1}}dh1]#]}} That gives me this error: Which I think is because CM is "selecting" the next turn token it uses.  Notice how there are no numbers in the bars (the "circle" is selcted not the monster token).   verses  I'm sure there is something simple I am missing (esp on the 1st one since it seems to know what to call, it just doesn't "call" it). Persephone said: @Nick that sounds like it may be an issue with how the characters/tokens in that module are set up. I don't own that module and haven't had this issue with any that I do. Feel free to PM me an invite link to a game you make with that module and I could take a closer look at what might be causing the issue. @Darryn you're missing the needed syntax and ID substitutions for commands used by CM. There's at least one example on page 10 of this thread. Use that as a reference to change the macro, then let me know if you're still having trouble with it.
1621399557

Edited 1621399695
Victor B.
Pro
Sheet Author
API Scripter
Run that command separate from CM until it works.  Debug the syntax then put in brackets for CM.  Issue it as a text command.  Once it's working then you only need some brackets.  There's a problem in your syntax
1621399662
Victor B. said: Run that command separate from CM until it works.  Debug the syntax then put in brackets for CM Yep, have tried that.  The macro works great if I run it normally (in fact until this is figured out I am doing the below to remind myself it needs to regenerate) /w gm &{template:desc} {{desc=**CT_TURN** [Regeneration](!
#zRegenerate)}}
1621399781
Victor B.
Pro
Sheet Author
API Scripter
Macro command are totally different than API commands.  Different syntax.  You can't launch a macro from CM.  You launch an API command.  Change it to work for an API and then include it into CM
1621399849
Victor B.
Pro
Sheet Author
API Scripter
CT TURN BTW is ancient Combat Tracker.  Gone, no longer supported.  
1621400060
I understand that from the name perspective, but it is a nice naming convention so that I can tell what the macro is for.  I know it can be called anything, but... :)  And according this this setup you can.  And it does work for other macros w/o issue. Victor B. said: CT TURN BTW is ancient Combat Tracker.  Gone, no longer supported.  
1621400130
And the reason for the macro is it is specific to the creature.  Not every character/npc/monster will have a per turn macro to run Victor B. said: Macro command are totally different than API commands.  Different syntax.  You can't launch a macro from CM.  You launch an API command.  Change it to work for an API and then include it into CM
1621400143
Victor B.
Pro
Sheet Author
API Scripter
Its been too long...You can launch a macro.  I forgot I supported that.  But you have a syntax issue somewhere
1621400186
Victor B.
Pro
Sheet Author
API Scripter
It works and has been working for many.  Not sure where your issue is and don't have time to debug it for you.  But there's an issue somewhere along the line.  
1621400242
And I have successfully set up API calls within CM.  For example, the blinded condition runs this macro to turn off vision on the token when it is blinded. {{!token-mod {{--api-as playeridsubstitution}} {{--ids tokenidsubstitution}} {{--off has_bright_light_vision}} }}
1621400300
No worries.  Thanks for the suggestions.  I will keep playing around with it Victor B. said: It works and has been working for many.  Not sure where your issue is and don't have time to debug it for you.  But there's an issue somewhere along the line.  
1621400407
Victor B.
Pro
Sheet Author
API Scripter
Something within your CT_TURN macro (and it can be called anything) is bombing out.  Don't know why.  Looking at the macro there's something in it causing CM to fail.  A special character, not sure, but again, I don't have time to support it or figure it out.  Try converting to an API call?   /w gm &{template:desc} {{desc=**CT_TURN** [Regeneration](!
#zRegenerate)}}
Oh I'm a dunce for missing this earlier. It's the @{selected} calls in the macro that aren't working. Those can't be passed through the API that way. You might be able to make use of timmaugh's Select Manager script to get around that, tho! I think I've seen some people successfully use it in combination with CM in this exact way!
1621401365

Edited 1621401508
Victor B.
Pro
Sheet Author
API Scripter
I didn't even see that, no you can't have a selected command in a macro.  That's how Roll20 works.  Selected in a macro won't translate to selection within the API.  
1621402058
Ok gotcha.  I guess I will keep going with just displaying a menu of options in the macro then.  Thank you very much for the help.  Really appreciate it.
1621404302

Edited 1621404330
I'm pretty certain Select Manager will do the trick. I think all it takes is starting the command with !forselected token-mod instead of !token-mod .
Persephone said: I'm pretty certain Select Manager will do the trick. I think all it takes is starting the command with !forselected token-mod instead of !token-mod . Yep, I use Select Manager and it works great. Example: --@forselected+|cmaster _add,condition=minor scar
1621426748

Edited 1621428259
Oh, the syntax changed a lot since I last used it! Oops. EDIT: Ah, wait, that's just the syntax required for Scriptcards, right? So the syntax I suggested ought to work for this scenario, @Darryn :)
Persephone said: Oh, the syntax changed a lot since I last used it! Oops. EDIT: Ah, wait, that's just the syntax required for Scriptcards, right? So the syntax I suggested ought to work for this scenario, @Darryn :) *smacks head* This is what I get for posting too quickly before I've had coffee. :) You're right, I was using Scriptcards syntax. My bad!
1622058109
Is there a workflow or best practices for Combat Master?  I ran my first game last weekend, but had a lot of trouble using CM.  I'm pretty sure it's just me, but I was just wondering if anyone had tips they have found that make CM smoother.  Thanks in advance
@Darryn what kind of trouble? If you're playing 5e I think CM is defaulted to simple condition tracking for that system right out of the box. I do recommend making a few macro shortcuts for the main CM commands like the main menu, show conditions, settings, and hold combat.
1622311511
Well, the specific issue I was having was the conditions were not showing up as I moved to the next attacker.  Mind you it was my first time running a game on roll20, and I probably bit off more than I should LOL.  I do think I am going to make a macro to help with conditions (and make the players track/apply their own).  I was just really wondering if there were any tips people have found using the script.  I'm prepping my 2nd one shot (all designed to help me get ready to run a full campaign) so I will be trying the API again. Persephone said: @Darryn what kind of trouble? If you're playing 5e I think CM is defaulted to simple condition tracking for that system right out of the box. I do recommend making a few macro shortcuts for the main CM commands like the main menu, show conditions, settings, and hold combat.
1622906975
I cant manage to get any kind of command for set up to work. as well as generating an error i can copy if needed
1622907278
For reference, the error message generated was:  RangeError: Maximum call stack size exceeded RangeError: Maximum call stack size exceeded at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1330:9) at processMultiOps (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:804:7) at Object.d20.textchat.doChatInput (eval at <anonymous> (/home/node/d20-api-server/api.js:158:1), <anonymous>:1128:4) at sendChat (/home/node/d20-api-server/api.js:1867:16) at makeAndSendMenu (apiscript.js:15022:9) at nextRound (apiscript.js:14769:13) at doTurnorderChange (apiscript.js:14609:17) at nextTurn (apiscript.js:14743:9) at nextRound (apiscript.js:14779:13) at doTurnorderChange (apiscript.js:14609:17)