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

CombatMaster 2.0

1604718870

Edited 1608182436
Victor B.
Pro
Sheet Author
API Scripter
This is the start of a new thread.&nbsp; I've wanted to do this for a long time since CombatMaster has gone way beyond alpha.&nbsp; Please post here for CombatMaster questions, etc.&nbsp; The newest version can be found here: <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> &nbsp; There is currently an issue with the one click on Roll20 Github.&nbsp; It will not work.&nbsp; Until it's resolved, use this above link. Use the RAW button to copy and then paste into a new script within your game.&nbsp; NOTE: This issue has been fixed.&nbsp; One click is working.&nbsp; Version 2.36 To start Combat Master type !cmaster --main .&nbsp; There's a help icon in the upper right corner for each menu that you see within CM.&nbsp; Click on it if you have questions about that part.&nbsp;&nbsp; There's tons of posts surrounding macro/api calls and everything else you might think about in the older thread of Combat Master located here:&nbsp; <a href="https://app.roll20.net/forum/post/8126152/combatmaster-alpha" rel="nofollow">https://app.roll20.net/forum/post/8126152/combatmaster-alpha</a> What is Combat Master?&nbsp; I combined Combat Tracker and Status Info together.&nbsp; You cannot run either Combat Tracker or Status Info with Combat Master.&nbsp; Keeping the original functionality provided by Robin, there are menus to tailor initiative rolling, stepping through the turnorder, a configurable player turn timer, control over announcements of a players turn in chat, how conditions are displayed, as well as any number of conditions or spells that you wish to track and easily assign, including concentration spells.&nbsp; Menus have been added to make adding and removing conditions quick.&nbsp; Macros can still add or remove conditions if needed.&nbsp;&nbsp; Combat Master will track concentration , the caster, the duration and notify the GM if the caster requires a con save to maintain the concentration.&nbsp; Spells and conditions can be assigned or removed easily and quickly using the main CM menu.&nbsp; CM can also detect when spells are cast and auto-add that spell, if you wish, to Combat Master.&nbsp;&nbsp; Combat Master allows for integration with other APIs such as Token Mod or CharSetAttr.&nbsp; It also integrates with Token Condition API.&nbsp; Providing the API is written in a way that will accept a token id, character id or character name, that API can be integrated.&nbsp; External API calls are made at the beginning of a Round, each Turn, when conditions are assigned and when they are removed.&nbsp;&nbsp; You can export from Combat Tracker (not all versions supported) and import into CM.&nbsp; You can also export CM from one game to another.&nbsp;&nbsp;
Getting in a feature request for the next major version of CM: the ability to automatically remove Concentration if the player fails the saving throw. Since you have them roll (manually), it shouldn't (I think?) be too much to remove Concentration, and that way agency is still kept in their hands (I agree with you that players want to roll themselves).
1604796024
Victor B.
Pro
Sheet Author
API Scripter
I've been thinking about that.&nbsp; Requires an auto roll con save.&nbsp;&nbsp;
1604819862
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
It might be nice to give a very broad overview of the script: what it does and how to call up the menu when first installed. For new users. There are still occasional folks using Robin's script who are surprised that the New and Improved flavor exists.
keithcurtis said: It might be nice to give a very broad overview of the script: what it does and how to call up the menu when first installed. For new users. There are still occasional folks using Robin's script who are surprised that the New and Improved flavor exists. Agreed. In particular, the fact that CM deprecates StatusInfo, supports custom token markers, and handles concentration on its own should be mentioned in the overview IMO.
1604848835
Victor B.
Pro
Sheet Author
API Scripter
Yes, I'll update the JSON script so it shows with one click.&nbsp; I may kick out a small message to chat each time the API server is restarted also.&nbsp;&nbsp;
1604849233
Victor B.
Pro
Sheet Author
API Scripter
@Andrea, hopefully you've shifted threads.&nbsp; Your error is pointing at Turn API calls.&nbsp; Are you trying to use group-init to reroll initiative each round?&nbsp; If so, CM already has that built into it's own initiative roller.&nbsp; Group-init is far more robust, but if you need the reroll init each round, I would suggest CM for that if possible.&nbsp;&nbsp; Also, yes you can use a macro to assign conditions, but you need to use the CM syntax, not a macro syntax to do this.&nbsp; Select the token(s) you want to assign the condition to and then in your macro add this: !cmaster --add,condition=earthbind,duration=10,direction=-1.&nbsp;&nbsp; This will assign earthbind condition (in this case a spell) to all selected tokens.&nbsp; Duration of 10 rounds (one minute in 5e) and each round it counts down by 1 round until earthbind is removed.&nbsp;&nbsp;
1604855901

