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

1581611038
Victor B.
Pro
Sheet Author
API Scripter
The alpha version of combat master can be found here.&nbsp;&nbsp; <a href="https://github.com/vicberg/CombatMaster/tree/master" rel="nofollow">https://github.com/vicberg/CombatMaster/tree/master</a> This thread now supersedes Combat Tracker.&nbsp; At this point, my Combat Tracker versions will not be supported.&nbsp; Combat Master manages a combat by rolling initiative (optional), stepping through the turn order, assigning conditions that have a set amount of rounds they last for, removing those conditions when that amount of rounds have passed.&nbsp; It provides a configurable timer.&nbsp; It allows for API and Macro calls at various timing points (beginning of each round, beginning of each turn, when a condition is assigned, when a condition is removed).&nbsp; It's menu driven, so conditions may be assigned/removed via a click.&nbsp; You can configure conditions so that if they have a variable length, you set that length when you assign the condition.&nbsp; If the condition length is fixed, then you can configure the condition so that with a simple one click, the condition is assigned.&nbsp; The Player Turn can be announced in chat along with options for the player to delay his turn or end it.&nbsp;&nbsp; Help file will be created in game.&nbsp; Put them into a folder.&nbsp; I can't create folders in Roll20.&nbsp; The help files will need work.&nbsp; EXPECT BUGS.&nbsp; I haven't tested all functionality yet.&nbsp; I'm putting this up now due to a request for alpha testing.&nbsp;&nbsp; Have fun with this.&nbsp;&nbsp;
Getting a 404 error when clicking the link
Problem fixing and re-uploading as this was the error i got on install. Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; SyntaxError: Unexpected token }
1581613357
Victor B.
Pro
Sheet Author
API Scripter
Hold a sec, I've taken it down for a bit.&nbsp; I've got a few more bugs to work through.&nbsp;&nbsp;
1581617684

Edited 1581617700
Victor B.
Pro
Sheet Author
API Scripter
I had some java syntax errors.&nbsp; I just have been tired when I logged off.&nbsp; Those have been fixed.&nbsp; I added an ascending sort of the conditions and I fixed the favorite/all button.&nbsp;&nbsp; New version, alpha 1.2 is available here.&nbsp; It's now public again.&nbsp;&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a>
!cm --tracker isn't doing anything for me. Is that the right macro?
!cm --show,setup Worked for me.
1581621513
Victor B.
Pro
Sheet Author
API Scripter
!cm -main
1581621525
Victor B.
Pro
Sheet Author
API Scripter
I'm going to have to review the help pages.&nbsp;&nbsp;
1581623131

Edited 1581623587
Conditions don't seem to be adding when using main menu to apply conditions. Getting this error: Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again. More info... For reference, the error message generated was: TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at doAddConditionCalls (apiscript.js:24348:51) at selectedTokens.forEach.token (apiscript.js:23116:12) at Array.forEach (native) at addCondition (apiscript.js:23113:25) at commandHandler (apiscript.js:22499:17) at _.each (apiscript.js:22355:21) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:22350:19) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8)
1581625934

Edited 1581625976
Victor B.
Pro
Sheet Author
API Scripter
Check the condition that your trying to use.&nbsp; Edit that condition and verify that all the API/Macro stuff is set to None.&nbsp; That's a problem with the new API logic.&nbsp; &nbsp;If it's set to something else, please let me know.&nbsp; That means my session state upgrade logic has a bug.&nbsp;&nbsp;
Victor B. said: Check the condition that your trying to use.&nbsp; Edit that condition and verify that all the API/Macro stuff is set to None.&nbsp; That's a problem with the new API logic.&nbsp; &nbsp;If it's set to something else, please let me know.&nbsp; That means my session state upgrade logic has a bug.&nbsp;&nbsp; I was trying it with all of the default conditions, and got the same error.
1581630137

