What is the standard deviation of dice rolling? When trying to find how to simulate rolling a variable amount of dice with a variable but unique number of sides, I read that the mean is $\dfrac{sides+1}{2}$, and that the standard deviation is $\sqrt{\dfrac{quantity\times(sides^2-1)}{12}}$.
I doubt that the $12$  comes from the formula because it seems strongly linked with the examples of using two six-sided dice.
Is the formula for the standard deviation correct? If not what is it?

The formula is correct. The 12 comes from $$\sum_{k=1}^n \frac1{n} \left(k - \frac{n+1}2\right)^2 = \frac1{12} (n^2-1) $$
Where $\frac{n+1}2$ is the mean and k goes over the possible outcomes (result of a roll can be from 1 to number of faces, $n$), each with probability $\frac1{n}$. This formula is the definition of variance for one single roll.
