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

CombatMaster 2.0

The best I can do with this is leave a copy of the "off map" tokens on the main map, add 100 to the initiative of the "off map" tokens (or as many hundreds needed to sort the all out, [if you are running combat on that many maps you may need counseling]), Switch maps only when the whole map will be involved, I usually provide a "camera" token, so the others can watch as it keeps them from mischief while "off map" combat is resolved.
Is there a Way that a combat master condition provides a token action while it is active?
1649117250

Edited 1649117272
Victor B.
Pro
Sheet Author
API Scripter
No on token action, but you can invoke an API.  Token mod for example.  Or charsetattr.  
is there a place i should look to see how to do that?
Victor B. said: Version 2.48 found here&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed the end of round marker.&nbsp; It's now showing up again.&nbsp;&nbsp; Fixing the end of round marker fixed the roll initiative each round issue.&nbsp; It's now re-rolling initiative when you set the roll each round to true under initiative menu.&nbsp;&nbsp; Going to beg TheAaron to commit to repo.&nbsp; That's a mystery to me.&nbsp;&nbsp; I'm going to take a deeper look at concentration/spells logic.&nbsp; It's a bit buggy.&nbsp;&nbsp; Has this been updated to the script in Roll20?
1649289688
Victor B.
Pro
Sheet Author
API Scripter
No one click isn't updated.&nbsp;
1649319026

Edited 1649319695
Bug: versions 2.47 (line 1106) and 2.48 (line 1104) have an error in the initialization of the state for a condition: tageted : false , "tageted" [sic] instead of "targeted". There are 2 user-level workarounds - 1. export the settings to text editor, global replace "tageted" with "targeted", then re-import. 2. toggle the "targeted" setting for all/any new condition to the desired setting (eta): second workaround added
As far as I can tell the "Use Marker" setting controls whether the players can see the markers (i.e. are they place on the token layer or the GM layer) rather than activating/disactivating the functionality Is there any way to switch the current/next turn marker functionality off so the markers are not used at all?
1649457005

Edited 1649495294
I might be missing something... I can see ways to stop the timer (timer=stop) and pause the timer (timer=pause) but no command to re-start it. What !CMaster command do I need to use to restart the timer I have paused?
For anyone having trouble with round announcements and centering on tokens I managed to get those features working by installing libline in the oneclick scripts. Some people sounded like they were having similar issues so I hope this helps others.
Francesco said: I might be missing something... I can see ways to stop the timer (timer=stop) and pause the timer (timer=pause) but no command to re-start it. What !CMaster command do I need to use to restart the timer I have paused? You should be able to do the command for "Next Turn" to restart timers (Play button)
david m. said: For anyone having trouble with round announcements and centering on tokens I managed to get those features working by installing libline in the oneclick scripts. Some people sounded like they were having similar issues so I hope this helps others. I think this problem happens when you're testing the script, but you're not on the "active" page (map).
1650345593
Victor B.
Pro
Sheet Author
API Scripter
Round announcements are working.&nbsp; Yes you need to have the player ribbon on the map you are testing against.&nbsp; A mistake made by pretty much everyone and can't be fixed due to Roll20 architecture.&nbsp;&nbsp;
I have a challenge I'm hoping to get some help on.&nbsp; I just started using Combat Master and I'm really loving it especially allowing my players to advance their own turn, what a game changer.&nbsp; I only have one issue and that is how to remove tokens from Combat Master as they die.&nbsp; I have tried moving them to the map layer, which removes them from the Roll20 turn tracker, but it doesn't remove them from combat master's advance turn function.&nbsp; So as the fight goes on, I must advance through dead tokens to get to the next live one.&nbsp; It isn't a massive issue but in some fights with lots of minions it can be a pain. Is there a command I can use to manually remove them, maybe with tokenmod?&nbsp; Do I have something setup incorrectly?&nbsp; I have not changed any settings from default.&nbsp; I don't know where the order is being stored so I am not sure how to hack it. Any help or workaround would be appreciated.&nbsp; Thanks!
1651375902
Victor B.
Pro
Sheet Author
API Scripter
In the turnorder remove the token, that removes from Combat Master.&nbsp;&nbsp;
I have a challenge there.&nbsp; I have another macro that auto moves token to the map layer when they hit 0 hp.&nbsp; It removes it from the turn order visually, but it is still there behind the scenes so Combat Master seems to continue tracking it.&nbsp; That is why I'm looking for an alternative way.&nbsp; Otherwise I have to move it back manually, remove it, then move it back to map layer.&nbsp; I was hoping for a more elegant solution or a setting that says only track token layer objects I am missing.
Adam J. said: I have a challenge there.&nbsp; I have another macro that auto moves token to the map layer when they hit 0 hp.&nbsp; It removes it from the turn order visually, but it is still there behind the scenes so Combat Master seems to continue tracking it.&nbsp; That is why I'm looking for an alternative way.&nbsp; Otherwise I have to move it back manually, remove it, then move it back to map layer.&nbsp; I was hoping for a more elegant solution or a setting that says only track token layer objects I am missing. Roll20 Architecture doesn't allow that.&nbsp; But you can simply hover over the dead guy, and hit the delete trash can on the turn tracker - everything memmed to that token is lost, you would have to roll initiative back in to do anything with the dead token once it's initiative order is deleted.
1651494051

