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
This post has been closed. You can still view previous posts, but you can't post any new replies.

CombatMaster Alpha

1590166682
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
THANK YOU PERSEPHONE!!!
^^^^^^ This
keithcurtis said: THANK YOU PERSEPHONE!!! The Goddess of Spring indeed!
This is a great script! Thank you! I am having some issues getting the script to read custom tokens, even with libTokenMarkers installed. Does anybody know if there's something special I need to do with the API/token names to get it working?
1590183825

Edited 1590184124
When I attempt to start combat via the main menu without having a token selected I get this API error.  I also get this error in the chat from Combat Master "A token was found not assigned to a character sheet."  I use Combat Master to roll the initiatives of monsters/NPCs and players roll their own.  There are situations where the characters need to be in initiative without there being an NPC/Monster around.  Any ideas? EDIT:  So the error is actually occurring only when a token object doesn't have a character sheet assigned to it.  With nothing selected it gives me the " No tokens selected. Combat not started" error from Combat Master.  Is there a workaround to allowing combat to start without select tokens? TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at doTurnorderChange (apiscript.js:9026:50) at Timeout._onTimeout (apiscript.js:8639:13) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)
Victor B. said: @everyone, a bit shout to persephone who redid the help files.  That was a lot of work and she did a great job.  I haven't mentioned her yet, my bad.   Absolutely!!!!! @Persephone, Awesome Job! @Victor, Brilliant Job! @Those of us who suggest without demand, Excellent Job being patient :-) lol The rest?  Shoo fly, don't bother me.  lmao
1590254330

Edited 1590254511
Shane M. said: When I attempt to start combat via the main menu without having a token selected I get this API error.  I also get this error in the chat from Combat Master "A token was found not assigned to a character sheet."  I use Combat Master to roll the initiatives of monsters/NPCs and players roll their own.  There are situations where the characters need to be in initiative without there being an NPC/Monster around.  Any ideas? EDIT:  So the error is actually occurring only when a token object doesn't have a character sheet assigned to it.  With nothing selected it gives me the " No tokens selected. Combat not started" error from Combat Master.  Is there a workaround to allowing combat to start without select tokens? TypeError: Cannot read property 'id' of undefined TypeError: Cannot read property 'id' of undefined at doTurnorderChange (apiscript.js:9026:50) at Timeout._onTimeout (apiscript.js:8639:13) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7) Yes - assign it a character sheet?  lol Otherwise, no. It's pretty straight-forward.  Rolling initiative requires an associated character sheet for all bells and whistles to work correctly, the token itself does not have the required information contained within it that the API needs to roll off of; even if you are using one of the bar bubbles to give it the information, the API has no way of knowing that's what the number is for.  That's where the character sheet fills in the missing pieces. You could make a character sheet called "Mook" that you assign all your mook tokens to.  Give it an unmodified Init Ability score.  Et Voila, instant fixed, like Jello Pudding on the range .... just remember to chill afterward or you'll burn ur lips off.  ROFL
1590287118
Victor B.
Pro
Sheet Author
API Scripter
I keep trying to root out ID errors when tokens aren't selected OR tokens aren't linked to a char sheet.  I'll look into that.  
1590289746

Edited 1590289862
Actually that error occurs on the OneClick install, it is not updated to 2.14 yet. I would suggest using the 2.14. Couple of things to note, if you have Combat Master roll init, it will not add mooks to the tracker if they are not linked to character sheet. You should no longer get the error in the api, but you will get a warning in chat about them not being assigned.  If you have Group Init to roll it will add the Mooks to tracker no problem, however because they have no attributes its a flat 1d20 roll. What you could do is select only the tokens that are linked to sheets normally and trigger combat master normaly. Then select your mooks and use group init to add them to the tracker like this  !group-init --bonus ?{modifier}. That would roll 1d20 plus the modifier any an all tokens selected. @victor when I tested 2.14 i did not get the errors , but on V2.0 I did in the oneclick in stall. 
1590295706

