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

1633403867
Victor B.
Pro
Sheet Author
API Scripter
Invite me to game and when I'm in, promote me to GM.  I'll take a look.  
1633410409

Edited 1633410421
Victor B.
Pro
Sheet Author
API Scripter
Also make sure that you have libTokenMarker installed.  
Victor B. said: Also make sure that you have libTokenMarker installed.   It happened again multiple times in another game I DM'ed yesterday: I have left the game intact and invited you to it 
1633712555
Victor B.
Pro
Sheet Author
API Scripter
What were you doing when you received that error.  I started up your combat and was able to step through without issue.  
1633878246

Edited 1633878305
Victor B. said: What were you doing when you received that error.  I started up your combat and was able to step through without issue.   The problem for me is reproducable every time by stopping combat. Shortly after stopping combat (10 seconds), all scripts stop working. I'll try and disable every script I have one by one until only yours is left to see if there is a script that doesn't play well with yours
Good morning/day/evening to you all, fellow API enthusiasts :-) I'd like to ask (if I may) anyone who is interested in this feature... <a href="https://app.roll20.net/forum/post/10432957/a-gm-only-popup-that-simply-says-your-api-sandbox-has-crashed/" rel="nofollow">https://app.roll20.net/forum/post/10432957/a-gm-only-popup-that-simply-says-your-api-sandbox-has-crashed/</a> ...if you would be willing to help us both out by upvoting it? :-)
1634016246
Hi there. I don't understand why but the command "! Cmaster --help" or "! Cmaster --main" does not work for me. I put it on and just nothing happens. I've been trying for hours to make it work. Can somebody help me?
1634019370

Edited 1634019620
Victor B.
Pro
Sheet Author
API Scripter
@Jugsof Holiness, your apis are working fine.&nbsp; You need to roll INIT before launching combat.&nbsp; You have auto-init set to off.&nbsp; So players have to roll.&nbsp; Read the help file.&nbsp; If you don't have combat master rolling it or you don't use group-init, then there's no turnorder and CM won't start without a turnorder established and it does kick out an error message which you have not noticed.&nbsp; When I set CM to roll init, it worked fine.&nbsp;&nbsp; Again read the help files.&nbsp;&nbsp;
1634019506
Victor B.
Pro
Sheet Author
API Scripter
@edio, !cmaster --main.&nbsp; No space between the exlamation mark.&nbsp; !cmaster --help does nothing.&nbsp; In game menus provide a help icon for each menu.&nbsp; Read them
1634056216
Victor B. said: @edio, !cmaster --main.&nbsp; No space between the exlamation mark.&nbsp; !cmaster --help does nothing.&nbsp; In game menus provide a help icon for each menu.&nbsp; Read them Thanks! It already works, although I would swear I tried it too. Is there a way to make the concentration counter go down per round? I have it set like this:&nbsp; <a href="https://gyazo.com/b15b160b01a4e8fce80e28e01fb75d95" rel="nofollow">https://gyazo.com/b15b160b01a4e8fce80e28e01fb75d95</a>
1634087338
Victor B.
Pro
Sheet Author
API Scripter
Assuming you are using the full concentration,&nbsp; for the concentration spell, set concentration to false.&nbsp; Set concentration to true for all spells that require concentration such as bless.&nbsp; Set override to false for all these other spells.&nbsp; When caster casts bless, for example, it auto puts a concentration on the caster that will count down by the spell that caused it.&nbsp; You then select the targets for the spell and it auto-places bless, or whatever, onto the targets.&nbsp;&nbsp;
1634691418
Gage
Pro
Is there any way to set it up so that, when 'next turn' is clicked, it selects the token for the character who is at the top of the initiative? Maybe it would be better to explain what I'm trying to do. I like to use the chat menus for NPCs, so I'm trying to figure out a way (using CombatMaster or any other API/macro combo) to set it up so that, whenever a 'new turn' is initiated, a 'chat menu stat block' is generated for that character/token. I tried to do this by setting up a 'chat menu stat block generator' macro to auto-trigger on new turn in CombatMaster, but then realized that, while it does center the token on the screen, CombatMaster doesn't select the token. This breaks my macro, since it references selected_token in its calls. Another solution I considered but couldn't figure out: maybe there's a way where, instead of referencing 'selected token' to pull stats, I could somehow have the macro reference 'character/token whose turn it is'? If anyone knows of something that works universally that'd be great, but I really only need it to work for NPCs. For reference this is 5e OGL.
1634709988