Edited 1651494446
Trying to set it up so that when I add an Enlarged condition it uses TokenMod to increase the scale of the selected token. This is the API call I'm putting in but it's not doing anything: {{!token-mod {{--ids tokenidentifier}} {{--set scale|*2}}}} EDIT: Nevermind, forgot the playerID completely, after adding substitutions the correct API call is ofc:&nbsp;{{!token-mod {{--api-as playeridentifier}} {{--ids tokenidentifier}} {{--set scale|*2}} }}
I am having an issue with Roll each round.&nbsp; I have been using combat master for a while. I started a new campaign it will not roll each round no matter what I do.&nbsp; Even with the same version on my other campaigns (2.47) that work, it will not do it.&nbsp; I have the exact same scripts and the exact same settings on all.&nbsp; Roll each round is set to true but still works like it is set to false.&nbsp;&nbsp; And in fact when I stop and start a combat it adds combatants twice.&nbsp; for example if I have 1 PC and 1 Monster, the 2nd time i start combat I end up with 2 of the same PC and 2 of the same monster in the turn order.&nbsp; That is not a big deal but I want the "roll each round" to work.&nbsp; The only thing I notice is there is now round tracker on the one that does not work.&nbsp;&nbsp; any ideas? could it be something with the map or the PCs themselves?
Renbukai said: I am having an issue with Roll each round.&nbsp; I have been using combat master for a while. I started a new campaign it will not roll each round no matter what I do.&nbsp; Even with the same version on my other campaigns (2.47) that work, it will not do it.&nbsp; I have the exact same scripts and the exact same settings on all.&nbsp; Roll each round is set to true but still works like it is set to false.&nbsp;&nbsp; And in fact when I stop and start a combat it adds combatants twice.&nbsp; for example if I have 1 PC and 1 Monster, the 2nd time i start combat I end up with 2 of the same PC and 2 of the same monster in the turn order.&nbsp; That is not a big deal but I want the "roll each round" to work.&nbsp; The only thing I notice is there is now round tracker on the one that does not work.&nbsp;&nbsp; any ideas? could it be something with the map or the PCs themselves? Hi mate, try updating to 2.48, I believe it was fixed in that version (further up in the thread). I don't use the feature myself so not 100% sure. <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a>
1651987706
Victor B.
Pro
Sheet Author
API Scripter
2.48 fixes.&nbsp; End of turn marker which is used for roll each round wasn't correctly being set.&nbsp;&nbsp;
YES!&nbsp; thank you very much.&nbsp; thought I just might have been doing something wrong but could not figure out what.&nbsp; It is weird that it was just working in some of my other campaigns.&nbsp; Thank You!&nbsp;
Hi,&nbsp; I'm having trouble with changing my initiative attributes. It says: Initiative Attr&nbsp; ��� Accepts a comma delimited list of attributes that make up initiative. The attribute name must match the attribute names in the character sheet. So in my case that would be: 'dexterity,dexterity_bonus,alert,initiative_mod'. But when I type that in it only registers dexterity. Thanks in advance for the assistance ^^
1652413861

