As written, all this does is discretize the probability of interruption. Even if you use rollDice(hoursToWait+1) to return an integer in [0,hoursToWait], forcing the roll to be an integer works the same as only rolling multiples of 1/hoursToWait and checking against fSleepRandMod.scrawl wrote:The patch changes the mechanic drastically, because the roll is now an integer.

Examples, with rollDice(hoursToWait+1):

- hoursToWait=1, the options are 0 or 1, so you can only ever be over or under fSleepRandMod. Probability of interruption is 50%.
- hoursToWait=2, the options are 0, 1, or 2; fSleepRandMod is multiplied by hoursToWait so now we are comparing against a float between 0 and 2. If fSleepRandMod is between 0 and 0.5, interruptions occur 33% of the time. If it's between 0.5 and 1, interruptions occur 66% of the time.
- hoursToWait=3, 0<fSleepRandMod<0.33, interruptions 25% the time. Increasing in 25% steps.

I don't think this is how the mechanic was intended to work. Why not check rollProbability() against fSleepRandMod for each hour rested?