RollerConfig.MaxDice Property

From DiceRoller Documentation

Gets or sets the maximum number of dice that may be rolled.

  • Namespace: Dice
  • Assembly: DiceRoller (in DiceRoller.dll)

Syntax

public int MaxDice { get; set; }

Property Value

Type: System.Int32

The maximum number of dice that may be rolled, including dice rolled due to rerolls or exploding dice. Exceeding this limit will result in a DiceException being thrown with DiceErrorCode.TooManyDice.

Remarks

The default value for MaxDice is 1,000. It is recommended to not set this too high, as there is generally no need to roll hundreds or thousands of dice in the course of typical role-playing games, and increasing this limit will adversely impact both memory usage as well as the time taken to process dice rolls.