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

This subforum contains all the issues which we already resolved.
Rseding91
Factorio Staff
Factorio Staff
Posts: 15897
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post 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.
If you want to get ahold of me I'm almost always on Discord.
kovarex
Factorio Staff
Factorio Staff
Posts: 8298
Joined: Wed Feb 06, 2013 12:00 am
Contact:

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

Post 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.
Post Reply

Return to “Resolved Problems and Bugs”