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

Replacing Dice Results?

I am in the process of authoring a sheet, and had a question that I was not able to find a direct answer to, after searching through the forums and documentation:  I am trying to work out if it is at all possible replace the results of a roll with a static number? More specifically, I would like to be able to roll 1d6 -> on a result of 1, I would like to replace that with a 6. I fear this may be out of the capabilities of roll macros at the moment, but if anyone with more experience in this department could weigh in it would be greatly appreciated.
1605172741
GiGs
Pro
Sheet Author
API Scripter
You cant do this with roll macros. But since you are authoring a sheet, you have the option of creating your own rolltemplate. A rolltemplate allows you to intercept the roll, and then display what you want from it. Using the rolltemplate helper functions, you can check if the roll is 1, and display a 6 instead. See here for the basics:&nbsp;<a href="https://wiki.roll20.net/Roll_Templates" rel="nofollow">https://wiki.roll20.net/Roll_Templates</a>
1605177661
Finderski
Pro
Sheet Author
Compendium Curator
One caveat to GiGs comment, if there are modifiers to the roll, things can get tricky; the roll template helper functions can only evaluate the entire inline roll OR if the roll was a critical success or a critical failure. So... If the roll was 1d6, no issues with that. If the roll is 1d6+1 then you can find if it was a 1 on the d6 using the helper functions for critical success and change the 1 to a 6, but you'd struggle to display 7 without additional logic. For the second case, you'd need to use the trick to re-use rolls .
1605184674
David M.
Pro
API Scripter
Without getting into helper functions and whatnot, a rollable table could do this easily, with entries 2, 3, 4, 5, 6. Give the 6 a weight of 2 and the rest a weight of 1. Call the roll using [[1t[TableName]]]. Modifiers can be added like a normal roll, e.g. [[1t[TableName] +@{selected|AttrName} +5]]. Would require the table to be present in any game the sheet would be used in, however, in case portability and seamless of the sheet use by others is a concern. In that case, I wonder if rolling from the sheet could check for the existence of the table and create it if not there? Note: I know nothing about sheet creation, so I don't know if this would be considered bad practice.
Thank you all for your input here, looks like I will be modifying my roll templates to implement this.