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 .
×

Macro for character sheet button?

I'm wondering if there is a way to write a macro to click a button on a character sheet? And, failing that, if there is a script that will allow you to do it? For context, I've been messing around with the Conan 2d20 sheet and I'm trying to figure out a way to speed up combat by eliminating the need for the players to look at their character sheets at all. Rolls are easy by utilizing the macro and or ability bars. But "Vigor" (hit points) is tracked in what seems to me to be an overly complicated way on the sheet. Essentially, your total Vigor is expressed by a number of black "X's" in an equal number of boxes. Above the boxes are "-" and "+" buttons. When you click the minus button, this subtracts one Vigor, which turns one black "X" to a red "X." Clicking the plus button does the opposite. This is accomplished, as far as I can tell, through toggles. Each box has two attributes: one for the black "X," and one for the red "X." Clicking the plus and minus buttons toggles one attribute "on" and the other "off" (or vice versa) for the next most box.  So, again, I'd like to create a macro for thos plus and minus buttons. I will also then create a Vigor attribute on each character sheet expressed as a number, and append said macro with a ChatSetAttr command that adds or subtracts from this number, allowing Vigor to be expressed as a number on one of the token bars. I COULD just do this anyway and ignore all the checkboxes but... what fun is that? lol
1668967426
Kraynic
Pro
Sheet Author
See if you can drag the button to the quick macro bar.  If you can, the quick macro bar uses the syntax you are after, allowing you to run the command from the bar and then put your cursor in the chat box and hit the up arrow to see the last command sent to chat.
1668968459

Edited 1668968840
Also, I should add, I've right clicked on the button and clicked "Inspect." The name of the buttons are "act_vigorup" and "act_vigordown." I've tried calling to those names as abilities but doesn't seem to work.
1669055116
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
EZ Does it said: Also, I should add, I've right clicked on the button and clicked "Inspect." The name of the buttons are "act_vigorup" and "act_vigordown." I've tried calling to those names as abilities but doesn't seem to work. Can you post the text of your macros? There may be a syntax issue in the way.
1669128852
Kraynic
Pro
Sheet Author
Action buttons are different than roll buttons, so I'm not sure if they can be called from a macro.&nbsp; I haven't (so far) used any in my character sheets other than using them for tab changes.&nbsp; The wiki article on them doesn't mention being able to trigger those buttons with a chat command like you can a regular roll button. <a href="https://wiki.roll20.net/Button#Action_Button" rel="nofollow">https://wiki.roll20.net/Button#Action_Button</a>