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

Roll Nd6 show total or Failure if any 1's rolled?

I've got a game where the basic rolling mechanic is you roll Nd6 and if you roll any 1's at all, the entire roll is a failure.  If successful, you compare the sum of the dice to a difficulty rating, needing greater or equal to the DR.  I've looked through the stupid roll20 tricks, and can't find a way to do this.  Hoping there's some magical regex way to do this.
1625342646

Edited 1625349142
GiGs
Pro
Sheet Author
API Scripter
There is no way to do this without a script. Generally speaking, if what you're trying to do includes the word "if", it cant be done without a script. No conditional results are possible. You should be able to do this with the ScriptCards script. I'd check out that script and ask in its dedicated thread. Edit: corrected a typo (said "with" instead of "without").
1625351639

Edited 1625351725
David M.
Pro
API Scripter
Here's an example of a scriptcard that performs your basic mechanic: !Script {{ --#title|Basic Roll Mechanic --:USER INPUT| --=numDice|?{How many dice?|3} --=DR|?{Enter Difficulty Rating|10} --#leftsub|[$numDice]d6 vs DR [$DR] --:GLOBAL VARS| --&outputRolls| --=rolledOnes|0 --=rollTotal|0 --:ROLL DICE| --=i|0 --:Loop| --=i|[$i]+1 --=thisRoll|1d6 --=rollTotal|[$rollTotal]+[$thisRoll] --&outputRolls|+[$thisRoll] --?[$thisRoll.Total] -eq 1|=rolledOnes;1 --?[$i.Total] -lt [$numDice.Total]|Loop --:OUTPUT| --+Rolls|[&outputRolls] --+Total|[$rollTotal] [b]vs DR[/b] [$DR] --?[$rolledOnes] -eq 1|AutoFail --?[$rollTotal] -ge [$DR]|OverallSuccess --?[$rollTotal] -lt [$DR]|OverallFailure --X| End Macro --:AutoFail| --+[c][#990000]~~~AUTO FAILURE~~~[/#][/c]| --X| --:OverallSuccess| --+[c][#009900]~~~SUCCESS~~~[/#][/c]| --X| --:OverallFailure| --+[c][#990000]~~~FAILURE~~~[/#][/c]| --X| }} Example output:
1625358433
Kraynic
Pro
Sheet Author
Or, if you make the roll but don't use the success/failure syntax, but simply display the roll and the target number, then any roll result that is outlined by red or blue has a 1 in it somewhere.
That'll work great David M..  Muchas Gracias