There are shortcuts, but from a logical perspective you can create any
number by rolling a base 6 number and discarding numbers outside the
range you are looking for. You have to re-roll every die though if
your number is outside the range to keep the even distribution. Convert
back to decimal and add 1 to get a number from 1..n.
Think in base 6. Roll one die for each decimal place and subtract 1
to get the digit, so your digits are 0-5. Re-roll all digits if it
is out of the acceptable range. As a shortcut if the highest-order
digit can be 0-1 (roll 1 or 2), you can treat even numbers as 0 and odd numbers as 1 (or 1-3 as 0 and 4-6
as 1). If the digits can be between 0 and 2 you can treat 1-2 as 0,
3-4 as 1, 5-6 as 2.
For an example with a d20 we are looking for a base 6 number between
00 and 31 (decimal 0 and 19). In base 6 that is 00 to 31.
- Roll a d6 and get 5, subtract 1 to get 4. That's outside the range for the first digit so restart.
- Roll a d6 and get 4, subtract 1 to get 3. Roll another d6 and get 4, subtract 1 to get 3. 33 is > 31 so restart.
- Roll a d6 and get 2, subtract 1 to get 1. Roll another d6 and get 5, subtract 1 to get 4.
- Now you have 14 in base 6 notation.
- That's 1*6+4, or 10.
- Add 1 to get 11. That's your roll.
For d2 you are looking for 0-1. Since that's the highest digit you can
treat 1-3 as 0 and 4-6 as 1. Roll a d6 and get 5, use 1 as the digit,
add 1 to get a 2 for your roll.
For d4 you are looking for 0-3. Roll a d6 and subtract 1. If the number
is 0-3, add 1 to get your result, if not then re-roll.
For d8 you are looking for 00 - 11. Since the first digit can be 0-1,
roll a d6 and treat even numbers as 0 and odd numbers as 1. Roll another
d6 for the second digit. If your total is greater than 11, re-roll.
If your number is between 00 and 11 (inclusive), multiply the first digit
by 6 and add the second digit to convert to decimal 0-7, then add 1 to get
your d8.
For d10 you are looking for base 6 numbers between 00 and 13.
For d12 you are looking for base 6 numbers between 00 and 15. Note that you will never have to re-roll because you'll use the shortcut to get 0-1 for the first digit and the second digit will always be 0-5.
For d20 you are looking for base 6 numbers between 00 and 31.
You can use this to get the number for any theoretical sided die. For d43
you are looking for base 6 numbers between 000 and 110. This
is a bit complicated. The first digit will be 0 if you roll even and 1 if
you roll odd. If you roll even, you will always count the next two die
because your results will be 0XX and that's less than 110.
If the first digit is 1 and you roll 3-6 on the second die, restart because
your result would be > 110.
If you roll 1 on the second die, that gives 10X, so your third die will
always count. If you roll 2 on the second die, that gives 11X. The only
valid number is 110, so you still have to roll the third die. If it isn't
1 to give you 110, you have to restart.