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 .
×
May your rolls be merry + bright! 🎄
Create a free account

Button in Chat to roll a dice - Bardic Inspiration Macro

1632544519

Edited 1632642820
&{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|token_name}}} {{Roll= [1d8](! IDK HOW TO ROLL THE FREAKING DICE )}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} NOT the GM but the player Other player can click the button, and it rolls dice  Nesting Macro Don't work when others click. It will only say "#macro name" free account and do NOT have API This should be easy, but I for the life of me can't figure out how to make that button just roll a dice when CLICKED . I want the other player to be able to click on the button and roll a dice. I originally used Nesting Macro but that don't work when other player click it. It will simply say "#macro name" when other player click the button. I spend like weeks for this simple task and is driving me crazy. I'm on free account and is a player in the game so no API. Want to make this macro to help remind people that they got a bardic inspiration and just click to roll ): THANK YOU Oosh  said: What you're trying to do is possible. There's the simple: &{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](!
[[1d8]]) }} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} There's the simple, but with custom styling applied to the link: &{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](`[[1d8]]" style="color:blue;font-weight:bold;border:1px solid blue;border-radius:5px;padding:2px; background: white) }} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} And last, but not least, there's nesting an entire template in the button: &{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](`#&{template:default} {{name=@{target|t1|token_name} uses Inspiration}} {{1d8=[[1d8]]}})}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} Options! When you nest anything in a button, you need to escape the control characters so they're not parsed until the button is clicked. Even attributes - it's pretty much the only time you want to escape @{attribute} syntax. Apart from that @{target|t1|token_name} halfway through the final option - that's unescaped so the parser fills in the target character's name when the inital template is rendered. Edit - Bonus round, because reasons. A really keen player can use Stylus to select the button containing their name + "1d8", and stick it to the chat bar so it follows with the scroll. Maybe they won't forget to use Inspiration! Unchecking the Style in the Stylus menu will restore it to its normal position in the roll template. #rightsidebar { overflow: auto!important } a[href*="1d8"][href*="Thisguy"] { position: fixed; right: 2%; bottom: 25%; z-index: +1; scale: 1.3; opacity: 0.7 } THANK YOU!!! keithcurtis  said: I think this will work. The die will not roll until you click the button, and only requires one macro: &{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|token_name}}} {{Roll= [1d8](!
/r 1d8)}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} Note that  
  is the HTML replacement for a new line.If you make this a collections macro, it will resolve whenever you re-open it. You will need to keep a clean copy somewhere. Alternatively, you can save it as an ability on a character sheet. Either on the bard's sheet, or on a  Macro Character Sheet . Macros saved as abilities do not resolve html entities upon re-opening.
1632544896

Edited 1632544960
vÍnce
Pro
Sheet Author
Just enclose your inline rolls with double square brackets.&nbsp; ie [[1d8]] <a href="https://wiki.roll20.net/Inline_Rolls" rel="nofollow">https://wiki.roll20.net/Inline_Rolls</a> Cheers
That roll the dice right away and not when I click the button ):
That roll the dice right away and not when I click the button ): vÍnce said: Just enclose your inline rolls with double square brackets.&nbsp; ie [[1d8]] <a href="https://wiki.roll20.net/Inline_Rolls" rel="nofollow">https://wiki.roll20.net/Inline_Rolls</a> Cheers
1632547399

Edited 1632547485
Uhm, is this what you want...? I feel like it accomplishes your goal 1st macro: &amp;{template:default} {{name=Bardic Inspiration}} {{Roll= [1d8](!&amp;#13;#1d8 )}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} 2nd macro: /em Inspires @{target|token_name} for [[1d8]] on their next roll!
1632548112

Edited 1632548767
Unfortunately, Nesting Macro does not work when other player click it )': When other player click it will say "#1d8" instead of running the macro.
1632551845

Edited 1632551912
vÍnce
Pro
Sheet Author
How about using just a query and an inline roll?; &amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|token_name}}} {{Effect=?{ Ability Check, Ability Check| Saving Throw, Saving Throw| Attack Roll to you, Attack Roll to you| Attack Roll to enemy, Attack Roll to enemy| Damage to you, Damage to you| Damage to enemy, Damage to enemy } for [[1d8]] }}
1632552565

Edited 1632552996
Bardic inspiration usually don't get used right away, so that is why I want a button that other player can click to roll. I don't want to take away the dice roll from the player who got the bardic inspiration. I'm hoping to use this code not just for myself, but also for my nooby players when I dm in the future. There is just no good way to automate/remind people that they got bardic inspiration as a player ):
1632553637
vÍnce
Pro
Sheet Author
Personally, I would just rely on the player remembering (maybe use a status marker on their token) that they have it and just roll a d8 when they want to use it...
1632554666

Edited 1632554748
I'm a player in the game and can not place a marker on others token. I just want to know how to make a button roll a dice when clicked )':
1632554865
vÍnce
Pro
Sheet Author
I hear you.&nbsp; It's right here;&nbsp;&nbsp;&nbsp; ;-P
1632555401

Edited 1632555417
Yes I know, but not the point. I'm trying to have a button in chat that everyone can click on.
1632556565
vÍnce
Pro
Sheet Author
You will probably need to use a macro mule character to store your macros and create a chat menu &nbsp;macro to access those macros.
1632558495

Edited 1632560702
GiGs
Pro
Sheet Author
API Scripter
Miki H. said: Unfortunately, Nesting Macro does not work when other player click it )': When other player click it will say "#1d8" instead of running the macro. Going back to this post - it sounds like you didnt share the macro properly. When you create a macro like that in the picture below, notice on the Edit macro form there is a scroll bar at the right side. Its very easy to miss (irritatingly so, I think this is a terrible design), but if you scroll down, you will see a Visible to Players drop down. Select All Players , and the macro will work for everyone.
1632565567

Edited 1632568120
Oosh
Sheet Author
API Scripter
What you're trying to do is possible. There's the simple: &amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](!&amp;#10;[[1d8&amp;rsqb;&amp;rsqb;) }} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} There's the simple, but with custom styling applied to the link: &amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](`[[1d8&amp;rsqb;&amp;rsqb;" style="color:blue;font-weight:bold;border:1px solid blue;border-radius:5px;padding:2px; background: white) }} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} And last, but not least, there's nesting an entire template in the button: &amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|t1|token_name}}} {{Roll=[1d8](`#&amp;amp;&amp;lcub;template:default&amp;rcub; &amp;lcub;&amp;lcub;name=@{target|t1|token_name} uses Inspiration&amp;rcub;&amp;rcub; &amp;lcub;&amp;lcub;1d8=[[1d8&amp;rsqb;&amp;rsqb;&amp;rcub;&amp;rcub;)}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} Options! When you nest anything in a button, you need to escape the control characters so they're not parsed until the button is clicked. Even attributes - it's pretty much the only time you want to escape @{attribute} syntax. Apart from that @{target|t1|token_name} halfway through the final option - that's unescaped so the parser fills in the target character's name when the inital template is rendered. Edit - Bonus round, because reasons. A really keen player can use Stylus to select the button containing their name + "1d8", and stick it to the chat bar so it follows with the scroll. Maybe they won't forget to use Inspiration! Unchecking the Style in the Stylus menu will restore it to its normal position in the roll template. #rightsidebar { overflow: auto!important } a[href*="1d8"][href*="Thisguy"] { position: fixed; right: 2%; bottom: 25%; z-index: +1; scale: 1.3; opacity: 0.7 }
&amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|token_name}}} {{Roll= [1d8](! ~BardAbilities|InspireD8 )}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} Then on a different sheet called BardAbilities create an ability called InspireD8 That sheet will have the actual template Roll in it. It 8s important that the sheet is useable by all players. If you aren't the DM you will need to consult them.
1632607060