Edited 1604856586
Victor B. said: @Andrea, hopefully you've shifted threads.&nbsp; Your error is pointing at Turn API calls.&nbsp; Are you trying to use group-init to reroll initiative each round?&nbsp; If so, CM already has that built into it's own initiative roller.&nbsp; Group-init is far more robust, but if you need the reroll init each round, I would suggest CM for that if possible.&nbsp;&nbsp; Also, yes you can use a macro to assign conditions, but you need to use the CM syntax, not a macro syntax to do this.&nbsp; Select the token(s) you want to assign the condition to and then in your macro add this: !cmaster --add,condition=earthbind,duration=10,direction=-1.&nbsp;&nbsp; This will assign earthbind condition (in this case a spell) to all selected tokens.&nbsp; Duration of 10 rounds (one minute in 5e) and each round it counts down by 1 round until earthbind is removed.&nbsp;&nbsp; Yes here i am! thanks for thee fast reply! nope this is my sequence for every map: my player roll their initiative using:&nbsp; /em initiative is [[1d20+@{selected|nimble}&amp;{tracker}]]! after that i select all the token i use as enemy and roll their initiative with&nbsp; !group-init and after this, when everything is ready, i start Combat master pressing play.&nbsp; Everythings works fine, as long as is my players turn, but when is the turn of an Npc the api crashes with that message. am i doing something wrong ? i could roll for the initiative for my players too but i like that they are responsible for their throws. after that i don't use Group Init again. Here is a video:&nbsp;<a href="https://drive.google.com/file/d/1MCeXm1s4vUchGV3w4WEuZkwUt7TV8RFT/view?usp=sharing" rel="nofollow">https://drive.google.com/file/d/1MCeXm1s4vUchGV3w4WEuZkwUt7TV8RFT/view?usp=sharing</a>
1604856502
Victor B.
Pro
Sheet Author
API Scripter
And when you hit play, that's when the error occurs.&nbsp; That's pointing at a turn based API call.&nbsp; Make sure all the api calls in turnorder menu in CM are set to 'None'
1604856730

Edited 1604856813
i edited the previous message with a video that shows what happens. Victor B. said: And when you hit play, that's when the error occurs.&nbsp; That's pointing at a turn based API call.&nbsp; Make sure all the api calls in turnorder menu in CM are set to 'None' You mean like this? or do i have to change something ?
1604856802
Victor B.
Pro
Sheet Author
API Scripter
I just went into a game, made sure on CM initiative menu that Roll Initiative is set to false.&nbsp; Used group-init to populate the turnorder.&nbsp; Started combat without issue.&nbsp;&nbsp;
1604856960
Victor B.
Pro
Sheet Author
API Scripter
Make sure target tokens are set to 'None'.&nbsp; Thats functionality I never did much with but haven't taken out yet.&nbsp; I just set CM to group-init and started combat without issue.&nbsp; There's something else going on.&nbsp; I think it would be easier if you PM me an invite to game.&nbsp; And then promote me to GM once I'm in game and I can take a look.&nbsp;&nbsp;
Victor B. said: Make sure target tokens are set to 'None'.&nbsp; Thats functionality I never did much with but haven't taken out yet.&nbsp; I just set CM to group-init and started combat without issue.&nbsp; There's something else going on.&nbsp; I think it would be easier if you PM me an invite to game.&nbsp; And then promote me to GM once I'm in game and I can take a look.&nbsp;&nbsp; Sure will do right now! thanks so much!
1604858227
Victor B.
Pro
Sheet Author
API Scripter
Version 2.37 can be found here:&nbsp; <a href="https://github.com/vicberg/CombatMaster" rel="nofollow">https://github.com/vicberg/CombatMaster</a> Fixed - The turnorder api calls were stopping the sandbox when a token not linked to a character sheet was passed in.&nbsp;&nbsp;
1604858306

