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 .
×

Adding a Roll A Dice Button to a Macro

1776753312

Edited 1776753357
Is this possible? In the macro image below, I can generate a button (the chat window is displaying a roll to hit table from Vince's AD&D 1e sheet): The macro script is: &{template:attacks} {{color=darkred}} {{name=@{selected|character_name}: To Hit [Roll](!1d20)}} @{selected|repeating_weapon_$0_weapon_whisper_to_hit} &{noerror} I'm trying to figure out how to make the button roll a d20; what can I put in the parenthesis?  [Roll](!1d20) Thanks
1776754439

Edited 1776754447
Gauss
Forum Champion
Chat Menu buttons call abilities usually, or they can make rolls directly.&nbsp; <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a> So you can do:&nbsp; [Roll](~Charactername|Abilityname) And then stick a macro in a Character's Ability.&nbsp; Or you can do:&nbsp; [Roll](`#Macroname) And then stick a macro in a Collection tab macro Or you can do:&nbsp; [Roll](`/r 1d20) Personally, because I prefer templates, I would use a Character Ability or Collection tab Macro.&nbsp;
1776793275

Edited 1776793873
Gauss said: Chat Menu buttons call abilities usually, or they can make rolls directly.&nbsp; <a href="https://wiki.roll20.net/Chat_Menus" rel="nofollow">https://wiki.roll20.net/Chat_Menus</a> So you can do:&nbsp; [Roll](~Charactername|Abilityname) And then stick a macro in a Character's Ability.&nbsp; Or you can do:&nbsp; [Roll](`#Macroname) And then stick a macro in a Collection tab macro Or you can do:&nbsp; [Roll](`/r 1d20) Personally, because I prefer templates, I would use a Character Ability or Collection tab Macro.&nbsp; Thanks, I was missing the ' My friends are a bunch of computer allergic, stunned as me arse, dumb asses. LOL LOL The main thing I was looking for was the ability to add a button to roll a d20 to the hit table. The result is a link, rather than a button, but but is close enough for me, thank you. :) It's also in the collection tab.
1776795624
Gauss
Forum Champion
The "`" turns it into a text link rather than a button (technically still a button, just the CSS is different). Instead of Collection Tab macros you may want to look into using a Macro Mule instead.&nbsp;
Gauss said: The "`" turns it into a text link rather than a button (technically still a button, just the CSS is different). Instead of Collection Tab macros you may want to look into using a Macro Mule instead.&nbsp; No idea what that is, LOL, I'll google it, thanks! :)
1776800624

Edited 1776800838
Gauss
Forum Champion
Sorry, I should have linked it: <a href="https://wiki.roll20.net/Macro_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Macro_Character_Sheet</a> Macro Mules are characters that store macros in Ability macros on the Attributes &amp; Abilities tab of the Character.&nbsp; They have several advantages.&nbsp; 1) Mobility, they are far easier to migrate from game to game than macros in the Collection tab are.&nbsp; 2) When calling an Ability macro from Chat Menu buttons they do not alter the form of the button like Collection Tab macros do.&nbsp; Chat Menu call to a Collection tab macro: [buttonname](`#macroname) Results in a "text only button" instead of the normal button appearance.&nbsp; Chat Menu call to an Ability macro: [buttonname](~charactername|abilityname) Button format is retained.&nbsp; 3) I find it easier to work with Ability macros over Collection tab macros.&nbsp; Opening/closing is easier for me, zoom function for readability, the attributes being right next to it, all make it easier for me in an Ability macro.&nbsp; 4) Other people can view Ability macros if they have access to the Character. People cannot view your Collection tab macros.&nbsp; This is a major problem when collaborating on a macro.&nbsp; Finally, the drawback:&nbsp; Ability macros require a bit of protection if you do not want a player to modify them.&nbsp; Because the player will require control of the sheet to use the macro (they do not need to see the sheet, do not assign that to players) you will need to put the macro behind another macro, such as a Chat Menu button (which is exactly what you are doing) or a call via a Collection tab macro.&nbsp; But once you get used to that process it is quick and easy.&nbsp;
1776891524

Edited 1776891549
Gauss said: Sorry, I should have linked it: <a href="https://wiki.roll20.net/Macro_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Macro_Character_Sheet</a> Macro Mules are characters that store macros in Ability macros on the Attributes &amp; Abilities tab of the Character.&nbsp; They have several advantages.&nbsp; They do indeed! Thank you so much. I'll just "hide" the macro character amongst the handouts.
1776906143
Gauss
Forum Champion
Tim M said: Gauss said: Sorry, I should have linked it: <a href="https://wiki.roll20.net/Macro_Character_Sheet" rel="nofollow">https://wiki.roll20.net/Macro_Character_Sheet</a> Macro Mules are characters that store macros in Ability macros on the Attributes &amp; Abilities tab of the Character.&nbsp; They have several advantages.&nbsp; They do indeed! Thank you so much. I'll just "hide" the macro character amongst the handouts. To clarify, "hiding" a macro mule does not stop the players from opening the macros and making changes.&nbsp; If you can see the macro button in either the bottom macro bar or the top token action bar then it may be possible (depending on the setup) to gain access to it and open it for editing.&nbsp; Hold the Shift key while clicking on it. That should open the macro if you have access to it.
1776911826

Edited 1776912003
Gauss said: To clarify, "hiding" a macro mule does not stop the players from opening the macros and making changes.&nbsp; If you can see the macro button in either the bottom macro bar or the top token action bar then it may be possible (depending on the setup) to gain access to it and open it for editing.&nbsp; Hold the Shift key while clicking on it. That should open the macro if you have access to it. Thanks Gauss, I realize that, it's how I edit existing macros all the time. :) Here's the macro bar and token macros I use and I do shift-click them all the time to check and modify things (posted this one before): I will stick with the macro tab as much as possible. And this one is relatively easy to recreate:&nbsp; You don't know how computer-phobic and stunned as me arse my players are (except for one who has authored a lot of phone type apps). LOL All are accomplished history profs, financial, and other professions of course&nbsp; - and I can trash them like that, we all went to kindergarten or later school together :)&nbsp; But they are just barely computer-literate to use email or FB messenger. I'm trying to spoon-feed them as much as possible. Besides, anther group who are all proficient in roll20 (one has nearly as many years in database design as I do) are friends and won't try to mess things up. I've never really played D&amp;D (or wargamed) with strangers except those who are invited guests by one of us. Someone from the other group (they are mainly younger friends of a younger brother of another kindergarten friend who died 16 years ago - it's amazing the difference a couple of years made in computer literacy) might try to modify it to get 18 or higher with every roll - a couple of them do write their own macros in the campaign - but that would be obvious and they'd be so pleased with themselves, they'd tell me anyway. LOL