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

October 05 (3 years ago)
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.  

October 05 (3 years ago)

Edited October 05 (3 years ago)
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 

October 08 (3 years ago)
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.  

October 10 (3 years ago)

Edited October 10 (3 years ago)


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

https://app.roll20.net/forum/post/10432957/a-gm-only-popup-that-simply-says-your-api-sandbox-has-crashed/

...if you would be willing to help us both out by upvoting it? :-)

October 12 (3 years ago)

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?



October 12 (3 years ago)

Edited October 12 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

@Jugsof Holiness, your apis are working fine.  You need to roll INIT before launching combat.  You have auto-init set to off.  So players have to roll.  Read the help file.  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.  When I set CM to roll init, it worked fine.  

Again read the help files.  

October 12 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

@edio, !cmaster --main.  No space between the exlamation mark.  !cmaster --help does nothing.  In game menus provide a help icon for each menu.  Read them

October 12 (3 years ago)


Victor B. said:

@edio, !cmaster --main.  No space between the exlamation mark.  !cmaster --help does nothing.  In game menus provide a help icon for each menu.  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: https://gyazo.com/b15b160b01a4e8fce80e28e01fb75d95



October 13 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Assuming you are using the full concentration,  for the concentration spell, set concentration to false.  Set concentration to true for all spells that require concentration such as bless.  Set override to false for all these other spells.  When caster casts bless, for example, it auto puts a concentration on the caster that will count down by the spell that caused it.  You then select the targets for the spell and it auto-places bless, or whatever, onto the targets.  

October 20 (3 years ago)
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.

October 20 (3 years ago)

Edited October 20 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Put the macro syntax into this thread.  Selected feature is purely a roll20 thing.  Select token, apply macro.  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.  

October 21 (3 years ago)

Edited October 21 (3 years ago)

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.<attribute name>) in place of @{selected|<attribute_name>} and add a {& select <token identifier substitute from CombatMaster 2.0>}  --  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.




October 23 (3 years ago)

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!


October 23 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

That looks good.  Try changing the notify in concentration menu to gm rather than character.  There might be a bug notifying the character

October 23 (3 years ago)

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.

October 23 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Send me pm with a game invite and promote me to gm once I'm in.  I'll take a look

October 24 (3 years ago)

Thanks Victor! Awesomely quick response and resolution, much appreciated!

October 24 (3 years ago)

Edited October 25 (3 years ago)

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.

October 24 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Somewhere at some point, I thought I put support for the external URLs into it.  But if you've got some code to add, feel free.  Love it

October 25 (3 years ago)

Edited October 25 (3 years ago)
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.

Does this mean the next auto-pull will update to the rotating tracker?

October 26 (3 years ago)

Edited October 26 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Keep it up love it.  Did you change the default tokens for new installations...don't care if you did.  

October 26 (3 years ago)

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? 

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? 




November 03 (3 years ago)
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?
November 04 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Yes, the turnorder part has an API section.  It runs either through all players in the turnorder or once at the beginning

November 04 (3 years ago)

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.

November 04 (3 years ago)

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.

November 04 (3 years ago)


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?



November 04 (3 years ago)

Something like [Button Caption](!&#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?

November 09 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

Version 2.45 can be found here: https://github.com/vicberg/CombatMaster

I'll update one click next Tuesday. 

Animated Markers are working.  Doesn't seem to conflict with exporting from an older version of Combat Master (new controls for animation added).  

November 09 (3 years ago)

In case no one thanked you lately Vic, THANX!!!!

November 09 (3 years ago)

Thanks Vic! Combat Master is definitely my favorite and most used API. 

November 11 (3 years ago)

Is there a way to use a command and add a condition without the menu?


November 12 (3 years ago)
Surok
Roll20 Production Team

I keep getting this error constantly.

For reference, the error message generated was: 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)

November 12 (3 years ago)

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?





November 12 (3 years ago)

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?


November 12 (3 years ago)
Surok
Roll20 Production Team


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.   

November 12 (3 years ago)

Edited November 12 (3 years ago)
Victor B.
Pro
Sheet Author
API Scripter

There's 3 new configurations added to the turnorder menu.  

  1. Animate Marker (true/false).  Shut it off if you don't want animation
  2. Animation Angle Step (an integer....how far to rotate each time....typically 15)
  3. 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. 

Also make sure you get latest as the version on Roll20 has issues.  Should get updated this next Tuesday. 

https://github.com/vicberg/CombatMaster 

November 12 (3 years ago)

Thank you. Putting values into the animation variables seems to have fixed the crash. 

And thank you for creating and maintaining this script. 

November 15 (3 years ago)

Wish I had seen this before my game Saturday.  Thanks for the fix, changed Animation Angle Step to 15, it was defaulted to undefined.  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.  I didn't even know the update occurred in the background.

November 15 (3 years ago)

Edited November 15 (3 years ago)

Timer is not showing in chat, nor under character.  Announce is set to true.
And turns are not advancing, obviously, cause no timer is being kicked off.  

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.  I was testing this out on a random battlemap page to see if it worked.  
wish this was in the help notes lol

November 15 (3 years ago)

Edited November 15 (3 years ago)

Hi there! Our table recently started getting this error :

TypeError: Cannot read property 'pr' of null
 at apiscript.js:2099:56
 at Array.sort (<anonymous>)
 at sortTurnorder (apiscript.js:2098:19)
 at rollInitiative (apiscript.js:1674:13)
 at startCombat (apiscript.js:1526:17)
 at commandHandler (apiscript.js:312:17)
 at apiscript.js:169:25
 at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore-umd.js:1330:9)
 at inputHandler (apiscript.js:164:23)
 at eval (eval at <anonymous> (/home/node/d20-api-server/api.js:168:1), <anonymous>:65:16)


Any ideas? tried setting the new configurations and the usual reinstallation/restarting and clearing chat cache.

Thanks!

November 15 (3 years ago)
Nico
Pro


Surok said:

I keep getting this error constantly.

For reference, the error message generated was: 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

November 16 (3 years ago)

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?

November 17 (3 years ago)

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!](!&#13;!token-mod --ids <token id substitution from combatmaster> --set bar1_value|-&#91;&#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!