msakuta / Factorio-NaturalTreeExpansion-Mod

A Mod for Factorio that automatically expand forests gradually
3 stars 2 forks source link

Multiplayer #1

Open LuthaMG opened 7 years ago

LuthaMG commented 7 years ago

I was using yours mod in my server, but it made game impossible. You said that

Multiplayer is not tested. This mod uses Lua's math.random(), which could cause problems on multiplayer game and replays.

But people from Reddit, gave a nice tip, which may help you with solving this problem.

math.random is safe to use in a mod. The issue with that mod is he doesn't save things in the global table so they aren't persisted through save/load.

msakuta commented 7 years ago

Another guy on Factorio mod portal told me the same thing (https://mods.factorio.com/mods/aster26/NaturalTreeExpansion/discussion/4120), and I guess you are right. The problem is that I don't have a particular friend to test multiplayer with, so I can't confirm that the suggested approach would work.