Desync from my scenario.
Posted: Sat Apr 17, 2021 4:05 am
I made a scenario. The script in this scenario modifies the amount of ore entities every 5 seconds. I works perfect on my own pc when I debug. But when I deploy it on a server and link to it from my Factorio started from Steam, the desync occurs.
Besides, when it's server and clients, none of us has seen the amount of any ore entities has ever changed, which is supposed to change every 5 seconds.
Any idea? Should I remove the ore entity and recreate one with new amount assigned directly?
Does the file uploading work?
I think I know the problem. When I assign a new amount value to an ore entity, the game doesn't sync the data. So when any critical event based on the amount happens, the server and my client don't match. The solution is something you've done to the fluidbox. The api looks like add_liquid, remove_liquid. So, please add the add_amount and remove_amount functions to ore entity, and sync when they are called.
Also, the energy, the progressions for assembly machine. If you don't want people to modify them in script, make them read only, or these details make tons of desync.
Besides, when it's server and clients, none of us has seen the amount of any ore entities has ever changed, which is supposed to change every 5 seconds.
Any idea? Should I remove the ore entity and recreate one with new amount assigned directly?
Does the file uploading work?
I think I know the problem. When I assign a new amount value to an ore entity, the game doesn't sync the data. So when any critical event based on the amount happens, the server and my client don't match. The solution is something you've done to the fluidbox. The api looks like add_liquid, remove_liquid. So, please add the add_amount and remove_amount functions to ore entity, and sync when they are called.
Also, the energy, the progressions for assembly machine. If you don't want people to modify them in script, make them read only, or these details make tons of desync.