PDA

View Full Version : How to create multifacited RNG tables.



Hexthat
10-22-2015, 10:10 AM
All numerical values are easy to convert to Hexadecimal and can be stored as 00-ff.


Example
RNG base=0-255

table 1
0-50
table 2
51-100
table 3
101-150
table 4
151-200
table 5
201-255

table1
rng = 0-255
table a1
0-50
table a2
51-100
table a3
101-150
table a4
151-200
table a5
201-255

table2
rng = 0-255
table b1
0-50
table b2
51-100
table b3
101-150
table b4
151-200
table b5
201-255

table3
table c1
0-50
table c2
51-100
table c3
101-150
table c4
151-200
table c5
201-255

table4
table d1
0-50
table d2
51-100
table d3
101-150
table d4
151-200
table d5
201-255

table 5
table e1
0-50
table e2
51-100
table e3
101-150
table e4
151-200
table e5
201-255

More to Example
table c3 101-150
101= HP-6 wolfhound
102= HP-7 wildcat
ect....

Should be able to pick 1280 random shnaz. This example has no weight on any one thing, by skewing tables you can create weight.

higher weight on HP-6
table c3 101-150
101= HP-6 wolfhound
102= HP-6 wolfhound
103= HP-7 wildcat
ect....

Now for rarity you get a separate RNG table... and for rolls you get a separate rng table.

Keeper Riff
10-22-2015, 10:58 AM
You forgot to say you need to run it on a different machine from the one that forms queries, or the machine has to have a separate non-synchronized timer which counts different time intervals from the one that the machine's CPU works on.

You also forgot to include coefficients which depend on weapon's popularity, player's /played time, their number of $ spent, number of bits currently on their account and whatever else price discrimination parameters you can imagine to make the player's greed work against their wallet.

BTW, from the Readme of your RNG batch:

Know Issue:
Possible for same number to show up multiple times.
Have you tried to insert a PING 127.0.0.1 -n 2 >NUL command into your FOR /L loop? It should add some slightly randomized time delay between the queries in the loop, thus getting rid of same numbers showing up.