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

Hide label unless roll is a crit.

I have a macro for my custom game that the player uses to roll their action. Actions that have a Perk only apply when the attack roll crits. Is there a way I can hide the Perk subsection unless the attack roll is a crit? &{template:default} {{name=@{character_name} - Sling}} {{attack=[[1d12+@{Dexterity}]] vs Deflect}} {{damage= [[1d6+@{Dexterity}]]}} {{Tags=Ammunition, Basic, Blunt, Ranged 16}} {{Perk=Chose which of the target's stats to Blight.}}
How is critical determined in your game? There's a few ways to do this with the default template.
A roll of a 12 on the attack d12
1728418028
GiGs
Pro
Sheet Author
API Scripter
I'm curious how you will do this, Tuo - I was all set to say this is not possible without a Custom Roll Template or a Script.
1728421696

Edited 1728425848
The easier way to do this is to use template overriding and reused rolls: &{template:default} {{name=@{character_name} - Sling }} {{attack= placeholder }} {{damage= placeholder }} {{[[[{0,$[[1]]}>[[12+@{Dexterity}]]]]](#)=**Perk**:Chose which of the target's stats to Blight. }} [[[[1d12+@{Dexterity}]]]] {{attack= $[[1]] vs Deflect }} {{damage= [[1d6+@{Dexterity}]] }} {{[0](#)=**Tags**:Ammunition, Basic, Blunt, Ranged 16 }} There is a neater way to do this , but RainbowEncoder can explain it better than me.
So the neater way referred to puts the on-crit template fields inside a dummy roll which will hide them as a roll comment. But by using a dynamic roll reference to 'break' the dummy roll lets the on-crit template fields be shown on a crit. The final macro being &{template:default} {{name=@{character_name} - Sling }} $[[$[[1]]]] [[[ [[ {0,[[1d12+@{Dexterity}]]-(@{Dexterity})}=12*2 ]] ]]] {{attack= }} {{damage}} {{Tags=Ammunition, Basic, Blunt, Ranged 16 }} [[[0 [[0]] {{Perk=Chose which of the target's stats to Blight.}} ]]] {{attack=$[[0]] vs Deflect }} {{damage=[[1d6+@{Dexterity}]]}}