Edited 1652414760
Victor B.
Pro
Sheet Author
API Scripter
Look at your char sheet and make sure you are referencing the correct attributes.&nbsp; There may be a summary of values that you aren't referencing.&nbsp; You do need to reference attributes as defined in the char sheet.&nbsp; For warhammer, I referenced multiple fields, comma delimited, and it did work because warhammer 4e was very crunchy like that.&nbsp;&nbsp;
Thanks for the response. I'm not sure what you&nbsp; mean by a summary of values that I'm not referencing? The sheet has an attribute called initiative_calc which gives NaN as initiative attribute when rolled. I know that initiative_calc consists of dexterity + dexterity_bonus + alert + initiative_mod. All of those work individually as initiative attributes but, when I try to enter them all as a list it only uses the first entry on that list. So the input alert,initiative_mod,dexterity,dexterity_bonus results in only alert being used as an initiative attribute. I'm using Pokerole Vesion 2 as my sheet btw (in case that helps)
1652480822
Victor B.
Pro
Sheet Author
API Scripter
I seem to remember that to use a summary field, it can't be a field that a char sheet calcs, it has to be a sheet worker.&nbsp; This is coming back to me.&nbsp;&nbsp; Make sure that none of those fields are calced fields.&nbsp;&nbsp;
1652741400

