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

@Victor I'm having the duplicate issue, but am also having the glitch where I can't PM people. Can you message me and see if I can reply?
1589570702
Victor B.
Pro
Sheet Author
API Scripter
Version 2.13 found here&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed Duplicate announcement of 1st player in turnorder
1589574115

Edited 1589574138
Looks good, Victor! Caught some bugs, both old and new: Handouts for Condition Menu, Timer, and Macro/API still have some image placeholders without images. Handout for Export Menu is empty. Setup still references CombatTracker, in both chat and help Clicking the Help icon in a condition menu causes API to crash
1589576208
Victor B.
Pro
Sheet Author
API Scripter
Version 2.14 found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed - Combat Tracker changed to Combat Master - Condition Help button fixed
1589577128
Victor B.
Pro
Sheet Author
API Scripter
I haven't added export yet.&nbsp; I'll do that next round of fixes
Anyone else having weird conflict still with CashMaster? Running CashMaster V.0.9.1 and CombatMaster V2.0 (set to latest) and for some reason when I try to start combat by selecting a group of tokens and pressing the start icon (!cmaster --turn,start --main) I get messages in chat saying CashMaster commands failed. Nothing errors in code. Same occurs when I end combat. Some of the errors include; CashMaster: ERROR: sender does not exist. ERROR: sender does not exist. and&nbsp; (From CashMaster): ERROR: Invalid Input. Validate that a subject is provided and input is not malformed. In response to DM's command !cmaster --main I know there were conflict issues mentioned way back on page 7 of this thread, has it come up again for anyone else?
1589596778
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Line 1136 of cashmaster defines the event as: &nbsp; &nbsp; if (msg.content.startsWith('!cm') !== true) return; That will catch !cmaster, and is probably not the best way for Cashmaster to check. It would be better to split the msg, but you can probably do a quick and dirty fix by changing that line to: &nbsp; &nbsp; if (msg.content.startsWith('!cm ') !== true) return; It should still return true for all Cashmaster uses and false for CombatMaster.
THANK YOU! Makes total sense. Will be fixing this now! keithcurtis said: Line 1136 of cashmaster defines the event as: &nbsp; &nbsp; if (msg.content.startsWith('!cm') !== true) return; That will catch !cmaster, and is probably not the best way for Cashmaster to check. It would be better to split the msg, but you can probably do a quick and dirty fix by changing that line to: &nbsp; &nbsp; if (msg.content.startsWith('!cm ') !== true) return; It should still return true for all Cashmaster uses and false for CombatMaster.
1589599270
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
:D Let me know if I'm right!
keithcurtis said: :D Let me know if I'm right! Seems to work for me on my quick test. No more errors! Thanks again!
Victor B. said: Version 2.12 found here&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed - A number of bugs related to a token condition on map.&nbsp;&nbsp; New Functionality&nbsp; - Help is in place.&nbsp; Help files being created in Archive to not pollute game.&nbsp; Expect a few bugs here.&nbsp;&nbsp; Outstanding&nbsp; - A few bugs @everyone - if you have a duplicate player announcement, please send me an invite to your game or a copy of your game and promote me to GM.&nbsp; I can't replicate this issue in my games and nothing is leaping out in the code.&nbsp; I'll need to see what's going on within your game causing the issue I not only have this problem, but also a player who gets two turns per round for whatever reason.&nbsp; The second time is out of order, but CM jumps to his character when it is not his turn.&nbsp; Sending you an invite in Direct Message
1589621961