Edited 1581630170
Mik Holmes
Pro
Marketplace Creator
Can confirm that the default add/rem options are all set to None, and getting the "get undefined" error. Also: This is so exciting! I'm so happy that this is out!!&nbsp;
I also noticed that reroll initiative on each round is not working
I am having the same issues mentioned above. When trying to apply the condition it crashes the API.&nbsp; &lt;3 im so stoked about this.
1581633299
Victor B.
Pro
Sheet Author
API Scripter
I'm able to recreate.&nbsp; I'll get this fixed soon
1581634363
Victor B.
Pro
Sheet Author
API Scripter
Bug fixed.&nbsp; New version here&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a>
Trying to start or advance to the next token I am getting this error. API Output Console Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at doRoundCalls (apiscript.js:25726:51) at doTurnorderChange (apiscript.js:25122:13) at nextTurn (apiscript.js:25240:9) at commandHandler (apiscript.js:23859:17) at _.each (apiscript.js:23783:21) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:23778:19) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1638:12
Kilter said: Trying to start or advance to the next token I am getting this error. API Output Console Your scripts are currently disabled due to an error that was detected. Please make appropriate changes to your scripts and click the "Save Script" button and we'll attempt to start running them again.&nbsp; More info... For reference, the error message generated was:&nbsp; TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at doRoundCalls (apiscript.js:25726:51) at doTurnorderChange (apiscript.js:25122:13) at nextTurn (apiscript.js:25240:9) at commandHandler (apiscript.js:23859:17) at _.each (apiscript.js:23783:21) at Function._.each._.forEach (/home/node/d20-api-server/node_modules/underscore/underscore.js:186:9) at inputHandler (apiscript.js:23778:19) at eval (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:65:16) at Object.publish (eval at &lt;anonymous&gt; (/home/node/d20-api-server/api.js:154:1), &lt;anonymous&gt;:70:8) at /home/node/d20-api-server/api.js:1638:12 Can confirm I am getting the same error when moving turns.
1581637897

Edited 1581638170
I am also having a weird issue where applying multiple statuses, deletes the previous status. Edit: The description shows up but the Icon does not appear on the token.
I believe I have just hit the same wall as Anthony. I have the condition setup and it is recognizing the correct custom marker but when the condition is applied the marker does not show up. However, the description, with the correct marker image, pops up in chat.&nbsp;
1581652637
Victor B.
Pro
Sheet Author
API Scripter
Alright, I haven't fully run through the new API logic (obviously).&nbsp; Let me do that and I'll get it fixed and post a new version.&nbsp;&nbsp;
Super excited! I love the UI. Haven't had any crashes yet, but I'm unable to set any custom markers to any conditions. I changed 'Icon Type' to Token Marker But when changing the icon, it still only shows the default marker names in the drop-down query. Manually replacing the drop-down query with the name of one of my custom markers only gets rid of the condition's icon altogether. Is there more setup required that I overlooked?
Persephone said: Super excited! I love the UI. Haven't had any crashes yet, but I'm unable to set any custom markers to any conditions. I changed 'Icon Type' to Token Marker But when changing the icon, it still only shows the default marker names in the drop-down query. Manually replacing the drop-down query with the name of one of my custom markers only gets rid of the condition's icon altogether. Is there more setup required that I overlooked? Be sure you have libTokenMarkers installed as well. I hit the same wall.
Oh yeah, should've mentioned I already have libTokenMarkers as well.
Are there any other script that need to be installed? I am having trouble getting any conditions to add to tokens.
Anthony V. said: Are there any other script that need to be installed? I am having trouble getting any conditions to add to tokens. I am also at the point where the marker will not apply to any tokens, but if i&nbsp;!cm --show,assigned it lists the correct conditions for the character.&nbsp;
1581654718

Edited 1581655556
Also getting this error when starting combat using CombatMaster And this error when going to the next turn using the default roll20 tracker
1581658865
Victor B.
Pro
Sheet Author
API Scripter
All of this related to the API logic.&nbsp;&nbsp;
Super excited....will do some testing soon.
same error generated here...
1581692383
Victor B.
Pro
Sheet Author
API Scripter
Fixed.&nbsp; It's stepping through turnorder without an error.&nbsp; New version here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a>
1581693142

Edited 1581693235
Victor B.
Pro
Sheet Author
API Scripter
And apologies for rushing this out.&nbsp; I added the API logic but didn't go through my usual battery of tests.&nbsp; This API has become HUGE. 3300 lines, though I'm sure The Aaron could reduce that code down to maybe 10 lines :)
It's a daunting task building such a large API so no sweat. Haven't had time to delve into testing myself yet, but I will give it a go this evening.
1581698334

