Lurker News

Comments (230) 51 threads

Earlier comments
vacri#
On a related note, a colleague once worked at a place where they did this for on-call: Everyone has an on-call score. Every week, the person on-call had their score set to zero, and everyone else incremented by one. You could plan out the next couple of months this way, and it provided an elegant way for new hires to take their place - they start at zero, and were generally familiar enough by the time their number came around.

There were some housekeeping rules to work around the organicness of human life - if someone went on holiday they kept their score, for example - but overall it seemed to work.

biafra#
How do I run this code? I thikn I succesfully installed the package with npm. There were some warnings but no error. But how do I run:

> const RiggedDie = require('gamblers-dice')
> const die = new RiggedDie(20) // for a d20
> console.log(die.roll()) // 1 -> 20
> console.log(die.roll()) // keep using the same instance
Do I put it in a file? Do I copy paste it into a REPL? If so what provides that REPL?
I am always surprised when sample code providers assume I know their languages ecosystem.
UPDATE: Apparently I can use "node" as a REPL for this.

nerdponx3 replies#
This "unfair RNG" issue was big in Dota 2 (a popular video game) for a while. They ultimately implemented something similar and AFAIK now all "random" effects use it.
Blackthorn1 reply#
You mean the pseudorandom distribution? IIRC that was even a part of DotA 1.
Quarrelsome1 reply#
yeah but now it applies for I think everything. The last one to go was Spirit Breaker's bash. Prior to that PA's crit. Funny thing is that with PRNG you can "warm up" via farming creep camps so if you don't crit in say 5 attacks you can go look for a fight and be "guaranteed" a crit with your first swing.
fiatjaf3 replies#
I googled "RNG" because I wanted to know what it meant, but was presented with an interactive widget that generated numbers.
sloppycee1 reply#
RNG stands for Random Number Generator. It is used colloquially, in gaming, to refer to the probability of certain random events or the underlying implementation of them.
avisser#
In its most personified form, the RNG transforms into RN Jesus to whom you pray for good video game luck.
RugnirViking1 reply#
In the case you weren't joking: RNG stands for Random number generator. It is an abbreviation commonly used in video games.
vacri#
Also in cryptography, in things like CSPRNG (cryptographically secure pseudo-RNG)
reificator#
That's exactly what it is. RNG = Random Number Generator.
xzel#
Not quite all; there are still a handful of skills that use a discrete or flat distribution but practically all attack based changes use the pseudo random distribution. For more info: http://dota2.gamepedia.com/Random_distribution

Load more comments