[0.16.36] Desync report on dedicated server with 3 players

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
mokujin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jun 11, 2018 8:38 pm
Contact:

[0.16.36] Desync report on dedicated server with 3 players

Post by mokujin »

We played a map on a server with 3 players and (possibly) after placing a blueprint over items marked for deletion desync occured for all players. After reverting save file to most recent autosave, desync was not happen for a while, but after some period of time started to happen again periodicaly only for one of the players. Attaching a couple of desync reports, mods folder and probably bugged save file.

Attachments:
desync report 1
desync report 2
desync report 3
save file
mods folder

mokujin
Manual Inserter
Manual Inserter
Posts: 2
Joined: Mon Jun 11, 2018 8:38 pm
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by mokujin »

Looks like desyncs was caused by turrent shields mod. Desyncs are happening right after marking turrents with shields for automatic deconstruction by bots. We removed this mod and issue resolved.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by ownlyme »

i really have no idea what causes the desyncs.
Now i have another guy telling me his game desyncs when the shields loose power.
I tested it and can verify it. it only happens when the shields have been fully charged though. (no shield bar displayed)

This is what the mod does at that point:
The on_tick event is registered on every 23th tick.
It loops through the shields table and compares the stored variable with the current energy stored in the electric-energy-interface to check if it lost energy.
It then reduces the stored energy by an amount (tested this with a fixed amount equal to 1/3 of the buffer size -> didn't help)
I think this is causing the desync:
It then creates one of 9 dummy entities that shows the current shield value and updates the table.

Maybe something on the game side is not working perfectly...
my mod is now marked as multiplayer incompatible...
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by ownlyme »

does any developer read this forum?
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

nuhll
Filter Inserter
Filter Inserter
Posts: 922
Joined: Mon Apr 04, 2016 9:48 pm
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by nuhll »

Yes, they are, but you must understand that mods are 3rd party, so its not a must to support it, ig uess its better if you post a new thread in the correct forum and ask for help from other devs.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by ownlyme »

i rather write a 3 line desync mod to demonstrate to the devs how awful their mod support is.
otherwise i dont give a fk, im not playing the game in multiplayer myself anyway.
Last edited by ownlyme on Wed Jul 18, 2018 10:40 pm, edited 2 times in total.
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Rseding91
Factorio Staff
Factorio Staff
Posts: 13175
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by Rseding91 »

ownlyme wrote:i rather write a 3 line desync mod to demonstrate to the devs how awful their mod support is.
otherwise i dont give a fk, im not playing the game in multiplayer myself anyway.
The problem is your mod is storing variables outside of the "global" table between ticks which isn't save-load stable. Specifically the global variables at the top of your mod.
If you want to get ahold of me I'm almost always on Discord.

User avatar
ownlyme
Filter Inserter
Filter Inserter
Posts: 400
Joined: Thu Dec 21, 2017 8:02 am
Contact:

Re: [0.16.36] Desync report on dedicated server with 3 players

Post by ownlyme »

wow, it really works! (Oo)
i thought it was because the energy network wasn't synced and by removing the power pole players would have different states of the internal electric buffer and caused the checksum error due to the entity creation.
Thank you very much and sorry for what i said about modding support

If anybody in the future finds this thread and wonders what i changed to make it work: take a look at turret shields version 29->30
I think it was a non-global variable i used to go through the shields table, which is pretty big and for performance reasons i wanted to only parse a limited amount of entries per tick
mods.factorio.com/user/ownlyme
My requests: uiAbove||Grenade arc||Blueprint allies||Creeps forget command/ don't get removed||Player Modifiers||textbox::selection||Better Heat IF||Singleplayer RCON||tank bug w/ min_range >= projectile_creation_distance

Post Reply

Return to “Desyncs with mods”