These dice are for the Star Wars tabletop role-playing game by Fantasy Flight Games. Check it out here!
The (psueudo-)randomness for this application is generated by random.org's API, which generates randomness through atmospheric noise.
My application calls random.org's API to generate random integers like so: given a user request for n dice rolls, I request n random integers from random.org, each in the range of 1 and 24, inclusive. This is because the three possible dice sizes are 6, 8, and 12 sides, which have a least common multiple of 24. This way, I can just use the modulus operator to generate random numbers within any of the three dice size ranges. With this approach, I can minimize the requested integers' range while only needing one API call for each set of dice rolls.