D4

From NWN Lexicon
Jump to: navigation, search



d4(int)

Rolls a 4-sided die.

int d4(
    int nNumDice = 1
);

Parameters

nNumDice

The number of dice to roll. (Default: 1)


Description

Returns the total from rolling nNumDice x d4 dice.
If nNumDice is less than 1, then 1 is used.



Remarks

A d4 (four sided die) has a 25% probability of turning up any one number.
nNumDice has a limit of 255 (BYTE == uin8_t == 0-255).


Version

1.22

See Also

functions: 

Random



 author: Charles Feduke