Edited 1604858461
Andreas J.
Forum Champion
Sheet Author
Translator
keithcurtis said: It might be nice to give a very broad overview of the script: what it does and how to call up the menu when first installed. For new users. There are still occasional folks using Robin's script who are surprised that the New and Improved flavor exists. Victor, I strongly recommend what Keith said, to edit the first post in this thread to contain more info, it will save time for both you and others if the important stuff is mentioned right there. (Pretty sure you don't want to keep answering the same questions over and over again, if you can just point people to the first post here) I suggest: Copy the API description from the previous thread link to your repo so&nbsp; it's easier to find the working/latest API Point out that the API Menu version still doesn't work, and that manual install is currently needed clearly say that !cmaster --main is the command to launch the API link to the old thread (so past discussions can be found) perhaps even a screenshot of the menu. I'll submit an update to github to update the forum link to this new thread, as well as submit v.2.37
Hello, it's me again. i'd like to use this macro:&nbsp; !modattr --silent --mod --charid @{Hugo|character_id} --Ap|10 !modattr --silent --mod --charid @{Squall|character_id} --Ap|10 !modattr --silent --mod --charid @{Jack|character_id} --Ap|10 !modattr --silent --mod --charid @{Teferi|character_id} --Ap|10 !modattr --silent --mod --charid @{Dante|character_id} --Ap|10 but only for the active character.&nbsp; (i tried this macro and put it under "Beginning of each turn macro") but what it does is, every turn all characters Ap gets +10. what i would like is that every time is a specified character turn, that character alone gets 10+ Ap. is it possible ?&nbsp; &nbsp;thank you in advance again!
1604941985
Andreas J.
Forum Champion
Sheet Author
Translator
Victor, in the first post, the link to your repo is broken, there is an extra "." on the url, so you end up on a page tha says it doesn't exist.
Currently using group initiative, CT tracker and status info apis with the shaped sheet.&nbsp; This looked like it may be able to replace all three with just one api and add some neat features to boot.&nbsp; Created a test game but can't get the marker to show up on turn, the camera to focus on that token etc. The turn order changes but no fancy effects.&nbsp; Haven't tried to add status conditions yet.&nbsp; The API is crashing a lot.&nbsp; Maybe Roll20 is just having hiccups so will try again tomorrow.&nbsp; This looks promising though if I can get it work play nicely.&nbsp; Thanks for the work.
JP said: Currently using group initiative, CT tracker and status info apis with the shaped sheet.&nbsp; This looked like it may be able to replace all three with just one api and add some neat features to boot.&nbsp; Created a test game but can't get the marker to show up on turn, the camera to focus on that token etc. The turn order changes but no fancy effects.&nbsp; Haven't tried to add status conditions yet.&nbsp; The API is crashing a lot.&nbsp; Maybe Roll20 is just having hiccups so will try again tomorrow.&nbsp; This looks promising though if I can get it work play nicely.&nbsp; Thanks for the work. Are you on the same page as the player flag? Do you have the other scripts disabled/ not installed? Have you run&nbsp; through the settings for the API and adjusted it to flavor? Have you run all configs on the Shaped API?
Yes, Wolf's questions are ones all new users of Combat Master should resolve. Particularly that Player ribbon thing which is basically a rite of passage for using CM, lol. Once you get CM going, you won't want to go back. It's a great script.
Yes, testing on a page that the players weren't on was my faux pas.&nbsp; Should've thought of that.&nbsp; thanks for the help.&nbsp; A few questions based on my testing today. 1-Any way to easily turn off the delay turn button? 5e rules don't allow delaying turn.&nbsp; I tried out the auto add spells feature, which appears to add spells as conditions which can then be applied to the targets of the spell.&nbsp; Very cool and useful, and helps me understand the necessity of the Change view condition filters for when you have many spells entered. And I have to find cool custom tokens for all these spells now! 2- Is it intended that upon casting a spell already entered as a condition in CM and with concentration field set to true for that spell, the concentration condition would then be applied to the caster?&nbsp; Or would this have to be done manually? Trying to test with the hex spell but the api crashes so much I'm having trouble seeing what's supposed to happen.&nbsp;&nbsp; 3- how does CM determine whether a caster under the concentration condition has been hit and should make a save?&nbsp; I'm not seeing anything trigger when reducing HP with concentration applied.&nbsp; HP is the attribute the Shaped sheet uses afaik.
1605066267

