I'm also going to ask, what is the default seed Lua uses?
Currently, I'm working on a way to predict Nutscript and Clockwork's rolling system so that people can get perfect rolls each go, however one thing I haven't been able to find is the source code for math.random in Lua, if I'm correct the default randomseed is os.time(). If anyone could drop it for me, you'd be doin' me a massive favour.
I'm also going to ask, what is the default seed Lua uses?
https://******.com/LuaDist/lua/blob/...ib.c#L181-L206
It is dependent on the C++ compiler used.
The lua manual:
Edit: I have heard that the default seed is 1 but I can't find any official source so it might depend on implementation aswell.This function is an interface to the simple pseudo-random generator function rand provided by ANSI C. (No guarantees can be given for its statistical properties.)
Edit 2: https://linux.die.net/man/3/randIf no seed value is provided, the rand() function is automatically seeded with a value of 1.
Last edited by Gorzoid; 05-09-2018 at 02:47 PM.
I am just here to learn, definitely not for hacks... o_O Just learning