In theory per some docs you set the seed once per application load\session and you're supposed to be good, in practice, idk.
Let's have a look.
I duped all your cases, same results as you. I ran tests with 'improved' versions mentioned below and got solid random results as well (all tests were click-fast couple times with in same second). Conclusion was same as you, seemed at a glance the game might be initializing it for us.
I went snooping around in the game code a little.
Looking at the LuaSandbox.Initialize code after it registers all the commands it does do this:
this.lua.DoString("math.randomseed( os.time() )", "chunk");
So I think the answer is yes, upon lua environment initialization it does initialize the randomseed using os.time() as the seed for us, and no we don't in 'most cases' need to touch it anymore.
When or if that was changed I don't know, it may have or may not have made the release notes at some point in time. Basically the generic LUA docs are correct, but Command is doing it for us so we don't have too, which I agree is good. That probably should be documented\updated somewhere if it's not already.
If you want\need more entropy the 'improved' functions may be the way to go.
I came across these and used them in the past improvedrandom() and improvedrandomseed() ?
Seems I can't post links yet so maybe I can try it this way
github dot com /rjstone/cmano-lua-helpers/blob/master/cmano_helpers.lua
Those functions would go in start-up script.
< Message edited by KnightHawk75 -- 1/22/2019 6:44:27 AM >