Skip to content

Commit f557241

Browse files
authored
Update README.md
1 parent 9bf1cc6 commit f557241

1 file changed

Lines changed: 10 additions & 3 deletions

File tree

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,17 @@ __int64 __fastcall rand()
2828
}
2929
```
3030

31-
The original implementation of random for the Infinity Engine uses the specific variant of a [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator) shown above.
31+
The original implementation of random for the Infinity Engine uses the specific variant of a [linear congruential generator](https://en.wikipedia.org/wiki/Linear_congruential_generator)
32+
shown above.
3233

33-
In EE game versions, other platforms outside of Windows (E.g. Linux) don't utilize this implementation, but instead perform library calls to a system level rand() function; thus, they don't necessarily
34-
suffer from the same defects.
34+
Versions of the games on platforms outside of Windows (E.g. Linux) don't utilize this implementation, but instead perform library calls to a system level rand() function; thus, they
35+
don't necessarily suffer from the same defects.
36+
37+
One consequence of the difference is that other platforms with better pseudo random number generators may have a higher probability of high consecutive rolls (e.g. rolling all 6's
38+
during an ability roll).
39+
40+
This can be best seen with ability autorollers. With the original algorithm, it appears to be extremely unlikely (or perhaps even impossible) for roll totals that are higher than 104.
41+
In Linux, on the other hand, 105 and 106 can readibly be seen after allowing an autoroller to run for a significant amount of time.
3542

3643
## Prerequisites
3744

0 commit comments

Comments
 (0)