Dedi Mutliplayer not saving map locally
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Dedi Mutliplayer not saving map locally
I am hosting a multiplayer headless server on a dedicated server host, and for some odd reason it is not saving the game on that box. Instead it is saving the game on my local machine. In order to keep the map updated I am having to upload the file to the dedicated server every time I finish playing. Is there something I am missing here?
Re: Dedi Mutliplayer not saving map locally
Can you post the log from the server? Also, can you check that the saves directory is actually writeable by the server?
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Re: Dedi Mutliplayer not saving map locally
When you say log are you talking about a text log made by the game server or a screenshot of the command prompt? It looks like the save directory is definitely writable. I attempted to login, make an alteration, then click save. When the game came back up the changes were there. It looks like I could be exiting the game without clicking save on my end? So does that mean the game server will not actually save progress without the players physically clicking save? Does the headless server work with save interval commands and things of that nature?Oxyd wrote:Can you post the log from the server? Also, can you check that the saves directory is actually writeable by the server?
Re: Dedi Mutliplayer not saving map locally
I mean the text file.MindlessMe wrote:When you say log are you talking about a text log made by the game server or a screenshot of the command prompt? It looks like the save directory is definitely writable. I attempted to login, make an alteration, then click save. When the game came back up the changes were there. It looks like I could be exiting the game without clicking save on my end? So does that mean the game server will not actually save progress without the players physically clicking save? Does the headless server work with save interval commands and things of that nature?Oxyd wrote:Can you post the log from the server? Also, can you check that the saves directory is actually writeable by the server?
Clicking save in the GUI should only save it for you and no one else, not even for the server. However, the server should be making autosaves just like anyone else. Also, there is a Factorio console command – /c game.server_save() – that will make the server save the game.
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Re: Dedi Mutliplayer not saving map locally
That is interesting, and odd considering it is saving the changes when I connect to the server again. Would that command have to be entered every time I want it to save or can it be set to save with an interval? Also, is there a variable I can add to the server startup that will make it save periodically?Oxyd wrote:I mean the text file.MindlessMe wrote:When you say log are you talking about a text log made by the game server or a screenshot of the command prompt? It looks like the save directory is definitely writable. I attempted to login, make an alteration, then click save. When the game came back up the changes were there. It looks like I could be exiting the game without clicking save on my end? So does that mean the game server will not actually save progress without the players physically clicking save? Does the headless server work with save interval commands and things of that nature?Oxyd wrote:Can you post the log from the server? Also, can you check that the saves directory is actually writeable by the server?
Clicking save in the GUI should only save it for you and no one else, not even for the server. However, the server should be making autosaves just like anyone else. Also, there is a Factorio console command – /c game.server_save() – that will make the server save the game.
(e.g.
Code: Select all
+server.saveinterval "90"
Thanks for getting back with me on this so quickly. We have been enjoying the game and really just looking for the best way to make multiplayer an even more awesome experience.
Re: Dedi Mutliplayer not saving map locally
You have to run server_save manually each time you want it.
But like I said, the server should have autosaves just like everyone else. You can set the autosave interval by passing the --autosave-interval parameter, e.g.to autosave every five minutes. If you don't use --autosave-interval, it will default to an autosave every 2 minutes. In other words, it should be saving automatically already.
But like I said, the server should have autosaves just like everyone else. You can set the autosave interval by passing the --autosave-interval parameter, e.g.
Code: Select all
./factorio --start-server map --autosave-interval 5
Do you mean you connect to the server and then it saves?MindlessMe wrote:it is saving the changes when I connect to the server again.
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Re: Dedi Mutliplayer not saving map locally
Sorry for the confusion. If I login to the server, make a change, then click save via the menu it actually saves to the server. I can save it, exit, reload, and the changes I just made show up. My friend notices that the game is saving to his local machine as well, and is labeled as an autosave. We are in the middle of Diablo 3 Season 4 so I will look into altering some things in a few and report back. I am going to attempt changing the save file info and a few other small things before I declare anything major. Thanks again.Oxyd wrote:You have to run server_save manually each time you want it.
But like I said, the server should have autosaves just like everyone else. You can set the autosave interval by passing the --autosave-interval parameter, e.g.to autosave every five minutes. If you don't use --autosave-interval, it will default to an autosave every 2 minutes. In other words, it should be saving automatically already.Code: Select all
./factorio --start-server map --autosave-interval 5
Do you mean you connect to the server and then it saves?MindlessMe wrote:it is saving the changes when I connect to the server again.
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Re: Dedi Mutliplayer not saving map locally
Alright so here is what I have done:MindlessMe wrote:Sorry for the confusion. If I login to the server, make a change, then click save via the menu it actually saves to the server. I can save it, exit, reload, and the changes I just made show up. My friend notices that the game is saving to his local machine as well, and is labeled as an autosave. We are in the middle of Diablo 3 Season 4 so I will look into altering some things in a few and report back. I am going to attempt changing the save file info and a few other small things before I declare anything major. Thanks again.Oxyd wrote:You have to run server_save manually each time you want it.
But like I said, the server should have autosaves just like everyone else. You can set the autosave interval by passing the --autosave-interval parameter, e.g.to autosave every five minutes. If you don't use --autosave-interval, it will default to an autosave every 2 minutes. In other words, it should be saving automatically already.Code: Select all
./factorio --start-server map --autosave-interval 5
Do you mean you connect to the server and then it saves?MindlessMe wrote:it is saving the changes when I connect to the server again.
I deleted all save files from the dedicated server.
Deleted all save files from my computer.
Dropped the save file(SAVE1) onto the dedicated server.
Results:
After wiping and starting with the latest save(SAVE1) the game is saving at regular intervals, but is saving to autosave files and not the original save file(SAVE1). It is also saving the autosave files to my local machine(Server is running on a dedi), which is not an issue since it allows me a backup. Even though the client is not using the original save file(SAVE1) it seems to be loading up the latest autosave when I exit and log back in. All in all it works out as long as the server doesn't decide to use the original save file like it did before.
Before cleaning up the saves it would always revert back to SAVE1 and not load the latest autosave file. There was a possible conflict with the save files on the dedicated computer running the headless server and my local machine? I tried saving the game manually through the menu and it still seems to be fine. Saved the game using a random name and as SAVE1 and so far no issues. Not entirely sure what caused the conflict earlier, but it seems to be fixed.
Re: Dedi Mutliplayer not saving map locally
That is correct. Autosaving doesn't – and never did – overwrite the original save.MindlessMe wrote:the game is saving at regular intervals, but is saving to autosave files and not the original save file(SAVE1).
Also correct behaviour.MindlessMe wrote:It is also saving the autosave files to my local machine(Server is running on a dedi)
I don't understand this. When you log into a server, it will send you the current map and your client will load it. You do not load any of the saves in your saves folder in this case.MindlessMe wrote:Even though the client is not using the original save file(SAVE1) it seems to be loading up the latest autosave when I exit and log back in.
The server uses whatever save you tell it to use when you start it.MindlessMe wrote:All in all it works out as long as the server doesn't decide to use the original save file like it did before.
So you would log out of the server, log back in and your changes were gone? That sounds horribly wrong. Or did you restart the server in between? If so, how exactly did you stop it and how exactly did you start it?MindlessMe wrote:Before cleaning up the saves it would always revert back to SAVE1 and not load the latest autosave file.
- MindlessMe
- Burner Inserter
- Posts: 6
- Joined: Sat Aug 29, 2015 11:55 pm
- Contact:
Re: Dedi Mutliplayer not saving map locally
Okay, thanks for the clarification on this. I am used to server clients that save directly to the original save file when they save periodically. Since the server doesn't save to the original save file during the interval save it threw me off.Oxyd wrote:I don't understand this. When you log into a server, it will send you the current map and your client will load it. You do not load any of the saves in your saves folder in this case.MindlessMe wrote:Even though the client is not using the original save file(SAVE1) it seems to be loading up the latest autosave when I exit and log back in.
Knowing the server only pulls data on startup only helps, thanks!Oxyd wrote:The server uses whatever save you tell it to use when you start it.MindlessMe wrote:All in all it works out as long as the server doesn't decide to use the original save file like it did before.
Considering what you have told me regarding the save file and how/when it is accessed I am 100% sure it was my fault. I am pretty sure it was after the newest update and I took the server down without saving it properly. Since I didn't save it using the command line it was loading the save file we used to start the server before(roughly 4 hours earlier). Of course the game was actually saving with autosaves so I just loaded one of those on the dedi and no harm done. Since I know how the game handles save files I shouldn't have anymore issues with this.Oxyd wrote:So you would log out of the server, log back in and your changes were gone? That sounds horribly wrong. Or did you restart the server in between? If so, how exactly did you stop it and how exactly did you start it?MindlessMe wrote:Before cleaning up the saves it would always revert back to SAVE1 and not load the latest autosave file.
Thanks a ton for explaining this. It goes a long way to ensure we keep playing. Keep up the great work!