Roll20 Neat Trick for Buttons in Descriptions

neat trick for all those description sections for heals, instead of writing out things like:

PL 1 = [[d4!!]]
PL 2 = [[d6!!]]
PL 3 = [[d8!!]]

which goes ahead and rolls all of them (which can lead to disappointment sometimes seeing better rolls), you can type this and it will output a button you can click in chat to roll that power level:

[PL 1](!
[[d4!!]] Power Level 1 Heal)
[PL 2](!
[[d6!!]] Power Level 2 Heal)
[PL 3](!
[[d8!!]] Power Level 3 Heal)

the basic formatting is, for those interested:

[<Label of the button>](!&#13;&#91;[<dice to roll>]&#93; <text to add after the roll>)

the first [ ] is the syntax for a link or button depending on what follows
( ) contains the information to do when the button is clicked
!&#13;  is carriage return that allows the roll syntax to work
&#91;  is open bracket [
&#93; is close bracket ]
and those are needed for syntax reasons
[<dice to roll>]  is pretty straight forward, needs the bracket before and after

8 Likes

Slightly better layout of buttons this time =P

1 Like

here’s something else I use. So if I just create a creature they are fighting, I don’t always worry about the sheet. I have quick access Macro’s for rolling.

Here is an example, I have one of these for each of the Attribute scores from 0 to 10:
###0=d20

content is:
&{template:openLegend} {{title= NPC/Creature Roll}} {{roll= [[?{# dice|1,1|2,2}d20!!k?{has:|Advantage,h|Disadvantage,l}1]]}}

###10=4d8

content is:
&{template:openLegend} {{title= NPC/Creature Roll}} {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice|0}+4)d8!!k?{has:|Advantage,h|Disadvantage,l}4]]}}

You’ll notice that the one labeled “10=4d8” is meant for attributes from 1 to 10. The first one is more unique for the d20 roll, as you will only have 1 Advantage/Disadvantage max.


And then this macro (which is all on one line for the /w gm part), which will display a rollable button hidden to the players that you can then click on any of the attribute scores to roll a basic attack, and output it nicely to the chat for players to see:

/w gm [0=d20](!&#13;#1=d4) [1=d4](!&#13;#0=d20) [2=d6](!&#13;#2=d6) [3=d8](!&#13;#3=d8) [4=d10](!&#13;#4=d10) [5=2d6](!&#13;#5=2d6) [6=2d8](!&#13;#6=2d8) [7=2d10](!&#13;#7=2d10) [8=3d8](!&#13;#8=3d8) [9=3d10](!&#13;#9=3d10) [10=4d8](!&#13;#10=4d8)

Do note, when you create the above macro, NEVER again open it after you save it. Currently, if you do this in Roll20, it will auto-convert all that code into what it is, and then the macro won’t work. I know, it’s weird, but a known issue.


Here’s what it looks like. I clicked on the buttons in the chat window at the top for “1=d4” and then “10=4d8”

1 Like

Since I’ve had 2 people ask for this (over a 12 month period of time), thought I’d put it here for reference.

&{template:openLegend} {{<name>=<info>}}
list of <name>:
title
subTitle
subTitleAdd
SubTitle2
SubTitle2Add
emote
target
roll
powertarget
powertargetmax
powerlevel
powerlevelmax
description
============
emote is the special case
emote=<info>
will actually only display the <info> in a single column/row (as oppossed to the 2 columns currently done in most output)
that one currently isn't used in any of the rolls
hold over from the last sheet i made for a different system
2 Likes

@Arisu was asking for something like this with a macro.

This is basically the same as the whisper GM thing that outputs the buttons. In this case the macro pops up a drop down menu for you to select which attribute score to roll, and then does all the work for that.

#2 Important Notes to make it Work

  1. You need to copy/paste the code exactly as it is below into the macro.
  • Once you have it in the macro, then save it (of course
  • NEVER open the macro again to edit it. If you do, the code will revert from the HTML into the syntax, and the macro won’t work anymore.
  • If you do above, simply come back here and copy/paste the code again
  1. You can call the Macro a few ways.
  • I named mine roll-score and thus, in the chat area I can just type #roll-score for the macro to start

  • You can check the box for “In Bar” so it shows up on your Macro Quick Bar (which you also need to have checked

    ?{Attribute?|
    Score 0, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 0&#125;&#125; {{roll= [[?{has:&#124;Advantage&#44;2d20!!kh1&#124;Neither&#44;1d20!!&#124;Disadvantage&#44;2d20!!kl1&#125;]]&#125;&#125; |
    Score 1, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 1&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d4!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1]]&#125;&#125; |
    Score 2, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 2&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d6!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1]]&#125;&#125; | 
    Score 3, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 3&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1]]&#125;&#125; |
    Score 4, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 4&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1]]&#125;&#125; |
    Score 5, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 5&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d6!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2]]&#125;&#125; |
    Score 6, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 6&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2]]&#125;&#125; |
    Score 7, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 7&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2]]&#125;&#125; |
    Score 8, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 8&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+3)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;3]]&#125;&#125; |
    Score 9, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 9&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+3)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;3]]&#125;&#125; |
    Score 10, &{template:openLegend&#125; {{title= NPC/Creature Roll&#125;&#125; {{subTitle= Score of 10&#125;&#125; {{roll= [[d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+4)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;4]]&#125;&#125;
    

}

