
Show Buttons
...because ButtonManager doesn't abbreviate politely.
FILE: (or in My Repo)
DEPENDENCY SCRIPT: Messenger (one-click)
ABSTRACT: Both abilities and macros can be used as token action buttons (the buttons at the top of your VTT when you select a token), and ShowButtons lets you manage which abilities and macros you want to see. A command-line interface lets you quickly send a command through chat to configure what buttons are available without having to open a character sheet and navigate to the Attributes & Abilities tab (for Abilities), or open the Collections tab, then open a given macro (for macros).
Example Usage
Starting token action bar:
After running:
!showbutton --show Kokoro|Wildshape-Base --hide Kokoro|Wildshape-Boar Kokoro|Wildshape-Eagle
Returning to base token action set:
!showbutton --hide Kokoro|Wildshape-Base --show Kokoro|Wildshape-Boar Kokoro|Wildshape-Eagle
Syntax
The script uses the handle showbutton, with or without a trailing 's':
!showbutton
!showbuttons
These can be followed by one or more arguments. Available arguments are as follows:
--show
--hide
--toggle
--report
--silent
The first 3 arguments, above (show, hide, and toggle) take a list of macros or abilities, and will show/hide/toggle them according to the argument. To specify an ability, use the character name, a pipe or a hash, then the ability name:
Bob|Tacos
Bob#Tacos
Macros just require the macro name:
Pizza
If either the character, ability, or macro has a space in the name, you can use sets of either apostrophes, ticks, or quotation marks to enclose that part:
`Bob the Hirsute`|Tacos
'Clobberachi the Clobbersome'|"Getting Clobbery"
"Hoocha Hoocha"
Example Command Line
So a command might look like:
!showbuttons --toggle `Bob the Hirsute`|Tacos `Bob the Hirsute`|Burritos --hide 'Volcano Man'|Ya-ya-ding-dong Collaborate Listen
That would show both the Tacos and Burritos ability on the character named Bob the Hirsute, while hiding the ability named Ya-ya-ding-dong on the character Volcano Man, as well as the Collaborate and Listen macros from the Collections tab.
Order of Argument Processing
Arguments are processed left to right, so if an ability is included in a hide argument earlier in the command line, then later included in a show or toggle argument, the end result will be that it will be displayed as a token action. A macro included in two different toggle arguments will be left in its original state. Similarly, with regard to reporting (see Reporting, below), the script will report or not report its actions based the last report or silent argument encountered.
Reporting
ShowButtons ships with reporting turned ON, so it will let you know everything it did in response to your command. This can be controlled with the last 2 arguments, above (report and silent), for any given command line:
!showbutton --show Bob|Spectacular-Jurgen-Prochnow --report
!showbutton --toggle Bob|Elongated-Jurgen-Prochnow --silent
GMs can configure this at the state level (affecting all subsequent command lines invoking ShowButtons) using either of the handles of showbuttonconfig or showbuttonsconfig, followed by a + or - and the setting name report:
!showbuttonsconfig +report
!showbuttonsconfig -report
To turn on default reporting for all ShowButtons messages, use the +.
To turn off default reporting, use the -.
Including a report or silent argument in a given command line will supersede the script configuration setting. So if the script is configured to not report but you include a report argument in your command line, you will get the report panel output.
The report panel will show in the chat window, detailing the actions ShowButtons just took:
A green dot indicates the ability/macro was set to be a token action (the button will be visible); a red dot indicates the ability/macro was set to not be a token action (the button will be removed, if it had been previously displayed).
My Ability/Macro Doesn't Show Up in the Report
If an ability or macro you included in any show, hide, or toggle argument does not show up in the report panel, this is an indication that ShowButtons could not the specified item, and you should confirm the name and your access to the character (for abilities).
Seeing the Results on the VTT
Scripts cannot alter the presentation layer of the VTT at all, so once you make a change to the visible/hidden token action buttons using ShowButtons, you will need to choose a new token (or deselect and reselect the same token) to see a new set of token action buttons. This is a limitation imposed by Roll20, and not one this or any script will be able to overcome.