Edited 1581698424
Kraynic
Pro
Sheet Author
I just tried running this script and can't seem to get the configuration to come up.&nbsp; I tried a double and single hyphen in front of "tracker" as well as copy/pasting out of the handout (which seems to give a slightly different length character).&nbsp; I tried it with and without a token selected.&nbsp; API console output: Spinning up new sandbox... "Starting webworker script..." "Loading 683 translation strings to worker..." "Starting webworker script..." "-=&gt; Universal Chat Menu v0.2.4 &lt;=- [Sun May 26 2019 06:25:12 GMT+0000 (UTC)]" "-=&gt; TokenNameNumber v0.5.12 &lt;=- [Tue Jul 25 2017 15:01:48 GMT+0000 (UTC)]" "-=&gt; TokenMod v0.8.48 &lt;=- [Mon Dec 16 2019 05:20:41 GMT+0000 (UTC)]" "������������ Initialized Welcome Package ������������" "-=&gt; Ammo v0.3.8 &lt;=- [Tue Jul 31 2018 12:42:46 GMT+0000 (UTC)]" "-=&gt; DoorKnocker v1.14 &lt;=- [Fri Jan 24 2020 21:02:43 GMT+0000 (UTC)]" "Set Defaults" "Combat Master Handout Found" "Combat Master Setup Handout Found" "Combat Master Initiative Handout Found" "Combat Master Turnorder Handout Found" "Combat Master Timer Handout Found" "Combat Master Announce Handout Found" "Combat Master Status Handout Found" "Combat Master Conditions Handout Found" "Combat Master Condition Handout Found" "CombatMaster Ready! Command: !cm" "-=&gt; ChatSetAttr v1.9 &lt;=-" {"content":"!cm --tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","type":"api","who":"Kraynic (GM)"} {"details":{"tracker":"tracker"},"action":null} "Command Handler" {"content":"!cm –tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","type":"api","who":"Kraynic (GM)"} {"content":"!cm -tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","type":"api","who":"Kraynic (GM)"} {"content":"!cm --tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","selected":[{"_id":"-M-u89vi8ur6kM187zpn","_type":"graphic"}],"type":"api","who":"Kraynic (GM)"} {"details":{"tracker":"tracker"},"action":null} "Command Handler" {"content":"!cm –tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","selected":[{"_id":"-M-u89vi8ur6kM187zpn","_type":"graphic"}],"type":"api","who":"Kraynic (GM)"} {"content":"!cm -tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","selected":[{"_id":"-M-u89vi8ur6kM187zpn","_type":"graphic"}],"type":"api","who":"Kraynic (GM)"} I also created a new game, and put this script in by itself.&nbsp; Tried a couple commands and the menu still won't pop for me.&nbsp; Api console from that game: Spinning up new sandbox... "Starting webworker script..." "Loading 683 translation strings to worker..." "Starting webworker script..." "Set Defaults" "Creating Combat Master Handout" "Creating Combat Master Setup Handout" "Creating Combat Master Initiative Handout" "Creating Combat Master Turnorder Handout" "Creating Combat Master Timer Handout" "Creating Combat Master Announce Handout" "Combat Master Announce Handout Found" "Creating Combat Master Status Handout" "Creating Combat Master Conditions Handout" "Creating Combat Master Condition Handout" "CombatMaster Ready! Command: !cm" {"content":"!cm","playerid":"-LoSPavXQIPEp8gLfJ9n","type":"api","who":"Kraynic (GM)"} {"content":"!cm –tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","type":"api","who":"Kraynic (GM)"} "Handle Graphic Movement" "Handle Graphic Movement" {"content":"!cm","playerid":"-LoSPavXQIPEp8gLfJ9n","selected":[{"_id":"-M03YhMObq0YVozmSmut","_type":"graphic"}],"type":"api","who":"Kraynic (GM)"} {"content":"!cm –tracker","playerid":"-LoSPavXQIPEp8gLfJ9n","selected":[{"_id":"-M03YhMObq0YVozmSmut","_type":"graphic"}],"type":"api","who":"Kraynic (GM)"} Not sure if all that is informative or not.&nbsp; Let me know if I need to try something else in either game. Edit: To be clear, nothing happens in chat when I try these commands.
1581699791
Victor B.
Pro
Sheet Author
API Scripter
!cm - main (for main menu)
1581700278
Kraynic
Pro
Sheet Author
Ok, might want to change the wording on the "Combat Master" handout then. To start configuring Combat Master, type !cm –tracker in chat and click the cog icon at the top. I was only trying to follow the instructions!&nbsp; :p&nbsp;&nbsp; Yes, main works much better.
1581701273
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Victor B. said: !cm - main (for main menu) I need to look closer. I was trying !cm -main (no space), and !cm --main (Just in case of a typo).
It has to be !cm --main with two dashes. Based on my testing.
Not bad been testing in a new game bare bones. No other scripts. Couple of things I noticed. For custom sheets or no character sheets if the init bonus is not set the script does respond it goes back to the menu !cm --main menu. Some logic might be put in warning users if the init stat is not found.&nbsp; The next person up in the turn order is a nice touch but I can see where in some games thats going get confusing. It might be nice to have the ability to disable those features. One thing I notice if someone makes a mistake entering a blank url for an image it will cause the api to crash. Might be a good idea to compensate for this kind of misahp. Note this is testing bare bones without group init, tokenmod or any other script.
1581705773

