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

Damage Roll with Button?

Hi everyone, This is for 5e, but I haven't used any character sheets because my players have custom classes; instead I am making macros in the Attributes and Abilities tab. I'm interested in adding a button to my macro output so that if a character was to succeed on a weapon hit, they could then click on the Button in chat and get a damage roll. Beyond20 does this for some players that use DnDBeyond and that's where I got the inspiration from. I've browsed the forum in search of a solution. Some of the threads I've found come close, but I can't seem to get it to work. Essentially, I have 2 macros one for rolling and want one of them to call the second one. First macro - Javelin: &{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{Roll damage:=[Damage](!
#Jav_dmg)}} Second macro - Jav_dmg &{template:default} {{name=Damage}} {{Roll damage:=[[1d6]]}} Ideally, the 'Damage' button in chat that appears as a result of the Javelin macro should call Jav_dmg, but the only thing that happens in chat when I click the 'Damage' button is text output '#Jav_dmg'. I've also tried &{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{Roll damage:=[Damage](! 
%{ABC|Jav_dmg)}} Which succeeds in calling Jav_dmg and provides all the values, but does not present the button 'Damage'. Instead, it shows a table with both Roll and Roll damage results right away which bypasses the need for the button in the first place. Any help would be appreciated.
1721244365

Edited 1721244386
GiGs
Pro
Sheet Author
API Scripter
Look in the wiki here: <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a> In your specific case, if the dsmage roll is a macro, you could do &amp;{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{[Roll damage](`#Jav_dmg)}} This first one uses older syntax but should work &amp;{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{Roll damage:=[Damage](! #Jav_dmg)}} It does use html entities, o it will fail if you close and then reopen the macro. If instead, your "macro" is stored as a character ability, you need a different syntax: &amp;{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{[Roll damage](~selected|Jav_dmg)}} This works only if you have a token linked to that character selected. You can enter the character name to avoid that, like this &amp;{template:default} {{name=Attack with Javelin}} {{Roll=[[1d20+7]]}} {{[Roll damage](~Alice|Jav_dmg)}} Use the character name exactly as it appears in the journal of characters.
That's great, thanks @GiGs! Didn't realize I was mixing up macros with the in-character abilities. Moving my damage macros outside the character and then having my hit rolls call those work perfectly. Thanks again!