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

Need help with dice roll command / formula

1676666659

Edited 1676666713
How do i make a command for dice rolls that changes 1's on a dice roll to 2's?
<a href="https://app.roll20.net/forum/post/7018858/how-to-turn-1s-into-2s-when-rolling-damage-dice" rel="nofollow">https://app.roll20.net/forum/post/7018858/how-to-turn-1s-into-2s-when-rolling-damage-dice</a>
I see&nbsp;{1d6, 2d1}kh1 + {1d6, 2d1}kh1 + {1d6, 2d1}kh1 + {1d6, 2d1}kh1 will work for 4d6 change 1's to 2's but later on I can further change it to change 1's &amp; 2's to 3's... how do i adjust the formula for that?
1676733534
Kraynic
Pro
Sheet Author
Change each 2d1 to 3d1.
ahh thank you, I will try that!
1676786189

Edited 1676786756
GiGs
Pro
Sheet Author
API Scripter
If its important to be able to vary the number of dice, you could make a rollable table. So imagine you made a rollable table that is d6's where 1 = 2, you could create a rollable table where items are 2, 3, 4, 5, 6, and item 2 has a weight of 2, the rest have a weight of 1. If that table was called d6w1=2, you could roll it with any number of dice, like /roll 3t[d6w1=2] /roll 6t[d6w1=2] etc. the number before the t is how many "dice" you roll. You can do the same for any replacement numbers. This is much easier for varying the number of dice. I really dont like Roll20s implementation of rollable tables, and can rant at length about that, but for this specific use , they are really good. (You can name the table lots of dfferent things - my name here just makes clear what the table is doing, you can use a shorter or clearer name if you prefer.)