Page 1 of 1

[RESOLVED] Desync when a mod removes item-on-ground entities

Posted: Sat Nov 01, 2014 4:57 pm
by Rseding91
EDIT: found the issue: I was using a local variable set oninit of the lua instance and that isn't reset onsave->onload. I switched to storing information in glob. and that works between save-loads. I'm not sure if this is something that needs to be fixed on the game side or if it's just something mod creators need to keep in mind: local variables are per-game session and won't carry between players in MP.


When I use this simple mod: https://forums.factorio.com/forum/vie ... =14&t=5410 that auto-picks up item-on-ground entities within their range it will desync any MP players when a item is picked up by them.

Steps to reproduce:
  • Install the mod on both player's computers
  • Start a game with commands enabled
  • Give yourself a collector: /c game.players[1].insert({name="item-collector-area", count = 50})
  • Place one on the ground
  • Drop a item on the ground near the chest
At this point any MP people will de-sync.

Re: [RESOLVED] Desync when a mod removes item-on-ground enti

Posted: Wed Nov 12, 2014 6:36 am
by kovarex
Well, yes this is part of the design, as we don't see a easy way to solve it. It is up to modders to do the save/load correctly, as local variables are not stored in the save.