Hourly Autosaves

by Shados

Autosaves the game (using a configurable prefix) on every hour of game-time

Utilities
21 days ago
0.18 - 2.0
1.53K

b Mod issues

1 year, 6 months ago

Hi, 2 issues I found with the mod:

Every time you press the manual save button, it creates a new window, so if you press it 10 times in a row, you have 10 windows instead of just having the same single window.
Second issue is the real problem. If you happen to save while having those 10 windows open and then load that save, you cant close the windows anymore. The event simple lost the reference to the frame and so it cant close it. On loading the game, the engine recreates existing frames but the button event was associated with a frame variable that does not exist anymore and so, doesnt work anymore.

1 year, 6 months ago

Huh. That's an interesting failure mode, I'd not expected Factorio to attempt to save/load anything about window frames. I'll have a think about what approach I want to take to handle that.

21 days ago

Fixed this in the Space Age-compatible 1.1.0 version. GUI handler callbacks are now persisted in the storage global and survive save/load cycles, albeit with some additional requirements and restrictions on how I use them, but oh well.

21 days ago
(updated 21 days ago)

Thanks Shados!! I just came to check on this issue because I fixed this in a much hackier way where I just erase gui elements whenever players join/leave: https://github.com/jahands/factorio_hourly_autosaves/commit/0768eefa3f030fbfcf0a2224be5ceae122f6096c

New response