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

Button to roll on table in chat

1486920102
GiGs
Pro
Sheet Author
API Scripter
I know how to create API buttons that appear in chat to run a macro. But I cant figure out how to get a button that will let players click it to roll a table. How do you do this?
1486921864

Edited 1486921919
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
There's a few different ways. You could make the table roll an ability on a character sheet and then use ability command buttons to call it: [Table Roll](~Abilities|Table-Roll) assuming you made the ability in a character called "Abilities" of course. You could do it as a straight roll using the API command buttons: [Table Roll](!
/r 1t[Table-name] If you want to use inline rolls of the table in an API command button rather than an ability command button you'll need to do some html replacements as the : [Table Roll(!
[[1t[TableName] ]]) Hope that helps and happy rolling, Scott EDIT: Fixed an eaten html encoding
1486973129
GiGs
Pro
Sheet Author
API Scripter
I need to have it appear as a button in chat for the players to click. I tried both the last two in your post, they just printed out those strings, as if they were text.
Try: [Table Roll](!
/r 1t[new-table]) or [Table Roll](!
[[ 1t[new-table] ]])
1486993376
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
G G said: I need to have it appear as a button in chat for the players to click. I tried both the last two in your post, they just printed out those strings, as if they were text. Huh, I somehow forgot a closing parentheses and closing square brackets respectively.