I have an Abjuration Wizard with the Improved Abjuration feature which lets me add my proficiency bonus to ability checks made when casting a spell such as counterspell. Additionally, my wizard also has an item that allows him to roll all INT ability checks with Advantage.

I'd like to make a Roll20 macro for use with counterspell and similar spells, but I don't see how to do that in the Macros Wiki. I need the macro to roll with Advantage and add the proficiency and ability modifiers (or just +10 and I can change the hardcoding when the modifiers change). I very much do not want to fill out the Roll20 character sheet, nor do I want the 'always roll Advantage' option turned on.

How to make a Roll20 macro that rolls Advantage and adds a modifier?

  • \$\begingroup\$ To be clear, you're just asking for syntax on how to roll dice; 2d20 + some_value? And do you want that value keyed off of a specific character and their attribute, any character and their attribute, or a pop-up that asks for the modifier every time? \$\endgroup\$
    – MivaScott
    Oct 4, 2022 at 17:21
  • \$\begingroup\$ @MivaScott It would be nice for the values to be pulled from a DDB character sheet, but not necessary. The biggest part is the Advantage roll - I've gotten the rest of it figured out but can't find how to roll 2d20 and take the highest. \$\endgroup\$
    – aaron9eee
    Oct 4, 2022 at 18:23

2 Answers 2


Roll20 implements min/max functions on dice pools.

One option is to write the following macro:

INT with advantage: [[{1d20,1d20}kh1]]

where roll20 keeps the highest 1 among the dice pool.

If you want to implement the dependency on the Proficency Bonus and on the INT mod, you can use the following code:

Int with advantage: 
[[{1d20,1d20}kh1+@{charName|PB}+@{charName|intelligence_mod}]] rolled

You have to substitute charName with the name of your character. In case you desire to have this particular roll available also for other creatures/tokens, you can use selected instead of charName: in this way, the roll is made using the char sheet of the selected token.

The example above refers to the case in which you are using the DnD5ed char sheet by Roll20.

Check Dice Reference: Grouping Rolls, for documentation. In case you need a complete list of the possible roll modifiers check Dice Reference: Roll Modifiers; for grouped roll modifiers, see Dice Reference: Grouped Roll Modifiers.

  • 1
    \$\begingroup\$ Thanks for that documentation link! I scrolled right past that as I was looking for how to roll with Advantage. \$\endgroup\$
    – aaron9eee
    Oct 4, 2022 at 18:56
  • \$\begingroup\$ @aaron9eee I added another piece of code, in case you do not want to hard code some the prof bonus and/or the modifiers. \$\endgroup\$
    – Eddymage
    Oct 4, 2022 at 19:21
  • 1
    \$\begingroup\$ And you can use "selected" if you want this to work with the selected token. (You may want to add that point; nice answer. :) \$\endgroup\$ Oct 5, 2022 at 11:50
  • 2
    \$\begingroup\$ @KorvinStarmast Thanks! I used the selected variable in the past, but I did not included in the answer since the OP seems to be not interested in. I can add it, maybe someone will find it useful. \$\endgroup\$
    – Eddymage
    Oct 5, 2022 at 12:32

You can use this as the text for your macro

/roll 2d20kh1 + 3 + 5 

where the +3 is the proficiency bonus, the +5 your Int bonus. The kh1 turns the 2d20 into an roll that picks the higher dice ("keep high one"). The trickier part would be to tie the bonuses to values in a character sheet, but it seems you do not want to do that anyways. If you wanted to, use

/roll 2d20kh1 + @{Name|pb} + @{Name|intelligence_mod} 

where Name would be your character's name (or, if you use selected for Name, it will work with the currently selected token's stats).

Macro creation dialog box

The announcement text as to what you are rolling for is optional, you can leave that first line off if you do not need it. In case you are wondering about the difference in syntax to Eddymages's version, he is using inline rolls, that show you just the resulting number, while these will output both the rolls and the resulting number, like you get with a normal /roll command.

The macro will show up in your macro tab. If you check the Show in Macro Bar button, and also check the "Display Macro Bar" at the bottom of the macro list, you will have it on the screen as a button and can click it anytime you want to roll it.

Macro Tab or List with Checkboxes

  • \$\begingroup\$ I'd love to be able to tie the bonuses to the modifiers from a DDB character sheet, but as those bonuses won't change all that often, a hardcoded value works as well. \$\endgroup\$
    – aaron9eee
    Oct 4, 2022 at 18:28
  • \$\begingroup\$ @aaron9eee You can do that like so /roll 2d20kh1 + @{Naal|pb} + @{Naal|intelligence_mod} where Naal would be your character's name. \$\endgroup\$ Oct 4, 2022 at 18:35
  • \$\begingroup\$ Can you provide a better image description than "insert image description here"? Imagine you're describing the images over the phone — the image description should be a replacement for the images for people who can't see them. \$\endgroup\$
    – Laurel
    Oct 4, 2022 at 21:34
  • \$\begingroup\$ can't this be done with the 'selected token' or is that limited to initiative? \$\endgroup\$ Oct 4, 2022 at 23:29
  • 2
    \$\begingroup\$ @KorvinStarmast, it can, you just use "selected" for the name instead of a specific character's name. Added that. \$\endgroup\$ Oct 5, 2022 at 3:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .