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

D&D 5e macro help

i want to do a conditional roll if "r=20 (crit) do 2d6(for example) but i cant figure out how to do that, as the wiki doesnt have something like that from what i can tell.
1484971105
The Aaron
Pro
API Scripter
Unfortunately, that isn't possible with the dice engine.  Generally people will roll the crit damage along with the regular damage and just add it in if they get a 20. With Roll Templates on a character sheet, the dice for criticals get rolled regardless of if you got a critical, they just have a special mechanic for not showing them.  Unfortunately, that isn't accessible outside of creating character sheets (Pro Perk). Similarly, conditional logic is the purview of the API, another Pro Perk. Sorry I don't have better news for you.
1484971704

Edited 1484971758
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
I don't have computer access this weekend, but there are some tricks you can do with API command buttons to approximate this. Still requires a click, but can allow passing of modifiers from the attack to the damage such as with pathfinder power attack. *Note: API command buttons do not require API access and are available to all.
oh the campaign i'm in, is using the char sheets with the api, i'm just not the user who made the campaign. if it can be setup with the api i guess it will be fine.
1485005904
Scott C.
Forum Champion
Sheet Author
API Scripter
Compendium Curator
What system/sheet are you using?
1485031662

Edited 1485031688
5th edition (shaped)
Alienfreak10 said: 5th edition (shaped) Alienfreak10, I point you toward the 5e shaped documentation that is linked at the bottom of the character sheet or  here . It goes through the adding critical dice to standard attacks and spells as well as the template fields in case you want to make your own macros. If you give more detail, we can point you to the exact place or give you an appropriate macro.
1485056514

Edited 1485059276
okay to be exact this is the situation,  got one damage(1) type (slashing) 2d6, got another damage(2) 1d6 (cold) , for each of those the crit is 2d6,1d6, the problem is we got more damage types we have to roll so in the freetext we been putting it there as just 3d4 + 3d4 (lightning)if it crits, ideally it would be nice to say if r=20 then roll the 3d4 so we don't have to have the extra 3d4 in the text. then there's another thing, when we get a crit, we deal 10 more damage (whatever the weapon damage is, slashing etc) due to a homebrew ore weapon is made out of and when we crit fumble we take a level of exhaustion. if that part isn't possible its not really a issue but just would be nice to have.  also they have requested me to ask, if one character has a regeneration (heal) to auto add it to the sheet. like how a short rest rolling a hit dice does it.
1485079048

Edited 1485080057
Vanakoji
KS Backer
It can depend on how much you want the damage separated for damage resistance but if that is rare, you can just add it to the crit field. For example, here is the crit with multiple damages in the roll itself You will have to mouse over the crit damage but it can work if the resistance issue is not common. So in the crit field, instead of just 1d6, the field is "1d6 [cold] + 3d4 [lightning]" (note you can also do [[1d6]] [cold] + [[3d4]] [lightning] to add the dice up nicer if moused over, will just remove the green/red outline of the damage). A similar thing can be done with the plus 10 you mention. Just put 1d8 + 10 in the crit field for the normal damage EDIT If the damage is a whole third damage type however, setting up a companion attack could work as it needs both the normal hit and crit damage. Doing this I would make a new attack, only fill in the two damage fields (first for normal, second for crit) and auto link it to the first using %{NAME|MACRO} syntax in the freeform field. More on that can be seen in the documentation&nbsp; <a href="https://docs.google.com/document/d/1yPcIZ_bIc3JlnW" rel="nofollow">https://docs.google.com/document/d/1yPcIZ_bIc3JlnW</a>... So crit only can be handled in the crit field, a full third damage type needs an extra setup as far as I know, all 5e sheets only support 2 damage types on an attack.