Edited 1581706567
Wow this is awesome! Working great so far the only thing I have run into is the Initative does not re-roll each round when set to that, and if you set up a macro on applying or removing a condition it seems to crash the system. I am trying to use this on the Blinded condition !token-mod --flip light_hassight Edit: Also if you set a condition for 10 rounds, as most conditions are a 1min. The condition does not appear till that creatures next turn when it drops to a 9. Edit Edit: Also the show conditions button at the top does not seem to do anything at the moment. Sorry for all the things, hope this helps when building :)
1581708178

Edited 1581708377
Dumbhuman
Pro
Marketplace Creator
I realize you've got other fires to put out right now, but in the other thread you were asking for examples of macros that people would run when a character's turn comes up.&nbsp; I haven't installed Combat Master yet to see how it functions, but I just wanted to give you a few examples that I currently use with CombatTracker's CT_TURN macro function.&nbsp; It's primarily used for NPCs to make my life as a DM easier. Whenever I have an NPC with a recharge power (such as a dragon's breath weapon), I create an ability on their character sheet named CT_TURN and put in something like this (actually I reference this macro on a character sheet dedicated to macros, but it equates to the same thing): /w gm &amp;{template:simple} {{rname=Ability Recharge}} {{mod=5-6}} {{r1=[[1d6cf&lt;4cs&gt;5]]}} {{normal=1}} That way, every time that particular monster's turn comes up, CombatTracker automatically whispers me with a d6 roll and colors the result green if the power has recharged (in the above case on 5 or 6) or red if it hasn't (4 or lower).&nbsp; It's literally the first thing I should be doing for that monster in combat anyway, so automating it with CombatTracker (or CombatMaster) makes total sense. Occasionally when I'm playing a complicated monster that I don't have memorized well just yet, I'll set its CT_TURN ability macro to whisper a little Powercard cheat sheet to myself to remind myself of its stats, traits, and available actions: !power {{ --name|@{selected|character_name} --titlefontshadow|none --whisper|GM --format|badguys --tokenid|@{selected|token_id} --npc_attribute_summary|@{selected|character_id} --Speed:|@{selected|npc_speed} --npc_qualities_summary|@{selected|character_id} --npc_skills_summary|@{selected|character_id} --!Actions| --npc_action_list|@{selected|character_id} --!Reactions| --npc_reaction_list|@{selected|character_id} --!LA| --npc_legendaryaction_list|@{selected|character_id} --!TR| --npc_trait_list|@{selected|character_id} --Spell Attack Bonus:|@{selected|spell_attack_bonus} --Spell Save DC:|@{selected|spell_save_dc} --spell_slots|@{selected|character_id} --spell_list|@{selected|character_id} }} For things like trolls or vampires that regenerate at the beginning of the turn, I use their ability named CT_TURN to provide a little reminder prompt with an API button called "Regenerate " in the title bar that links to another ability macro on my dedicated macro character sheet to add the hit points via TokenMod.&nbsp; So my troll NPCs effectively have an ability on their character sheet named CT_TURN which looks like this: /w gm &amp;{template:default} {{name=[Regenerate](~M|regen10)}} {{Unless fire or acid damage taken last round.}} If I had some sort of complicated monster with a recharging attack, regeneration, and lots of traits/actions/spells, I might very well make the CT_TURN macro on its specific character sheet include versions of all three of the above.&nbsp; The basic idea is just getting an automatic action at the beginning of an NPCs turn for those specific things that I'd want to do at the beginning of its turn anyway, but what those specific things are will vary from NPC to NPC and many won't have any CT_TURN ability defined at all.&nbsp; The only functionality that Combat Master would need to carry over from Combat Tracker in order to achieve this is just the option at the start of each turn to trigger an ability with a specific name (such as "CT_TURN") if such an ability exists on&nbsp; the character sheet controlled by the token whose turn has just begun.&nbsp; What's contained within that ability shouldn't matter to Combat Master at all, because many characters won't even have the ability and those that do will have it tailored to their particular needs, whether it's recharging a breath weapon, regenerating, changing the token to a random color, pulling a random battle cry from a rollable table, or whatever else the CT_TURN ability macro contains. I hope that explanation of how I use the CT_TURN functionality is helpful to you.
1581716013