Edited 1652741576
I figured it out! As I'm quite new to API stuff, I didn't realize that I had to use {{...}} to make a list. Now I won't ever forget I guess ^^ Anyway, thanks for the help (even though it wasn't that useful to my noobish mistakes)
Hi, I just installed the CombatMaster API and I'm not seeing a round counter when I start combat. All I've done so far is configure some conditions, any idea what might be causing this?&nbsp;
Never mind. I installed the version from GitHub and it resolved the issue.&nbsp;
1654225219
Victor B.
Pro
Sheet Author
API Scripter
make sure the player ribbon is on page your are testing
How can I get CM to look at concentration from the 5olg character sheet?
1656406871
Victor B.
Pro
Sheet Author
API Scripter
It will.&nbsp; Reach out to me.&nbsp;&nbsp;
For Concentration - do I still need to Concentration API? I tried CM default and applied the marker to it, token took dmg and nothing happened. The other api used the overdrive marker, once applied, if token took damage, it will state to roll a concentration check and provide the appropriate DC.&nbsp; I want that feature working with CM
Is there a way to pass in the token ids on this command? !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} If not, can a way be added?&nbsp; I have an API I am working on that will take setting the condition of a character on DNDBeyond, using the Beyond20 extention, when the /em &lt;Condition&gt; message comes across I want to automictically apply the condition to the token, but the token is not selected and can't be through the API.&nbsp; I've looked at Select Manager to do this, but have never been able to make this work. Something like this !cmaster --ids -MaVv0IALIj6_SZ-sbtM --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} Or !cmaster --ids @{target|token_id} --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0}
@Darren: SelectManager should do this. What command line have you tried using that syntax?
1657564931
timmaugh
Pro
API Scripter
Darryn said: Is there a way to pass in the token ids on this command?... &lt;SNIP&gt; ...&nbsp; I've looked at Select Manager to do this, but have never been able to make this work. Something like this !cmaster --ids -MaVv0IALIj6_SZ-sbtM --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} Or !cmaster --ids @{target|token_id} --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} If SelectManager is installed and if this is a valid CombatMaster call: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} ...Then... SelectManager should work with any of the following: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select -MaVv0IALIj6_SZ-sbtM} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select @{target|token_id}} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select Bob the Hirsute}
Well... thanks! LOL.&nbsp; I've never seen such a concise example for Select Manager.&nbsp; I've been trying to use the !forselected and add the tokens to the list which was not working.&nbsp; I will give this a try.&nbsp; Thanks a Lot!!! timmaugh said: Darryn said: Is there a way to pass in the token ids on this command?... &lt;SNIP&gt; ...&nbsp; I've looked at Select Manager to do this, but have never been able to make this work. Something like this !cmaster --ids -MaVv0IALIj6_SZ-sbtM --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} Or !cmaster --ids @{target|token_id} --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} If SelectManager is installed and if this is a valid CombatMaster call: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} ...Then... SelectManager should work with any of the following: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select -MaVv0IALIj6_SZ-sbtM} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select @{target|token_id}} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select Bob the Hirsute}
One other question.&nbsp; Is there a way to send @{target|token_id} to the chat from the API?&nbsp; It is stripping off the @{} parts timmaugh said: Darryn said: Is there a way to pass in the token ids on this command?... &lt;SNIP&gt; ...&nbsp; I've looked at Select Manager to do this, but have never been able&nbsp; !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select -MaVv0IALIj6_SZ-sbtM} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select @{target|token_id}} !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select Bob the Hirsute}
1657634085
timmaugh
Pro
API Scripter
Any time those characters are encountered by the Roll20 parser, it's going to try to resolve an apparent call to retrieve information. What are you hoping to accomplish? Maybe there's another way to get there...
When a player casts Bless/Bane/etc, I want them to be able to click on the tokens they want to apply it to and have CM apply the correct status icon (with duration also) and the only way I know how is to use @{target_token_id} since players can't select tokens they don't control.&nbsp; I could put that into a macro and have that called as well, I was just trying to clean up the (seems like) hundreds of macros I have Can they be replaced with ASCII or HEX codes?
1657636664
timmaugh
Pro
API Scripter
I guess I'm not understanding, though... If you have this line stored as a macro: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select @{target|token_id}} ... and you send that macro to the chat, you should get the prompt for targeting. Roll20 will turn your click into the return value for removing the @{target} structure, and your line will effectively look like this: !cmaster --add,condition=concentration,duration=?{Duration|1},direction=?{Direction|0} {&amp;select -MaVv0IALIj6_SZ-sbtM} Then SelectManager uses that {&amp;select} structure to add the token matching THAT ID to the selected tokens for the message. Then CombatMaster gets the message with that token apparently "selected." The only way this doesn't work is if you call this command line from a script... in that case, there is no "source player" who can see and respond to the targeting request, so nothing gets populated to that part of the line. If that's not what you have going on, then help us understand how you are currently storing and calling this command line, what the resulting behavior is, and how that differs from the behavior you expect or want to see.
1657648213