Edited 1590332720
I've been able to get an ability to trigger on turn starts but have not had any luck getting one to trigger on round / combat start. Where am I supposed to save a macro so that it runs on round start? Sorry adding an edit here because I was very vague with my initial comment!: What I'm ultimately trying to accomplish is to generate a powercard at the start of every round that serves as a general score report on all the tokens in combat. Is this possible?
I soooooooooooooooooooooo wish the "Delay Turn" function was configurable/ toggleable/ hideable; It has caused my campaigns considerable issue.  People keep hitting the down arrow (instead of the checkmark) to end their turn only to be given a second turn in the same round later on.  I have tried to give them end turn buttons via macro, but they see that the option is there, so they use that one, and hit the wrong button 80% of the time!
Would it be possible for us DMs to have the Bar show only, without the favorites/ conditions unless requested with --main?  Or to have the combat controls placed at the bottom of the list instead of top?  I have about 50 conditions setup, and have to scroll to the top of that list to do something from the menu, or verify the color and content of the refresh to be sure it went through.
That doesn't sound like a script error. At that point that seems like people don't care. They just need training, have them lose a turn every time they do it. lol
For anyone curious, @Victor has written 3933 lines of code for this API, and it functions fairly well, considering.  Keeping up with all the design of a 100 line script might drive me batty - but this man has done that 39 times over!  To me, it would be like trying to rewrite the Webster's dictionary, from memory, verbatim. Sorry - things like this seriously impress me...
1590335534

Edited 1590335964
Kilter said: That doesn't sound like a script error. At that point that seems like people don't care. They just need training, have them lose a turn every time they do it. lol Actually - it took a while to catch it: 1) There is no sendChat reporting the turn was delayed - it functions in the same manner as ending your turn; the next person begins theirs. 2) The buttons are close together.  They are just graphics until you hover over them and wait a millisecond for the text to show.  Our battles with the combat at hand, added to technical issues like lag or old PCs chugging along, and the timer counting down, make people rush to hit the thing in an area.  Sometimes its the wrong thing. 3) They are used to the old API I used from TheAaron, " TurnMarker1 ", which only had the EOT button. Additionally - I'm not the Spank-happy DM.  We discussed it, they are trying to be more careful, but, mistakes happen for the reasons above.  Usually when we recognize it - they don't try taking the extra turn, and I've caught the issue every time (just knowing that X turn precedes Y, you can already get a heads up something is wrong. Now something that would be useful with this feature is timer timedowns.  If it takes a player more than 2 minutes to complete their turn, I'd be glad to push them to the bottom of the round to have their turn.  But this logic makes little to no sense if they were in the bottom of the turn order anyway.  To me, the Delay function is a brilliance in API wizardry, but - IMO - lacks practical benefits, to the abounds of practical detriments.  And I'm all for keeping things more to the positives than negatives - pros and cons, if you will.
1590432265
Victor B.
Pro
Sheet Author
API Scripter
The one-click update has been updated with v2.14
1590434421

Edited 1590434783
I remember using an older version of this script which allowed me to config settings such as turning off the turn timer. But now a config timer doesn't seem to exist. Unless if those commands are meant to be all these broken images shown below. EDIT Looks like the script is so broken that it keeps disabling all my scripts every time that I use the "!cmaster --help" command and gives me this. I think I'm gonna have to disable this script, it just doesn't want to do anything.
To get the new One click version, do I need to delete the script and re-install?  In game...it still says 1.8 Alpha.
Victor B. said: @everyone, a bit shout to persephone who redid the help files.  That was a lot of work and she did a great job.  I haven't mentioned her yet, my bad.   A bit late to the party, but yey Persephone! :D
1590449619

Edited 1590449640
Victor B.
Pro
Sheet Author
API Scripter
Woops don't do !cmaster --help.  That's gone.  Forgot to remove the command support.  Click on the help icon through CM to figure out what that panel does.  And turn timer off.  That works
1590449680
Victor B.
Pro
Sheet Author
API Scripter
@wolf, I'm not going to provide control over delay button.  Again, too much code already.  It really is a training issue.  
Victor B. said: @wolf, I'm not going to provide control over delay button.  Again, too much code already.  It really is a training issue.   I recognized what you mean, almost 4k lines of code!  Even if it is a training issue as you said, understand I play with people who have mental issues (memory lapses from a head injury, PTSD, anxiety, depression, etc.).  Their hitting the wrong button causes them a lot of stress; but I do understand.  They don't adjust to things well, even in the end when these very things are meant to make life easier.
I have the following scripts installed in my game. Which of them should be removed if I am using Combat Master? I mean, what features/scripts are made redundant by Combat Master? Aura/Tint HealthColors Concentration GroupInitiative Roll20 Audio Master GroupCheck 5th Edition OGL by Roll20 Companion
None David B. said: I have the following scripts installed in my game. Which of them should be removed if I am using Combat Master? I mean, what features/scripts are made redundant by Combat Master? Aura/Tint HealthColors Concentration GroupInitiative Roll20 Audio Master GroupCheck 5th Edition OGL by Roll20 Companion
1590542444
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
However, given that CombatMaster allows you to conditionally run macros for any of those based on turn or condition.
1590583772

