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 .
×

Macros - A 1 at dice result = 2 successes ?

Hello, I'm a macros newbie... I'm looking for a way to count successes in a particular way : a one equals to 2 successes. I checked the macros wiki page, but couldn't find an expression to do that... For example I have the following expression : &{template:default}{{name=@{Selected|Token_Name}}} Force=[[ 2D10<@{Selected|force}]]succès I'd like to add a condition saying that if a 1 is obtained, it equals to 2 successes and to increase the default successes number first obtained. Is it possible with roll20 ? Anyone knows how it could be done ? Thanks
1608542806
Oosh
Sheet Author
API Scripter
You can achieve this by using the failure operator to subtract 1 for a fail, a normal success is a 0, and a critical success is a 1. You then add the number off dice thrown to the total (simulating a 0 / +1 / +2 outcome): [[2d10<1f>@{Selected|force}+2]] If the number of dice is variable, it will work with a Query: [[?{Number of dice?|2}d10<1f>@{Selected|force}+?{Number of dice?}]] Roll20 also treats > as 'greater than or equal to', so if you need 'greater than' @{force}, you may need to add 1 to the failure number: [[2d10<1f>[[@{Selected|force}+1]] +2]] And finally, you might want to redo the critical success/failure colouring to better match how the dice are used: [[2d10cs1cf>@{selected|force}<1f>@{Selected|force} +2]] This will give a red outline on a failure and green on a 1.
Thank you for the idea. It works, but induces error while reading the result : only 10s are critical, and it counts every result above the "force" value as critical. So, I tried to modify your script as below to count only 10s as critical : [[2d10cs1cf10<1f>@{Selected|force} +2]] But now, it doesn't count a result equal to the "force" value as a success. I tried several expressions but thanks to my limited knowledge they don't work at all...
Hum, I finally tried this, that seems to work: [[2d10cs1cf10<1f>[[@{Selected|force}+1]] +2]]succès Thank you Oosh :)