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

Rolling d4 - d20s publicly and adding the modifier privately.

1655635536

Edited 1655635651
Hi, A while ago my friend made me some macros that would roll a D20/D4/D8/D10/D12/D100 publicly and add the modifiers privately, however they're now broken. Example of what it should be from a D20 + 100 roll (thats how I know they're broken) Example of the modifier box. The code is: &{template:default} {{name=@{selected|token_name} Rolls}}{{Result =[[[[?{amount}d20}+?{mod}]]]]}} I've clearly broken it. What do I need to change to fix the macro? Thanks for the help.
1655644972
Andreas J.
Forum Champion
Sheet Author
Translator
?{amount}d20} should probably be ?{amount|d20} , that way you can decide which dice you roll. You could also change so it has a dropdown to select the dice, like this: &{template:default} {{name=@{selected|token_name} Rolls}} {{Result =[[ [[?{dice|d4|d6|d8|d10|d12|d20}+?{secret mod}]] ]]}} With Roll20 Syntax Highlight VSCode extension, mistakes in macro syntax are easier to spot, like below: