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

1587076431

Edited 1587076459
I was able to figure it out. I hadn't properly referenced the substitution for the tokenid in the command. {{!token-mod {{--api-as <playeriidsubstitution>}} {{--ids <tokenidsubstitution>}} {{--set light_multiplier|0}}}} Thank you @Persephone for your help - I would not have been able to figure it out without the pointers. And thank you @Victor B. for writing this. It is going to really help bring my sessions to the next level. 
Happy to help! Have fun!
Can we get some documentation on what's required for a custom turn marker? Every time I try to make one, the script crashes. This was also a problem with Combat Tracker. TypeError: Cannot read property 'get' of undefined     at turnorder.forEach.turn (apiscript.js:1601:34)     at Array.forEach (native)     at checkMarkerturn (apiscript.js:1600:19)     at getOrCreateMarker (apiscript.js:1585:19)     at doTurnorderChange (apiscript.js:1716:27)     at sortTurnorder (apiscript.js:1796:9)     at rollInitiative (apiscript.js:1417:13)     at startCombat (apiscript.js:1319:13)     at commandHandler (apiscript.js:281:17)     at _.each (apiscript.js:142:25)
1587171525

Edited 1587171613
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Are you trying to use a piece of Marketplace art?
1587172489

Edited 1587172514
Hi Keith, No, was making my own. (Heir of Orcus verses 1 & 2 demand a more pixel-art style!) I'm sure what I'm doing is using the wrong file format or the wrong dimensions, or something like that! I don't think it's a bug per se, I just think more documentation would be handy.
1587179960

Edited 1587180082
Ravenknight
KS Backer
Hiya Victor, one of my players turned my attention to a problem with the remove function in chat. The trashcan icon do not align itself with conditions with a longer description and/or messages and it seems to depend on the size of the chat window. Below you can see how the "Nursed by the Forge" - trashcan is beside another condition making it easy to press the wrong icon in the heat of battle. Not a big thing but still somewhat annoying.
Apologies if this has been asked before, my search hasn't bore fruit.  Is there a macro written for this that allows you to query the length of the status that you're adding to a token?  Example: Barry becomes blinded for 10 rounds. I select his token, hit the macro and it queries: What condition; How long it will last; Direction of travel (i.e -1 per round)? This sounds simple on the face of it, but I can't wrack my head round the macro wording for Roll20
1587219886
Victor B.
Pro
Sheet Author
API Scripter
@Sean I'm seeing downstream issues with the turnorder causing failures.  This is due to the turnorder not being setup correctly.  I'm adding functionality to prevent the failure and sending error messages to chat
1587220023

Edited 1587220184
Victor B.
Pro
Sheet Author
API Scripter
@Ravenknight, that's a tough one because of the length of what's being displayed.  The trash can is moving to the right of everything.  Since it goes across two lines, you're seeing it show at the end of the second line.  I could move the trashcan before everything but the issue there is you go to click on the condition and hit the trash can instead.  Either way, there's no elegant solution around this.  It's a real estate issue.  The trash can to the right of the wrong condition is another CSS formatting issue due to real estate.  I'll look into it
1587220291

Edited 1587220364
Sean R. said: Can we get some documentation on what's required for a custom turn marker? Every time I try to make one, the script crashes. This was also a problem with Combat Tracker. TypeError: Cannot read property 'get' of undefined &nbsp; &nbsp; at turnorder.forEach.turn (apiscript.js:1601:34) &nbsp; &nbsp; at Array.forEach (native) &nbsp; &nbsp; at checkMarkerturn (apiscript.js:1600:19) &nbsp; &nbsp; at getOrCreateMarker (apiscript.js:1585:19) &nbsp; &nbsp; at doTurnorderChange (apiscript.js:1716:27) &nbsp; &nbsp; at sortTurnorder (apiscript.js:1796:9) &nbsp; &nbsp; at rollInitiative (apiscript.js:1417:13) &nbsp; &nbsp; at startCombat (apiscript.js:1319:13) &nbsp; &nbsp; at commandHandler (apiscript.js:281:17) &nbsp; &nbsp; at _.each (apiscript.js:142:25) It depends on what you mean, but I'll give you 2 possibilities: 1. If you're referring to Status Markers - don't forget you need libTokenMarkers API to use them - here is the documentation: <a href="https://app.roll20.net/forum/post/8033593/release-note-for-january-7-2020" rel="nofollow">https://app.roll20.net/forum/post/8033593/release-note-for-january-7-2020</a> 2. If you're referring to the Marker or Platen for whose turn it is, make the marker and make sure it is hosted on the internet somewhere that you can refer to it's url.&nbsp; Make sure the url is not encoded (such as the 2 mile long string that often starts with "data:" and ends without file type information) or using CDN information (..."/sample.jpg&amp;width=200&amp;height=300&amp;quality=hd"). I don't know what dimensions or file type are required, but I'm certain any type and the API will control it's size (I've seen it enlarge on screen for larger size creatures).&nbsp; Personally, I would choose gif or png as file type for the transparency. Then click the url location of the current, replacing it with your url directly to the art file.&nbsp; Do yourself a favor, unless Victor wants to put in a reset to default for the current default marker, make a note of the url that is defaulted when you installed Combat Master.&nbsp; I didn't and don't remember it anymore :::Shrugs:::
1587220625

