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 .
×

The new D&D 2024 sheet is now available!

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

I'm having the same issue...Installing it from the API menu is still installing the Alpha version and I'm too much of dumba$$ to install from the Github page
Yeah, the one-click seems to be messed up. I'm just installing it manually, based on when Victor updates it.
If you remove --main from the link it won't bring it up in chat. Setup and things like that will but the main part for next turns and adding conditions won't. You can also copy and paste the menu from chat into the handout so if it less typing but you will still have to edit the links. Thomas H. said: Kilter said: You can make a handout that link to all the macro or API commands.  i.e. In the Hand out type Main Menu highlight it, then select add link. in the link put `!cmaster --main and so on.. This still displays the !cmaster --main menu in the VTT chat. What I'm wondering is if there is a way to to make the !cmaster --main display appear in its own popup. That way I don't have to open it up in the VTT chat over and over whenever I needed it, just have it on hand.
Hey, good evening Is it possible to add the condition to a token through Target? I tried tokenmod but I encountered a problem. My macro is something like: !token-mod --ids @{target|Condition target?|token_id} --set statusmarkers|?{Choose Condition|Hidden,green|Persistent Damage,red:?{Value|0}} So, supposing the token already has a Persistent Damage 2 (red 2), if i try to change to red # that is not 2, it just goes to red without a number. Is there a way to @target in the combat master api? I also tried !token-mod --ids @{target|Condition target?|token_id} --set statusmarkers|?{Choose Condition|Hidden,green|Persistent Damage, -red| red:?{Value|0}} but also doesnt work. Thanks in advance.
@Lucas, you're missing the --api-as parameter in the TokenMod command. See the Macro & API Help for more about that. Also @Victor, I realized Player Ribbon dependency isn't mentioned anywhere in Help. Not sure where it should go. Any ideas?
1590975491
Victor B.
Pro
Sheet Author
API Scripter
@everyone, no more changes.  Only fixes at this point.  
1590975563
Victor B.
Pro
Sheet Author
API Scripter
The "Alpha Version" isn't correct.  It may be I didn't update the JSON file correctly so it's showing alpha, but it's not.  Don't focus on that. 
1591113865

Edited 1591196153
Didn't see this posted before but did find one small minor bug: In the Macro & Api Setup: clicking the trash can to delete a substitution string cause the menu to re-post and does not delete the item.  Edit: I'm not so sure this was bug a result of how CM filters for certain characters such as ? " ' and ,.  These seems to also affect descriptions as well as any text gets truncated when it encounters the first symbol it finds.  I was able to solve it by looking at the command and found it was leaving the very thing i wanted to delete blank so ran it manually with the ? and it worked.
1591119606

Edited 1591120607
Don
Pro
Token Mod and Combat Master Syntax question I want to have bar3 reset for each token automatically at the begging of their turn. So the token mod command I would use would be !token-mod --set bar3_reset| For Combat Master, I cant seem to get this to work, I tried putting it in turnorder:  beginning of each turn: api; likely its a syntax thing {{!token-mod {{--set bar3_reset|}}}} doesn't seem to work for me. -nm - solved below -
For others like me I'll type this, now that I realize my errors: more commands are needed within the tokenmod command - as well as the substitutions in the macro and api portion of combatmaster this worked: {{!token-mod}} {{--api-as playerid}} {{--ids tokenid}} {{--set bar3_reset|}} with playerid and tokenid being set up as a substitution in the API/Macro part of the menu
Hi...thank you for this.... unfortunately NOTHING HAPPENS when i type !cmaster in the chat ...i downloaded the one from the main first - did nothing...then downloaded directly from your site - still doin nothing     please help my game starts in hours
1591122426
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Try !cmaster --main
1591125949

Edited 1591126409
GM
Pro
keithcurtis said: Try !cmaster --main Thank you sir!!!   i'd give you a lama badge if i could Also is there a list of commands? for the chat
1591127168
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Probably in the help documentation. You can click in the "i" logo in the header of any CM menu or call it up in the help handouts (they are hiding in your archived journals). Also, you can run any clickable command and press the up arrow in your chat input to see the code that was sent.
Persephone said: @Lucas, you're missing the --api-as parameter in the TokenMod command. See the Macro & API Help for more about that. Thanks for the reply. I tried using it but couldnt understand it. Can you help me with it? I tried but dont know how to use the target command with the substitutions.
1591191587

Edited 1591191625
Victor B.
Pro
Sheet Author
API Scripter
Token Mod works on a token id.  So you need to add --api-as parameter so TokenMod knows that it's being called by another API and not directly.  Secondly, there's a --ids in TokenMod which accepts a token id.  So put into your command --ids tokenidentifier.  Then in Substitutions, add a substitution for Token ID called tokenidentifier.  CM will look at the command, the tokenidentifier and replace tokenidentifier with the actual token id.  
1591197990

Edited 1591198136
Lucas X.
Translator
Victor B. said: Token Mod works on a token id.  So you need to add --api-as parameter so TokenMod knows that it's being called by another API and not directly.  Secondly, there's a --ids in TokenMod which accepts a token id.  So put into your command --ids tokenidentifier.  Then in Substitutions, add a substitution for Token ID called tokenidentifier.  CM will look at the command, the tokenidentifier and replace tokenidentifier with the actual token id.   Oh I got it to work, thank you very much!
Actually, it worked only with the default markers, is there a way to make it work with the other imported token markers? Or maybe the code I wrote isnt actually correct? !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|?{Choose ConditionPersistent Damage,skull:?{Value|0}|Hidden,green}
1591208412
Victor B.
Pro
Sheet Author
API Scripter
Hmmm, I'm not sure on that one.  I know TheAaron has integrated libTokenMarker with TokenMod.  You'll need to check the TokenMod help to see if you can reference a custom icon.  
I'm running into an issue when trying to disable having the turn tracker show up on the token. It still shows even when set to false but the text under the token itself is not bolded and red. This is using the latest when installed from roll20 API scripts menu.
Apologies to post about this again but I'm still having trouble configuring a macro to run at the beginning of each round  / at the start of combat. I'm trying to use the feature to present a score card of combat health totals (most likely a powercard) but it seems like my set macro (a global macro with a case sensitive name) isn't registering at all. I use group-init and cmaster's group-init setting if that is in any way relevant. Also, as others have said, this is an absolute gamechanger of a script! Thank you for all of the work you've put in to this amazing contribution.
Lucas X. said: Actually, it worked only with the default markers, is there a way to make it work with the other imported token markers? Or maybe the code I wrote isnt actually correct? !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|?{Choose ConditionPersistent Damage,skull:?{Value|0}|Hidden,green} If you are going to be applying a status marker using token-mod and it is a custom marker you will need to get the id code for it. Use !token-mod --help command and scroll up till you find your marker that you want. You want to use the code in the [ ] (Ex  Bloodied::243574  ), these codes are different for each game that the markers are used in.
Snow said: If you are going to be applying a status marker using token-mod and it is a custom marker you will need to get the id code for it. Use !token-mod --help command and scroll up till you find your marker that you want. Hey, thanks for the help. Unfortunately, it still didnt work: The token goes back to no number after i try to alter it's number while it already has a number. I used the token id's from my game of course, but i will give an example using yours: !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|?{Choose Condition|Dazed,Dazed::243532:?{Value|0}|Panicked,Panicked::243550} Using this command, when adding the Dazed condition with a value of 2 or more, it works. Then I try to apply it again, now changing to another number, the number just vanishes.
So for the Pathfinder 2 official sheet, initiative attribute is defined as dynamic field, since it is dependent on which skill is currently selected for initiative by the player plus any bonus. If I use this initiative attribute in this script, it crashes the Combat Master.  Using a static skill like perception works fine. Using the Group Initiative script, it works, so apparently this can be done.
Lucas X. said: Snow said: If you are going to be applying a status marker using token-mod and it is a custom marker you will need to get the id code for it. Use !token-mod --help command and scroll up till you find your marker that you want. Hey, thanks for the help. Unfortunately, it still didnt work: The token goes back to no number after i try to alter it's number while it already has a number. I used the token id's from my game of course, but i will give an example using yours: !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|?{Choose Condition|Dazed,Dazed::243532:?{Value|0}|Panicked,Panicked::243550} Using this command, when adding the Dazed condition with a value of 2 or more, it works. Then I try to apply it again, now changing to another number, the number just vanishes. I am not sure this is possible with combatmaster and Tokenmod. I did do some testing and while tokenmod allows you to specify a number on the token and the number will appear on that statusmarker you designate. However with combat master running it appears to intercept this and only accept the first value. If  you change it any other value it replaces it to 0, and displays statusmarker as though there were no number on it.  To understand what was happening I turned off combat tracker and just tokenmod. I passed a command of !token-mod --set statusmarkers|Dazed::2073424:?{how many (0-9)}  and each time the statusmarker changed as expected. When i turned combatmaster then the behavior is as you described and consistent with how I tested. The only work around I can think would be first to remote statusmarker first then when the new command is run it will place the value you want. Example in a macro: !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|-Dazed::243532 !token-mod --api-as --ids tokenidentifier @{target|Condition target?|token_id} --set statusmarkers|?{Choose Condition|Dazed,Dazed::243532:?{Value|0}|Panicked,Panicked::243550} Note it has to be in macro or passed in chat, with first line being able to remove the condition.
1591475549

Edited 1591475643
Ian M. said: So for the Pathfinder 2 official sheet, initiative attribute is defined as dynamic field, since it is dependent on which skill is currently selected for initiative by the player plus any bonus. If I use this initiative attribute in this script, it crashes the Combat Master.  Using a static skill like perception works fine. Using the Group Initiative script, it works, so apparently this can be done. Combat Master and Group-Init integrate; so merely select Group-Init as your Initiative handler instead of CM in CM's settings. You'll be able to roll and handle your initiative, and have all the beauty that is CM.
1591478705

Edited 1591480914
Quick question: I tried to set up an API/Macro substitution, but I messed it up. I'm trying to delete it, but no matter how many times I click on the trashcan, it won't go away! I've added additional substitutions, and those delete just fine, but the first one I created won't delete. Any help is appreciated. *Edit* I'm also trying to make it so when I remove the Guidance condition, a TokenMod api triggers that removes the Concentration status from the caster. Right now this is what I have: !token-mod --name [Character Name] --set statusmarkers|?Concentration:0
1591541772
Victor B.
Pro
Sheet Author
API Scripter
I'll look into the trashcan issue on API/Macro.  That's been reported before.  
1591589636

Edited 1591590465
Hi.  Quick question and/or feedback.  Is there functionality (or is it planned) to add tokens individually to initiative via Combat Master?  I currently use GroupInitiative and Turn Tracker 1, which allows me to add tokens by group or individually.  This is helpful because sometimes/often tokens are not in a nice group to be selected and added all at once.  They might be further apart on a map, and very often (for me) some tokens are on the GM layer.  Combat Master doesn't seem to be able to handle generating initiative under these conditions?  If I'm wrong please correct me! I'd use GroupInitiative or add tokens manually, but the turnorder functionality in Combat Master seems a little wonky in the beginning of combat when generating initiative using those methods.  Seems to skip the first person in initiative and/or get it out of order.  Maybe I'm doing something wrong.  I'm trying this script because StatusInfo is unsupported and my TokenMod macro that I use to apply conditions using StatusInfo is now producing errors.  I may just use this script for conditions I suppose. Thanks for any help.  Appreciate all the hard work! EDIT:  Also, it appears the help button for the Announcement Setup is broken.  It produces an error that requires restarting the sandbox. For reference, the error message generated was:  TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at showHelp (apiscript.js:11277:82) at commandHandler (apiscript.js:8210:7) at apiscript.js:7969:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9) at inputHandler (apiscript.js:7964: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:1648: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'm not sure if this has been covered in this discussion before, but sometimes Combat Master gets "stuck" in combat mode, where the bar at the top is green, and trying to hit the Stop Combat button returns this error: TypeError: Cannot read property 'substring' of null TypeError: Cannot read property 'substring' of null at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:892:27) at createObj (/home/node/d20-api-server/api.js:2692:23) at getOrCreateMarker (apiscript.js:17601:22) at removeMarkers (apiscript.js:17639:9) at stopCombat (apiscript.js:17338:9) at commandHandler (apiscript.js:16234:17) at apiscript.js:16091:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9) at inputHandler (apiscript.js:16086:23) at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:154:1), <anonymous>:65:16) I've tried completely reloading the github file (deleting the old file and installing a new file) and occasionally it works to fix the problem, but I seem to end up getting this error very often.
Herbie said: Hi.  Quick question and/or feedback.  Is there functionality (or is it planned) to add tokens individually to initiative via Combat Master?  I currently use GroupInitiative and Turn Tracker 1, which allows me to add tokens by group or individually.  This is helpful because sometimes/often tokens are not in a nice group to be selected and added all at once.  They might be further apart on a map, and very often (for me) some tokens are on the GM layer.  Combat Master doesn't seem to be able to handle generating initiative under these conditions?  If I'm wrong please correct me! I'd use GroupInitiative or add tokens manually, but the turnorder functionality in Combat Master seems a little wonky in the beginning of combat when generating initiative using those methods.  Seems to skip the first person in initiative and/or get it out of order.  Maybe I'm doing something wrong.  I'm trying this script because StatusInfo is unsupported and my TokenMod macro that I use to apply conditions using StatusInfo is now producing errors.  I may just use this script for conditions I suppose. Thanks for any help.  Appreciate all the hard work! EDIT:  Also, it appears the help button for the Announcement Setup is broken.  It produces an error that requires restarting the sandbox. For reference, the error message generated was:  TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at showHelp (apiscript.js:11277:82) at commandHandler (apiscript.js:8210:7) at apiscript.js:7969:25 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9) at inputHandler (apiscript.js:7964: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:1648: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) You can have Group-Initiative installed, then go into CombatMasters setup and change the Initiative from CombatMaster to Group-Initiative. With a macro you can either single target or group target tokens and add them into the turn order. It will also put them in order. The macro is !cmaster --turn,start You can end a turn with !cmaster --turn,next or end combat with !cmaster --turn,stop Stop will close the turn order and clear it.
Thanks!  I didn't know where to find macro commands for this script.  Those will help.
Has anyone had success getting a macro to run at the start of each round (including at the beginning of combat)? I'm trying to have a powercard display a general combat "update" on health totals / battle conditions.
1591738709
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Herbie said: Thanks!  I didn't know where to find macro commands for this script.  Those will help. With most scripts that have a chat menu interface, you can issue a command, click in the chat window and press the up arrow key to get the macro that was sent.
1591764272
Victor B.
Pro
Sheet Author
API Scripter
@everyone, you will get these various javascript errors out of CM depending on how you end your prior session.  If you leave it open, things can strange.  If you encounter these, restart API.  Stop combat.  Restart.  I can't fix these.  Best thing to do at end of combat is to either HOLD combat or STOP combat.  You may be switching pages, which will screw up CM.  You may be doing a host of things.  Simply restart the API server to start from there.  If error persists, stop combat and then restart.  
Hey all, First, I want to thank @Victor for creating this. Thank you for your time and effort spent into this. I'm spending a lot of time working on things to make it work great for the players in my campaign—as a non-programmer who is barely able to understand how these types of things work, I can't imagine how much comparative time you've spent and are continuing to spend building and maintaining such a complicated beast. Second, I'll note that I've read everything in this thread, lightly glossing over things that were very specific or redundant (the nth instance where an individual had a similar question as before—not insulting them, just a funny observation). That being said, I've gotten fixated on one thing, and although I know @Victor has said "no more changes, only maintenance," I figured I'd post about it in case he (or another) mercifully helps me: Concentration! I know there isn't an official implementation or support for them, but I have been using the user-made APIs posted in the thread. There were two that I saw here; one by @KeithCurtis and a later one by @VictorB. I also saw @Persephone engaging in the comments about them and testing them. Keith's script ( KeithCurtis CON roll20forum  - scroll down a bit until you find the code)  short, sweet, and to the point. It does dutifully detect if a token has the appropriate "concentration" marker (delineated by CombatMaster), and whispers the GM when said creature receives damage, automatically calculating the CON save DC per D&D5e rules. I modified it slightly so that it sent said message in chat, rather than as a whisper, so that the player in question could click the button to make the save. Again, this works perfectly at what it is doing, but it doesn't automatically add concentration to tokens when their character sheet clicks off a spell that instills concentration (aka has the {{concentration=1}} field) . This is not an error of Keith's code—it just wasn't the goal of the code. I can account for this, the hard way, by just adding a token-mod script to every spell in the game on every character sheet I'm using, but that's obviously a tedious task for something that just amounts to "hey, dummy, remember to click the button"—hence my desire to find a way to filter by the {{concentration=1}} field and automate this. Victor's script ( VictorB CON github ) This one is so daunting that I'm at a loss as to where to even begin to make the tweak(s) I'm interested in taking care of. This script beautifully checks if a spell is cast with a {{concentration=1}} field, and then automatically marks said token and outputs a little notification to chat! I'm completely happy with that—works as intended. However, when said script was initially posted into this thread, @persephone rightly pointed out that, despite seeming to have code trying to detect if a token is damaged, the script doesn't seem to follow through and accomplish anything when the creature receives damage. So, TL;DR I'm wondering if there is any chance anyone could help me with any of the following questions: Is there any chance I could just change a couple lines of code in Victor's script to get it up and running? If so, could someone help me solve that? Or even point me in the direction of resources that could allow me to solve that on my own? This is . . . javascript? Right? I don't even know where to get started. If not, is there any way I could cut the parts currently not working such as to avoid any API clashes, and thereafter just use KeithCurtis' script and a fragment of VictorB's? Am I overthinking things? Will they just "play nice" to begin with? (obviously trial-and-error would elucidate this) Like I said, I have no clue with this stuff. Would anyone likeminded but far more skilled with API be willing to undertake this crusade and get VictorB's CON script (linked above) troubleshooted*? Or maybe the problem exists between keyboard and chair and they can help me solve that, alternatively. *as an aside, is the past tense of "troubleshoot" . . . "trouble shot" ??
1591919300
Angelo
API Scripter
just trying to use this for the first time (copying the code from git), found a bug: when adding a condition if you edit the description and your new description has commas it will get cut at the comma position, looks like a parser error since you are using commas for parameters
I'm an idiot, but what is the correct syntax for getting a Roll20 audio master track to play at start of round? The help says to enclose the command and each parameter in double curly braces. I've tried the following, without success. {{!roll20AM --audio,play|Sonic Blast}} {{!roll20AM {{--audio,play|Sonic Blast}}}} I know I'm missing something.
Jay R. said: I'm an idiot, but what is the correct syntax for getting a Roll20 audio master track to play at start of round? The help says to enclose the command and each parameter in double curly braces. I've tried the following, without success. {{!roll20AM --audio,play|Sonic Blast}} {{!roll20AM {{--audio,play|Sonic Blast}}}} I know I'm missing something. {{!roll20AM}} {{--audio,play|Sonic Blast}}
Angelo said: just trying to use this for the first time (copying the code from git), found a bug: when adding a condition if you edit the description and your new description has commas it will get cut at the comma position, looks like a parser error since you are using commas for parameters You need to put the commas in curly brackets {{,}}
Snow said: Jay R. said: I'm an idiot, but what is the correct syntax for getting a Roll20 audio master track to play at start of round? The help says to enclose the command and each parameter in double curly braces. I've tried the following, without success. {{!roll20AM --audio,play|Sonic Blast}} {{!roll20AM {{--audio,play|Sonic Blast}}}} I know I'm missing something. {{!roll20AM}} {{--audio,play|Sonic Blast}} Hmm. I think I tried that one too and it didn't work. Will check again. Thank you! Edit: it works! Thanks again. I must not have entered it correctly the first time.
1591985223

Edited 1591985271
Victor B.
Pro
Sheet Author
API Scripter
I'll check if start of round syntax is working.  You will want to add nomenu to your commands --audio,nomenu,play|Sonic Blast
Sorry if this has been asked and answered before, but if I'm in the middle of combat and need to add a character/NPC to the turn order, is there a way to do that in CM? Or do I need to set up an 'Initiative' macro that adds them to the turn tracker manually? And if the latter, how does CM treat any new additions to the turn order?
1592005520

Edited 1592005553
Victor B.
Pro
Sheet Author
API Scripter
Group init is a quick an easy.  Simply highlight the new characters and !group-init and they get added.  You may need to resort the turnorder OR manually adjust where the new chars belong
Ok, thank you!
OK, the start of round Roll20AM call is working now, but there's one issue. At the start of combat, when players are adding themselves to initiative and I'm doing the same for monsters, my "start of round" sonic blast plays every time someone is added to initiative. I don't know that there's any way to fix this, but I just thought I'd bring it up.
Don't start combat till everyone has their character in the initiative, then if using group-init select all you monster then start combat or add everyone 1st then start combat.
Kilter said: Don't start combat till everyone has their character in the initiative, then if using group-init select all you monster then start combat or add everyone 1st then start combat. I'm a bit confused by this. I use group-init through Roll20, so when someone rolls initiative, combat is automatically started by Combat Master. Is there a way to detach initiative from combat starting up in CM? 
Jay R. said: Kilter said: Don't start combat till everyone has their character in the initiative, then if using group-init select all you monster then start combat or add everyone 1st then start combat. I'm a bit confused by this. I use group-init through Roll20, so when someone rolls initiative, combat is automatically started by Combat Master. Is there a way to detach initiative from combat starting up in CM?  I haven't test this but you might try having players roll init from thier sheet not using the group init from a macro or combat master. Then use combat master to trigger group init to add your monsters/npc's and it should auto sort and then start CM.