Resource Monitor

by devdot

Monitor mining sites and track resources across planets / surfaces.

Utilities
3 months ago
1.1 - 2.1
15.8K

g Desync on dedicated Server

9 days ago

Hi, I have an dedicated linux server running. I have 100+ mods and this mod is causing desyncs. One workaround was to reduce the scanned sites from 10 to 1 per tick. After a day the desyncs where back. The mod YARM from https://mods.factorio.com/mod/YARM-fork is causing no desyncs. I like how your mod is handling the showing of sites. Sadly I do not know how to isolate the exact issue, if I can help you find the cause, please instruct me what steps I would need to make.

8 days ago

With the help of AI I could find the following cause:

components/translation.lua keeps pending translation requests in a plain Lua table (Translation.callback). This table is not part of storage, so it is not saved and not sent to clients when they join.

If a player joins while translation requests are still pending, the server has entries in Translation.callback but the joining client does not. When on_string_translated fires, only the server runs resource_translated(). That function writes to storage.resources and can issue follow-up request_translation() calls (fallback to resource-name / item-name). As a result, game state and the translation ID counter diverge between server and client, which leads to a desync.

components/surfaces.lua has the same pattern on a smaller scale: finish_generate_surface_list is a file-local table, and finish_generate_from_game() later modifies surfaces in storage based on it. A client joining between generateFromGame() and the deferred finish step would end up with a different state.

I hope this helps.

New response