Autosave to primary file

Anything that prevents you from playing the game properly. Do you have issues playing for the game, downloading it or successfully running it on your computer? Let us know here.
Post Reply
Caennanu
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Fri Mar 17, 2017 4:28 pm
Contact:

Autosave to primary file

Post by Caennanu »

Good day,

I have read a few forums, some reddit etc.
It seems that when running a headless server, the autosave feature works as intended.
However, with a headless server powering off forcefully (windows updates, power shortage, hardware failure, human error) everything comes back online after solving the issues.
The problem really is, that the autosave is saved, but the server will load the fixed - predefined - savegame.

This in turn would mean having to rename the autosave to the savegame and replacing this manually.
Now obviously, people can write scripts, bots, executables whatever to do this automatically, but this seems trivial.
The obvious immediate solution would be to limit the server to 1 autosave file and configure the server to load just that file. But i can understand that this leads to some issues.

Is there a way to force this from a configuration point of view? Maybe an implementation idea for 0.15 or 0.16?
Say something like ... autosave.zip equals loadsave.zip

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Autosave to primary file

Post by BenSeidel »

In your config.ini (under the config folder in your Factorio install), change "autosave_slots=3" to "autosave_slots=1". Load up the map, allow an autosave to occur, then change your autoboot procedure to load the autosave map.

Be warned, you will lose your map if Factorio is forcibly shut down during a save. I would suggest setting the autosave to two instead, that way one will always be loadable.

quyxkh
Smart Inserter
Smart Inserter
Posts: 1028
Joined: Sun May 08, 2016 9:01 am
Contact:

Re: Autosave to primary file

Post by quyxkh »

Just start your server with `--start-server-load-latest`, that'll get the autosave if it's newer than the main save.

If I'm remembering it right you can also see this with the singleplayer mode, if you alt-F4'd out it starts up with the autosave preselected.

Caennanu
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Fri Mar 17, 2017 4:28 pm
Contact:

Re: Autosave to primary file

Post by Caennanu »

BenSeidel wrote:In your config.ini (under the config folder in your Factorio install), change "autosave_slots=3" to "autosave_slots=1". Load up the map, allow an autosave to occur, then change your autoboot procedure to load the autosave map.

Be warned, you will lose your map if Factorio is forcibly shut down during a save. I would suggest setting the autosave to two instead, that way one will always be loadable.
Aye, thats what i suggested in the main topic.
quyxkh wrote:Just start your server with `--start-server-load-latest`, that'll get the autosave if it's newer than the main save.

If I'm remembering it right you can also see this with the singleplayer mode, if you alt-F4'd out it starts up with the autosave preselected.
That's a good one i will test!

Caennanu
Long Handed Inserter
Long Handed Inserter
Posts: 52
Joined: Fri Mar 17, 2017 4:28 pm
Contact:

Re: Autosave to primary file

Post by Caennanu »

hola,

Command --start-server-load-latest works like a charm!

Post Reply

Return to “Technical Help”