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

Using a Roll Button from Chat

So I'm trying to set up a macro that will whisper the player who controls a sheet a set of Ability Call buttons to roll their stuff. So far my code is this: &{template:PTUmacro}{{name=Rockruff's Statblock}}{{note=**Skills:** [Acrobatics](~@{AcrobaticsCheck}), [Athletics](~@{AthleticsCheck}), [Combat](~@{CombatCheck}), [Focus](~@{FocusCheck}), [Perception](~@{PerceptionCheck}), [Stealth](~@{StealthCheck}) }} The ability I'm trying to call is the name of a sheet button.  When I run the macro, I get these error messages   Despite the error messages, the buttons work as if you've clicked the button from the sheet. Any idea how to suppress the errors? Or is there a better way of calling these buttons in chat? Thank you!
1565914618
GiGs
Pro
Sheet Author
API Scripter
You probably need to add the character name to each attribute. E.g. change [Acrobatics](~@{AcrobaticsCheck}) to [Acrobatics](~@{Rockruff|AcrobaticsCheck}) (use the character name as shown in the Journal tab)
1565914937

Edited 1565914954
Unfortunately adding in the character name doesn't prevent the error message, thank you for the suggestion though.
1565915779

Edited 1565915858
GiGs
Pro
Sheet Author
API Scripter
I just noticed you have  ~@ in each button. You should just have one or the other - which one depends on if its an ability or attribute. Since its a button, it should just be ~. You probably still need the character name, if this is a macro that prints into chat. If its meant to be universal, use selected instead of character name.
1565916190

Edited 1565916914
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For an ability (a "Sheet Macro") use this format: [button name](~Character Name|Ability Name) You are getting a "No attribute was found" error because you are actually trying to call an ability, but using the attribute syntax. Edited because I forgot the syntax is different for a roll button than a naked Ability call, which would be: %{Character Name|Ability Name} If you were to put that into an ability command button, it would execute t at the same time that the calling macro is executed.
1565916362
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also, if this code is going into an ability on the same sheet, the syntax is even simpler: [button name](~ability_name)
I should probably clarify I'm using this macro as a Sheet Ability, and not from the macro bar. Which means the ~ is needed, otherwise the button is treated as a hyperlink. But without the @ the button thinks you're calling an ability. So in order to have the button output what I'm aiming for you need both. With the @ the ability thinks you're making an attribute call, and as what you're calling is a roll instead you get the error message, but the button still works.
1565916943
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
See my edit above. I boo-boo'd.
Experimenting with entering %{selected|AcrobaticsCheck} into the chat works. However when attempting to incorporate that into the ability it breaks the whole macro.
1565917257
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Also, there's no functional difference between an ability inherent to the sheet and one you write and append yourself. The syntax is identical. To call from an ability on the same sheet: [button name](~ability_name) To call from elsewhere (another sheet or a macro): [button name](~Character Name|Ability Name)
1565917295
Finderski
Pro
Sheet Author
Compendium Curator
keithcurtis is right...here's the code from my character sheet that outputs a button in chat: [Roll Agility](~Kha Lieth|tAgilityRoll) Here's what it looks like in the sheet: And here's what it looks like in the chat: You'll want to include the character's name, though, because once it's in the chat, it tends to lose the connection to the sheet
1565917526
Finderski
Pro
Sheet Author
Compendium Curator
This should work for you: &{template:PTUmacro}{{name=Rockruff's Statblock}}{{note=**Skills:** [Acrobatics](~Rockruff|AcrobaticsCheck), [Athletics](~Rockruff|AthleticsCheck), [Combat](~Rockruff|CombatCheck), [Focus](~Rockruff|FocusCheck), [Perception](~Rockruff|PerceptionCheck), [Stealth](~Rockruff|StealthCheck) }}
1565917530

Edited 1565917563
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This should work if it is an ability on Rockruff's character sheet: &{template:PTUmacro}{{name=Rockruff's Statblock}}{{note=**Skills:** [Acrobatics](~AcrobaticsCheck), [Athletics](~AthleticsCheck), [Combat](~CombatCheck), [Focus](~FocusCheck), [Perception](~PerceptionCheck), [Stealth](~StealthCheck) }} If you wrote it as a loose macro or on a different sheet it would be: &{template:PTUmacro}{{name=Rockruff's Statblock}}{{note=**Skills:** [Acrobatics](~Rockruff|AcrobaticsCheck), [Athletics](~Rockruff|AthleticsCheck), [Combat](~Rockruff|CombatCheck), [Focus](~Rockruff|FocusCheck), [Perception](~Rockruff|PerceptionCheck), [Stealth](~Rockruff|StealthCheck) }} Assuming of course, that the character name is Rockruff.
1565917553

Edited 1565917605
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
Sniped by Finderski!
1565917675
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
This post should give you the different syntaxes for a chat menu (which is what you are creating), and when, where and why to use them.
1565917999

Edited 1565918045
Right thank you ever so much guys, the problem was I was still including the {} in the macro, &{template:PTUmacro}{{name=Testing}}{{note=**Skills:** [Acrobatics](~{Rockruff|AcrobaticsCheck}) }} and it wasn't until seeing your own written out that I was able to notice and correct this!