Edited 1590583814
I noticed an issue the other night using GroupInit in Combatmaster to do initiative.   It would roll everyone then skip the first person on the first round, starting with the second person.   It was a minor annoyance but easy to work around 
1590588167

Edited 1590588221
Hello CombatMasters, I've noticed that there's quite the overlap between people using CM and the ChatMenu API, so I thought this might be worth sharing. I've been trying for a while to get Chat Menus send to chat for each player and NPC when their turn came up. I've got confused and ran into issues with how CM handles @{selected| and couldn't get it to work. So, I butchered Victor's nice script a bit and got to this: The API buttons calling chat menus are sent to chat with each turn announcement now. You still need to click but I can live with that. I have by no means any scripting authority and Tom Scott would call this the botchiest of the botches, but it works. If anyone is curious here's the bit of code I made a few tweaks to:  let contents = '<div style="'+styles.announcePlayer+'">'+image+'</div>' let characterObj = getObj('character', tokenObj.get('represents')) if (!show) { let controlledBy = characterObj.get('controlledby') let players = controlledBy.split(",") if (players.length > 1) { contents += '<div style="'+styles.announcePlayer+'">'+name+'\'s Turn - [ Player Menu ](!
%{ MacroDude|YOUR-TURN })</div>' } else { contents += '<div style="'+styles.announcePlayer+'">'+name+'\'s Turn - [ NPC Menu ](!
%{ MacroDude|NPC })</div>' } } else { contents += '<div style="'+styles.announcePlayer+'">'+name+'</div>' } contents += conditions The  bold  lines are the last and first unchanged one. In between are the lines that have been added/adjusted. The  underlined   parts are the labes of your API buttons. Put whatever you like there The  italic  bits are the macro that is called. (Note that I'm using a Macro Character). I'm really not sure if this is helpful for anyone but me, but I got plenty of great help here, so I thought this might be worth sharing. The obvious drawback is that you need to re-adjust your script with each update, but the utility I'm getting out of this is well worth it for me personally. /K
While this may be an incredible script it's lack of a help file makes it near impossible to figure out without a lot of work. I don't see a menu, and can only use default values I get ??? instead of buttons. I can't read any documentation that shows how to manually set the values. I could grab the code and learn it that way.  What command do I begin with? !cmaster --help Is there really a menu, or do I have to type it all in code? I don't mind either way, but I would like to help improve the documentation if possible.
1590593283