Hope this is helpful for some people!


EDIT:
As a note, you can do: /w gm #roll-score with this as well so only you see the output.

#Rolling Initiative
Isn’t it always annoying when you have your players roll initative and forget to select their token to automatically have it added to the turn order?

Well fear no more, just add this Macro to your roll20 game, and click the checkbox for “Show as Token Action?”

&{template:openLegend} {{title= Initiative Roll}} {{subTitle= @{selected|character_name}}} {{subTitleAdd= @{selected|select_initiative}}} {{roll= @{selected|initiative}}} {{description= Make sure you selected your token to have it automatically added to the turn order.}}

Now whenever ANY token (even your NPCs and Enemies) are selected, at the top left of the screen there will be the button to roll. I named mine “Token-Initiative”, but “Initiative” works just as easy.


EDIT
Make sure the token is linked to a charactersheet for this to work.

1 Like

This is Initiative that works for any token you select without having to read from a sheet.

This also works for the Minimalist sheet

Follow the same directions as above about not modifying the macro after you’ve entered it.

/emas @{selected|character_name} rolls for Initiative [[?{Attribute Score |
     0, ?{has:&#124;Advantage&#44;2d20!!kh1&#124;Neither&#44;1d20!!&#124;Disadvantage&#44;2d20!!kl1&#125; |
     1, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d4!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1 |
     2, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d6!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1 | 
     3, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1 |
     4, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+1)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;1 |
     5, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d6!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2 |
     6, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2 |
     7, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+2)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;2 |
     8, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+3)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;3 |
     9, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+3)d10!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;3 |
     10, d20!! + (?{# Advantage/Disadvantage Dice&#124;0&#125;+4)d8!!k?{has:&#124;Advantage&#44;h&#124;Disadvantage&#44;l&#125;4
}&{tracker}]]

This is 3 pop-up windows, I am planning on changing it so it can be 3 different Macros and work nicer, but it is late, and I’m tired, so I’ll do that sometime tomorrow.

You are awesome, Greatest Moustacheness. Thak you for all your great work. I’d like to ask, though, have you ever got back to this and made the three macros?

1 Like

hmmm, had to look at it a moment to think I was doing it.

I guess I was going to make one that was an “advantage” one “disadvantage” and one “normal”

haven’t really thought of it much since I posted it. Regardless, it will have 2 pop-ups, except for the normal roll, since you have to select your Attribute Score, then you’d have to input the advantage/disadvantage dice # , but by seperating it out, it would take away the ask of if it was “Advantage/Disadvantage/Neither”

1 Like

Thank you for the reply. I tried the macro out for a bit more and it’s really not that much of a hassle, and it’s cleaner with just the one token action. So i guess it’s perfectly fine as it is. Maybe i will finagle a bit and try to make one that has 1 advantage default for the “swift” property, as that and no advantage are 99% of the npcs without their own sheet, so i can just enter the agility score and double press enter. But even that might not be worth it. It saves tonnes of time as it is. As does the whole character sheet. Really good work.

Actually it’s 2 advantage. It used to be 1 long ago, but to balance the cost of a full WL increase, it was changed to 2.

1 Like