Is there a way to generate random numbers in deterministic way in game to not break synchronization in multiplayer?
I noticed that there is a very convoluted way of doing that in RSO mod currently - it also seems it might not be enough. I'd like to make it MP friendly - rng seems to be main potential issue there.
Multiplayer and random number generation
Re: Multiplayer and random number generation
I vaguely remember some FFF mentioning that they made rng deterministic, i don't know though if it was the one in c++ or lua.
Re: Multiplayer and random number generation
Maybe are you looking for that : https://forums.factorio.com/forum/vie ... 450#p46431 ?
Koub - Please consider English is not my native language.
Re: Multiplayer and random number generation
Thanks Koub.
So this huge rng implemented in RSO is now obsolete I guess.
I'll try to remove it and see if it's more behaved after that. It could be that fancy random stuff is somehow causing desync.
Is there some kind of guideline for what mod shouldn't do to not break multiplayer?
Edit:
Are mods global variables synced or it would need to use glob.* to store those to make it synced correctly?
So this huge rng implemented in RSO is now obsolete I guess.
I'll try to remove it and see if it's more behaved after that. It could be that fancy random stuff is somehow causing desync.
Is there some kind of guideline for what mod shouldn't do to not break multiplayer?
Edit:
Are mods global variables synced or it would need to use glob.* to store those to make it synced correctly?
Re: Multiplayer and random number generation
glob is the only thing synced.orzelek wrote:Thanks Koub.
So this huge rng implemented in RSO is now obsolete I guess.
I'll try to remove it and see if it's more behaved after that. It could be that fancy random stuff is somehow causing desync.
Is there some kind of guideline for what mod shouldn't do to not break multiplayer?
Edit:
Are mods global variables synced or it would need to use glob.* to store those to make it synced correctly?
If you want to get ahold of me I'm almost always on Discord.