@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?
@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?
Version 2.13 found here https://github.com/vicberg/CombatMaster
Fixed
Duplicate announcement of 1st player in turnorder
Looks good, Victor! Caught some bugs, both old and new:
Version 2.14 found here: https://github.com/vicberg/CombatMaster
Fixed
- Combat Tracker changed to Combat Master
- Condition Help button fixed
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;
Line 1136 of cashmaster defines the event as:
if (msg.content.startsWith('!cm') !== true) return;
if (msg.content.startsWith('!cm ') !== true) return;
THANK YOU! Makes total sense. Will be fixing this now!
keithcurtis said:
Line 1136 of cashmaster defines the event as:
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:if (msg.content.startsWith('!cm ') !== true) return;It should still return true for all Cashmaster uses and false for CombatMaster.
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 https://github.com/vicberg/CombatMaster
Fixed
- A number of bugs related to a token condition on map.
New Functionality
- Help is in place. Help files being created in Archive to not pollute game. Expect a few bugs here.
Outstanding
- 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. I can't replicate this issue in my games and nothing is leaping out in the code. 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. The second time is out of order, but CM jumps to his character when it is not his turn. Sending you an invite in Direct Message
@Vic: Could we have the following command separate from others that whispers to the calling player/ dm only and is titled "Show Current Status" Rather than "Next Player Up"? Maybe, !cmaster --show,selfcheck ?
I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat. 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. This allows !me to be placed at the beginning of a chat entry and have it only whisper to whomever called it. Very useful with chat menus.
on('ready', () => {
const processInlinerolls = (msg) => {
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 && 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) => {
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:()=>'API'}).get('_displayname');
let content = args.join(' ');
if(_.has(msg,'rolltemplate') && _.isString(msg.rolltemplate) && msg.rolltemplate.length){
content = content.replace(/\{\{/,'&{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" Rather than "Next Player Up"? Maybe, !cmaster --show,selfcheck ?
I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat. 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.
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" Rather than "Next Player Up"? Maybe, !cmaster --show,selfcheck ?
I could see this as a lot of clutter and confusion while my PCs check their current conditions during combat. 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.
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.
keithcurtis said:
Line 1136 of cashmaster defines the event as:
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: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; }
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. 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. TrackerJacker used to do this, and it's a very nice thing to have.
@d100GM, no I'm afraid not. The -1 is core to the process. It marks the end of the round. I'd suggest you don't auto sort if you have a negative initiative.
@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.
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.
Good call. I would rather have 4-5 separate API tools than a Swiss Army knife that only 4 tools are used out of 20
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!
Cheers!
Hi,
Loving CombatMaster - however I'm running an issue. 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:
Mort your entire command isn't in CM. You need to bracket the command when entering it into CM
{{!roll20AM {{--audio,play|Round End}}}}
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
at JSON.parse (<anonymous>)
at importJukebox (apiscript.js:10136:33)
at configHandler (apiscript.js:9428:13)
at Timeout._onTimeout (apiscript.js:9188:17)
at listOnTimeout (internal/timers.js:549:17)
at processTimers (internal/timers.js:492:7)
Victor B. said:
Mort your entire command isn't in CM. 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.
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:
Victor B. said:
Ypsi, did you bracket your commands like I just showed Mort in prior post, when entering into CM?
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) 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
at apiscript.js:12970:37
at Array.forEach (<anonymous>)
at sendCalltoChat (apiscript.js:12963:27)
at doAddConditionCalls (apiscript.js:12914:17)
at apiscript.js:11477:12
at Array.forEach (<anonymous>)
at addCondition (apiscript.js:11474:25)
at commandHandler (apiscript.js:10787:17)
at apiscript.js:10580:25
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
!token-mod --off light_hassightand the opposite
!token-mod --on light_hassightto work on the blinded condition
the below image shows it just keeps reverting to !token-mod
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
@Michael, you're trying to import. 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.
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.
Victor B. said:
@Colin, read the help on API & Macros. 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. The ~ shows that it's kinda non-standard. I say kinda because there aren't really any standards, but The Aaron has gone a long way in establishing them. The issue I see is that API is expecting selected tokens. Unless it can accept a specific token id, then you can't run it out of CM. Selected means directly invoked from Roll20. CM can't emulate that. 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... :)
Victor B. said:
@Colin, read the help on API & Macros. 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.
There's a as-api command that's need as well as a ids- parameter required. This is all in either API & Macro Help and conditions where it discusses API syntax.
Colin B. said:
Victor B. said:
@Colin, read the help on API & Macros. 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 & Macros. 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.