Project Cars 2 | Server Configuration Print

  • Project Cars 2 Server Configuration, project cars 2 server configuration, Project Cars 2, project cars 2, Server Configuration, server configuration
  • 2

It's easy to configure your Pingperfect Project Cars 2 Server. Just follow the steps below.

  1. Open the 'Configuration Files' section from your control panel.
  2. Select the 'Text Editor' option next to 'server.cfg'
  3. Refer to the Example Configuration below and change the respective settings where you need to do so in order to configure your server to your desires.

"//" : "You can use dummy entries like this to write comments into the config. 'rem' and '#' are also supported as comment entries."

// But in recent version of the server, standard C++ like one-liner comments are supported as well.

//////////////////////////

// Basic server options //

//////////////////////////

// Logging level of the server. Messages of this severity and more important will be logged. Can be any of debug/info/warning/error.

logLevel : "debug"

// Number of gameplay events stored on the server. Oldest ones will be discarded once the game logs more.

eventsLogSize : 10000

// The server's name, this will appear in server browser (when implemented) and will be also the default name of sessions hosted on the server.

name : "projectcars2 Server"

// Authenticate users with Steam to check VAC ban when set to true.

secure : true

// Password required to create sessions on the server as well as to join the sessions, password set in Create options is ignored on DS.

password : ""

// Maximum size of sessions that can be created on this server.

// Note that setting this above 16 will allow sessions unjoinable by 32-bit clients to be created on the server.

// The game also currently does not support sessions larger than 32, even if the server can be configured for up to 64 players.

maxPlayerCount : 1

// IP address where the server's sockets should be bound. Leave empty for 'all interfaces'.

bindIP : "185.145.201.61"

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.

steamPort : 40503

hostPort : 40501

queryPort : 40502

// Delay between server ticks in milliseconds, when not hosting and when hosting a game, respectively.

// Lower values will make the server more responsible and decrease latency by a bit at the expense of higher CPU usage.

sleepWaiting : 50

sleepActive : 10

// Sports Play will use system sockets instead of Steam networking API. Recommended for offline LAN-only events.

// Use cmdline switch -sportsplay serverIp:hostPort on client to host and join games on sportsPlay server.

sportsPlay: false

///////////////////////////

// Server access control //

///////////////////////////

// Black list

// Anyone in this list will not be allowed into the server.

// You can use array or map/object. If the value is an object, the keys are ignored, but you can used the strings as comments with name or reason for being in the list.

// If the value is an integer, it's interpreted as a Steam ID of the blacklisted user.

// If it's a string, it's file from which the black list is loaded. The file can contain either an array or an object just like this one, and can reference more files.

// Here we just load the list from file "blacklist.cfg"

// To disable the blacklist just add // infront of the line below

blackList : [ "blacklist.cfg" ]

// White list

// If this is not empty only whitelisted members will be allowed into the server. In that case the black list is ignored.

// Usually you don't want to have this set at all and use passwords instead, but if you prefer to control server access by whitelisting instead, keep this in and enter the right IDs.

// You can use array or map/object. If the value is an object, the keys are ignored, but you can used the strings as comments with name or reason for being in the list.

// If the value is an integer, it's interpreted as a Steam ID of the whitelisted user.

// If it's a string, it's file from which the white list is loaded. The file can contain either an array or an object just like this one, and can reference more files.

// Here we load the list from file "whitelist.cfg", and also allow user with Steam ID 76561197994111033.

// To enable the whitelist just remove the // from the line below

//whiteList : { "whitelist" : "whitelist.cfg", "Stouie" : 76561197994111033 }

///////////////////////////

// HttpApi configuration //

///////////////////////////

// This provides http-based API and basic web-based controls using a built-in http server.

// HttpApi is disabled by default, and if you enable it with everything else left to default it will listen only locally on 127.0.0.1:9000

// Master enable/disable toggle.

enableHttpApi : false

// Similar to logLevel above but used only for libwebsockets output.

// Note that all logging still goes through the main filter, so you won't be able to use more verbose logging here than the main level.

httpApiLogLevel : "warning"

// Interface name or IP where to bind the local http server providing the API and web-based controls.

// This is the textual name of the interface as assigned by your OS, or IP address of the interface.

// The default value is "127.0.0.1", change it to an empty string to bind the listen socket to all available interfaces.

httpApiInterface : "185.145.201.61"

// Port where the local http server listens.

httpApiPort : 40505

// Map with extra HTTP headers to add to HTTP API responses.

// The keys are the conditions for adding the headers, the values are the headers to add.

// There are no conditions supported yet, so just use "*" for a generic wildard for now, that will match everything in the future too.

httpApiExtraHeaders : {

    "*" : "Access-Control-Allow-Origin: *"

}

// Http API access level overrides.

// Each HTTP API endpoint defines its default access level, usually one of "public", "private" or "admin".

// This map can override these levels to anything else. The keys are wildcard endpoint paths, and the values are the

// access levels to use. The first path that matches will be used, processing them in the order as written here.

// The wildcard patterns are case-sensitive and can contain:

// - '*': matches 0 or more characters

// - '%': matches 0 or more characters except for forward slash

// - '?': matches 1 character

httpApiAccessLevels : {

    // The default is empty, using defaults as defined by the endpoints themselves.

    // But you could for example use this to change all access levels to public (not recommended!)

    // "*" : "public"

    // Or this to hide the status from public

    // "" : "private"

    // "status" : "private"


Was this answer helpful?

« Back