Edited 1605066286
Victor B.
Pro
Sheet Author
API Scripter
1) No I didn't put control over the delay button,&nbsp; Simply tell your players to not touch it 2) If the spell is already in CM and CM can detect the caster (not always possible depending on how the spell if formatted), it auto assigns concentration to caster.&nbsp; If it can't detect the caster, it will first ask for the targets of the spell and then ask for the caster as two separate menus sent to chat.&nbsp;&nbsp; 3) Make sure your wound bar is set up.&nbsp; Example above, first bar has to be set to HP in the token.&nbsp; When the damage is applied to token (or linked char sheet), Cm looks if concentration is assigned to token and then sends a message to chat saying the caster has to make a con save
Victor B. said: 3) Make sure your wound bar is set up.&nbsp; Example above, first bar has to be set to HP in the token.&nbsp; When the damage is applied to token (or linked char sheet), Cm looks if concentration is assigned to token and then sends a message to chat saying the caster has to make a con save Hi Victor, how needs damage to be applied, manually decreasing HPs in character sheet would be OK too?
and Victor ... you'r doing such an awesome and fantastic work !&nbsp; A big thank you for all your time, dedication and efforts you continuously put into making CombatMaster better and tirelessly fighting all these bugs . &nbsp; :)
1605133960
Victor B.
Pro
Sheet Author
API Scripter
any wounds cause a con save, even 1 point.&nbsp; This is following 5e rules.&nbsp;&nbsp;
Hello! I searched but couldn’t find an answer. is it possible to insert a command like&nbsp; !cmaster add blinded to target 1/2/3&nbsp; and to have this triggered by the player from his sheet without the need to select his character?&nbsp; Let me know if I didn’t explain my self clearly! thanks in advance!
1605421699
Victor B.
Pro
Sheet Author
API Scripter
That sounds to me like a token action which can call a macro for sure and an api (i believe but I don't use them).&nbsp; A list of actions shows and the players select an action.&nbsp;&nbsp; What are you trying to accomplish?&nbsp;&nbsp; Players can only select their own tokens so they can't see what's going on with an NPC, etc.&nbsp; So the only way a player can assign a condition to NPCs is either 1) you have to allow it and they now have access to information they shouldn't, or 2) you need to select the tokens.&nbsp;&nbsp;
Victor B. said: That sounds to me like a token action which can call a macro for sure and an api (i believe but I don't use them).&nbsp; A list of actions shows and the players select an action.&nbsp;&nbsp; What are you trying to accomplish?&nbsp;&nbsp; Players can only select their own tokens so they can't see what's going on with an NPC, etc.&nbsp; So the only way a player can assign a condition to NPCs is either 1) you have to allow it and they now have access to information they shouldn't, or 2) you need to select the tokens.&nbsp;&nbsp; Yup kinda like that!&nbsp; my players have some abilty like: Holy shield, that gives holy shield to all the players in their range. what they have in their character sheet is a macro that they hit and calculate how many turn the holy shield lasts and target witch player are affected. what i'd like to have is to implement inside the macro the possibility to automatically add the condition Shielded to all the targets, without me having to intervene.&nbsp; if is not possible i'll continue to add it myself but that would simplify greatly the process. /em Uses Holy Shield Lvl 1 "*Let's do it @{target|token_name}*" !token-mod --ids @{target|token_id} --set statusmarkers|Shielded:+[[ceil(d4/2)]] !ammo @{Teferi|character_id} AP -80 Action Points| Intead of token mod which only adds the marker but not the condition, i'd like to be able to use !cmaster,&nbsp; so that the condition is set (but targeting and not selecting)
1605455340
Victor B.
Pro
Sheet Author
API Scripter
Oh, Change the spell to targeted.&nbsp; That's an option in the condition menu.&nbsp; Then when the caster casts holy shield a message is sent to chat, select the targets of this spell, you still have to select the tokens because they player won't be able to.&nbsp; Click the checkmark and the spell is assigned to the targets but based on the caster.&nbsp; Does this accomplish your goal?&nbsp;&nbsp;
Hi Victor, in your opening message of this thread, the URL to github doesn't work because it includes the trailing "."
1605470001
Victor B.
Pro
Sheet Author
API Scripter
Fixed
Hi, If I try and use anything for 'Marker Type' in the turnorder setup other than External URL (and have a valid URL selected), I get this error? I also have the 'next turn' marker turned off. Thanks :) TypeError: Cannot read property 'substring' of null TypeError: Cannot read property 'substring' of null at TrackedObj._validateAttrs (/home/node/d20-api-server/api.js:905:27) at createObj (/home/node/d20-api-server/api.js:2705:23) at getOrCreateMarker (apiscript.js:11859:22) at doTurnorderChange (apiscript.js:12017:27) at handleTurnorderChange (apiscript.js:12084:13) 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 TrackedObj.set (/home/node/d20-api-server/api.js:1047:14) at updateLocalCache (/home/node/d20-api-server/api.js:1345:18) at /home/node/d20-api-server/api.js:1635:7
Hi, i discovered that whenever i use a macros like This: &nbsp;!token-mod --set bar2_value|+10 or this:&nbsp; !modattr --silent --mod --charid @{Dante|character_id} --Ap|10 and set them in my character abilty and inside Combat Master: Beginning of Each Turn Macro&nbsp; i get this error whenever the turn goes to the character with that macros. TypeError: Cannot read property 'get' of undefined TypeError: Cannot read property 'get' of undefined at apiscript.js:17639:44 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:1661:12 at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:560 at hc (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:39:147) at Kd (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:546) at Id.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:93:489) at Zd.Ld.Mb (/home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:94:425) at /home/node/d20-api-server/node_modules/firebase/lib/firebase-node.js:111:461 i also tried to disable the Combat Master: Beginning of Each Turn Macro&nbsp; and use the macros above with OnMyTurn script, but it crashes anyway any idea why?
1605637714
Victor B.
Pro
Sheet Author
API Scripter
External URL logic doesn't work.&nbsp; Use the default token markers.&nbsp; I've been meaning to either fix or remove the external URL option.&nbsp;&nbsp;
1605637786
Victor B.
Pro
Sheet Author
API Scripter
Andrea, the API server crunched.&nbsp; That error isn't coming out of CM.&nbsp;&nbsp;
This will seem somewhat vague, as I don't know what debug info is useful, however upon upgrading to 2.37 I don't see turn announcements anymore. There are no error messages in the output console. the turn annoucements simply do not appear (It's a 5e OGL sheet game if it matters). Both announce turns and rounds are set to true, however while rounds display, turns do not. When I switch on the turn announcement I see the following in the console: "config,announcements,key=announceTurn,value=true" "Lookup:" "Tokens:config,announcements,key=announceTurn,value=true" {"details":{"announcements":"announcements","key":"announceTurn","value":true},"action":["config"]} "Command Handler" ["config"] "show,announce" "Lookup:" "Tokens:show,announce" {"details":{"announce":"announce"},"action":["show"]} "Command Handler" ["show"] The Output console shows the following when I pass the turn to a new player/NPC: "Handle Turnorder Change" "Do TurnOrder Change" "Verify Turnorder" "Get or Create Marker" "Check Marker Turn" "Get or Create Marker" "Check Marker Turn" "Reset Marker" "Get or Create Marker" "Check Marker Turn" "Get or Create Marker" "Change Marker" As far as I can tell everything else is working other than Markers (no markers are appearing despite Use Marker being set to true). Any initial ideas on what I can try investigating/debugging?
1605668909

Edited 1605669094
Sorry if this is an obvious answer, but I can't seem to find it in the old thread. I am having trouble getting ChatSetAttr to fire using the Condition API feature.&nbsp; I have tried multiple iterations to no avail.&nbsp; I even built a seperate macro and tried to fire it through the Conditions Macro feature, but the result is the same. I am trying to get a condition (Spell-Mage Armor) to fire the following API !modattr --sel --silent --ac|3 The command I enter in the API field is: {{!modattr}} {{--sel}} {{--silent}} {{--ac|3}} When that didn't work, I made a macro (MageArmor) and used the !modattr command above and used the Condition Macro command MageArmor, but the result is the same: I keep getting the error: 10:04PM (From ChatSetAttr): Errors No target characters. You need to supply one of --all, --allgm, --sel, --allplayers, --charid, or --name.
1605671611

Edited 1605673691
Victor B.
Pro
Sheet Author
API Scripter
Francesco, do you have the player ribbon dragged onto the page your testing?&nbsp; If not, markers don't work.&nbsp; Have to be on player ribbon page.&nbsp;&nbsp; Catswan, check some of the help pages for this.&nbsp; -sel won't work.&nbsp; Thats the selected tokens CM can't pass selected tokens into another API.&nbsp; What you need is to look at modattr and see what the token id command is so Modattr accepts a token id.&nbsp; Then in CM, under macros and apis, you need to create a substitution string linked to token id.&nbsp; And then you add -id &lt;tokensubstring&gt; into your api command.&nbsp; CM takes the token id and replaces the substitution string with the token id.&nbsp; CM can also pass a character id.&nbsp; Create a substitution string for character id and change your command to this {{!modattr {{--charid &lt;yourcharidsubstitutionstring&gt;}} {{--silent}} {{--ac!3}}}}
Victor B. said: Francesco, do you have the player ribbon dragged onto the page your testing?&nbsp; If not, markers don't work.&nbsp; Doh! That was indeed the case, thanks for the quick response! I am not certain if these are "working as intended" or edge cases, but a couple of items from my perspective that would be great to resolve if possible: (1) The announcements set-up has a "Whisper GM Only" flag. When set to "true" then player conditions each turn are indeed only sent to the GM, however NPC conditions still go to general chat anyway (if it matters, the underlying NPC sheets are set to "Always Whisper Rolls"). Should the NPC sheets also be whispered to GM when this setting is true? (2) Announcements - when tokens are on the GM Layer (often used for hiding from players) their turns are still sent to the open chat. Should tokens on the GM layer have their turn announcements whispered by default (in the same way as they don't appear to players on the turn order sheet)? **************************************************** From my perspective the use case is to have monsters that the PCs are not aware of / haven't discovered be able to act / appear with surprise. In the latest case I have a tricksy hag that has been plaguing my party for a while (ever since they defeated her sisters), she was behind a nasty little Fey ambush, but was "hidden" and expected to stay undiscovered (unless the PCs happened to reveal her presence) - but her turn popped up in the chat window to a loud chorus of "... Oh, she's here!!!!". ... which was actually fun as it happens... but not intended :-) What do you think? P.S. Awesome work on the script by the way, it's incredibly useful! Thanks!
There's a separate toggle for showing NPC conditions. Can't remember which menu but it's there.
1605706022
timmaugh
Pro
API Scripter
Victor B. said: Catswan, check some of the help pages for this.&nbsp; -sel won't work.&nbsp; Thats the selected tokens CM can't pass selected tokens into another API.&nbsp;&nbsp; Would the SelectManager script (and slight alteration to the CombatMaster script detailed in that thread) correct this? Or is there something else going on within CombatMaster that prevents it?
Jay R. said: There's a separate toggle for showing NPC conditions. Can't remember which menu but it's there. Got it, thanks Jay! I think you mean the "Show NPC Conditions" option. I had not used this as I (i.e. the GM) wanted to see the NPC Conditions, and assumed that setting simply turned them off for everyone. Oops :-) Problem resolved. ... perhaps a suggestion to change the text for a future release to something like "Show NPC Conditions to players" for that setting for slow folks like me :-&gt;
Francesco said: Jay R. said: There's a separate toggle for showing NPC conditions. Can't remember which menu but it's there. Got it, thanks Jay! I think you mean the "Show NPC Conditions" option. I had not used this as I (i.e. the GM) wanted to see the NPC Conditions, and assumed that setting simply turned them off for everyone. Oops :-) Problem resolved. ... perhaps a suggestion to change the text for a future release to something like "Show NPC Conditions to players" for that setting for slow folks like me :-&gt; Yep, that's the one, and no problem. I went through the same issue a while back until I found that option.&nbsp;
1605737376

