rng
Deterministic random numbers for rolling gear. `Rng.new(seed)` returns a generator (`:next()` in [0,1), `:range(lo, hi)`, `:int(lo, hi)`); `Rng.hash(...)` hashes strings and numbers to a 32-bit integer; `Rng.pick(rng, keys, weights)` picks a weighted key in a fixed order. All ari…
gearStatsKit.rng
Deterministic random numbers for rolling gear. Rng.new(seed) returns a generator (:next() in [0,1), :range(lo, hi), :int(lo, hi)); Rng.hash(...) hashes strings and numbers to a 32-bit integer; Rng.pick(rng, keys, weights) picks a weighted key in a fixed order. All arithmetic is exact 32-bit, so the same seed gives the same item on every engine and platform: that is what lets a rolled item's id rebuild it anywhere with no network sync.
Used by gearStatsKit.roll for every roll and drop; a game can use it for its own seeded randomness.
Scoped to this part · feeds back into the world's score.