Auto save help for headless please!

Arrange meetings with other people to play MP, announce your servers.
Nahz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 14, 2016 5:18 am
Contact:

Auto save help for headless please!

Post by Nahz »

Hey everyone!

I just made a big mistake and saved over a huge game a had with a few friends. The game seemed to be auto saving but when I went back to check the autosaves they were from a solo game I had ages ago from an old version of the game.

I read that if I launch my server with "--help" i can see a list of current commands for the version im on where I will find autosave options so this never happens again but I don't know what that means. Do I put --help at the start of my .bat file? Do I type it in chat in game? I tried a few things and I didnt get an extensive list of all the commands for the current version I am hosting. My .bat is super simple and looks like this:

factorio.exe --start-server C:\Users\Justin\AppData\Roaming\Factorio\saves\SERVERSAVE.zip
pause

I mean it works, I just manually save it every now and then and there is no lag and it's wonderful. Like I said it seems to be autosaving but it's really not. Any tips?

thanks guys, you rock! Amazing game!
Nahz
Burner Inserter
Burner Inserter
Posts: 7
Joined: Fri Oct 14, 2016 5:18 am
Contact:

Re: Auto save help for headless please!

Post by Nahz »

Is this too newb of a post? :lol:

Sorry guys, I checked the wiki and other obvious sources but I just can't seem to get a direct answer on how to set this fundamental function up.
daniel34
Global Moderator
Global Moderator
Posts: 2761
Joined: Thu Dec 25, 2014 7:30 am
Contact:

Re: Auto save help for headless please!

Post by daniel34 »

In previous versions autosave settings were part of the .bat file, but they have been moved to a server-settings.json file.

You set one up by going into the data directory of your Factorio installation, then make a copy of the server-settings.example.json and rename that copy server-settings.json. Open that file in a text editor (don't use the windows notepad as it will mess up the line endings, use e.g. Notepad++) and change the parameters you want.

At the very least set a name and description, and if you set the visibility to public (so that it appears in the server browser) you'll also need to set a username, and a password or token (how to find that token).
You can set an autosave_interval and the autosave_slots, and you can choose that autosaves are only saved on the server with autosave_only_on_server (which is true by default).

To use that server-settings,json file you add the following parameter to your .bat file directly after the savegame name (change the path if it's different):

Code: Select all

--server-settings "C:\Program Files\Factorio\data\server-settings.json"
quick links: log file | graphical issues | wiki
Post Reply

Return to “Multiplayer”