08-12-2023, 12:16 AM
I forget where I got this random number generator (UPDATE: it was from this post) but managed to figure out how to use it in a program to easily roll an n-sided die with one button press. Just put a non-zero seed in, and set VAL to the number of sides on the dice.
No idea how well this random function does, but seems to work. Still trying to wrap my head around the solver in this thing so open to suggestions/improvements. Also only tried it so far in Emu42, waiting on the real thing in the mail.
[attachment=12402]
Code:
DICE:ROLL=0*L(SEED:FP((PI+G(SEED))^5))+INT(SEED*VAL+1)
No idea how well this random function does, but seems to work. Still trying to wrap my head around the solver in this thing so open to suggestions/improvements. Also only tried it so far in Emu42, waiting on the real thing in the mail.
[attachment=12402]