Edited 1590593476
!cmaster --main Check your archived for a help document as well. (If you have the most up to date version) Plus here 
We should sticky your reply, or just put that in the documentation for the api. Thank you so much Kilter!
Each menu of the script has a help button in the upper right corner, as Kilter showed. Clicking it will open the help handout for that menu.
Hey, first of all: thanks for this amazing script! I would have a question/request: I put "handleStatusMarkerChange" into the return statement at the end of the script to be able to trigger the script if I change a status marker with one of my own scripts. Is there another intended way to do this? If so, how should I handle this? If not, would it be possible for you to add this to the script on Github so that everyone can use this feature (and I don't have to do it every time I update the script when you make bugfixes and additions)? Thanks for your help! :)
1590709095

Edited 1590709234
Victor B.
Pro
Sheet Author
API Scripter
@Jesse there's a help icon on every menu in CM.  Click on them to get to what you need.   @Florian does your script support an observer?  If so, then code is added to CM to observe the script doing something and then CM does what it needs to do @jesse It may be a timing issue.  CM is stepping on Group Init.  Executing before Group Init is done.   @karankwan - feel free to do whatever with the code.  It's open source.  I won't be adopting your changes though.  
Victor B. said: @karankwan - feel free to do whatever with the code.  It's open source.  I won't be adopting your changes though.   Oh yes of course not. I made a highly personalized addition to your generic tool that works for a lot of people. It never crossed my mind to have this as a proper addition to the script. If my comment suggested that much hybris I'd like to apologize.  I simply thought someone that was trying to do something similar could benefit from the bits I added to accommodate my needs. /K
1590756394
Victor B.
Pro
Sheet Author
API Scripter
Don't apologize.  All good
1590761937

Edited 1590761952
Have installed Combat Master 2.14, and whilst I have turn marker as true and external image set (default), I have no turn marker showing up during combat. It appears on the turn order as the new round marker but not on the player tokens. Have reinstalled multiple times with no luck. Any advice on this? Thanks in advance!!
Dusty said: Have installed Combat Master 2.14, and whilst I have turn marker as true and external image set (default), I have no turn marker showing up during combat. It appears on the turn order as the new round marker but not on the player tokens. Have reinstalled multiple times with no luck. Any advice on this? Thanks in advance!! Do you have the players ribbon on the current page ?
sebastien g. said: Dusty said: Have installed Combat Master 2.14, and whilst I have turn marker as true and external image set (default), I have no turn marker showing up during combat. It appears on the turn order as the new round marker but not on the player tokens. Have reinstalled multiple times with no luck. Any advice on this? Thanks in advance!! Do you have the players ribbon on the current page ? I am an idiot. Thank you.
Dusty said: sebastien g. said: Dusty said: Have installed Combat Master 2.14, and whilst I have turn marker as true and external image set (default), I have no turn marker showing up during combat. It appears on the turn order as the new round marker but not on the player tokens. Have reinstalled multiple times with no luck. Any advice on this? Thanks in advance!! Do you have the players ribbon on the current page ? I am an idiot. Thank you. Hey, I am also an idiot (made the exact same mistake awhile back!).
I've been there :-)
Been there too.
Been there three.
Hey, I'm not sure if this has already been asked or reported, but I'm having some trouble with Token Mod integrating with Combat Master. As of right now, I have a macro for my bard set up such that when he clicks on the Token Action, it prompts him to select a target for his Bardic Inspiration. It then adds the "All for One" status icon and unlocks a "Bardic Inspiration" token action on the target. I have added a condition in Combat Master for Bardic Inspiration, and it uses the "All for One" icon, but whenever I use my macro nothing displays in chat! It works perfectly fine when I manually add the status icon, but not through the Token Mod API. Here is the macro I wrote for my bard. I don't think there are any errors since it adds the icon just fine, I just can't figure out why it isn't prompting the Combat Master description in chat. !setattr --silent --name Gralyse --mod --class_resource|-1 !toggle-ability --enable --name Bardic-Inspiration --ids @{target|character_id} !token-mod --ids @{target|character_id} --set statusmarkers|+all-for-one
1590849211
Victor B.
Pro
Sheet Author
API Scripter
Sasha go to the API & Macros menu of CM and click the help.  Your syntax isn't quite correct.  There are examples in that section.  
Victor, Thank you for your reply, but I'm afraid I'm not sure what you are talking about. I have read through the --help article and can't seem to find any examples, and when I click on "Macros & API" in the --main menu it only shows a button labeled "Add Substitution." I'm sorry if there's something terribly obvious that I'm missing here, but I'm just not sure where I'm supposed to be looking...
1590869094
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
First, make sure you have the latest copy of the script installed. It makes help handouts. Then click as follows:
1590877176

Edited 1590877430
I love this script and I'm finding fun ways to use it all the time. I do have a question though, is there any way to get the menu to be in a separate window like the dice roller? It would be very convenient if the GM could have a window they couldn't minimize like many of the other sheets. I know there's no plans to add any more code (and after looking through it I completely understand) but I wanted to see if maybe someone knew of a script or a macro that could help. Thanks again for all your hard work, this script is amazing.   
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..
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.
1590883972

Edited 1590884287
Ok, I've kind of figured it out. It turns out that when you install it via the Roll20 API library it installs Alpha version 1.8 rather than the latest version, even if you select v.2.14 instead of "Latest." I had to manually install it, but it seems to be working now with no tweaking. I am running into a new issue, though, where it is placing the status marker on all instances of the player token across all maps and flooding chat with a copy of the status description for each token affected in this way. Any suggestions on how to remedy this? **Edit** Never mind, I'm a doofus. I had it set to character_id rather than token_id. It's all fixed now and running as intended.