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

How to display BOTH rolls for Advantage/Disadvantage from the Macro buttons

I have the macros set up as Abilities on my Character Sheet, the buttons work with all the rolls correct, I even get the drop-down menu asking for Normal/Adv/Dis rolls. I just can't get it to display both of the rolls. Is that possible?

Here's what I put together, probably sloppy but meh:


[[ ?{Attack Type|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} ]] &{template:default}{{name=Eldritch Blast}} {{attack=[[1d20 +@{Arben Embergilt|spell_attack_bonus}  ]]}}  {{damage=[[1d10]]}} 


Default template, free-to-play guy here.

June 08 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

When you say both rolls, which rolls are you referring to?

Also your attacktype query isn't used in the rest of the template, should it be?

[[ ?{Attack Type|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1} ]] &{template:default}{{name=Eldritch Blast}} {{attack=[[?{Attack Type} +@{Arben Embergilt|spell_attack_bonus}  ]]}}  {{damage=[[1d10]]}} 


June 08 (5 years ago)

Edited June 08 (5 years ago)

When I choose to roll either Advantage or Disadvantage I want both rolls to show on the macro template.


The first image is to show that I have the drop-down menu available and I chose Advantage. The second image is the roll result using the Macro button; I would prefer both rolls to show for Adv/Dis.

Also, I am copy/pasting all of my Macro lines and doing this by trial/error, so I am not sure what you mean by my attack query.


June 08 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

When you say "both rolls", do you mean both dice in the 2d20 roll?

Yes. When it is Advantage or Disadvantage I would like the Macro button to display both rolls.

June 08 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

I dont think thats possible, unfortunately. There is a trick that lets you see each roll of a 2 dice roll, but it doesnt work when in a query.

This part is your query:

?{Attack Type|Standard, 1d20|Advantage, 2d20kh1|Disadvantage, 2d20kl1}

You can see both dice by hovering your mouse over the yellow box. 


The only way to see both dice rolls directly, would be to dispense with the rolltemplate, and use this format:

/roll (dice stuff goes here)


Yeah, it seems that is outside of what the Macro buttons can do. If I want to use them I'll have to make another button for a Adv/Dis d20 roll. 

Thanks a lot for your help though!

June 08 (5 years ago)

Edited June 08 (5 years ago)
Oosh
Sheet Author
API Scripter

Try this:

&{template:default}{{name=Eldritch Blast}}  {{attack=?{Attack Type|Standard,[[ [[1d20]]+ @{Arben Embergilt|spell_attack_bonus}]]|
Advantage,[[ {[[1d20]],[[1d20]]}kh1 + @{Arben Embergilt|spell_attack_bonus}[SAB]]]  ---  ($[[0]]/$[[1]])|
Disadvantage,[[ {[[1d20]],[[1d20]]}kl1 + @{Arben Embergilt|spell_attack_bonus}[SAB]]]  ---  ($[[0]]/$[[1]])}}} {{damage=[[1d10]]}}

It's not the prettiest, could probably format it a little better.


EDIT - errrr, you say "Default template, free-to-play guy here." .... any reason why  you're limiting yourself to the default template?  You don't have to pay to use the templates built in to the sheet.

Try this:

&{template:default}{{name=Eldritch Blast}}  {{attack=?{Attack Type|Standard,[[ [[1d20]]+ @{Arben Embergilt|spell_attack_bonus}]]|
Advantage,[[ {[[1d20]],[[1d20]]}kh1 + @{Arben Embergilt|spell_attack_bonus}[SAB]]]  ---  ($[[0]]/$[[1]])|
Disadvantage,[[ {[[1d20]],[[1d20]]}kl1 + @{Arben Embergilt|spell_attack_bonus}[SAB]]]  ---  ($[[0]]/$[[1]])}}} {{damage=[[1d10]]}}

It's not the prettiest, could probably format it a little better.


EDIT - errrr, you say "Default template, free-to-play guy here." .... any reason why  you're limiting yourself to the default template?  You don't have to pay to use the templates built in to the sheet.



THIS WORKED!!!!!!!1111!!!!

Got my Eldritch Blast working and displaying, going to work that into the rest of my macros later.

Not sure how to use different templates. Honestly, me and the boys just got into all of this about 8 hours ago.

June 08 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter

Nice work, Oosh. :)

July 13 (5 years ago)

I've trimmed down the above macro for use for my sorcerer (working on a chill touch macro).  My problem is that the html code (in bold) doesn't stay once I save the macro.  it tests just fine when noted below, but once the , and the } reappear, its all jacked up again - and that happens as soon as I hit save.  Any suggestions?