Edited 1589622150
@Vic: Could we have the following command separate from others that whispers to the calling player/ dm only and is titled "Show Current Status"&nbsp; Rather than "Next Player Up"?&nbsp; Maybe, !cmaster --show,selfcheck ? I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat.&nbsp; Being whispered only to the caller will highlight it so they can discern the output - and will not be shown to others, so they do not get confused as to who the next player is in combat, and will also not result in cluttering chat, thereby adding to the DM task of monitoring relative things, like rolls, during combat. TheAaron wrote an API that may have relevant parts in it you may be able to extract for the how-tos and what nots, albeit it is over my head.&nbsp; This allows !me to be placed at the beginning of a chat entry and have it only whisper to whomever called it.&nbsp; Very useful with chat menus. on('ready', () =&gt; { const processInlinerolls = (msg) =&gt; { if(_.has(msg,'inlinerolls')){ return _.chain(msg.inlinerolls) .reduce(function(m,v,k){ let ti=_.reduce(v.results.rolls,function(m2,v2){ if(_.has(v2,'table')){ m2.push(_.reduce(v2.results,function(m3,v3){ m3.push(v3.tableItem.name); return m3; },[]).join(', ')); } return m2; },[]).join(', '); m['$[['+k+']]']= (ti.length &amp;&amp; ti) || v.results.total || 0; return m; },{}) .reduce(function(m,v,k){ return m.replace(k,v); },msg.content) .value(); } else { return msg.content; } }; let lastPlayerId; on('chat:message', (msg) =&gt; { if('api' !== msg.type ){ return; } let args = processInlinerolls(msg).split(/\s+/); switch(args.shift()){ case '!me': { const who=(getObj('player',('API'===msg.playerid ? lastPlayerId : msg.playerid))||{get:()=&gt;'API'}).get('_displayname'); let content = args.join(' '); if(_.has(msg,'rolltemplate') &amp;&amp; _.isString(msg.rolltemplate) &amp;&amp; msg.rolltemplate.length){ content = content.replace(/\{\{/,'&amp;{template:'+msg.rolltemplate+'} {{'); } sendChat(msg.who,`/w "${who}" ${content}`); } break; default: if(/\s!me\b/.test(msg.content)){ lastPlayerId = msg.playerid; } break; } }); });
Wolf Thunderspirit said: @Vic: Could we have the following command separate from others that whispers to the calling player/ dm only and is titled "Show Current Status"&nbsp; Rather than "Next Player Up"?&nbsp; Maybe, !cmaster --show,selfcheck ? I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat.&nbsp; Being whispered only to the caller will highlight it so they can discern the output - and will not be shown to others, so they do not get confused as to who the next player is in combat, and will also not result in cluttering chat, thereby adding to the DM task of monitoring relative things, like rolls, during combat. Seconding Wolf's request here, if it's possible, Vic. Any time I use the Show Conditions option, it posts that Next Player Up dialog to the chat, which is confusing to my players. Changing the title to Show current status (or conditions or whatever) and setting it to a player-specific whisper would be very helpful.&nbsp;
1589655967
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I would also appreciate this tweak. :)
Jay R. said: Wolf Thunderspirit said: @Vic: Could we have the following command separate from others that whispers to the calling player/ dm only and is titled "Show Current Status"&nbsp; Rather than "Next Player Up"?&nbsp; Maybe, !cmaster --show,selfcheck ? I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat.&nbsp; Being whispered only to the caller will highlight it so they can discern the output - and will not be shown to others, so they do not get confused as to who the next player is in combat, and will also not result in cluttering chat, thereby adding to the DM task of monitoring relative things, like rolls, during combat. Seconding Wolf's request here, if it's possible, Vic. Any time I use the Show Conditions option, it posts that Next Player Up dialog to the chat, which is confusing to my players. Changing the title to Show current status (or conditions or whatever) and setting it to a player-specific whisper would be very helpful.&nbsp; Although it is a very minor thing, I would also not mind the "next player up" wording being tweaked. Just a quality of life change more than anything.
1589667194
The Aaron
Roll20 Production Team
API Scripter
keithcurtis said: Line 1136 of cashmaster defines the event as: &nbsp; &nbsp; if (msg.content.startsWith('!cm') !== true) return; That will catch !cmaster, and is probably not the best way for Cashmaster to check. It would be better to split the msg, but you can probably do a quick and dirty fix by changing that line to: &nbsp; &nbsp; if (msg.content.startsWith('!cm ') !== true) return; It should still return true for all Cashmaster uses and false for CombatMaster. This will let you still use a bare "!cm": if(true !== /^!cm(\b\s|$)/.test(msg.content)) { return; }
Could you make the "Round Counter" in the "Turn Order" have a lower initiative count so that tokens with a negative modifier don't get listed below it?
Is there a way to add statuses that aren't revealed to the players? I haven't been able to figure out a way to do this with CM.&nbsp; It's very handy because it allows you to add things like Curses that the players aren't aware of (yet), or various detrimental effects they may not have figured out yet.&nbsp; TrackerJacker used to do this, and it's a very nice thing to have.
1589730895

Edited 1589730904
Victor B.
Pro
Sheet Author
API Scripter
@d100GM, no I'm afraid not.&nbsp; The -1 is core to the process.&nbsp; It marks the end of the round.&nbsp; I'd suggest you don't auto sort if you have a negative initiative.&nbsp;&nbsp; @Anthony, I'm not going to be adding new functionality, at least for a while, CM has grown and grown and it's getting to the point of becoming too large.&nbsp;&nbsp;
Victor B. said: I'm not going to be adding new functionality, at least for a while, CM has grown and grown and it's getting to the point of becoming too large.&nbsp;&nbsp; Good call.&nbsp; &nbsp;I would rather have 4-5 separate API tools than a Swiss Army knife that only 4 tools are used out of 20&nbsp;
Hey all, I seem to have hit a wall when trying to configure CombatMaster (v. 2.14) for use with Earthdawn. For example, I have created a Condition called "Knocked Down" which obviously gives some disadvantages to the character (Similar to Prone I guess, in other games). But I can't seem to figure out how to add the command from CombatMaster so that it also applies the effect of this condition, not only shows the icon on the token. From the chat or a macro, this line would apply this effect to a selected token (or remove it, if run again): !edToken~ !Earthdawn~ ForEach~ marker: knocked :t But if I add this into the Macro or API section in CombatMaster I get only errors, and so my (limited) understanding of the script means I have to add a Substitution but I have really no idea what I'm gonna do with that after. If anybody feels they have a spare minute to explain to me what I'm doing wrong I'd be eternally grateful. And thanks to Victor for this script!
@Vic just wanted to say THANK YOU for everything your doing with CombatMaster! Me and my group are new to roll20 and APIs, originally using the script libraries combat tracker. The things you have done are leaps and bounds better and have made DMing a dream!&nbsp; Cheers!
Hi, Loving CombatMaster - however I'm running an issue.&nbsp;I've tried using roll20AM commands for start of rounds and start of turns but it doesn't seem to work? If I put random text it does spit it out at the start of a turn for instance but the full roll20AM command seems to do nothing. See below the command I've put in: !roll20AM --audio,play|Round End It does not generate any response from roll20AM either, however if the command simply posted in the chat does work, so it's valid input:
1589893464
Victor B.
Pro
Sheet Author
API Scripter
Mort your entire command isn't in CM.&nbsp; You need to bracket the command when entering it into CM {{!roll20AM {{--audio,play|Round End}}}}
1589893516
Victor B.
Pro
Sheet Author
API Scripter
Ypsi, did you bracket your commands like I just showed Mort in prior post, when entering into CM?&nbsp;&nbsp;
On a side note of roll20AM. I am no longer able to import the jukebox. Every time I do so, it breaks the API. Any suggestions? SyntaxError: Unexpected end of JSON input SyntaxError: Unexpected end of JSON input &nbsp;&nbsp;&nbsp; at JSON.parse (&lt;anonymous&gt;) &nbsp;&nbsp;&nbsp; at importJukebox (apiscript.js:10136:33) &nbsp;&nbsp;&nbsp; at configHandler (apiscript.js:9428:13) &nbsp;&nbsp;&nbsp; at Timeout._onTimeout (apiscript.js:9188:17) &nbsp;&nbsp;&nbsp; at listOnTimeout (internal/timers.js:549:17) &nbsp;&nbsp;&nbsp; at processTimers (internal/timers.js:492:7)
Victor B. said: Mort your entire command isn't in CM.&nbsp; You need to bracket the command when entering it into CM {{!roll20AM {{--audio,play|Round End}}}} Hey Victor thanks for that, works perfectly. I do have another issue however.&nbsp; If I set audio to run at the start of each turn like so: It won't work, audio will however play if I set it to the beginning of Each Round (on each turn). Not sure if this is a bug or something, I was hoping to have a different sound on each round and each turn. I'm quite confused why the each round one is setting off on each turn. Hopefully that makes sense :). Thanks for the help so far.
Is there a way to trigger the !deal-init API at the end of each round? I was trying to use the macros built into this API tool, and the referenced macro 'fired' (as in it was sent to the chat), but nothing occurred. I did use brackets. I used {{!deal-init}} in the All Tokens Macro field for Turn Order Setup . I also noticed that when starting combat, CombatMaster would cycle through an entire round of combat (Round 0? No round marker was placed in chat, the round counter in the Turn Tracker didn't update) when using card initiative, as is the standard for Savage Worlds. Screen cap:
I can't seem to get&nbsp; !token-mod --off light_hassight and the opposite !token-mod --on light_hassight to work on the blinded condition the below image shows it just keeps reverting to !token-mod &nbsp;
1589921031

Edited 1589921078
Victor B. said: Ypsi, did you bracket your commands like I just showed Mort in prior post, when entering into CM?&nbsp;&nbsp; I've tried to do different variations for the brackets, I am really not sure how many and where they are needed, or whether the pipe is needed here or not. But I can't get it to work. Most iterations of the brackets return with this error: "2020-5-19 20:32:47 (UTC)&nbsp; Error! No token selected." A few examples of what I've tried: {{!edToken~ !Earthdawn~ ForEach~ marker: knocked :t}} {{!edToken~ {{!Earthdawn~ ForEach~ marker: knocked :t}}}} {{!edToken~ {{!Earthdawn~ {{ForEach~ marker: knocked :t}}}}}} While a few of the iterations returned a complete script crash which required me to restart the API. Here's one of the crash errors: TypeError: Cannot read property 'replace' of undefined &nbsp;&nbsp;&nbsp; at apiscript.js:12970:37 &nbsp;&nbsp;&nbsp; at Array.forEach (&lt;anonymous&gt;) &nbsp;&nbsp;&nbsp; at sendCalltoChat (apiscript.js:12963:27) &nbsp;&nbsp;&nbsp; at doAddConditionCalls (apiscript.js:12914:17) &nbsp;&nbsp;&nbsp; at apiscript.js:11477:12 &nbsp;&nbsp;&nbsp; at Array.forEach (&lt;anonymous&gt;) &nbsp;&nbsp;&nbsp; at addCondition (apiscript.js:11474:25) &nbsp;&nbsp;&nbsp; at commandHandler (apiscript.js:10787:17) &nbsp;&nbsp;&nbsp; at apiscript.js:10580:25 &nbsp;&nbsp;&nbsp; at Function.each (/home/node/d20-api-server/node_modules/underscore/underscore.js:188:9) But I don't think you need to pay attention to that, probably just a bad attempt by me. I really start to wonder if it's at all possible to call the Earthdawn API from CM, maybe it simply just doesn't work?
Colin B. said: I can't seem to get&nbsp; !token-mod --off light_hassight and the opposite !token-mod --on light_hassight to work on the blinded condition the below image shows it just keeps reverting to !token-mod &nbsp; I tried the bracketing method mentioned in relation to Morts post above and although it now shows in the API section the full code I want it to activate it doesn't do it. I can type the code manually in the chat box and it works but not through this api
1589927231

Edited 1589927583
Victor B.
Pro
Sheet Author
API Scripter
@Colin, read the help on API &amp; Macros.&nbsp; Your syntax is incorrect
1589927490

Edited 1589927605
Victor B.
Pro
Sheet Author
API Scripter
@Ypsi, Some APIs won't work with CM.&nbsp; The ~ shows that it's kinda non-standard.&nbsp; I say kinda because there aren't really any standards, but The Aaron has gone a long way in establishing them.&nbsp; The issue I see is that API is expecting selected tokens.&nbsp; Unless it can accept a specific token id, then you can't run it out of CM.&nbsp; Selected means directly invoked from Roll20.&nbsp; CM can't emulate that.&nbsp; See if the API accepts specific token ids
1589927708
Victor B.
Pro
Sheet Author
API Scripter
@Michael, you're trying to import.&nbsp; Take the export file and put into notepad and make sure you didn't pick up anything extra at the end, like the back button.&nbsp;&nbsp;
How Can I change the Turn order from Descending to Ascending. Dont want to create work for you. But a quick code change on my end would be fine. I finally used this last night. They loved it... :)
@Victor That worked. Thank you! Side note- Is it possible yet to set two different sound files for Combat Master Turnorder, i.e. Beginning of round and Beginning of turn? Currently, whatever sound I set to "Beginning of round" auto defaults to "beginning of turn" as well, no matter what sound file I have for beginning of turn.
1589929054

Edited 1589929089
Victor B.
Pro
Sheet Author
API Scripter
@bilbo, you can't.&nbsp; You can manually sort ascending, but I'd shut off autosort if you do.&nbsp; Or change the sort to asc in the code.&nbsp;&nbsp;
Victor B. said: @Colin, read the help on API &amp; Macros.&nbsp; Your syntax is incorrect Hi, I am using the full syntax as {{!token-mod {{--off light_haslight}}}} as is in the examples on your help document but it still isn't working. If I am missing something which help document are you referencing. I am practising googlefoo right now to try to find the answers.
Victor B. said: @Ypsi, Some APIs won't work with CM.&nbsp; The ~ shows that it's kinda non-standard.&nbsp; I say kinda because there aren't really any standards, but The Aaron has gone a long way in establishing them.&nbsp; The issue I see is that API is expecting selected tokens.&nbsp; Unless it can accept a specific token id, then you can't run it out of CM.&nbsp; Selected means directly invoked from Roll20.&nbsp; CM can't emulate that.&nbsp; See if the API accepts specific token ids Appreciate your input here Victor. I've gone through the API .js file for Earthdawn and it's almost 10 000 lines. I couldn't figure out whether it accepts a specific token id or not since my JS skills aren't that great. There were a few references to token id, I guess the most relevant could be this comment: "// We have been passed a tokenID to act upon. Set TokinInfo and CharID." Anyway, I give up on this. I want to use CM to get some help with keeping track of the debuffs / buffs going on each round, the duration and stuff like that, and it does that just great. So now it's just an extra step of having to apply or remove these effects manually through the character sheets which is definitely worth it. Thanks again for your help, much appreciated. :)
I would like to change the code on my end. I found it in line 1800+ But I was not successful in changing it. Any tips...??? Greatly appreciated... :)
Anyone know if the one click in the API menu has been updated yet?
Victor B. said: @Colin, read the help on API &amp; Macros.&nbsp; Your syntax is incorrect Solved, thank you for the hint @Victor. I also realised I was using an out of date version which didn't help.
1589939538
Victor B.
Pro
Sheet Author
API Scripter
There's a as-api command that's need as well as a ids- parameter required.&nbsp; This is all in either API &amp; Macro Help and conditions where it discusses API syntax.&nbsp;&nbsp;
1589939642
Victor B.
Pro
Sheet Author
API Scripter
One click hasn't been updated yet.&nbsp; Coming next week.&nbsp;&nbsp;
1589940911
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Colin B. said: Victor B. said: @Colin, read the help on API &amp; Macros.&nbsp; Your syntax is incorrect Hi, I am using the full syntax as {{!token-mod {{--off light_haslight}}}} as is in the examples on your help document but it still isn't working. If I am missing something which help document are you referencing. I am practising googlefoo right now to try to find the answers. Try running that command outside of CombatMaster. I don't think there is a light_haslight argument. Did you mean light_hassight?
keithcurtis said: Colin B. said: Victor B. said: @Colin, read the help on API &amp; Macros.&nbsp; Your syntax is incorrect Hi, I am using the full syntax as {{!token-mod {{--off light_haslight}}}} as is in the examples on your help document but it still isn't working. If I am missing something which help document are you referencing. I am practising googlefoo right now to try to find the answers. Try running that command outside of CombatMaster. I don't think there is a light_haslight argument. Did you mean light_hassight? Yes, that was a typo on the forums, I had the correct command in my game. and have got it working now. Thank you for all your help @Victor B and @KeithCurtis Just for reference the help document Victor B was referring to was archived in my handouts which is why I didn't find it right away.
DM Neil said: Is there a way to trigger the !deal-init API at the end of each round? I was trying to use the macros built into this API tool, and the referenced macro 'fired' (as in it was sent to the chat), but nothing occurred. I did use brackets. I used {{!deal-init}} in the All Tokens Macro field for Turn Order Setup . I also noticed that when starting combat, CombatMaster would cycle through an entire round of combat (Round 0? No round marker was placed in chat, the round counter in the Turn Tracker didn't update) when using card initiative, as is the standard for Savage Worlds. Screen cap: Can anyone help me with this? I've got the macro written in the Turn Order Setup fields as {{!deal-init}}. Do I need to set up an ids- parameter, or invoke an as-api command? The latter is completely foreign to me, and I would need help with that. Likewise, if this requires a substitution string I'm a gonna need help.
1590159408
Victor B.
Pro
Sheet Author
API Scripter
@everyone, a bit shout to persephone who redid the help files.&nbsp; That was a lot of work and she did a great job.&nbsp; I haven't mentioned her yet, my bad.&nbsp;&nbsp;