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 edit Critical Hit or Fail values for dice rolls macros.

1524796729

Edited 1524801453
So, I have a few macros that I've been working on.  I want to be able to edit both the roll values for critical success and critical fails on a dice. For example:  The character has a weapon that can crit on a 19, but can also injure the player on a 2 or a 3.  How can I edit the macro to identify those numbers as crits, and show the respective indicators(red and green surrounding boxes) for those rolls? Going off of that, is there a way to also set up certain messages, or other specific rolls to occur on a certain outcome?  For example:  Going off the above example, if the player rolled a natural 1, 2, or 3, is there a way that I could create a message to pop up either in chat, roll table, or popup that would say something like "Backfire"?
1524802491
The Aaron
Pro
API Scripter
One a die roll, you can specify the critical ranges for success (green) and failure(red) using the cs and cf modifiers.  to give a red border on 1,2,3 and a green border on 19,20, you can use: [[1d20cf<3cs>19]] Note that < is less than or equal to, and > is greater than or equal to.  You could also specify individually: [[1d20cf1cf2cf3cs19cs20]] which is more verbose, but lets you skip ranges. As for outputting a specific message, you could create a rollable table where the backfire values are the text "Backfire" or possibly "Backfire (1)", "Backfire (2)", etc. and the other entries are the numbers 4-20  However, you won't be able to do math on that table as you'll get 0 for all the text values.  (I don't think you can make cs/cf work with them either). The best bet for having a full output is to use an API script (Pro Subscriber Perk) to determine the outcome and provide appropriate messaging.  That could either be done with all the logic and output being part of the API script, or you could have a script that merely watches the output and adds the "Backfire" note as an addition to rolls that have already happened (as a new message). Hope that helps!