Page 1 of 1

Add show-time-to-next-autosave debug option to the API

Posted: Tue Jun 30, 2026 11:59 am
by LCStark
We have this debug setting available:
06-30-2026, 13-44-54.png
06-30-2026, 13-44-54.png (2.14 KiB) Viewed 179 times


Turning it on displays time remaining to next auto-save in top-right corner:
06-30-2026, 13-44-43.png
06-30-2026, 13-44-43.png (9.39 KiB) Viewed 179 times


It would be nice if we could read that value in the API. I've checked and there are two auto-save related members available: `LuaGameScript::auto_save` to perform an auto-save programmatically, and `LuaGameScript::autosave_enabled` to check if auto-saving is enabled and to toggle it.

I propose adding another property, maybe something like `LuaGameScript::autosave_time_to_next`, which would be a read-only value returning the same time remaining as that debug option (though returning it as number of ticks remaining would probably be most convenient).

Re: Add show-time-to-next-autosave debug option to the API

Posted: Tue Jun 30, 2026 12:04 pm
by Rseding91
This is unfortunately not possible as this value is not part of the game state and so would cause desyncs if used in multiplayer. It also is different for every player in a multiplayer game and different on the dedicated server.

Re: Add show-time-to-next-autosave debug option to the API

Posted: Tue Jun 30, 2026 12:14 pm
by LCStark
Ah, shame. Since `auto_save` specifically mentions only saving on the server, I assumed it might be possible to make it work the same way here - returning time to the next auto-save for the server. Anyway, thanks for a quick response!