MP Dedicated Server - Autosave when no players are connected

Post your ideas and suggestions how to improve the game.

Moderator: ickputzdirwech

orbitarm
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Apr 28, 2016 3:18 pm
Contact:

MP Dedicated Server - Autosave when no players are connected

Post by orbitarm »

The autosave system works wonderfully for dedicated servers, but it can affect the flow of the game if the interval is set too low. By default, when all players leave, the game is paused until a player connects to the server once again.

I keep my dedicated server up and running 24/7. If the autosave interval is set too high, and the server crashes at an inopportune time, it's possible that a lot of work could be lost. An option for the server to automatically save the main save file when no players are connected would be a big help. Obviously this wouldn't help if the servers crash while players are connected, but in my case (and presumably the case of people playing with friends) where the server is paused for a good chunk of time, this option would save a lot of headaches.

Zaflis
Filter Inserter
Filter Inserter
Posts: 491
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by Zaflis »

The server supports all sorts of arguments, what i'm using is
Factorio.exe --start-server Modded1.zip -c D:\pelit\Factorio\config-server.ini --no-auto-pause --latency-ms 110 --autosave-interval 10 --autosave-slots 5

So if you add the --no-auto-pause, it will keep autosaving when no players are on. Without that there isn't even need to save, because time is stopped.

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by SyncViews »

Thats not the same thing.

Some people want the game to not run when there is no one connected, depleting resources, maybe getting overrun by biters. So you want auto pause.

Now if the auto save time is 10 minutes, and every one leaves at 9 minutes, my understanding is that Factorio will not autosave. Then maybe in the next 15 hours it crashes, server resets, etc, then you loose those 9 minutes.

Zaflis
Filter Inserter
Filter Inserter
Posts: 491
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by Zaflis »

Not exactly sure when it autosaves, but when another player joins it propably notices that it's been more than the 10 minutes since last save. And it can't crash when paused when it's not doing anything. Also the scenario that there would be multiple visits on server shorter than the autosave frequency is a bit far fetched? ;)

orbitarm
Manual Inserter
Manual Inserter
Posts: 3
Joined: Thu Apr 28, 2016 3:18 pm
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by orbitarm »

Zaflis wrote:Not exactly sure when it autosaves, but when another player joins it propably notices that it's been more than the 10 minutes since last save. And it can't crash when paused when it's not doing anything. Also the scenario that there would be multiple visits on server shorter than the autosave frequency is a bit far fetched? ;)
Here's the scenario I was envisioning:
  • I set my server's autosave interval to 30 minutes to keep the flow of the game.
    My friends and I are playing at night
    The game autosaves at 9:30, and we play until 9:50 or so, when we all log off at the same time
    In the middle of the night, my computer restarts, force closing the server without saving the game
    We lost 20 minutes of work because the last autosave was from 9:30
Not too far fetched in my opinion. If the game was just set to autosave when everyone left the server, there would be no issue. It seems easy enough to implement since they already have autosave features.

Hope this helped clear it up.

SyncViews
Filter Inserter
Filter Inserter
Posts: 295
Joined: Thu Apr 21, 2016 3:17 pm
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by SyncViews »

Zaflis wrote:And it can't crash when paused when it's not doing anything.
That is not really true, even if the game is not doing anything, the rest of the system is, and it is still sat in volatile memory. Power outage, system crash, user initiated system restart, low system memory, low disk space (done this before, left more logging enabled in a separate program than I intended and it ate all the free disk space over night), or any other of many things that could cause Factorio to unexpected terminated or to fail to save when a user does join.

Zaflis
Filter Inserter
Filter Inserter
Posts: 491
Joined: Sun Apr 24, 2016 12:51 am
Contact:

Re: MP Dedicated Server - Autosave when no players are connected

Post by Zaflis »

But yes i agree with you that it should be saving at least once after players leave.

Ok after tested the saving myself on 0.12.31 server i can confirm it doesn't work how we would like it to. It's not autosaving at all after players leave, even if quick visit is done after long time of not saving.

Post Reply

Return to “Ideas and Suggestions”