Edited 1587220642
Victor B. said: @Sean I'm seeing downstream issues with the turnorder causing failures.&nbsp; This is due to the turnorder not being setup correctly.&nbsp; I'm adding functionality to prevent the failure and sending error messages to chat I was wondering... haven't had feedback from you or TheAaron on this for a bit. I have a game today and just copied your test API over to that one.&nbsp; So far it seems to have corrected the issue on the user side of things, but I'm sure the problem persists on the back end.
PoisonedDM said: Apologies if this has been asked before, my search hasn't bore fruit.&nbsp; Is there a macro written for this that allows you to query the length of the status that you're adding to a token?&nbsp; Example: Barry becomes blinded for 10 rounds. I select his token, hit the macro and it queries: What condition; How long it will last; Direction of travel (i.e -1 per round)? This sounds simple on the face of it, but I can't wrack my head round the macro wording for Roll20 I believe what you are looking for is&nbsp;!cmaster --show,assigned This will show for the token selected any condition placed on it.&nbsp; A tip on how to find the macro command for Combat master is you can put !cmaster --main and click on any icon and then hit the up arrow in the chat and it will give you the last command issued.
Victor B. said: @Ravenknight, that's a tough one because of the length of what's being displayed.&nbsp; The trash can is moving to the right of everything.&nbsp; Since it goes across two lines, you're seeing it show at the end of the second line.&nbsp; I could move the trashcan before everything but the issue there is you go to click on the condition and hit the trash can instead.&nbsp; Either way, there's no elegant solution around this.&nbsp; It's a real estate issue.&nbsp; The trash can to the right of the wrong condition is another CSS formatting issue due to real estate.&nbsp; I'll look into it I'm not sure if this is relevant or useful, but I've seen Character sheets that have lines of information that are there permanently until you hit a button. One the button has been hit, trashcans appear across each line and you can choose which to delete. When you hit done, the trashcans disappear. Could something similar be done for the list of conditions?
RobbaYaga said: Victor B. said: @Ravenknight, that's a tough one because of the length of what's being displayed.&nbsp; The trash can is moving to the right of everything.&nbsp; Since it goes across two lines, you're seeing it show at the end of the second line.&nbsp; I could move the trashcan before everything but the issue there is you go to click on the condition and hit the trash can instead.&nbsp; Either way, there's no elegant solution around this.&nbsp; It's a real estate issue.&nbsp; The trash can to the right of the wrong condition is another CSS formatting issue due to real estate.&nbsp; I'll look into it I'm not sure if this is relevant or useful, but I've seen Character sheets that have lines of information that are there permanently until you hit a button. One the button has been hit, trashcans appear across each line and you can choose which to delete. When you hit done, the trashcans disappear. Could something similar be done for the list of conditions? Your talking about setting the state into an "edit mode".&nbsp; That same mode also allows you to rearrange the orders of the list.
1587246163

Edited 1587246246
Also, that ability to move and delete individual items is for repeating sections , a special Roll20 class of entries in character sheets. It can probably be done with the API, but I don't think a roll template can take advantage of that functionality.
Rabulias said: Also, that ability to move and delete individual items is for repeating sections , a special Roll20 class of entries in character sheets. It can probably be done with the API, but I don't think a roll template can take advantage of that functionality. Same thing I was thinking.&nbsp; The trash can that is there is nothing more than a link placeholder running the delete condition command of the api.
Rabulias said: Also, that ability to move and delete individual items is for repeating sections , a special Roll20 class of entries in character sheets. It can probably be done with the API, but I don't think a roll template can take advantage of that functionality. Fair enough. I am not familiar with JS. On the bonus side, I successfully quoted (twice now) which means that bug is fixed.
1587250186

