Every engine
03Engine

Dice

The player picks a chance and a side; one number is rolled.

Kind
one draw, a range
Largest win
99x the stake
Name in the files
dice
Version
ba10c380b07e

Download this engine as one file

What the player sets

  • target: the chance in basis points, 100 to 9800 (1% to 98%)
  • over: false to win under the target, true to win over it

Every round also takes the return dial in basis points, 9600 to 9900, and a stake.

The round, in order

  1. r = int_below(10000)
  2. under: the roll wins when r < target. over: it wins when r >= 10000 - target

int_below(m) is a whole number from 0 to m-1: limit = 2^64 - (2^64 mod m); take values until v < limit; return v mod m. shuffle: Fisher-Yates from the end, j = int_below(i+1). Words: HMAC-SHA256(key = seed, "STORM-DRBG|" || u64be(j)), cut into big-endian u64s.

What it pays

A win pays rtp x 10000 div target (x10k), a loss nothing. The chance is target / 10000, so the return is the dial, rounded down by at most one part in ten thousand of the pay.

Tables

The tables the round uses at three points of the dial, each with its exact return. A multiple is kept in the files as a whole number times 10,000, rounded down (Storm’s multX1e4); here it is written out.

Dial at 96%

chance = target/10000; pays (x10,000) = rtp*10000 // target

Eight of the 9,701 targetsexact return 95.9902% to 96% over every target · largest win 96x
Target (chance)PaysExact return
100 (1%)96x96% (24/25)
500 (5%)19.2x96% (24/25)
1000 (10%)9.6x96% (24/25)
2500 (25%)3.84x96% (24/25)
5000 (50%)1.92x96% (24/25)
7500 (75%)1.28x96% (24/25)
9000 (90%)1.0666x95.994% (47997/50000)
9800 (98%)0.9795x95.991% (95991/100000)

Dial at 97.5%

chance = target/10000; pays (x10,000) = rtp*10000 // target

Eight of the 9,701 targetsexact return 97.4902% to 97.5% over every target · largest win 97.5x
Target (chance)PaysExact return
100 (1%)97.5x97.5% (39/40)
500 (5%)19.5x97.5% (39/40)
1000 (10%)9.75x97.5% (39/40)
2500 (25%)3.9x97.5% (39/40)
5000 (50%)1.95x97.5% (39/40)
7500 (75%)1.3x97.5% (39/40)
9000 (90%)1.0833x97.497% (97497/100000)
9800 (98%)0.9948x97.4904% (121863/125000)

Dial at 99%

chance = target/10000; pays (x10,000) = rtp*10000 // target

Eight of the 9,701 targetsexact return 98.9903% to 99% over every target · largest win 99x
Target (chance)PaysExact return
100 (1%)99x99% (99/100)
500 (5%)19.8x99% (99/100)
1000 (10%)9.9x99% (99/100)
2500 (25%)3.96x99% (99/100)
5000 (50%)1.98x99% (99/100)
7500 (75%)1.32x99% (99/100)
9000 (90%)1.1x99% (99/100)
9800 (98%)1.0102x98.9996% (247499/250000)

On Storm

In Storm’s core this engine is built from this page as written, with the settings and the largest win above, and is right when it reproduces the test rounds below. The rest of this part is about the templates Storm has live today, which is the way onto Storm until then.

Our reading against Storm’s templates: fits (range). One chance from 1% to 98%.

On the templates it would take: the `range` template: one chance from 1% to 98%, pays rtp*10000 // target (x10,000). Its params are not published.

Check a build against ours

36 whole rounds, each from a seed given in the file. A build is right when, from the same seed, settings, dial and actions, it makes the same draws in the same order and pays the same amount. The seed of a test round is sha256("rain-engine-vector|<engine>|<case>|<rtp_bps>|<i>"), given in hex in each vector.

under 50%, dial 9900
seed 6ad42895fe546deab6774de8884acc673da55d07ea2f8ef828c50da75d3d87d6
settings {"target":5000}
draws int_below(10000) = 3591
pays 1.98x (payX10k 19800)
over 25%, dial 9900
seed 9441378f37a9f464149402bfa7a6ee7a71f1d19c849d359ff0e32fc23787989c
settings {"over":true,"target":2500}
draws int_below(10000) = 9492
pays 3.96x (payX10k 39600)

The rest are in this engine’s file, with the full result of each round. The reference build plays this engine and reproduces every one of them.