Edited 1634710018
Victor B.
Pro
Sheet Author
API Scripter
Put the macro syntax into this thread.&nbsp; Selected feature is purely a roll20 thing.&nbsp; Select token, apply macro.&nbsp; CM has the ability to execute the macro against the token that is active in the turnorder but it depends on what you are launching and it's flexibility.&nbsp;&nbsp;
1634840682

Edited 1634840752
There's a couple ways to do this, the most straightforward of which (IMHO) is to use SelectManager and Fetch (two different APIs available on One-Click). You can then modify your scripted menu to use @(selected.&lt;attribute name&gt;) in place of @{selected|&lt;attribute_name&gt;} and add a {&amp; select &lt;token identifier substitute from CombatMaster 2.0&gt;}&nbsp; --&nbsp; this involves very little change to your script, most likely. Then, you can configure CombatMaster to run your macro at the start of each turn. Gage said: Is there any way to set it up so that, when 'next turn' is clicked, it selects the token for the character who is at the top of the initiative? Maybe it would be better to explain what I'm trying to do. I like to use the chat menus for NPCs, so I'm trying to figure out a way (using CombatMaster or any other API/macro combo) to set it up so that, whenever a 'new turn' is initiated, a 'chat menu stat block' is generated for that character/token. I tried to do this by setting up a 'chat menu stat block generator' macro to auto-trigger on new turn in CombatMaster, but then realized that, while it does center the token on the screen, CombatMaster doesn't select the token. This breaks my macro, since it references selected_token in its calls. Another solution I considered but couldn't figure out: maybe there's a way where, instead of referencing 'selected token' to pull stats, I could somehow have the macro reference 'character/token whose turn it is'? If anyone knows of something that works universally that'd be great, but I really only need it to work for NPCs. For reference this is 5e OGL.
1635027475
I have tried many variants but am unable to get the concentration functionality to work. More specifically... when I cast a spell from the character sheet that is marked as concentration, text appears in the chat showing the concentration condition description and also the spell description (in this case bless). The chat also shows the "select targets and click" message, which I do. However while the spell condition marker is added to the token the concentration one is not. Additionally if I remove HP from the character (tried both Bar1 and the character sheet) no concentration Save message is shown. Here are some screenshots should they help: Combat Master - 1 - Concentration Condition Combat Master - 2 - Concentration Setting Combat Master - 3 - Concentration Spell Cast Does anyone know what I might be missing/have overlooked? Thanks in advance!
1635028560
Victor B.
Pro
Sheet Author
API Scripter
That looks good.&nbsp; Try changing the notify in concentration menu to gm rather than character.&nbsp; There might be a bug notifying the character
1635029111
No joy alas, it doesnt seem to make a significant difference. If it matters... this is me testing at the moment, not the player doing it.
1635030738
Victor B.
Pro
Sheet Author
API Scripter
Send me pm with a game invite and promote me to gm once I'm in.&nbsp; I'll take a look
1635085257
Thanks Victor! Awesomely quick response and resolution, much appreciated!
1635115816

Edited 1635152883
CombatMaster is brilliant, but after setting my own image marker External URLs, i found the need add some extra width to the images. The fixed 0.35 width factor was made configurable by adding a few lines of code in just 4 locaties. Have merged this with your Victor B. 2.42 version into a 2.43 version and made a pull requests for the next one click repository pull.
1635119244
Victor B.
Pro
Sheet Author
API Scripter
Somewhere at some point, I thought I put support for the external URLs into it.&nbsp; But if you've got some code to add, feel free.&nbsp; Love it
1635175246

Edited 1635180198
really love the way how InitiativeTrackerPlus highlights the token with the current turn by rotating the marker. AFAIK InitiativeTrackerPlus and CombatMaster cannot be loaded at the same time. As CombatMaster is the better 'total package', i added the rotation of the marker to CombatMaster. A pull request has been made, probably it's available in the One Click on wednesday. In the screenshot you can see an animated marker and the new configuration in the Turnorder Setup: Marker Size - you can set the size of the marker here as factor of the token size Animate Marker - toggle to start/stop animation Animation Angle Step - the number of degrees the marker is rotated every tick Animation Angle Wait - the number of milliseconds between rotations.
1635181695
Does this mean the next auto-pull will update to the rotating tracker?
1635207450