Edited 1587250221
@anyone using DeathTracker, The Aaron fixed the issue where it would apply markers to every copy of a player token (making CM spam the chat)! It now only adds the markers to tokens on the page with the player ribbon <a href="https://app.roll20.net/forum/permalink/8499949/" rel="nofollow">https://app.roll20.net/forum/permalink/8499949/</a>
Sorry, but I might be missing this somewhere in the interface. One of the things I loved about Combat Tracker was you could toggle it so that if the initiative tracker window got closed, combat didn't stop and the initiative list didn't clear. I can't seem to find this option in Combatmaster. Whenever the initiative window is shut, all of the initiatives are lost. Am I missing it somewhere? Or isn't it in this new, snazzy api version? Many thanks, Alison
1587305518
Victor B.
Pro
Sheet Author
API Scripter
Stopping combat but leaving everything in place will be handled by the hold combat functionality which is close to being finished.&nbsp;&nbsp;
Good to know Victor. Thanks for the update. Really enjoying CM at the moment. Very useful. Just terrified that I'm going to lose my 30 character initiative list by accidentally closing it. :-)
So I made a macro on the StatusInfo script to be able to send condition effects to chat quickly; set it up as follows.&nbsp; I cant figure out the right command to make this macro work with CombatMaster. Can anyone help with this?
@Cody, here's a simple version: !cmaster --show,description,key=?{Condition}
Since I'm new to scripts, maybe this is a common way for them to crash, but I cannot get Combat Master to respond at all now. I cannot get the Help window to appear, the Menu, etc. I'm at a loss as to what to do short of deleting it and reinstalling. Honestly, I'm not even sure how I broke it. Any thoughts from those more knowledgeable than I?
Did you reset the API?
Yeah, first thing to do is restart the API in case you just experienced the API crashing. If you restart and CM still isn't responding, let us know.
.To be more precise, they are telling you to cluck the "Restart API sandbox" button under settings - API scripts, but yeah, make sure that is done before anything.&nbsp; Also check what the error message is beforehand.&nbsp;
1587576154

Edited 1587576174
Victor B.
Pro
Sheet Author
API Scripter
Version 2.10 can be found here.&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> .&nbsp;It will be available next tuesday for one click subscribers.&nbsp;&nbsp; Added hold combat functionality and fixed a couple issues related to messed up turnorders.&nbsp;&nbsp; A new button will cause combat to be held. &nbsp;&nbsp; The button bar will be yellow to show a held combat and click the start button to restart.&nbsp;&nbsp;
1587591870

Edited 1587591987
Victor B. said: Version 2.10 can be found here.&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> .&nbsp;It will be available next tuesday for one click subscribers.&nbsp;&nbsp; Added hold combat functionality and fixed a couple issues related to messed up turnorders.&nbsp;&nbsp; A new button will cause combat to be held. &nbsp;&nbsp; The button bar will be yellow to show a held combat and click the start button to restart.&nbsp;&nbsp; Ur Awesome Vic! Where are we with what is done/ what you want to do yet?&nbsp; You were updating us with a regular state of the API with each update, I kinda wondered where this update fell in that.
1587593759

Edited 1587594087
@Vic - put 2.11 on my DM's Game, rolled initiative via !cmaster --turn,start : Tried while CM Running using !group-init : Does not crash until !cmaster --turn,next is pressed Using a --show command, like !cmaster --show,favorites --main did not crash the system, but applying any condition did ( !cmaster --add,condition=advantage_for,duration=1,direction=-1 ): Just do not know how to get this working... Difference between our games is his uses OGL, mine uses Shaped.&nbsp; Gonna play around with it in my game tomorrow evening. NOTE: Will also crash the API if CM is running and you click the right arrow button next to the blue gear in the Turn Order, instead of using CM at all.&nbsp; As soon as the new order is begun:
@Victor, the new version and Hold Combat feature are working great! Btw, I just realized that these two bugs... When adding/removing most Marketplace markers via radial menu, CM doesn't add/remove the associated condition. For some reason, it is working with one or two of the markers within the set. Unsure what's causing it to work for some but not all. The TokenMod observer works when TokenMod adds a default or uploaded marker to a token, but still isn't registering when a Marketplace marker is added by TokenMod. ...had little to do with them being Marketplace markers; it happens with markers that have a space in the name. Unfortunately, since they are Marketplace-bought, I have no way to edit the names to remove the spaces. All of the markers named '______ Weapon' and the one named 'Knocked Prone' are the kind experiencing the issue. For example: I linked the Knocked Prone marker to the Prone condition just fine, and when I use CM to add the Prone condition to a token, the Knocked Prone marker is added to that token. Removing the condition with CM also removes the marker. This works fine. If I use the radial menu to add the Knocked Prone marker to a token, CM does not add the Prone condition to that token. If the token already has the both the marker and the condition, using the radial menu to remove the marker does not remove the condition. If I use the following TokenMod command to add the marker !token-mod --set statusmarkers|Knocked_Prone::243125 CM does not add the condition, even though this identifier for the marker has no spaces. Same with removing via TokenMod. Hope that helps clear up the issue, let me know if you need more info on that.
1587596082