Edited 1632607315
Unfortunately, I'm not the GM but the player. GiGs said: Miki H. said: Unfortunately, Nesting Macro does not work when other player click it )': When other player click it will say "#1d8" instead of running the macro. Going back to this post - it sounds like you didnt share the macro properly. When you create a macro like that in the picture below, notice on the Edit macro form there is a scroll bar at the right side. Its very easy to miss (irritatingly so, I think this is a terrible design), but if you scroll down, you will see a Visible to Players drop down. Select All Players , and the macro will work for everyone.
THANK YOU SO MUCH!!! This little problem of my have been driving me crazy for weeks. Do you need API for the "Options" stuff? And what do you mean " escape the control characters"? Don't have a character selected before using the macro? And what is a " Stylus" is there a page somewhere I can read all this up? You have saved me so much headache, thank you! Oosh said: What you're trying to do is possible. There's the simple: .............
1632611836

Edited 1632611972
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
I think this will work. The die will not roll until you click the button, and only requires one macro: &amp;{template:default} {{name=Bardic Inspiration}} {{Inspire=@{target|token_name}}} {{Roll= [1d8](!&amp;#10;/r 1d8)}} {{Effect= ‣ Ability Check ‣ Saving Throw ‣ Attack Roll to you ‣ Attack Roll to enemy ‣ Damage to you ‣ Damage to enemy}} Note that&nbsp; &amp;#10; is the HTML replacement for a new line.If you make this a collections macro, it will resolve whenever you re-open it. You will need to keep a clean copy somewhere. Alternatively, you can save it as an ability on a character sheet. Either on the bard's sheet, or on a&nbsp; Macro Character Sheet . Macros saved as abilities do not resolve html entities upon re-opening.
1632612147

Edited 1632612484
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For Stylus, here are the main repositories on the forum (explanations and instructions in top post of each): Show Off Your Style Show Off Your Style 2: The Stylening! Show off your Style 3: Third Time is the Charm! By thread: Show Off Your Style Tiny Tracker &nbsp;- keithcurtis&nbsp; [install] More Compact Macro Bar &nbsp;- keithcurtis&nbsp; [install] Bigger Card Hand &nbsp;- keithcurtis&nbsp; [install] Inline Links on OGL Roll Templates &nbsp;- keithcurtis&nbsp; [install] Hide Roll20 Interface &nbsp;- keithcurtis&nbsp; [install] Add Rows to Map Tab &nbsp;- keithcurtis&nbsp; [install] More Compact Token Action Toolbar &nbsp;- keithcurtis&nbsp; [install] 5e Style for Your Handouts &nbsp;- keithcurtis&nbsp; [install] Marketplace Read Tags and See Pictures &nbsp;- keithcurtis&nbsp; [install] Show Off Your Style 2: The Stylening! Neater Character Vault &nbsp;- keithcurtis&nbsp; [install] Roll20 Site: Dark Red Mode &nbsp;- Andreas J. Compact Editor for Sheet Authors &nbsp;- Vince Dark Mode for Roll20 &nbsp;- Vince Edit Status Icon Menu &nbsp;- Mike deBoston&nbsp; [install] Streamline Turn Order Settings (For Savage Worlds) &nbsp;- Mike deBoston&nbsp; [install] Macro Editing Window Tweak &nbsp;- Mike deBoston&nbsp; [install] Sheet Editor WYSIWYG Editor Style &nbsp;- Scott C Deleting Cards Without Scrolling &nbsp;- Mike DeBoston&nbsp; [install] Lock Turn Tracker Position &nbsp;- Mike DeBoston&nbsp; [install] Change Button Colors on Token Action Toolbar &nbsp;- Mike deBoston&nbsp; [install] Hide Error Messages in Chat &nbsp;- Mike deBoston -&nbsp; [install] Default Roll Template Enhancement&nbsp; - keithcurtis -&nbsp; [install] Tighter Sidebar Lists &nbsp;- keithcurtis -&nbsp; [install] Pathfinder 2e - Pseudo Grayscale &nbsp;- Mik Holmes Query Input Fits to Popup &nbsp;- Noon Show Time Stamps in Chat Archive &nbsp;- Noon (by way of&nbsp; forum post )&nbsp; [Install] Tweaks for D&amp;D 5e by Roll20 (OGL) &nbsp;sheet - keithcurtis&nbsp; [Install] Talk To Myself banner &nbsp;- keithcurtis&nbsp; [Install] Zoom Slider Tweaks &nbsp;- keithcurtis&nbsp; [Install] Correctif pour D&amp;D 5E by Roll20 &nbsp;- Ryuh Dragoon (translated sheet fix)&nbsp; [Install] Sheet Sandbox &amp; Game Settings Button Mover &nbsp;- Scott C. API Scripts Button Mover &nbsp;- Scott C. Hide Toolbar Buttons &nbsp;- keithcurtis&nbsp; [Install] Dark Mode (esp. for&nbsp;D&amp;D 5th Edition by Roll20 Sheet) &nbsp;- Kirill S.&nbsp; [Source Code] Hide Broken Aura Tool-Tips When Editing Forum Posts &nbsp;- The Aaron Tweaks to the Radial Token Menu and Token Markers &nbsp; Adding Labels to Token Marker Menu &nbsp;- Andrew&nbsp; [Install] Horizontal Toolbar &nbsp;- Andrew&nbsp; [Install] Show off your Style 3: Third Time is the Charm! Larger Default Input/Select Boxes On Macro Prompts &nbsp;- Liam Larger Preview window for Rollable Tokens &nbsp;- Jarren
1632612589
keithcurtis
Forum Champion
Marketplace Creator
API Scripter
For example, here is what your macro looks like with&nbsp; Default Roll Template Enhancement :