Edited 1657648325
What I want to be able to do is send this from the API&nbsp; sendChat('','/w &lt;charname&gt;&nbsp;[Click To Bless](!cmaster --add,condition=bless,duration=10,-1 {&amp;select @{target|token_id}})'); But when I do it does I get this.&nbsp;&nbsp; I'm not sure that what I want to do is possible with CM (thus the discussion in the other chat about token mod instead).&nbsp; I think I could make this a macro though and call the macro instead and leave the difficult stuff there. sendChat('','/w &lt;charname&gt;&nbsp;[Click To Bless](&amp;#13;#Condition-Bless)');
1657648494

Edited 1657649696
timmaugh
Pro
API Scripter
ah... for that you'll want to encode (or double encode) those characters. I use Aaron's handy function for this... &nbsp; &nbsp; const HE = (() =&gt; { &nbsp; &nbsp; &nbsp; &nbsp; const esRE = (s) =&gt; s.replace(/(\\|\/|\[|\]|\(|\)|\{|\}|\?|\+|\*|\||\.|\^|\$)/g, '\\$1'); &nbsp; &nbsp; &nbsp; &nbsp; const e = (s) =&gt; `&amp;${s};`; &nbsp; &nbsp; &nbsp; &nbsp; const entities = { &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&lt;': e('lt'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '&gt;': e('gt'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; "'": e('#39'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '@': e('#64'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '{': e('#123'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '|': e('#124'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '}': e('#125'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '[': e('#91'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ']': e('#93'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '"': e('quot'), &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; '*': e('#42') &nbsp; &nbsp; &nbsp; &nbsp; }; &nbsp; &nbsp; &nbsp; &nbsp; const re = new RegExp(`(${Object.keys(entities).map(esRE).join('|')})`, 'g'); &nbsp; &nbsp; &nbsp; &nbsp; return (s) =&gt; s.replace(re, (c) =&gt; (entities[c] || c)); &nbsp; &nbsp; })(); Then just feed whatever needs encoding to that function: let outputmsg = '/w &lt;charname&gt; [Click To Bless](!cmaster --add,condition=bless,duration=10,-1 {&amp;select @{target|token_id}})'; sendChat('',HE(outputmsg)); If something needs to be double encoded, just feed the output of the function to itself: sendChat('',HE(HE(outputmsg))); EDIT: You might only need to encode the command line portion of that line (because you want the brackets that establish the button syntax to be processed... so your usage might look more like: let outputmsg = `/w&nbsp;&lt;charname&gt; [Click To Bless](${HE('!cmaster --add,condition=bless,duration=10,-1 {&amp;select @{target|token_id}})')}`; Air-coded, again, but that should be right.
1657648628

Edited 1657648726
timmaugh
Pro
API Scripter
If you call a macro from CM (or any script), it will be an API-generated message, and there will be no user who can answer the targeting question. To utilize that functionality, you'll need to have the user execute the command (like you're talking about doing with giving them a button from a new API). The button click will generate a message from THAT user, and they will get the targeting interface.
Hello, I'm sorry but is there no tutorial for this script? Am I missing something? I'm a DM who has used various API's so I'm used to process, I just don't write my own. I'm mostly just trying to get concentration to work, the description says that it will notify in need of con save etc, and that it has all these features, I see settings but nothing explaining how they work. For example I have some basic questions I can't find answers for, how does CM know that a spellcaster is being attacked (or loses hp) and then is in need of con save? Does CM auto add the Concentration setting when a caster casts a spell that needs concentration?&nbsp;&nbsp; How does the targeted/targeted caster work and what do they mean? Even basic things like what does overrride mean? How can I import things like bless? If there is a document that I'm missing I would so love to see it! This API looks amazing but I'm so lost. Thanks for any help
There is a tutorial in this thread for the concentration setting, just not sure where. plus the help menu at the top (the circle with the I in it.)&nbsp; The concentration set up is been a struggle for a few people. That and make sure the player ribbon is on the page you are working on.
1658534187
Victor B.
Pro
Sheet Author
API Scripter
Each menu has an info icon in the upper right corner.&nbsp; Click on it and you'll get a tutorial for that panel
1658607793

Edited 1658608228
Sorry I missed the i, I thought it was only for certain menus. Yeah I saw the player ribbon issue when I was reading through the thread but thanks! And thanks for your quick response! I have some follow up issues though if you don't mind? I looked at the tutorial and it shows this: I'm somehow missing the Auto Add Spells option, any advice? I have a druid in my party and I've been experimenting trying to get moonbeam to work but I'm not sure how to proceed. One other follow up where I'm not sure if I'm doing something wrong, I've added Bless and it looks like this, note the duration and direction. But when I add to token through the CM and then go through my turns the ticker doesn't count down. Any help, as always, is super appreciated!