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