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

A macro to turn on/off abilites?

Hello Can macro be written that will put a checkmark in an ability to show on the Macro bar for 4e? Example. I ask the players to make a perception check. The players hit a macro button named "Skill Check". This macro places a check mark on the "Show on Macro Bar" for on all abilities dealing with skill checks (perception, thievery, arcana, etc..). So, the player hits the skill check button, all the skill check macros are "activated" and placed in the macro bar. Once a skill check is done (the player clicks the perception check), all the macros dealing with those skills are turned off and removed from the macro bar. 
1476746063

Edited 1476752813
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
The API doesn't have access to that unforunately. You could make an  ability command button menu though. EDIT: The API does have access to "istokenaction" so you could toggle it on/off as a token action.
So create a token action macro named "abilities". This utilizes "istokenaction" to set the abilities I want to true. Something like that?
1476820777
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
If you were going to go the API route, it would depend on how you wrote the script. I'd probably go with having the command syntax be something like: !toggle &lt;abilityName&gt; [Character Name] The script would then look for an ability in the character linked to the selected token if no character name is passed or in the first character that matches the name passed if a character name is passed. It would evaluate the current state of that ability's "istokenaction" property and flip it to the opposite state (true -&gt; false or false -&gt; true). The downside here is that the display of token actions doesn't update until you unselect the token and then reselect it, so it's not really intuitive to use. If you were going to go the ability command button menu route (the route I'd recommend), then you'd make an ability(or a global macro if everyone is going to have the same ones) and then it will output a menu to chat for people to click on the necessary skill. You can of course set these up so that they whisper to the appropriate player (keeping the actual chat clear of menu spam). And if you want to get fancy and put lots of work into your menu, you can make it a roll query dropdown prompt that pops up and players then select what they want to do. This method is probably the closest to your original goal, but it is also by far the hardest to implement. It is very slick once done though. If you were going to do this, I would highly &nbsp;recommend making them as a character ability instead of a global macro as the html replacements that you will need to do will be parsed out by the global macro whenever you reopen it. Advanced Roll Query Wiki:&nbsp; <a href="https://wiki.roll20.net/Macros#Advanced_Usage_for_" rel="nofollow">https://wiki.roll20.net/Macros#Advanced_Usage_for_</a>... If you want some good examples of what is necessary for the query method, do a forum search for nested roll queries, roll query abilities, or similar terms; there are many threads on the topic already.
Thank you for the helpful guidance. I will do as you suggested and do some more research into the drop down menu.&nbsp;