[0.14.21] Desync - Custom Scenario

Desyncs in modded game will be ignored most of the time, until it is clearly proven that the desync is not caused by scripting.
Post Reply
Oarc
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

[0.14.21] Desync - Custom Scenario

Post by Oarc »

Hi again,

A few players on my server seem to be getting a lot of desyncs. One of them in particular has a bad net connection.
From what I understand, any kind of desync is never expected?

I'm running a custom scenario on my home linux server, headless install.
The code for the scenario can be found here: https://github.com/Oarcinae/FactorioSce ... layerSpawn

One of my players was kind enough to post their desync file: https://dl.dropboxusercontent.com/u/303 ... -10-45.zip

Unfortunately, I don't have much information except it seems to happen when they are joining the game I think.
I can't rule out my scenario code but I've been using it a lot (and other people run it on other servers) and these seemingly random desyncs haven't usually been an issue.

Let me know if I can help in anyway with more info or something.

Thanks,
Oarc

User avatar
Klonan
Factorio Staff
Factorio Staff
Posts: 5151
Joined: Sun Jan 11, 2015 2:09 pm
Contact:

Re: [0.14.21] Desync - Custom Scenario

Post by Klonan »

Oarc wrote:Hi again,

A few players on my server seem to be getting a lot of desyncs. One of them in particular has a bad net connection.
From what I understand, any kind of desync is never expected?

I'm running a custom scenario on my home linux server, headless install.
The code for the scenario can be found here: https://github.com/Oarcinae/FactorioSce ... layerSpawn

One of my players was kind enough to post their desync file: https://dl.dropboxusercontent.com/u/303 ... -10-45.zip

Unfortunately, I don't have much information except it seems to happen when they are joining the game I think.
I can't rule out my scenario code but I've been using it a lot (and other people run it on other servers) and these seemingly random desyncs haven't usually been an issue.

Let me know if I can help in anyway with more info or something.

Thanks,
Oarc
Thanks for the report,

However with any custom script code, a desync can be expected if certain rules are not followed.

The main issue would be saving global variables outside of the 'global' table,
Such that any state of any part of your script that should be static, should be saved in the global table,
This is because when a player downloads the game, the only script information outside of the actual .lua files he receives is a serialization of the global table

From looking at your script nothing obvious jumps out, but in the end, unless you can narrow it down to something specific that the API is doing wrong, IE it desyncs because of a API call, then its almost definitely an oversight somewhere in your script

Oarc
Fast Inserter
Fast Inserter
Posts: 101
Joined: Sun Sep 18, 2016 2:04 pm
Contact:

Re: [0.14.21] Desync - Custom Scenario

Post by Oarc »

Okay that's what I figured. I'll keep looking through my scenario code.

Thanks for the reply anyway!

Post Reply

Return to “Desyncs with mods”