Edited 1635207466
Victor B.
Pro
Sheet Author
API Scripter
Keep it up love it.&nbsp; Did you change the default tokens for new installations...don't care if you did.&nbsp;&nbsp;
1635221359
I'm sorry if this question has been asked several times, but I am rather new to DMing on Roll20 and using any API/scripts and I don't really understand much of this but I was watching a Nick Olivo video on using token mod and status info for setting status markers. Which is great, But I purchased a set on the R20 market that I like and I'm not sure how to call those into a script. Nick directed me to this thread but everything I read is very confusing as I'm not a coder. Is there a video anywhere that explains this or a step by step direction on how to call a different set of status markers?&nbsp;
1635258682
Status Info is a pretty defunct script. CombatMaster 2.0 is largely an overhaul of that script together with two other older scripts (CombatTracker and Concentration) which are also no longer updated. One script you'll want to make sure you have installed is libTokenMarkers. You will also need to ensure that your token markers are manually added to your game: you can do this by going to your game's home page and adding the sets using the buttons on the right-hand side of the page where it says "Token Marker Sets." You should also reload the page for your VTT (I've found that the custom markers don't always load right the first time). You can verify that the token markers are loaded correctly by trying to set them manually from the token itself. Once you've got them loaded, you can see what the correct name for each marker is using the token-mod help command--in the section on statusmarkers, it will tell you the name of each marker and will also explain how to use custom token markers from the marketplace. It will be something like "Holy_Weapon::1234567" JC-Dragon said: I'm sorry if this question has been asked several times, but I am rather new to DMing on Roll20 and using any API/scripts and I don't really understand much of this but I was watching a Nick Olivo video on using token mod and status info for setting status markers. Which is great, But I purchased a set on the R20 market that I like and I'm not sure how to call those into a script. Nick directed me to this thread but everything I read is very confusing as I'm not a coder. Is there a video anywhere that explains this or a step by step direction on how to call a different set of status markers?&nbsp;
1635977759
Is there a way for the condition to use an API or roll 2 command at the start of a persons turn when they have the condition?
1636001989
Victor B.
Pro
Sheet Author
API Scripter
Yes, the turnorder part has an API section.&nbsp; It runs either through all players in the turnorder or once at the beginning
1636031589
But the problem is that would run for all of the players, where i want to use the condition to have it happen on only one player's turn.
1636035775
I've added the command to a chat button that goes into the message block, so the player has to click the button when their turn starts.
1636036718
Colin C. said: I've added the command to a chat button that goes into the message block, so the player has to click the button when their turn starts. how did you format that?
1636043429
Something like [Button Caption](!&amp;#13;!API command line) You'll need to use HTML replacement or CM replacement (e.g., tokenid, etc.), most likely, depending on what you're trying to do. Can you give an example of what you're trying to do?
1636495187
Victor B.
Pro
Sheet Author
API Scripter
Version 2.45 can be found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> I'll update one click next Tuesday.&nbsp; Animated Markers are working.&nbsp; Doesn't seem to conflict with exporting from an older version of Combat Master (new controls for animation added).&nbsp;&nbsp;
In case no one thanked you lately Vic, THANX!!!!
1636498294
Thanks Vic! Combat Master is definitely my favorite and most used API.&nbsp;
1636645344
Is there a way to use a command and add a condition without the menu?
1636719909
I keep getting this error constantly. For reference, the error message generated was:&nbsp; Error: Firebase.update failed: First argument contains NaN in property 'rotation' Error: Firebase.update failed: First argument contains NaN in property 'rotation' at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at J.update (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (/home/node/d20-api-server/api.js:905:27) at Timeout.later [as _onTimeout] (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1153:39) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
1636731523
If you use the menu to add a condition, then use the up arrow key in the chat box, up see the command line. You can copy that and edit as appropriate. Will a. said: Is there a way to use a command and add a condition without the menu?
1636734288
Rick
Pro
I am getting the same error as Surok every time as soon as I start combat. We hadn't done combat for a couple of weeks since we were doing social encounters - has something changed since maybe three weeks ago?
1636739760
Rick said: I am getting the same error as Surok every time as soon as I start combat. We hadn't done combat for a couple of weeks since we were doing social encounters - has something changed since maybe three weeks ago? Yea the API is basically not functionable, it crashes almost immediately after I do anything.&nbsp; &nbsp;
1636747886

Edited 1636747920
Victor B.
Pro
Sheet Author
API Scripter
There's 3 new configurations added to the turnorder menu.&nbsp;&nbsp; Animate Marker (true/false).&nbsp; Shut it off if you don't want animation Animation Angle Step (an integer....how far to rotate each time....typically 15) Animation Angle Wait (an integer...how long to wait between each rotation....any number, but shorter numbers have larger performance impact). Make sure all 3 are set.&nbsp; Also make sure you get latest as the version on Roll20 has issues.&nbsp; Should get updated this next Tuesday.&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> &nbsp;
1636758569
Rick
Pro
Thank you. Putting values into the animation variables seems to have fixed the crash.&nbsp; And thank you for creating and maintaining this script.&nbsp;
1636988431
JP
Pro
Wish I had seen this before my game Saturday.&nbsp; Thanks for the fix, changed&nbsp; Animation Angle Step to 15, it was defaulted to undefined.&nbsp; That seems to have prevented the endless crashes that plagued Saturday's game. Would be nice in situations like this if Roll20 gave us the option on the one click API's to be able to choose to update to the latest version.&nbsp; I didn't even know the update occurred in the background.
1636993375

Edited 1636996562
Timer is not showing in chat, nor under character.&nbsp; Announce is set to true. And turns are not advancing, obviously, cause no timer is being kicked off.&nbsp;&nbsp; timer doesnt start when combat start button is pressed. And if init is rolled before hand, you need to select a token to roll inti, even though that is set to none. seems like all features are not working proper... are there other pre reqs besides libtokenmarker set? UPDATE: OMG need to have the player ribbon on the map you are on, to test this out.&nbsp; I was testing this out on a random battlemap page to see if it worked.&nbsp;&nbsp; wish this was in the help notes lol
1637000536

Edited 1637000633
Hi there! Our table recently started getting this error : TypeError: Cannot read property 'pr' of null &nbsp;at apiscript.js:2099:56 &nbsp;at Array.sort (&lt;anonymous&gt;) &nbsp;at sortTurnorder (apiscript.js:2098:19) &nbsp;at rollInitiative (apiscript.js:1674:13) &nbsp;at startCombat (apiscript.js:1526:17) &nbsp;at commandHandler (apiscript.js:312:17) &nbsp;at apiscript.js:169:25 &nbsp;at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1330:9) &nbsp;at inputHandler (apiscript.js:164:23) &nbsp;at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:168:1), &lt;anonymous&gt;:65:16) Any ideas? tried setting the new configurations and the usual reinstallation/restarting and clearing chat cache. Thanks!
1637003885
Nico
Pro
Surok said: I keep getting this error constantly. For reference, the error message generated was:&nbsp; Error: Firebase.update failed: First argument contains NaN in property 'rotation' Error: Firebase.update failed: First argument contains NaN in property 'rotation' at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:9:186) at Ba (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:207) at Aa (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:8:462) at Ea (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:10:403) at J.update (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:146:318) at TrackedObj._doSave (/home/node/d20-api-server/api.js:905:27) at Timeout.later [as _onTimeout] (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1153:39) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) Getting this one too
1637093692
hi! been using combatmaster for a long time and love it, i checked but couldn't find an answer: is it possible to create a condition, like "poison" to inflict x damage every turn, tu the token with the condition applied?
1637116841
You can, but really only by way of creating a button (as far as I can tell). In the condition setup, you can edit the message to include a button, such as: [Poison: Start of Turn!](!&amp;#13;!token-mod --ids &lt;token id substitution from combatmaster&gt; --set bar1_value|-&amp;#91;&amp;#91;1d6]]) You could also use ChatSetAttr or AlterBars. If there's a way to have the damage fire automagically every round, I haven't figured it out. I suspect (without knowing) that it requires far more coffeewriting (javascript) than I know--but I'm quite sure it's possible!