&{template:default}{{name=Chill Touch}} 
?{Attack Type|
Standard, Standard Attack [[ [[1d20]]+8 ]] |
Advantage, Attack with Advantage [[ {[[1d20]],[[1d20]]}kh1+8 ]] |
Disadvantage, Attack with Disadvantage [[ {[[1d20]],[[1d20]]}dh1+8 ]] }

July 13 (5 years ago)
GiGs
Pro
Sheet Author
API Scripter


Carey S. said:

I've trimmed down the above macro for use for my sorcerer (working on a chill touch macro).  My problem is that the html code (in bold) doesn't stay once I save the macro.  it tests just fine when noted below, but once the , and the } reappear, its all jacked up again - and that happens as soon as I hit save.  Any suggestions?

This is a fundamental issue with roll20 macros. You aren';t quite correct on the problem though. When you hit Save, your macro is fine and will keep working. The problem happens when you open the macro. The instant you open it, those html entities are parsed and converted to the characters their represent.

So you have two main solutions to this:

  1. When you save the Macro, never reopen it. It's that simple. It's a good idea to save a copy of the macro somewhere outside of roll20 in case you do accidentally open it.
  2. Abilities on character sheets do not suffer this problem. So you can create a character purely to store macros on, as Character Abilities. If you set this character as Editable by all, and visible to none, players can use the "macros" stored on it, but the character doesnt show up in their collection so they cant edit it. Call this character something like Macros.

The second option is preferred by a lot of people and has other advantages: for instance, you can copy the character to another campaign, and this keep your macros when you start a new campaign.

July 13 (5 years ago)

I'm playing in this game, and am using this as a learning experience for the games I run.

I figured out a work around that seems to work like a charm, based on a suggestion elsewhere of using the character sheet attributes.

I added an attribute called SpellAtk, and copied the script in my previous post into it - and that locked in the code.

With that there, I wrote the following, with the key part for this discussion being the @{Schueler|SpellAtk} line (Schueler being my character name)  The screenshots below show its output, with the second showing a rollover that reveals the actual rolls -

/fx missile-frost @{target|token_id} @{target|token_id}
/em slashes his wand viciously and casts Chill Touch!
&{template:default}{{name=Chill Touch, +8 to Hit}}
@{Schueler|SpellAtk}
/r 2d8 Necrotic Damage!
On a hit, Target is unable to regain hit points during its next turn.



July 13 (5 years ago)

Edited July 13 (5 years ago)
David M.
Pro
API Scripter

If you happen to be using the "D&D 5th Edition by Roll20" character sheet, I would use the Attack template. First, go to your character sheet configuration tab (the gear icon just below the XP field). In the upper right region of that tab, set Roll Queries to "Query Advantage" and Auto Damage Roll to "Auto Roll Damage & Crit". Select the appropriate token and run a macro similar to the following:

@{selected|wtype}&{template:atkdmg} {{mod=+[[@{selected|charisma_mod} + @{selected|pb}]]}} {{rname=Eldritch Blast}} {{r1=[[@{selected|d20}cs>20 + @{selected|charisma_mod}[CHA] + @{selected|pb}[PROF]]]}} @{selected|rtype}cs>20 + @{selected|charisma_mod}[CHA] + @{selected|pb}[PROF]]]}} {{attack=1}} {{range=120 feet}} {{damage=1}} {{dmg1flag=1}} {{dmg1=[[1d10]]}} {{dmg1type=Force}} 0 {{crit1=[[1d10[CRIT]]]}} {{desc=Some Description}}

Here is an example output when selecting "Advantage" when the macro runs, rolling a crit on the first roll (for 9 extra damage). Note the second roll is greyed out. If it had been Disadvantage, the 22 would have been greyed out and no crit damage would roll.

EDIT #1-- If you set to "Always roll Advantage" instead, then both rolls would remain in bold coloring and you would just decide which to use by looking at it. This is what we do in our games, because it is less clicking. Note that if the roll was not actually with advantage but the second roll crits, then crit damage would still show up in the damage field. You would simply ignore the crit damage in that case. Mousing over the numbers in the chat results tells you where each number comes from.

Edit #2 -- you can still add the emote flavor text prior to calling the roll template, or put it in the description field. 


More info on how to use templates for this character sheet can be found here.

https://wiki.roll20.net/D%26D_5e_by_Roll20_Roll_Templates


July 13 (5 years ago)

Going to try this out...