Edited 1581716444
Victor B.
Pro
Sheet Author
API Scripter
Good to hear is woriking at a basic level functionality @Kraynic - I need to update that help file.&nbsp; @everyone, double dashes for commands and you can stack commands if you want --add,condition=prone,duration=1,direction=1 --add,condition=ouchmybackhurts,duration=1,direction=0 @Mark, good idea.&nbsp; I'll add a message in chat if init attribute not set @Anthony, I'll use that very same command and try it out again blinded.&nbsp; I'll see what's happening there.&nbsp; I'll look into the reroll init logic.&nbsp; That had to change due to group-init.&nbsp; Roll20 doesn't support adding double digit numbers to these status icons.&nbsp; I think tracker jacker has something that can do it.&nbsp; So as long as the duration is 9 or less it will show on the icon.&nbsp; Anything over that and I don't show anything.&nbsp; However, the duration shows during player announcements if you turn that on.&nbsp; @KC, thank you.&nbsp; I'll try out those and verify if they are working.&nbsp;
So to add a custom icon to the token when you add the condition do you have to add it with TokenMod or is it suppose to do it automatically?&nbsp; Also is the condition suppose to add when you mainly add the icon because it doesn't seem to do so like before?
1581720635

Edited 1581720860
It's working a lot smoother now minus a few things you already know about. Just one sorta cosmetic thing I noticed is that when a character has more than one condition on them with a message it gets spit into the chat all wonky. The character below is supposed to have the Protection and Prone conditions on them but only the first one comes out in the card. The rest will just go into regular char with no template around it. (I know I can fix the&nbsp;whole ' ’' thing im just being lazy.)
1581722730
Victor B.
Pro
Sheet Author
API Scripter
@devilish, that's a bug.&nbsp; The white box should go all the way down.&nbsp; There's an extra div lurking around&nbsp; cutting off the box.&nbsp;&nbsp; @Kilter, you need libTokenMarker found here (unless The Aaron has already published to Roll20).&nbsp;&nbsp; <a href="https://github.com/shdwjk/Roll20API" rel="nofollow">https://github.com/shdwjk/Roll20API</a> If you've loaded custom icons into Roll20 and added them to your game, when you set the icon type to Token Marker, you'll get a full list of both Roll20 Default Icons and the custom ones you uploaded.&nbsp;&nbsp;
Did that but it doesn't seem to add the icon to the token. It has the icon in the list and for the condition but nothing is added to the token.
1581724841

Edited 1581724946
First look - this seems great :-) Few issues/questions; 1) I tried to delete a condition (Inspiration), and nothing happens, and I get this in the API window; 2) I've also changed my icons to custom Token Markers, changed the defaults to my custom tokens but they don't seem to apply to the token, though the condition does. Is this something I'm doing or a script error? (I also have lib TokenMarker running and see the icons no problem). 3) In CombatTracker there was an ability to have the turn icon rotate - is that an option in CombatMaster and where would it be configured? Thanks for your work on this!
1581726269
Victor B.
Pro
Sheet Author
API Scripter
Kilter you're seeing the icon, so that good and means that it's correctly being pulled.&nbsp; I'll check why it's not being added.&nbsp; I may have broken that logic.&nbsp; It was working.&nbsp;&nbsp;
1581726313
Victor B.
Pro
Sheet Author
API Scripter
Alexander, there is rotate functionality still in CM.&nbsp; How was it being used?&nbsp;&nbsp;