d4(int)
From NWN Lexicon
Jump to navigationJump to searchRolls a 4-sided die.
Parameters
- nNumDice
- The number of dice to roll. (Default: 1, maximum 255)
Description
Returns the total from rolling nNumDice x d4 dice.
If nNumDice is less than 1, then 1 is used. If nNUmDice is over 255 it overflows, making 256 be "0" dice rolled, 257 be 1 die, and so on.
Remarks
An easier way to have dice rolls visible in code, which in D&D comes up a lot.
A d4 (four sided die) has a 25% probability of turning up either 1, 2, 3 or 4.
A single roll is equivalent of running:
Version
1.22
See Also
functions: |
author: Charles Feduke