Edited 1605737407
Victor B.
Pro
Sheet Author
API Scripter
timmaugh.&nbsp; Great concept.&nbsp; CM could utilize it for condition adding, which often goes against multiple selected tokens.&nbsp; That would allow for using ModAttr with the -sel attribute.&nbsp; The issue on my side, is that I don't always want to pass the -sel attribute into APIs.&nbsp; There's APIs set on the turnorder and those want the current active token in the turnorder.&nbsp; Right now the concept is based on accepting selected, then running through each selected token to apply an API with a command expecting a token id or char id etc.&nbsp; Without a making a lot of changes, I'd need a mechanism to determine if this API is expecting selected tokens vs individual token/char id.&nbsp; That would be something that the user would have to tell me.&nbsp; -sel in one api, might be -select in another or -selected in a 3rd.&nbsp; Or something completely different in another
1605753883

Edited 1605755342
@Victor B&nbsp; That worked like a charm!&nbsp; I have been playing with those substitutions all day to no effect, but it turned out I misinterpreted the API syntax instructions and was separating the API call and commands into individual instances of double curly brackets.&nbsp; Once I corrected that, it worked great!&nbsp; However, it is not letting me do the inverse for the Remove Api. {{!modattr {{--charid characterident}} {{--silent}} {{--ac!3}}}} works great to apply +3 to AC, but {{!modattr {{--charid characterident}} {{--silent}} {{--ac!-3}}}} throws this error: Errors Attribute ac!-3 is not number-valued for character Reed Marx. Attribute left unchanged &nbsp; It looks like this is now a problem with ChatSetAttr not recognizing a negative modifier for AC for some reason. Or is there a character replacement for &lt; - &gt;? EDIT -- Figured it out!&nbsp; The character replacement &lt; ! for |&gt; was not jiving with the &lt; - &gt; symbol.&nbsp; Luckily, the vertical bar | character works fine. So my Add Api text ends up being: {{!modattr {{--charid characterident}} {{--silent}} {{--ac|3}}}} and my Remove Api text is: {{!modattr {{--charid characterident}} {{--silent}} {{--ac|-3}}}} Now to set up the Shield spell! Thanks for your help!
1605754346
timmaugh
Pro
API Scripter
Do you construct the API command lines to feed to the other scripts, or is that coming from the user? (Wondering if there is a way to upgrade/enhance the SM interface in a way that could help what you're doing, or not.)
@timmaughI don't currently use Select Manager, but I am about to look into it...
1605760400
Victor B.
Pro
Sheet Author
API Scripter
The above command catswann just put in is stored and then executed when the condition is assigned or the turnorder is advanced.&nbsp; The brackets around the commands are to prevent my parsing engine from thinking they are CM commands and trying to execute them.&nbsp; The substitution string is replaced by an actual token id (or char id or char name).&nbsp; Then the api command is sent to chat and voila it works.&nbsp;&nbsp; I'm wondering if I use the api subsitution string and add select tokens to it.&nbsp; Then place the substitution string after the -sel (or whatever sytnax) and it get's removed before executing the api.&nbsp; By doing this, it's not much work and it tells CM that this is excepting selected tokens.&nbsp; My question to you, because it isn't clear, is do I need to pass the msg.selected into your api or do you auto-magic find it and pass along?&nbsp;&nbsp;
1605798740
timmaugh
Pro
API Scripter
It should be there auto-magically... When user calls CM, there are selected tokens. &gt;&gt; SM also listens to that call and stores the selected tokens in state CM sends new API command line to chat (let's say, !modattr) MA command reaches chat with new message object &gt;&gt; SM also listens to that call, but since it came from the API, does nothing with it (state still has original selected tokens) If MA is modified to work with SM (by utilizing the three lines listed in the forum thread and also in header comments in the script), &nbsp;&nbsp;&nbsp;&nbsp;then when it sees that the selected property of the message object is missing (undefined), it will look to the state to copy it over. Which really means CM doesn't have to do anything if the downstream script (modattr) is set up to look at the message object for the selected tokens, and also set up to read from SM if the selected is "missing."
1605820399
Victor B.
Pro
Sheet Author
API Scripter
that's nice.&nbsp; But that does require a change to CharSetAttr.&nbsp; Reach out.&nbsp; Or someone wanting to use the -sel parm on charsetattr reach out and request the addition.&nbsp; That make it easy to call charsetattr