[0.12.33] math.randomseed( int ) doesn't work/register
[0.12.33] math.randomseed( int ) doesn't work/register
The outputs aren't the same as they should:
Re: [0.12.33] math.randomseed( int ) doesn't work/register
viewtopic.php?f=25&t=19353#p123629
Oxyd wrote:You can't seed the generator from Lua. There is one random number generator for each map – used both by the game itself and by Lua's math.random. This generator is seeded when the map is generated – there's an input box on the map generator screen when starting a new game that lets you specify the random seed.Ranakastrasz wrote:Alright. What about the seed? Do I have to initilize it to get different results per game? Do I have to do it on game-load? If i do it on game load, will it sync over all players?
Re: [0.12.33] math.randomseed( int ) doesn't work/register
This is main reason (I think - dark wrote it) why RSO uses separate random generator made in lua to provide proper ore regeneration.
It could use the built in one now but you wouldn't be able to regen the ores and get same result since there is no way to seed it.
It would be nice actually to have ability to instantiate our own random gen through lua.
It could use the built in one now but you wouldn't be able to regen the ores and get same result since there is no way to seed it.
It would be nice actually to have ability to instantiate our own random gen through lua.
Re: [0.12.33] math.randomseed( int ) doesn't work/register
orzelek has made a request:
Creation of separate random generators [Modding interface requests]
I think this should stay in 'Not a bug' as Factorio just works that way and reseeding the RNG wasn't planned.
Creation of separate random generators [Modding interface requests]
I think this should stay in 'Not a bug' as Factorio just works that way and reseeding the RNG wasn't planned.
Given that the ores already regenerate randomly (depending on the map seed), why would you need to get the same result when calling it twice?orzelek wrote:It could use the built in one now but you wouldn't be able to regen the ores and get same result since there is no way to seed it.
Re: [0.12.33] math.randomseed( int ) doesn't work/register
Fine! I'll build my own RNG! With blackjack and hookers!
Joking aside, I get the reason and I'll find a solution
Joking aside, I get the reason and I'll find a solution
Re: [0.12.33] math.randomseed( int ) doesn't work/register
For anyone else needing a seed-able rng: viewtopic.php?f=96&t=25797