Edited 1587600080
Also, persistent macros are still not working since v2.09
1587598257

Edited 1587598279
Persephone said: ...had little to do with them being Marketplace markers; it happens with markers that have a space in the name. Unfortunately, since they are Marketplace-bought, I have no way to edit the names to remove the spaces. You can contact the creator and ask them update their set, or you can download the problematic icons, change the names, re-upload them to your Art Library and add them back into your custom token set.
1587598662

Edited 1587598681
Sorry, people, I was busy with work for a couple days. I reset the API. This is the error message that was generated before the reset: SyntaxError: Expected "(", ".", "[", "abs(", "ceil(", "d", "floor(", "round(", "t", "{", [ |\t], [+|\-] or [0-9] but "N" found. undefined
@Rabulias, I didn't think of that, thank you! I'll try uploading them myself
1587600473
Victor B.
Pro
Sheet Author
API Scripter
I'll look into the issues tomorrow.&nbsp;&nbsp;
1587600511
Victor B.
Pro
Sheet Author
API Scripter
Robba, you need to click the RAW button if you are copying from git.&nbsp; If you don't you'll pick up extra crap and that will cause syntax errors.&nbsp;&nbsp;
Victor B. said: Robba, you need to click the RAW button if you are copying from git.&nbsp; If you don't you'll pick up extra crap and that will cause syntax errors.&nbsp;&nbsp; I'm 99% sure I did pick the raw file and I tested this several times to make sure it worked before my game Sunday where it crashed out. However, I will make sure to grab the raw file of the new version and see if I can break it again because, ATM, after restarting the sandbox, the menu appears as it should and I can do things like adjust settings, but then if I select a token and hit the "play" button, it crashes out with the same message.
So here's something fun I've been playing with. You can put a command button in a condition message. This works really great for some concentration spells. Blade of Wrath for our warlock has been a big one. This way he is able to make a BoW attack if he has the weapon out during his turn. I also applied it to our Druid's "Healing Spirit". It allows her to heal as a bonus action each turn that the spirit is out so I made a healing button for that condition.&nbsp; Don't need help with anything. Just thought this was a cool, useful, thing that some others may want to utilize.
Nevermind, I'm an idiot of my own design. I downloaded the latest and "hold combat" works great. My problem was that I put the d in front of the 100 (this game uses a d100 for initiative rolls) because I obviously cannot read. Turns out it didn't like dd100 as a die choice. Thanks for all your hard work.
The Devilish DM said: So here's something fun I've been playing with. That's really cool.
@Robba, glad you were able to solve that! @Devlish, very cool. I'm gonna test that out myself!
RobbaYaga said: The Devilish DM said: So here's something fun I've been playing with. That's really cool. Indeed! Need to test that out myself. :)
@Devilish, that is awesome! Gonna try that out myself.
I'm a copy/paste coder. I know just enough to get myself in trouble. When I edit a description of a condition, it stops at the comma.&nbsp; How can I change that?
1587664018

Edited 1587669510
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
If I recall correctly, put the comma in brackets: We the People of the United States{{,}} in Order to form a more perfect Union{{,}}&nbsp;establish Justice{{,}}&nbsp;insure domestic Tranquility...
keithcurtis said: If I recall correctly, put the comma in brackets: We the People of the United States{,} in Order to form a more perfect Union{,}&nbsp;establish Justice{,}&nbsp;insure domestic Tranquility... I believe its double brackets {{,}}. That's what I've been using and it works. maybe I'm putting too many tho. lol
1587669523
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
You're probably right. Edited.