Problem with server-settings.json

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.
xxh9
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 26, 2016 7:33 pm
Contact:

Problem with server-settings.json

Post by xxh9 »

I don't have a problem when not specifying a server-settings.json file.

Code: Select all

factorio@localhost:/opt/factorio/bin/x64$ ./factorio --start-server my-save.zip
Runs and starts up no problem.

But when I specify a server-settings.json file, I get an issue with formatting. And yes I realize i put the server password in the plaintext here.

Code: Select all

factorio@localhost:/opt/factorio/bin/x64$ ./factorio --start-server my-save.zip --config /opt/factorio/data/server-settings.json
   0.000  Error GlobalContext.cpp:639: /opt/factorio/data/server-settings.json: Bad file format; ignoring
   0.000  Error Util.cpp:58: There is no package core in /usr/share/factorio
factorio@localhost:/opt/factorio/bin/x64$ cat /opt/factorio/data/server-settings.json
{
  "name": "supercool game",
  "description": "for coolkids",
  "max_players": "4",
  "visibility": "hidden",
  "username": "",
  "password": "",
  "token": "",
  "game_password": "cracktorio123",
  "verify_user_identity": false
}
factorio@localhost:/opt/factorio/bin/x64$
Anyone have any idea?
kinnom
Filter Inserter
Filter Inserter
Posts: 706
Joined: Fri Dec 26, 2014 4:20 pm
Contact:

Re: Problem with server-settings.json

Post by kinnom »

I'm no expert at all, but have you tried replacing : with =
no yes yes no yes no yes yes
xxh9
Manual Inserter
Manual Inserter
Posts: 2
Joined: Tue Jul 26, 2016 7:33 pm
Contact:

Re: Problem with server-settings.json

Post by xxh9 »

Changing the : to = didn't seem to help. Thanks for the suggestion though!
Megapants
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Jul 23, 2016 2:04 am
Contact:

Re: Problem with server-settings.json

Post by Megapants »

The JSON format appears to be correct, but you're missing a few definitions.

Here's the default file:

Code: Select all

  "name": "Name of the game as it will appear in the game listing",
  "description": "Description of the game that will appear in the listing",
  "tags": ["game", "tags"],
  "max_players": "0",

  "_comment_visibility": ["public: Game will be published on the official Factorio matching server",
                          "lan: Game will be broadcast on LAN",
                          "hidden: Game will not be published anywhere"],
  "visibility": "public",

  "_comment_credentials": "Your factorio.com login credentials. Required for games with visibility public",
  "username": "",
  "password": "",

  "_comment_token": "Authentication token. May be used instead of 'password' above.",
  "token": "",

  "game_password": "",

  "_comment_verify_user_identity": "When set to true, the server will only allow clients that have a valid Factorio.com account",
  "verify_user_identity": true
}
Keep the same format and don't remove anything. Just fill in or change the values that you need to.
Post Reply

Return to “Technical Help”