PDA

View Full Version : Dedicated Server configuration



Pages : [1] 2

Visceral_Syn
23-09-2017, 13:25
What is the correct syntax, some lines end with a comma at the end, but not all. Also have a buncha AI in the server, when I have not specified in the flags to fill session with AI, gridsize and maxplayers is set to the same value. Have even attempted to use the sms_rotate script, and again not added FILL_SESSION_WITH_AI, flag, have used text and the value, still has AI in the session.

Visceral_Syn
23-09-2017, 13:46
Ok, I see multiple options are all separated by comma's. But this still does not explain the AI in session, when AI should not be in session...

patycy
23-09-2017, 14:09
Ok, I see multiple options are all separated by comma's. But this still does not explain the AI in session, when AI should not be in session...

Most likely it is due to this configuration in server.cfg

// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : 656106,

Marc Wieneke
23-09-2017, 14:12
Try to use 524520 instead.

Shooter80
23-09-2017, 14:51
What is the correct syntax, some lines end with a comma at the end, but not all. Also have a buncha AI in the server, when I have not specified in the flags to fill session with AI, gridsize and maxplayers is set to the same value. Have even attempted to use the sms_rotate script, and again not added FILL_SESSION_WITH_AI, flag, have used text and the value, still has AI in the session.

I have the same problem, tried every combination of settings there is (even just using Flags : 24 and not using the sms_rotate at all). The strange thing is, that it adds 14 AI, in a 24 slot server, on a 32 slot track (Spa) so the numbers dont add up, and it doesnt always do it. If I enter the lobby and 'Vote To Start' with just me in it, I'm pretty much guaranteed 14 AI, but most (all) of the time that there are others in the lobby and we 'Vote To Start' then it doesn't add any.

It also maybe only does it the first session after the server has been started, not sure about that, will post back if I spot a pattern.

Minolin
23-09-2017, 15:15
Have the same problem with this (and many other combinations) flag sequence:



// FORCE_REALISTIC_DRIVING_AIDS = 16
// FORCE_SAME_VEHICLE_CLASS = 512
// MECHANICAL_FAILURES = 262144
// AUTO_START_ENGINE = 524288
// TIMED_RACE = 1048576
// ONLINE_REPUTATION_ENABLED = 8388608
"Flags" : 10224144,

Also GridSize=MaxPlayers, according to the comments I read that the server wouldn't add AIs even if configured.


"GridSize" : 16,
"MaxPlayers" : 16,


Not using sms_rotate in this scenario.

Visceral_Syn
23-09-2017, 15:46
Testing with a configured sms_rotate...

Visceral_Syn
23-09-2017, 15:53
So, added all lines for all 3 sessions, Practice, Qualify, Race, with weather for each. Lobby shows some other date I did not specify, and the weather I specify. Not only is there STILL AI in the session its using weather from god only knows. Man, documentation goes a loooong way...

Visceral_Syn
23-09-2017, 15:56
Unless I'm mistaken, if sms_rotate is configured, it also overrides the server.cfg session attributes section ?

Shooter80
23-09-2017, 16:05
I'm pretty convinced its not a configuration problem. I've even tried with Flags : 24 and enableLuaApi : false and it still usually (but not always) adds 14 AI.

Seems its broken, and needs patched.


EDIT: Yes, as I understand it the contents of sms_rotate_config.json override the sessionAttributes settings in server.cfg, with the (supposedly) added bonus of allowing you to use strings instead of enums or bitfield flags and being able to auto-rotate settings.

Visceral_Syn
23-09-2017, 16:28
The web admin behaves like its making changes... but I'm not sure how to get more than 2 tracks configured in a rotation with it. And it also kept defaulting things, like the server is reading a config file from somewhere else and ignoring sms_rotate and even the server configuration file.

Visceral_Syn
23-09-2017, 17:20
Ok, and disabled sms_rotate, and configured the server configuration file in detail: for practice, qualify, and race sessions, again no AI is selected. Added -c server.cfg to the commandline. Server is not reading my configured server.cfg, its using whatever values from lord only knows where.

Siberian Tiger
23-09-2017, 17:48
Regarding GridSize and Max Players...

I bi no mean an Expert when it Comes to DS but:

There can't be any AI if those Numbers are Equal.

Make Gridsize 16 and Max Players 10, then there should be 6 AI Drivers.

Visceral_Syn
23-09-2017, 17:50
i agree with that math too, but the Linux pCars˛ dedicated server... does not...

Minolin
23-09-2017, 18:10
The windows one has a different opinion as well ;)

Edit: My server had a strange appearance in the server list since it has the AI issue. Now I see several dedicated servers looking the same, maybe this is related and shows a broken state?
Unfortunately I can't post images, so have a code tag:



http://www.minorating.com/images/pc2servers.png

Radar
24-09-2017, 08:55
I can confirm that I also have this issue (calling it a bug I am). It sometimes works without AI, but most of the time the server is filled with 14 AI on a 32 player host. It seems some of the other flags are also broken, for instance I added Race Director and the server had the option, I removed the flag but Director still remained even after multiple shut downs and restarts.

Asturbo
24-09-2017, 09:20
An easy spreadsheet to calc the flags value in the server.cfg file for the Dedicated Server:

https://docs.google.com/spreadsheets/d/1dSst7oaWrwbzhZCRZnfBlfdM-ob2htHyvS4i0g3M-Qw/edit?usp=sharing

Visceral_Syn
24-09-2017, 12:29
Asturbo, that rocks! thanks!

Minolin
25-09-2017, 11:50
Yesterday I also noticed the AI will spawn only in the first session (after a server.exe start). Other settings are still going mad, including weather. Applies to both server.cfg standalone and sms_rotate.
In the client's server list my server then is still looking strange/broken like in the screenshot (post #15).

Can we have a confirmation that there is an issue? Currently I don't know if I need to invest more time here, or just wait for an update.

Shooter80
25-09-2017, 12:17
I've tried everything too, and I get the exact same results as you. I've worked in IT for 20 years, and software development for 15 (so none of the configuration was confusing or foreign to me). I'm convinced I'm not doing something wrong. And since you (for all your doubtless knowledge and experience) can't get it working properly either, then I'm pretty sure its broken.

I fear they don't care though. It should be an easy thing to fix, the server is standalone so they could update it separately from the game, so no concerns over needing too much testing. Its utterly broken at the moment, so they would have nothing to lose to try, yet they still won't confirm its an issue.

To me, the fact that they didn't set up a bunch of controlGameSetup : false dedicated servers at launch, for people to use/meet in, seems to me that they either knew it was broken, forgot it existed, or don't care if it works enough to even test it themselves.

Another curious thing is there appears to be no way to specify multiple classes, and no indication in the sample config files to limit which grade of player can join ("MinimumOnlineRank","MinimumOnlineStrength" though I assume). Even the maths in the default server.cfg is wrong (8+32+64+128+512+131072+524288 <> 656106).

Even if they were running properly though, the chances of filling one is almost zero anyway, since nobody sees dedicated servers without specifically filtering for them (now that ALL excludes them).

I've pretty much decided its not worth the effort, unless they completely redesign the server browser anyway, it'll never work the way I'd like it to. With no way to search by name, save favourites, or filter well then traffic will be all too random to be worth trying to make it somewhere to race familiar faces/names.

Some wasted potential for sure.

toold
25-09-2017, 13:11
I'm not sure this dedicated server is really standalone.
why:
You can't change the the default values of a session via the API. Only you can change settings, if somebody is in the lobby or for the next session.
These changes are transmitted directly to the multiplayer game and do not change local settings.
So any freak configs have to come from the PC2 central servers. It seems, that the API has no direct effect to our local config files

Minolin
25-09-2017, 13:32
I've tried everything too, and I get the exact same results as you. I've worked in IT for 20 years, and software development for 15 (so none of the configuration was confusing or foreign to me). I'm convinced I'm not doing something wrong. And since you (for all your doubtless knowledge and experience) can't get it working properly either, then I'm pretty sure its broken.

I fear they don't care though. It should be an easy thing to fix, the server is standalone so they could update it separately from the game, so no concerns over needing too much testing. Its utterly broken at the moment, so they would have nothing to lose to try, yet they still won't confirm its an issue.

To me, the fact that they didn't set up a bunch of controlGameSetup : false dedicated servers at launch, for people to use/meet in, seems to me that they either knew it was broken, forgot it existed, or don't care if it works enough to even test it themselves.

Another curious thing is there appears to be no way to specify multiple classes, and no indication in the sample config files to limit which grade of player can join ("MinimumOnlineRank","MinimumOnlineStrength" though I assume). Even the maths in the default server.cfg is wrong (8+32+64+128+512+131072+524288 <> 656106).

Even if they were running properly though, the chances of filling one is almost zero anyway, since nobody sees dedicated servers without specifically filtering for them (now that ALL excludes them).

I've pretty much decided its not worth the effort, unless they completely redesign the server browser anyway, it'll never work the way I'd like it to. With no way to search by name, save favourites, or filter well then traffic will be all too random to be worth trying to make it somewhere to race familiar faces/names.

Some wasted potential for sure.

I wouldn't be that pessimistic. Pretty sure we both shipped software in the past that didn't work out from day zero ;) I'm also convinced that there is something wrong, but I can't tell for sure we didn't make a mistake (that should have better error handling for sure). There are some working dedicated servers out there. Give them some time to react and eventually fix the issue, before giving up hope.

Shooter80
25-09-2017, 13:52
I wouldn't be that pessimistic. Pretty sure we both shipped software in the past that didn't work out from day zero ;) I'm also convinced that there is something wrong, but I can't tell for sure we didn't make a mistake (that should have better error handling for sure). There are some working dedicated servers out there. Give them some time to react and eventually fix the issue, before giving up hope.

Yea, indeed I have. I suppose the difference is that I test things at launch myself, and I acknowledge if something is broken, and I give a timescale for when I think it can (or can't) be fixed for. To not even respond at all is to disregard the time people are spending/wasting trying to figure out if the problem is at their end, or mine.

I don't doubt they could fix it, I just find it hard to believe they really care enough to do it quickly.

wopr
25-09-2017, 15:03
An official youtube video explaining dedicated server setup with a demonstration would be nice!

IlIlSHADOWlIlI
25-09-2017, 15:59
what would be nice is if someone uploaded the optimal config file that we can then tweak to our liking.

wopr
25-09-2017, 16:58
what would be nice is if someone uploaded the optimal config file that we can then tweak to our liking.

Hmm that would be nice also but would like to have somebody explain it so can get an understanding!

toold
25-09-2017, 17:40
Yea, indeed I have. I suppose the difference is that I test things at launch myself, and I acknowledge if something is broken, and I give a timescale for when I think it can (or can't) be fixed for. To not even respond at all is to disregard the time people are spending/wasting trying to figure out if the problem is at their end, or mine.

I don't doubt they could fix it, I just find it hard to believe they really care enough to do it quickly.

I think they will get it sorted fast. If you set up a temporary race lobby, the welcome message is elitegameservers.
So I suppose they have some connection with them.
And as a game hosting company, they are the first interested their servers are working.

F1_Racer68
25-09-2017, 18:56
MAin issue I am finding is that some FLAG values are still missing. For Example:

- No FLAG values to force formation lap
- No FLAG to set allowable Time Penalties
- No FLAG to enable Track Cut Penalties
- No way to set separete times for Practice and Qualifying sessions
- No way to set Time Progression for Pracitce and Qualifying sessions to match race session

The 2 attached images are my configuration currently. The first is the server just started from the config file. The second is with manual changes made from within the lobby.

240548240549

Also, not sure how the Car Classes got populated, but it looks like they got picked up from the last P2P room I hosted. And the Race Date is still not showing correctly. Somehow while making my manual changes, it reverted back to default date rather than my custom one.

In all fairness, so far this is all being attempted via the SERVER.CFG file. I have yet to really dig into the SMS_ROTATE LUA config. That may or may not address some of my issues.

philmcphil
25-09-2017, 20:36
@F1 RACER68,

could you , please put your server.cfg to see which line in it need to be change ( put a XXX on your port and IP ;)

Thanks.

F1_Racer68
25-09-2017, 21:04
@F1 RACER68,

could you , please put your server.cfg to see which line in it need to be change ( put a XXX on your port and IP ;)

Thanks.

Sorry, I can't do that. There are MANY lines and many of them also contain userIDs. I would be worried to miss something. I will however gladly try to answer any specific questions you might have. I am by no means an expert.........

The Sample config file in the sample_config folder is a good starting point. There are a lot of good explanaitons in there. It's still the same file as was used for pCARS1, with just a few minor changes.

Brado23
25-09-2017, 21:54
I too am experiencing problems with AI filling sessions even although I have turned it off, but I think I have almost everything else working using rotate_lua. I haven't tried doing anything with multi class though, so maybe that is broken too if other people are having problems?

Some of the settings I had to work out the attribute names myself (from the httpapi web page) and manually enter them in the rotate files. I have things like the safety rating, rank and a few other things working correctly now by adding the attributes to the rotate lua config file myself.

I'll clean usernames and passwords out of my config files and I will post them here to help out anyone interested. Give me 20-30 mins and I'll make another post with them.

Brado23
25-09-2017, 22:18
Ok, so here are my config files.

server.cfg


"//" : "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 : "info"

// 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 : "My Server Name"

// 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 : "myjoinpwd"

// 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 : 32

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : ""

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
"myadmin" : "myadminpwd",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
"private" : [ "myadmin" ],
"admin" : [ "myadmin" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
"sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",

// pinglimit
// "epinter_pinglimit",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,

// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 24,
"MaxPlayers" : 24,

// Just 3 race laps.
"PracticeLength" : 30,
"QualifyLength" : 15
"RaceLength" : 8,

// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : 1776812712,

// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,

// Visual only damage
"DamageType" : 1,

// No tire wear.
"TireWearType" : 6,

// Fuel usage off.
"FuelUsageType" : 0,

// Penalties on.
"PenaltiesType" : 1,

// Any camera view allowed.
"AllowedViews" : 0,

// Track Brands Hatch Indy. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 904625875,

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : -112887377,

// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1353949246,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 9,
"RaceDateDay" : 22,
"RaceDateHour" : 11,

// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}


sms_rotate_config.json


// Config version.
version : 7

// Default configuration.
config : {

// Is the current rotation index persistent? If true, the rotation will continue after server restart,
// If false, the rotation will always start from the first setup.
// You can always delete the sms_rotate_data.json file from lua_config to reset the persisted index.
"persist_index" : true,

// The default setup. This is a table with attributes and values. The following rules apply to the attributes:
// - If TrackId is specified: The track to enforce. Automatically sets 1 to ServerControlsTrack
// - If VehicleModelId is specified: The vehicle to enforce. Automatically sets 1 to ServerControlsVehicle, sets FORCE_IDENTICAL_VEHICLES to Flags
// - If VehicleClassId is specified: The class to enforce. Automatically sets 1 to ServerControlsVehicleClass, sets FORCE_SAME_VEHICLE_CLASS to Flags
// - Track, vehicle model, vehicle class and all enum/flags attributes can use values in string forms - so you can use either track id, or track name.
// - Flags in string form can contain multiple flags separated by comma, so for example "ABS_ALLOWED,SC_ALLOWED,TCS_ALLOWED"
// - The setup should never contain any of the "ServerControls" attributes, those are decided automatically.
// - The setup should never contain both VehicleModelId and VehicleClassId at the same time. Restrict either the class or specific vehicle.
// - The Flags attribute should never contain FORCE_IDENTICAL_VEHICLES or FORCE_SAME_VEHICLE_CLASS flags, those are decided automatically.
"default" : {
"GridSize" : 24,
"MaxPlayers" : 24,

"PracticeLength" : 0,
"QualifyLength" : 15,
"RaceLength" : 8,

"Flags" : 1776812712,
"DamageType" : "VISUAL_ONLY",
"TireWearType" : "OFF",
"FuelUsageType" : "OFF",
"PenaltiesType" : "FULL",
"AllowedViews" : "Any",

"AllowablePenaltyTime" : 5,
"ManualPitStops" : 1,
"MinimumOnlineRank" : "U",
"MinimumOnlineStrength" : 1200,

"QualifyDateYear" : 2017,
"QualifyDateMonth" : 9,
"QualifyDateDay" : 22,
"QualifyDateHour" : 11,
"RaceDateYear" : 2017,
"RaceDateMonth" : 9,
"RaceDateDay" : 22,
"RaceDateHour" : 14,

"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : "LightCloud",
"QualifyWeatherSlot2" : "Clear",
"QualifyWeatherSlot3" : "Clear",
"QualifyWeatherSlot4" : "Clear",
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Clear",
"RaceWeatherSlot3" : "Clear",
"RaceWeatherSlot4" : "Clear",
},

// The rotation. Array of setups to rotate. If empty, just the default setup will be used with no actual rotation happening.
//
// These setups are applied on top of the default setup, then applied to the game. Previous setup in the rotation is never used.
// So for example if you wanted to repeat the same track in multiple consecutive setups, different from the default track,
// each of those setups needs to explicitly include that track. Also remember that apart from the flags nothing can be "removed"
// from the default setup, so if the default setup contains a track, some track will always be enforced (either the default one,
// or the setup-specific one). And one last thing, these override setups can never include an attribute that's not specified in
// the default setup - it can just override some of the default attributes, not add new ones. The only exception are the
// track/vehicle/class attributes.
//
// Attributes in these setups can have a special attribute RemoveFlags set, which will remove the specified flags from the default
// setup instead of adding them to it (which is what the Flags attribute will do)

"rotation" : [
{
"TrackId" : "Bathurst Mount Panorama",
"VehicleClassId" : "V8 Supercars",
},
{
"TrackId" : -945967394,
"VehicleClassId" : "GT3",
},
{
"TrackId" : "Red Bull Ring GP",
"VehicleClassId" : "Formula Renault",
},
{
"TrackId" : "Brands Hatch GP",
"VehicleClassId" : "Megane Trophy",
}
]
}


NOTE: Settings defined in the sms_rotate_config.json will overwrite those in the server.cfg.


I also find the following links useful when searching for attributes, etc on the dedicated server itself. I have set these up as bookmarks.

240559

Brado23
25-09-2017, 22:47
Actually two things someone might be able to help me with...

Does anyone know how to make the dedicated server sit in the Lobby for one of the tracks in your rotation while waiting for people to join, rather than just being empty and non-active. The pCars 2 server browser displays dedicated servers that are empty and non-active weird (has broadcaster and director icons displayed, rating as a white box, and jibberish for the Remaining column), or just completely wrong.

Secondly, every time I browse to one of the API web pages I showed above, I get the following message in the console window of the dedicated server itself...

INFO: Rejecting request with URI '/favicon.ico', path 'favicon.ico' does not match any registered HTTP query handler

favicon.ico is just the icon that is used for the web page to show with your bookmarks, etc. I created a favicon.ico file of my own and tried putting it in several directories on the dedicated server but no where seems to stop the message (or display the icon on the web page). Does anyone know where this file needs to be placed? I've tried a few places under the web_files directory with no luck.

Thanks.

Brado23
25-09-2017, 23:02
I just did a bit more testing with mine and it appears that the Manual Pit Control setting doesn't seem to work. There may be a bug with that too?

Meekychunky
26-09-2017, 09:25
Hi All! Just thought I'd share my experiences on this...

I'm experiencing the same issue with AI filling-up the session, but it seems to only be in the first session of the rotation. So for example if I set up 4 sessions using sms_rotate_config.json (e.g. imola, monza, brands, redbull) and start my server I get AI in imola but NOT in monza, brands and redbull. I haven't tested yet whether AI appears when it the rotation cycles back to imola again but it would be good to know whether it's just me or if those on this thread experience the same behaviour.

Also bearing in mind if AI appears in this pattern (or at random), it mightn't be such an issue if I can use the server's web UI to skip sessions manually, but that's broken for me too (this is the "Next Session" button in the deprecated "Status" menu item at the bottom-left). Is that broken for everyone else too?

Brado23
26-09-2017, 10:36
I haven't noticed what happens in the other rotations with AI. I'll check tonight.

And yes, the Next Session button or Advance Session or whatever it is in the depreciated status menu doesn't work for me either.

Meekychunky
26-09-2017, 10:59
Thank you Brado23 for confirming the "Next Session" functionality's broken. I've done some further testing and can confirm it's only the first session since starting the server that's populated with AI - subsequent sessions, even when cycling back through the configured rotation are NOT populated with AI. It's a pity it's not possible to have a running server re-read the config without a restart, but it doesn't seem so bad now :)

Also regarding your point about favicon.ico - I think your only option is to lower the logLevel (in server.cnf) from "info" to "warning" or "error" if you absolutely must get rid of those messages.

philmcphil
26-09-2017, 11:26
Thank you,

concretly, what need to be set in the server.cfg to have a server running with the basics?

i don't have a 100% understanding english lol .

In advance thanks for the support !! :)

Minolin
26-09-2017, 11:45
Thank you,

concretly, what need to be set in the server.cfg to have a server running with the basics?

i don't have a 100% understanding english lol .

In advance thanks for the support !! :)


There is a ready-to-go sample file in a subfolder, just copy it next to the server.exe and rename it to server.cfg. Many of the settings in the file are pretty straight forward, until you hit the flag stuff. Then you either need to read into the sms_rotate.lib (recommended) or read the PDF files (also recommended)

Brado23
26-09-2017, 13:15
For the flags use Asturbo's spreadsheet.....

https://docs.google.com/spreadsheets/d/1dSst7oaWrwbzhZCRZnfBlfdM-ob2htHyvS4i0g3M-Qw/edit?usp=sharing

philmcphil
26-09-2017, 14:45
Thank you very much for the support :)

Rantam
26-09-2017, 21:32
Hi there,

Well... I have been studying and testing the DS since the game was released and It's working good, with only a few things not working as expected:

- I don't have problems at all adding AI to the session, but they ALWAYS use the same car model I have chosen (I never set the car model in the server config/rotation, I always want to select it manually in the lobby. But I usually use the "VehicleClassId" to filter the available cars). Even if the session is a multiclass session.

- Despite the first session got AI cars, once it's finished and the second starts the AI is gone.

- Despite I set the server to have manual pitstops it doesn't work. No matter if I use "ManualPitStops" : 1, or "ManualPitStops" : "Manual". Weird thing is that when the session is up and I join I can see in the "realism" screen in the lobby that Manual pitstops = No, but on the httpAPI server status screen the SessionAttribute ManualPitStops = 1. Ideas?

240836

- "AllowablePenaltyTime" parameter doesn't seem to be working. No matter the value I set there (10, 15..) it always uses 5. But again, in the server httpApi status the value I set appears correctly.

- I can get a multiclass race to work properly. Meaning in the car selection screen all cars present in the classes I choose are there, but I can only select one car of these available within the class I set in the VehicleClassID of the session. I'd like to be able to select any car available in any of these classes. Is that possible?

- Also there's no way to set the AI agression and AI strength separately. Just something called AI difficulty, which goes from 1 to 100. What is that and how that is calculated?

These are my config files:

server.cfg


"//" : "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 : "info"

// 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 : "Server name"

// 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 : "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 : 64

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
"mixtel" : "j7idh4k2",
// "michal" : "bar",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
"admin" : [ "mixtel" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
"sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 0,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0
}

sms_rotate_config.json


// Config version.
version : 7

// Default configuration.
config : {

// Is the current rotation index persistent? If true, the rotation will continue after server restart,
// If false, the rotation will always start from the first setup.
// You can always delete the sms_rotate_data.json file from lua_config to reset the persisted index.
"persist_index" : true,

// The default setup. This is a table with attributes and values. The following rules apply to the attributes:
// - If TrackId is specified: The track to enforce. Automatically sets 1 to ServerControlsTrack
// - If VehicleModelId is specified: The vehicle to enforce. Automatically sets 1 to ServerControlsVehicle, sets FORCE_IDENTICAL_VEHICLES to Flags
// - If VehicleClassId is specified: The class to enforce. Automatically sets 1 to ServerControlsVehicleClass, sets FORCE_SAME_VEHICLE_CLASS to Flags
// - Track, vehicle model, vehicle class and all enum/flags attributes can use values in string forms - so you can use either track id, or track name.
// - Flags in string form can contain multiple flags separated by comma, so for example "ABS_ALLOWED,SC_ALLOWED,TCS_ALLOWED"
// - The setup should never contain any of the "ServerControls" attributes, those are decided automatically.
// - The setup should never contain both VehicleModelId and VehicleClassId at the same time. Restrict either the class or specific vehicle.
// - The Flags attribute should never contain FORCE_IDENTICAL_VEHICLES or FORCE_SAME_VEHICLE_CLASS flags, those are decided automatically.
// Check http://127.0.0.1:9000/api/list/ for more information about flags and attributes

// "GridLayout" : "Default", //"Default","PlayerFirst","PlayerMiddle","PlayerLast","Random"
// "GridSize"​ ​:​ ​12, //Total maximum grid size, including AI participants. Can be modified only for the 'next session' and can never be larger than the maximum session size set in the server config
// "MaxPlayers"​ ​:​ ​12, //Maximum number of players. Can't be higher than GridSize, but can be lower and then the extra slots will be reserved for AI vehicles. Can be modified only for the 'next session'

// "MultiClassSlots" : 3, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
// "MultiClassSlot1" : "GTE", //Additional vehicle class id
// "MultiClassSlot2" : "LMP1", //Additional vehicle class id
// "MultiClassSlot3" : "LMP2", //Additional vehicle class id

//"MinimumOnlineRank" : "U" ,// Minimum safety rank "U","F","E","D","C","B","A","S"
// "MinimumOnlineStrength" : 1500, // Minimum online strength. Value from 100 to 5000


//"PracticeDateProgression" : 60, //Practice session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
//"PracticeWeatherProgression" : 30, //Practice session time-based forecast progression multiplier. Only some values between 1 and 30 are valid, the game might change the requested value to closest valid one


//"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
//"RaceWeatherProgression": 30, //Race session time-based forecast progression multiplier. Only some values between 1 and 30 are valid, the game might change the requested value to closest valid one

//"RaceRollingStart" : 1,// 1 to enable
//"RaceMandatoryPitStops" : 1,//1 to enable
//"RaceFormationLap" : 1,//Race session formation lap. Set 1 to enable. Only valid if Race Rolling Start is enabled.


"default" : {

"PracticeLength" : 0,
"QualifyLength" : 10,
"RaceLength" : 3,

"GridSize" : 32,
"MaxPlayers" : 32,
// "GridLayout" : "Default",

"Flags" : "ALLOW_CUSTOM_VEHICLE_SETUP,FORCE_REALISTIC_DRIVING_AIDS,FORCE_MANUAL,FILL_SESSION_WITH_AI,MECHANICAL_FAILURES,AUTO_START_ENGINE,PASSWORD_PROTECTED,ONLINE_REPUTATION_ENABLED,PIT_SPEED_LIMITER,PIT_STOP_ERRORS_ALLOWED,DISABLE_DRIVING_LINE,COOLDOWNLAP",

"DamageType" : "VISUAL_ONLY", //"OFF","VISUAL_ONLY","PERFORMANCEIMPACTING","FULL"
"TireWearType" : "STANDARD", //"SLOW","STANDARD","X2","X3","X4","X5","X6","X7","OFF"
"FuelUsageType" : "STANDARD", //"SLOW","STANDARD","OFF"
"PenaltiesType" : "FULL",//"NONE","FULL"
"PitWhiteLinePenalty" : 1,// 1 to enable
"DriveThroughPenalty" : 1, // 1 to enable
"AllowablePenaltyTime" : 10,// Amount of penalty time (in seconds) before a drive-through pits is issued. 0 to disable, valid range supported by game is 5 to 30
"ManualPitStops" : 1,// "Auto","Manual"
"ManualRollingStarts" : 1,// 1 to enable
"RaceRollingStart" : 0,
"RaceMandatoryPitStops" : 0,
"AllowedViews" : "Any",//"Any","CockpitHelmet"

"OpponentDifficulty" : 85,

"PracticeDateProgression" : 1,
"PracticeWeatherSlots" : 4,
"PracticeWeatherSlot1" : "LightCloud",
"PracticeWeatherSlot2" : "MediumCloud",
"PracticeWeatherSlot3" : "Clear",
"PracticeWeatherSlot4" : "LightCloud",

"QualifyDateProgression" : 1,
"QualifyWeatherSlots" : 4,
"QualifyWeatherSlot1" : "LightCloud",
"QualifyWeatherSlot2" : "MediumCloud",
"QualifyWeatherSlot3" : "Clear",
"QualifyWeatherSlot4" : "LightCloud",


"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 12,

"RaceDateProgression" : 1, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one

"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "MediumCloud",
"RaceWeatherSlot3" : "Clear",
"RaceWeatherSlot4" : "LightCloud",

"MultiClassSlots" : 0, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
"MultiClassSlot1" : -1289517523, //"LMP1", //Additional vehicle class id
"MultiClassSlot2" : -564539194, //"LMP2", //Additional vehicle class id
"MultiClassSlot3" : 1740243009, //"GTE", //Additional vehicle class id
},

// The rotation. Array of setups to rotate. If empty, just the default setup will be used with no actual rotation happening.
//
// These setups are applied on top of the default setup, then applied to the game. Previous setup in the rotation is never used.
// So for example if you wanted to repeat the same track in multiple consecutive setups, different from the default track,
// each of those setups needs to explicitly include that track. Also remember that apart from the flags nothing can be "removed"
// from the default setup, so if the default setup contains a track, some track will always be enforced (either the default one,
// or the setup-specific one). And one last thing, these override setups can never include an attribute that's not specified in
// the default setup - it can just override some of the default attributes, not add new ones. The only exception are the
// track/vehicle/class attributes.
//
// Attributes in these setups can have a special attribute RemoveFlags set, which will remove the specified flags from the default
// setup instead of adding them to it (which is what the Flags attribute will do)
//


"rotation" : [
// Before adding a track always check its Gridsize. If it's < to the Gridsize set in the default section the track will be replaced!
// This is the track index=1 in the sms_rotate_data.json. There the index apearing is the last track that was loaded on the last session.
{
"TrackId" : "Long Beach Street Circuit",
"VehicleClassId" : "V8 Supercars",
"RaceLength" : 5
},
{
"TrackId" : "Circuit of the Americas GP",
"VehicleClassId" : "Road​ ​A",
"RaceLength" : 5,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random"
},
{
"TrackId" : "Oulton Park Island",
"VehicleClassId" : "Megane Trophy",
"GridSize" : 26,
"MaxPlayers" : 10,
"RaceLength" : 5
},
{
"TrackId" : "Silverstone GP",
"VehicleClassId" : "GT1",
"RaceRollingStart" : 1,
"RaceLength" : 5,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "Clear",
"RaceWeatherSlot2" : "MediumCloud",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "LightCloud",
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60 //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
},
{
"TrackId" : "Knockhill International",
"VehicleClassId" : "GT4",
"GridSize" : 12,
"MaxPlayers" : 10,
"RaceLength" : 5
},
{
"TrackId" : "Autódromo Internacional do Algarve",
"VehicleClassId" : "GT3",
"RaceLength" : 5,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random"
},
{
"TrackId" : "Bathurst Mount Panorama",
"VehicleClassId" : "Group A",
"RaceDateYear" : 2015,
"RaceDateMonth" : 1,
"RaceDateDay" : 6
},
{
"TrackId" : "Hockenheim Classic GP",
"VehicleClassId" : "Group 5",
"RaceLength" : 5,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random"
},
{
"TrackId" : "Brands Hatch GP",
"VehicleClassId" : "Track Day A",
"GridSize" : 30,
"MaxPlayers" : 10
},
{
"TrackId" : "24 Hours of Le Mans Circuit",
"Flags" : "FORCE_MULTI_VEHICLE_CLASS",
"VehicleClassId" : "LMP2",
"RaceLength" : 5,
"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "MediumCloud",
"RaceWeatherSlot3" : "Storm",
"RaceWeatherSlot4" : "Random",
"RaceRollingStart" : 1,
"RaceMandatoryPitStops" : 1,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"MultiClassSlots" : 3, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
"MultiClassSlot1" : -1289517523, //"LMP1", //Additional vehicle class id
"MultiClassSlot2" : -564539194, //"LMP2", //Additional vehicle class id
"MultiClassSlot3" : 1740243009, //"GTE", //Additional vehicle class id
}
]
}



By the way... I think I read somewhere in the documentation that flags that were set in the default section can be removed in the rotation section using a special command. But I can't find where I read that... Am I right? is there a way to do that?

Kindest regards

Ps. Once I have everything sorted out I may create a video about how to configure the DS ;)

Brado23
27-09-2017, 03:09
Yeah, I can confirm I have the problem with ManualPitStops as well. I have listed reported it to SMS through another thread as well.

F1_Racer68
27-09-2017, 03:57
Guys, please be a bit more careful when posting your config files. I am seeing lots of user names and passwords in these.

Brado23
27-09-2017, 04:06
I replaced them with dummy names and values in mine. Not sure if Rantam did though.

Rantam
27-09-2017, 10:00
Guys, please be a bit more careful when posting your config files. I am seeing lots of user names and passwords in these.

Mine are dummies too. Thanks for the warning anyway ;)

Regards

Flens07
27-09-2017, 10:39
May problem is, that I can´t activate training and qualifying at my Dedei... all the other setting are allright (now:D)

(I´ll try to start the Dedi and join ingame on it to make the server-settings. searchds "server" is activated)

wopr
27-09-2017, 13:05
Is anybody running a dedi on server 2012r2 ?

ErockR32
27-09-2017, 16:32
really just need a GUI that sets this up instead of going into notepad and editing. Would make life so much easier

Asturbo
27-09-2017, 18:37
Is anybody running a dedi on server 2012r2 ?
Yes. No problem for me.

Shooter80
27-09-2017, 18:49
To everyone who had said they have their dedicated server working 'fine'. Can you confirm if any of you can run a public/non-passworded server, that doesn't randomly add 14 AI cars? (even though its set not to).

Since it looks like the next update to the dedicated server tool will likely be Project CARS 3, it would be interesting to know if its at least possible to trick it into working.

Thanks

NinjaTrek2891
27-09-2017, 19:54
Yes. No problem for me.

Please show us some examples of configs. I'm on a 2016 server and it's not getting listed without any errors. It just says IDLE and Joinable X.

Without any outputs its hard to diagnostic the problem why things don't get listed.

Brado23
27-09-2017, 21:36
To everyone who had said they have their dedicated server working 'fine'. Can you confirm if any of you can run a public/non-passworded server, that doesn't randomly add 14 AI cars? (even though its set not to).

Since it looks like the next update to the dedicated server tool will likely be Project CARS 3, it would be interesting to know if its at least possible to trick it into working.

Thanks

Yes, as a few of us have said, if you skip to the next event in a rotation the AI not longer appear. It is a bug.

I doubt the next update of the DS will be project cars 3 as there are bugs with it that need to be fixed, and I'm pretty sure SMS are aware of them by now.

Minolin
27-09-2017, 21:42
Yes, as a few of us have said, if you skip to the next event in a rotation the AI not longer appear. It is a bug.

Ah it's worse: At least for some of us the AI won't spawn in the next sessions, but many other settings (flags, weather) are still going crazy.


and I'm pretty sure SMS are aware of them by now.

I may not be as pessimistic, but I'm not sure about the awareness. We didn't even get a hint if this is ackknowledged as bug, or if we can deliver/test something.

Shooter80
27-09-2017, 21:55
..//..pretty sure..//..

I'd like to be able to share your optimism, but from where I'm sitting either:

- Nobody looks at these threads, because they don't care.
- They look at them, but decided they don't care enough to acknowledge there's a problem.
- They look at them, decided it was important enough to work on fixing, but choose to not tell anyone.

One of the first two seem more likely to me, since if they know its broken, and they plan to fix it, why not tell anyone?

Hopefully I'm wrong, and I'm just 'spoiled' working in the professional/corporate software environment where people are accountable for delivering software that matches the sales pitch (or at least explaining why it doesn't).

I know one thing, when I'm in a situation where future revenue is dependent on customer confidence and satisfaction, I answer every question that is asked.

No offence intended, I'm intrigued by all of this.

Brado23
27-09-2017, 23:14
Yeah, I can see your point of view wrt communication. Some sort of register for bugs with a status next to them that the mods/devs can update with something like (Problem forwarded to devs, Investigating, Fix in progress, Problem fixed in next patch) would give people a lot more faith that their problems are being looked at. From what I can work out it seems that the mods on the forum are filtering out the issues from other posts and forwarding them onto the devs. I'd say the devs would be flat out at the moment doing fixes.

Don't forget that the game only got released less than a week ago. We have to give them a chance. Lets see how things pan out with bug fixes over the next few weeks/month before being too critical.

With how quickly people give up on things these days and move onto something else, my biggest worry is that if the online and dedicated server issues aren't give priority for fixes and fixed early, we'll end up with a game full of empty servers down the track which would be a massive shame.

Shooter80
27-09-2017, 23:48
Indeed, a list of reported/known/recognised issues would be handy, I get why they wouldn't want to publish one though (for lots of bad, yet valid reasons). But relating to this specific thread, lots of other threads are marked as [KNOWN ISSUE] etc, and other threads have had their titles changed or moved to other boards, yet this one goes ignored. That does not give the impression anyone cares.

The incapable server browser, the lack of filters, the broken dedicated server, to me, goes way past 'bug fixes' and is much more in the 'design issue' category. This is something which has just been released, after an extended period of 'closed beta' (WMD) and it lacks basic working features that have been in pretty much every online game for the last 10 years.

In fairness, I have first hand experience of how adding more and more features into something results in very few of them being 100%, and the ambition is certainly admirable and impressive. And, yea, if it gets properly supported, and if it doesn't take 'too long', I'd expect it will all be worth it in the end, but there's little little hard evidence so far that this will happen.

A lot/most people who buy games nowadays do research first, and if I hadn't gambled my money already with the pre-order, from all the problems on these forums, this isn't a game I'd back. Which is a shame, because they got a lot of stuff right, the physics, and FFB I can have no complaints about, just right now it feels like having an awesome car with broken headlights and wipers...can only enjoy it during daytime, if its dry...

F1_Racer68
27-09-2017, 23:58
OK guys, here we go.

I have everything workign exactly as I want it with 1 small exception.... I too get AI on track :( THAT HAS GOT TO GET FIXED PLEASE!!

Our config is for MultiClass using LMP2, GTE and GT3. We are running timed races with timed practice and qualifying. FOr now, due to the real weatehr bug we are sticking with a single slot.



////////////////////////////////// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Just 3 race laps.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 145,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1629747944,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" :0,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 30,
"PitControl" : 1,
"ManualRollingStarts" : 1,
"RaceRollingStart" : 1,
"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Daytona Road Course. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 467707118,

"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : 1740243009,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 10,
"QualifyWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 10,
"RaceWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}




There are some bugs with how things are displayed in the lobby as follows:



Session Date shows today's date, not the configured date - Session launches with correct configured dates (Display issue only)
Session indicates COLLISION NO - Display issue only. Collisions are in full effect on track
Session indicates MANUAL PIT CONTROL NO - Manual Pit control is working


So, in the end, there are 3 information display bugs in the lobby, and I am also getting the AI issue. Other than that, the above config is working exactly as I wanted it to work.

One point of note...... The guide shows this for the Manual Control in Pits:

"int8 ​ ​ManualPitStops
TODO: ​ ​rename ​ ​to ​ ​PitControl. ​ ​Control ​ ​mode ​ ​while ​ ​driving ​ ​through ​ ​pits. ​ ​The ​ ​enum​ ​values​ ​are
available ​ ​also ​ ​via ​ ​HTTP ​ ​API ​ ​at ​ ​/api/list/enums/pit_control ​ ​or​ ​in ​ ​Lua ​ ​global ​ ​tables
lists.enums.pit_control, ​ ​PitControl ​ ​and ​ ​value_to_pit_control. ​ ​(ReadWrite) "

I can confirm (as you can see in the above config file) that using the "PitControl" entry is working.

Good luck all.

Brado23
28-09-2017, 00:18
Interesting, as I tried to change ManualPitStops to PitControl in my config file too, but it didn't work for me. In the Dedicated Server console it threw an error when starting and said something like Unknown value PitControl. You don't see that?

F1_Racer68
28-09-2017, 00:24
Interesting, as I tried to change ManualPitStops to PitControl in my config file too, but it didn't work for me. In the Dedicated Server console it threw and error when starting and said something like Unknown value PitControl. You don't see that?

No, not at all. I did see an issue I have regarding the Lua config , but I know what that is and will fix it later.

I only posted the actual game config info in my earlier post. The only part of the lua I am using is the stats portion.

Brado23
28-09-2017, 00:27
Ah, so you are not using rotation? That may be the difference then. PitControl might work through server.cfg, but not through the rotate lua.

F1_Racer68
28-09-2017, 01:07
Ah, so you are not using rotation? That may be the difference then. PitControl might work through server.cfg, but not through the rotate lua.

Correct. We use the DS for league races primarily, so only via the config file..... for now.

With that said, the 14 AI bug may cause an issue for us. Sure hope that get's addressed ASAP as we have a league series starting in just over a week. So I may have to learn how to use the Rotation script to see if I can figure out a way to do a short 1 or 2 lap race ahead of the main event just as a work around......

Krobo
28-09-2017, 07:58
Man , sounds like a nightmare ! I'm sure someone from SMS will chime in here soon ..heh ..:numbness: in the mean time you guys are really smart ! thx for posting your findings

Im one of the Race admins at simrascingonline.co.uk we have a PC1 server we rent & I can see from the screens its the exact same server updated with pc2's new features .. I have no clue how to make it work as that was set up for us ..we use the Steam launch options to get to the empty server and set it up from there ..

we want to get a pc2 server but I think we might wait a month or 2 ..lol

Oh ya before I forget , is are the results still in the same place ?> lua_config /sms_stats_data ?

and/or does anyone know of a way to get results from a pc hosted event ? I cant find anything in the files that remotely covers results from the pc ..

Thanks !

Shooter80
28-09-2017, 14:05
I'm surprised they didn't announce it. But it seems there has been an update to the Dedicated Server an hour ago:
https://steamdb.info/app/413770/history/

No idea of what has changed. Unfortunately doing some real work at the moment.

Minolin
28-09-2017, 14:10
No word about the changed server in the patchnotes, but I think I'll have another try with that one. @SMS: A word about the state would be nice here, running a dedicated server and being involved in the rating system is my #1 reason to be around in pc2

Shooter80
28-09-2017, 14:18
I had a quick test, still appears to add 14 AI, nothing else seems different. It was probably just a patch to make the server happy with the updated client version number.

I'm still pretty convinced nobody had read this thread, and its not even on their issues list. Maybe it would be worth starting a new one with a clearer title? I'm tempted, but wording it without getting banned might be tricky for me.

Siberian Tiger
28-09-2017, 14:21
Sadly im nowhere a Dedicated Server Specialist, but i can asure you that all Threads get scanned.

And if you do Post Constructive Critic, and Bugreports you won't have to fear to get banned.

I will have a look if i find someone who is able to help.

Shooter80
28-09-2017, 14:26
Thanks for the confirmation SiberianTiger, but hold up for now. I re-updated the server tool, and restarted everything again, and either it adds AI a lot less often than it did before, or its stopped doing it (the 2nd Steam update seemed to download more files).

Will test a bit more and confirm.

EDIT: Restarted the server a few more times and so far it seems ok, not adding AI, not confirmed any of the other issues (weather flags etc) testing PC2 over VNC is kinda tricky.

Minolin
28-09-2017, 17:15
Thanks for the confirmation SiberianTiger, but hold up for now. I re-updated the server tool, and restarted everything again, and either it adds AI a lot less often than it did before, or its stopped doing it (the 2nd Steam update seemed to download more files).

Will test a bit more and confirm.

EDIT: Restarted the server a few more times and so far it seems ok, not adding AI, not confirmed any of the other issues (weather flags etc) testing PC2 over VNC is kinda tricky.

For me it's still the same. AI is active, weather and other settings ignored. In the server list most dedicated servers are now empty regarding setting icons (starting with a missing Rating restriction), instead of weird symbols. :(

Shooter80
28-09-2017, 18:03
Yea, I just got AI added. And yea, weather didn't seem to be working right.

EDIT: New, worse problem. It seems the JOIN button is missing for the server if it has anyone in the lobby. So can get more than one player in the 'multi'-player server. Its obviously hard to test, but seems that way.

Rantam
28-09-2017, 18:44
Well.. being messing with the DS for days now both with and without LUA(rotations). I'll start with the most simple configuration, LUA(rotations) deactivated, so only the server.cfg with settings for the session:

- Server added the expected number of AI.
- Manual Pitstops WORKED (note PitControl parameter is used here, not ManualPitstops), despite in the lobby info it appears as not being enabled.
- The weather settings don't work. Even if in the lobby and the loading screen the weather appears as was set in the file, once the track is loaded weather is always clear (in my case in both qualy and race):


241184

241185

241186

241183

241182



Server.cfg


"//" : "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 : "info"

// 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 : "dummy 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 : "dummy"

// 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 : 64

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
"aaa" : "dummy",
// "eee" : "dummy",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "www", "eee" ],
"admin" : [ "aaa" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : false

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
"sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0

// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
// Set GridSize=MaxPlayers to avoid AI being added
"GridSize" : 12,
"MaxPlayers" : 2,


// Laps.
"PracticeLength" : 0,
"QualifyLength" : 1,
"RaceLength" : 5,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1194458344,//Forces same vehicle class, among other things
//"Flags" : -1194458856,//Not forcing same vehicle class
//"Flags" : -1194457320,//Forces multi vehicle class


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" :95,


// Visual only damage
"DamageType" : 2, // 1="VISUAL_ONLY", 2="PERFORMANCEIMPACTING", 3="FULL"


// No tire wear.
"TireWearType" : 6,// 0=X7, 1=X6, 2=X5, 3=X4, 4=X3, 5=X2, 6=STANDARD, 7="SLOW", 8=OFF


// Fuel usage off.
"FuelUsageType" : 0,//0=STANDARD, 1=SLOW, 2=OFF


// Penalties on.
"PenaltiesType" : 1,//0=NONE, 1=FULL
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 15,
"PitControl" : 1,
"ManualRollingStarts" : 1,
//"RaceRollingStart" : 1,
//"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 1876749797, //Cadwell Park GP

//"MultiClassSlots" : 3,
//"MultiClassSlot1" : -564539194,
//"MultiClassSlot2" : 1740243009,
//"MultiClassSlot3" : -112887377,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : 2095740485, // Vintage Formula D


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
//"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,


// Weather slot. See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : 888299130,//MediumCloud
//"PracticeWeatherSlot2" : 888299130,//MediumCloud
//"PracticeWeatherSlot3" : 888299130,//MediumCloud
//"PracticeWeatherSlot4" : 888299130,//MediumCloud


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 10,
"QualifyWeatherProgression" : 10,


// Weather slot. See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : 2067843977,//Foggy
//"QualifyWeatherSlot2" : 2067843977,//Foggy
//"QualifyWeatherSlot3" : 2067843977,//Foggy
//"QualifyWeatherSlot4" : 2067843977,//Foggy

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 10,
"RaceWeatherProgression" : 10,


// Weather slot. See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : 129238383, //Heavy Cloud
//"RaceWeatherSlot2" : 129238383, //Heavy Cloud
//"RaceWeatherSlot3" : 129238383, //Heavy Cloud
//"RaceWeatherSlot4" : 129238383, //Heavy Cloud
}



And if I use LUA I also have issues (many already explained):

-- I can't get manual pit control work if I use "ManualPitStops" parameter in the sms_rotate_config.json, but if i set "PitControl" : 1 in server.cfg it does work, even if I have LUA enabled and the sms_rotate_config.json is used. So it's not really that the hole default section in sms_rotate_config.json overrides the one in server.cfg. It only seems to do that if the parameter is set in both files.

--Manual cooldown lap doesn't work either if you try to set it in the sms_rotate_config.json file. But it seems to work when I only use the server.cfg file.

-- "RaceMandatoryPitStops" : 1 doesn't seem to work either. I tried it on the Le Mans session you see in the LUA file below without luck. Not sure if it'd work if I set it in the server.cfg instead though.

-- Weather configuration seems to be broken too, no matter if i use the string name or the value. I can't set any kind of weather on my sessions, they are always clear, no clouds in the sky. Again, in lobby and the server status screen you see correct settings, but once the track loads it's clear.

-- "RaceDateProgression" only seems to work when using it in the server.cfg.

-- I can't get multiclass race to work with the AI, and classes added to the session seem to work odd either. For example: In the Le Mans 24h event I set in my server lobby car selection screen all categories i added for the race appear (LMP1, LMP2 and GTE), but of course i can only select a car from the one i set in the VehicleClassID parameter (LMP2). But the AI only select cars from the category set in the VehicleClassID parameter (so my category, LMP2).

When the session reached the next multiclass event at Watkins Glen the classes added were not the intended ones... instead of having the LMP900, GTO and LMP3 I got LMP1, LMP2 and LMP900. And again all IAs selected a car from my class (LMP900).

-- Regading multiclass sessions I'd also like to ask if there's any way to allow players to select any car of any of the categories added to the race. Removing ther VehicleClassID parameter doesn't make that happen...

-- Not sure if it also happens in single player sessions, but if you tweak the car setup in the garage and reduce the fuel from 50 to 20 (for example) once the race starts your fuel won't be 20 but way more. This is odd, as the rest of the setup defined in the garage seems to be applied correctly.

-- unless you specify something different certain session attributes are kept from the current session to the next session, even if in the default section are different. That is the case for example of GridSize and OpponentDificulty. Check the config files below to follow my explanation: after a session at Cadwell Park GP with the Vintage Formula Ds me and the AI moved to Spa with the group C. The session kept the same number of AI (7) present at Cadwell, and they also kept the difficulty level of the AI (95), despite the settings of the default section:

sms_rotate_config.json:

// Config version.
version : 7

// Default configuration.
config : {

// Is the current rotation index persistent? If true, the rotation will continue after server restart,
// If false, the rotation will always start from the first setup.
// You can always delete the sms_rotate_data.json file from lua_config to reset the persisted index.
"persist_index" : true,

// The default setup. This is a table with attributes and values. The following rules apply to the attributes:
// - If TrackId is specified: The track to enforce. Automatically sets 1 to ServerControlsTrack
// - If VehicleModelId is specified: The vehicle to enforce. Automatically sets 1 to ServerControlsVehicle, sets FORCE_IDENTICAL_VEHICLES to Flags
// - If VehicleClassId is specified: The class to enforce. Automatically sets 1 to ServerControlsVehicleClass, sets FORCE_SAME_VEHICLE_CLASS to Flags
// - Track, vehicle model, vehicle class and all enum/flags attributes can use values in string forms - so you can use either track id, or track name.
// - Flags in string form can contain multiple flags separated by comma, so for example "ABS_ALLOWED,SC_ALLOWED,TCS_ALLOWED"
// - The setup should never contain any of the "ServerControls" attributes, those are decided automatically.
// - The setup should never contain both VehicleModelId and VehicleClassId at the same time. Restrict either the class or specific vehicle.
// - The Flags attribute should never contain FORCE_IDENTICAL_VEHICLES or FORCE_SAME_VEHICLE_CLASS flags, those are decided automatically.
// Check http://127.0.0.1:9000/api/list/ for more information about flags and attributes

// "GridLayout" : "Default", //"Default","PlayerFirst","PlayerMiddle","PlayerLast","Random"
// "GridSize"​ ​:​ ​12, //Total maximum grid size, including AI participants. Can be modified only for the 'next session' and can never be larger than the maximum session size set in the server config
// "MaxPlayers"​ ​:​ ​12, //Maximum number of players. Can't be higher than GridSize, but can be lower and then the extra slots will be reserved for AI vehicles. Can be modified only for the 'next session'

// "MultiClassSlots" : 3, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
// "MultiClassSlot1" : "GTE", //Additional vehicle class id
// "MultiClassSlot2" : "LMP1", //Additional vehicle class id
// "MultiClassSlot3" : "LMP2", //Additional vehicle class id

//"MinimumOnlineRank" : "U" ,// Minimum safety rank "U","F","E","D","C","B","A","S"
// "MinimumOnlineStrength" : 1500, // Minimum online strength. Value from 100 to 5000


//"PracticeDateProgression" : 60, //Practice session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
//"PracticeWeatherProgression" : 30, //Practice session time-based forecast progression multiplier. Only some values between 1 and 30 are valid, the game might change the requested value to closest valid one


//"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
//"RaceWeatherProgression": 30, //Race session time-based forecast progression multiplier. Only some values between 1 and 30 are valid, the game might change the requested value to closest valid one

//"RaceRollingStart" : 1,// 1 to enable
//"RaceMandatoryPitStops" : 1,//1 to enable
//"RaceFormationLap" : 1,//Race session formation lap. Set 1 to enable. Only valid if Race Rolling Start is enabled.

// Weather values to be used with "PracticeWeatherSlotX", ""QualifyWeatherSlotX" or "RaceWeatherSlotX" parameters:
// "Clear", "LightCloud", "MediumCloud", "HeavyCloud", "Overcast", "LightRain", "Rain", "Storm", "ThunderStorm",
// "snow", "heavysnow", "blizzard", "Foggy", "FogWithRain", "HeavyFog", "HeavyFogWithRain", "Hazy", "Random"
"default" : {

"PracticeLength" : 0,
"QualifyLength" : 10,
"RaceLength" : 3,

"GridSize" : 32,
"MaxPlayers" : 5,
// "GridLayout" : "Default",

"Flags" : "ALLOW_CUSTOM_VEHICLE_SETUP,FORCE_REALISTIC_DRIVING_AIDS,FORCE_MANUAL,FILL_SESSION_WITH_AI,MECHANICAL_FAILURES,AUTO_START_ENGINE,PASSWORD_PROTECTED,ONLINE_REPUTATION_ENABLED,PIT_SPEED_LIMITER,PIT_STOP_ERRORS_ALLOWED,DISABLE_DRIVING_LINE,COOLDOWNLAP",

"DamageType" : "VISUAL_ONLY", //"OFF","VISUAL_ONLY","PERFORMANCEIMPACTING","FULL"
"TireWearType" : "STANDARD", //"SLOW","STANDARD","X2","X3","X4","X5","X6","X7","OFF"
"FuelUsageType" : "STANDARD", //"SLOW","STANDARD","OFF"
"PenaltiesType" : "FULL",//"NONE","FULL"
"PitWhiteLinePenalty" : 1,// 1 to enable
"DriveThroughPenalty" : 1, // 1 to enable
"AllowablePenaltyTime" : 10,// Amount of penalty time (in seconds) before a drive-through pits is issued. 0 to disable, valid range supported by game is 5 to 30
"ManualPitStops" : 1,// "Auto","Manual"
"ManualRollingStarts" : 1,// 1 to enable
"RaceRollingStart" : 0,
"RaceMandatoryPitStops" : 0,
"AllowedViews" : "Any",//"Any","CockpitHelmet"

"OpponentDifficulty" : 75,

"PracticeDateProgression" : 1,
"PracticeWeatherSlots" : 4,
"PracticeWeatherSlot1" : "LightCloud",
"PracticeWeatherSlot2" : "MediumCloud",
"PracticeWeatherSlot3" : "Clear",
"PracticeWeatherSlot4" : "LightCloud",
"PracticeWeatherProgression" : 30,

"QualifyDateProgression" : 1,
"QualifyWeatherSlots" : 4,
"QualifyWeatherSlot1" : "LightCloud",
"QualifyWeatherSlot2" : "MediumCloud",
"QualifyWeatherSlot3" : "Clear",
"QualifyWeatherSlot4" : "LightCloud",
"QualifyWeatherProgression" : 30,

"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 12,

"RaceDateProgression" : 1, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one

"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "LightCloud",
"RaceWeatherSlot2" : "MediumCloud",
"RaceWeatherSlot3" : "Clear",
"RaceWeatherSlot4" : "LightCloud",
"RaceWeatherProgression" : 30,

"MultiClassSlots" : 0, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
"MultiClassSlot1" : -1289517523, //"LMP1", //Additional vehicle class id
"MultiClassSlot2" : -564539194, //"LMP2", //Additional vehicle class id
"MultiClassSlot3" : 1740243009, //"GTE", //Additional vehicle class id
},

// The rotation. Array of setups to rotate. If empty, just the default setup will be used with no actual rotation happening.
//
// These setups are applied on top of the default setup, then applied to the game. Previous setup in the rotation is never used.
// So for example if you wanted to repeat the same track in multiple consecutive setups, different from the default track,
// each of those setups needs to explicitly include that track. Also remember that apart from the flags nothing can be "removed"
// from the default setup, so if the default setup contains a track, some track will always be enforced (either the default one,
// or the setup-specific one). And one last thing, these override setups can never include an attribute that's not specified in
// the default setup - it can just override some of the default attributes, not add new ones. The only exception are the
// track/vehicle/class attributes.
//
// Attributes in these setups can have a special attribute RemoveFlags set, which will remove the specified flags from the default
// setup instead of adding them to it (which is what the Flags attribute will do)
//


"rotation" : [
// Before adding a track always check its Gridsize. If it's < to the Gridsize set in the default section the track will be replaced!
// This is the track index=1 in the sms_rotate_data.json. There the index apearing is the last track that was loaded on the last session.
{
"TrackId" : "Long Beach Street Circuit",
"VehicleClassId" : "V8 Supercars",
"OpponentDifficulty" : 75,
"RaceLength" : 5,
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "LightCloud"
},
{
"TrackId" : "Circuit of the Americas GP",
"VehicleClassId" : "Formula C",
"RaceDateMonth" : 4,
"RaceWeatherSlots" : 4,
"RaceDateHour" : 16,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Overcast",
"RaceWeatherProgression" : 30
},
{
"TrackId" : "Oulton Park International",
"VehicleClassId" : "Megane Trophy",
"GridSize" : 26,
"MaxPlayers" : 5,
"RaceLength" : 5,
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "MediumCloud"
},
{
"TrackId" : "Silverstone GP",
"VehicleClassId" : "GT1",
"OpponentDifficulty" : 75,
"RaceRollingStart" : 1,
"RaceLength" : 5,
"RaceDateMonth" : 4,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "HeavyCloud",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Overcast",
"RaceWeatherProgression" : 30,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60 //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
},
{
"TrackId" : "Knockhill International",
"VehicleClassId" : "GT4",
"OpponentDifficulty" : 85,
"GridSize" : 12,
"MaxPlayers" : 10,
"RaceLength" : 5,
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "MediumCloud"
},
{
"TrackId" : "Autódromo Internacional do Algarve",
"VehicleClassId" : "GT3",
"RaceLength" : 5,
"RaceDateMonth" : 10,
"RaceDateHour" : 16,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30
},
{
"TrackId" : "Bathurst Mount Panorama",
"VehicleClassId" : "Group A",
"RaceDateYear" : 2015,
"RaceDateMonth" : 10,
"RaceDateDay" : 8,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30
},
{
"TrackId" : "Snetterton 200",
"VehicleClassId" : "F5",
"RaceDateMonth" : 3,
"GridSize" : 26,
"MaxPlayers" : 5,
"RaceLength" : 5,
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "MediumCloud"
},
{
"TrackId" : "Hockenheim Classic GP",
"VehicleClassId" : "Group 5",
"RaceLength" : 5,
"RaceDateMonth" : 4,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Overcast",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30
},
{
"TrackId" : "Cadwell Park GP",
"VehicleClassId" : "Vintage F1 D",
"OpponentDifficulty" : 95,
"QualifyWeatherSlots" : 2,
"QualifyWeatherSlot1" : "Foggy",
"QualifyWeatherSlot2" : "HeavyCloud",
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Overcast",
"RaceWeatherSlot3" : "HeavyCloud",
"RaceWeatherSlot4" : "MediumCloud",
//"RaceWeatherProgression" : 30,
"GridSize" : 12,
"MaxPlayers" : 5,
"RaceLength" : 5
},
{
"TrackId" : "Circuit de Spa-Francorchamps GP",
"VehicleClassId" : "Group C1",
"RaceLength" : 5,
"RaceDateYear" : 1988,
"RaceDateMonth" : 9,
"RaceDateDay" : 18,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "Overcast",
"RaceWeatherSlot2" : "Random",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30,
"RaceRollingStart" : 1,
"RaceMandatoryPitStops" : 1,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60 //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
}
{
"TrackId" : "Brands Hatch GP",
"VehicleClassId" : "Track Day A",
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "MediumCloud",
"RaceDateMonth" : 10,
"GridSize" : 30,
"MaxPlayers" : 10
},
{
"TrackId" : "24 Hours of Le Mans Circuit",
"Flags" : "FORCE_MULTI_VEHICLE_CLASS",
"VehicleClassId" : "LMP2",
"RaceLength" : 5,
"RaceDateYear" : 2015,
"RaceDateMonth" : 6,
"RaceDateDay" : 6,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "HeavyCloud",
"RaceWeatherSlot3" : "Storm",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30,
"RaceRollingStart" : 1,
"RaceMandatoryPitStops" : 1,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"MultiClassSlots" : 3, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
"MultiClassSlot1" : -1289517523, //"LMP1", //Additional vehicle class id
"MultiClassSlot2" : -564539194, //"LMP2", //Additional vehicle class id
"MultiClassSlot3" : 1740243009, //"GTE", //Additional vehicle class id
},
{
"TrackId" : "Red Bull Ring GP",
"VehicleClassId" : "Formula C",
"RaceLength" : 5,
"RaceDateMonth" : 4,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Overcast",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30
},
{
"TrackId" : "Watkins Glen International GP",
"Flags" : "FORCE_MULTI_VEHICLE_CLASS",
"VehicleClassId" : "LMP900",
"RaceLength" : 5,
"RaceDateYear" : 2001,
"RaceDateMonth" : 8,
"RaceDateDay" : 12,
"RaceDateHour" : 16,
"RaceWeatherSlots" : 4,
"RaceWeatherSlot1" : "MediumCloud",
"RaceWeatherSlot2" : "Overcast",
"RaceWeatherSlot3" : "Random",
"RaceWeatherSlot4" : "Random",
"RaceWeatherProgression" : 30,
"RaceRollingStart" : 1,
"RaceMandatoryPitStops" : 1,
"QualifyDateProgression" : 60,
"RaceDateProgression" : 60, //Race session date/time progression multiplier. Only some values between 1 and 60 are valid, the game might change the requested value to closest valid one
"MultiClassSlots" : 2, //"Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined templates in MultiClassSlotN.
"MultiClassSlot1" : "GTO",
"MultiClassSlot2" : "LMP3"
}
]
}

And this is the server.cfg I'm using with that LUA:

"//" : "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 : "info"

// 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 : "dummy 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 : "dummy"

// 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 : 64

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
"aaa" : "dummy",
// "eee" : "dummy",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "rrr", "eee" ],
"admin" : [ "aaa" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
"sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 0,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0
}


Apart of this the Spa session shown a known (I already saw it and reported it during the development phase) graphic issue: transparent environment and black grass. I guess I should expect to find snow (because of the race date settings) on these places, but I'm not sure...

241187

241188

Regards

erickgoldner
28-09-2017, 18:54
Yea, I just got AI added. And yea, weather didn't seem to be working right.

EDIT: New, worse problem. It seems the JOIN button is missing for the server if it has anyone in the lobby. So can get more than one player in the 'multi'-player server. Its obviously hard to test, but seems that way.

I've just had this !
It seems to happen always when you Force Settings through the file "controlGameSetup : true" .

If you don't use the controle game setup, it seems to be fine.

Oh boy.. so many bugs still present from Pcars 1.

Vincen
28-09-2017, 21:09
I've just had this !
It seems to happen always when you Force Settings through the file "controlGameSetup : true" .

If you don't use the controle game setup, it seems to be fine.

Oh boy.. so many bugs still present from Pcars 1.

So.. we can't make public servers, because if you leave the admin is transferred to a random player?

erickgoldner
28-09-2017, 21:21
So.. we can't make public servers, because if you leave the admin is transferred to a random player?

Well, yes!
And then who gets the host will be able to change anything, just like a p2p server.
o.O

Just pretty much confirmed that it is the control game setup thing!
Set it to false, a friend could join.
Set it to true, after the first person joins, no Join button anymore and neither via inviation.

Vincen
28-09-2017, 21:57
Well, yes!
And then who gets the host will be able to change anything, just like a p2p server.
o.O

Just pretty much confirmed that it is the control game setup thing!
Set it to false, a friend could join.
Set it to true, after the first person joins, no Join button anymore and neither via inviation.

I can confirm that.

leonstone
28-09-2017, 23:56
When first player race over,time left is too short. someone cannot finish the session, and session is closed
i donot find a Attributes to set it. dedicated server Doc.
anyone knows how set it ?

Brado23
29-09-2017, 05:14
I agree it is probably a bit too short. It should be long enough for someone with a damaged car trying to hold it together, to still finish a clean lap.

Meekychunky
29-09-2017, 10:51
My dedicated server was working acceptably until yesterday's update, but now it seems the rotations (in sms_lua_rotations.json) have been disabled by the update. Now the server's stuck on the initial settings defined under sessionAttributes (in server.cfg). Can anyone else confirm rotations are broken?

Rantam
29-09-2017, 10:55
They do seem to work OK in my DS.

Regards

Meekychunky
29-09-2017, 11:31
They do seem to work OK in my DS.

Regards

Thanks Rantam - in that case I'll continue fiddling :)

Rantam
29-09-2017, 11:39
I'm positive it works. I just checked it now and i ran 3 consecutive sessions and the next track was always the expected one. For a start check "persist_index" is set to "true" (i guess you already did that, but..) :)

Regards

Shooter80
29-09-2017, 15:57
Sadly im nowhere a Dedicated Server Specialist, but i can asure you that all Threads get scanned.

And if you do Post Constructive Critic, and Bugreports you won't have to fear to get banned.

I will have a look if i find someone who is able to help.

Since the dedicated server is still horribly broken (randomly adds AI to session, cant have > 1 player in games with controlGameSetup : true, weather doesn't work, etc etc) can I take you up on that offer to try to find someone to help, or perhaps could you get someone to confirm that one of the "9 online programmers" are actually aware of the problem, and perhaps if they perhaps intend to fix it.

Thanks

Rantam
29-09-2017, 18:01
Patch 1.1.3.2 - Release Notes
Fixed a multiplayer exploit with reputation restricted lobbies
Fix for Dedicated Servers that would become unjoinable if the Dedicated Server was configured to control the game setup

;)

Minolin
29-09-2017, 18:44
True, we can join again. Rest of the issues unfortunately remain (flags+settings are ignored/randomized, server list doesn't show any icon,...)

Anything-but
30-09-2017, 00:10
Weird bug...

Have the server configured with a track/car class rotation and all works fine, but for some reason i ALWAYS seem to get rain even though it's set for clear and everyone else gets the designated weather!

So, i thought i.d set the controlgamesetup to false and use the web ui to adjust the session, but now the problem is even though forcing same class (GT3) there is only one car to chose from in the game lobby.
Any pointers to one or both of those?

Cheers. :)

F1_Racer68
30-09-2017, 04:41
The DS in it's current state is most definitely a very buggy mess. I will hopefully find the time next week to sit down and document every one of the issues.

The biggest frustration is that you see different bugs depending on how the server is configured:

- ServerControlsGame true vs. false
- Config file vs. Lua

etc.

BenWatki
30-09-2017, 11:20
anyone have a problem where you cant see your own dedicated server in game but can see it via WMDPortal?.

Shooter80
30-09-2017, 11:34
I may have lucked into a set of settings for a public server that doesn't add AI, server controlling tracks and class, has track rotation, and pays attention to most of the settings. If anything, it seems that having really simple weather (as-in always Clear) might make the difference.


logLevel : "info"
eventsLogSize : 10000
name : "SERVERNAME"
secure : true
password : ""
maxPlayerCount : 24
bindIP : "185.198.189.2"
steamPort : 8766
hostPort : 9000
queryPort : 27016
sleepWaiting : 50
sleepActive : 10
sportsPlay: false

enableHttpApi : true
httpApiLogLevel : "warning"
httpApiInterface : "185.198.189.2"
httpApiPort : 27017
httpApiExtraHeaders : {
"*" : "Access-Control-Allow-Origin: *"
}
httpApiAccessLevels : {
}
httpApiAccessFilters : {
"public" : [
{ "type" : "accept" }
],
"private" : [
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],
"admin" : [
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
]
}
httpApiUsers : {
"AdminUser" : "adminpass"
}
httpApiGroups : {
"private" : [ "AdminUser" ],
"admin" : [ "AdminUser" ]
}
staticWebFiles: "web_files"

enableLuaApi : true
luaAddonRoot : "lua"
luaConfigRoot : "lua_config"
luaOutputRoot : "lua_output"

luaApiAddons : [
"sms_base",
"sms_rotate",
"sms_motd",
"sms_stats"
]

luaAllowedLibraries : [
"lib_rotate"
]

allowEmptyJoin : true
controlGameSetup : true
sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicleClass" : 1,
"ServerControlsVehicle" : 0,

"GridSize" : 24,
"MaxPlayers" : 32,

"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 30,
"PitControl" : 1,
"MinimumOnlineRank" : 0,
"MinimumOnlineStrength" : 100,

"Flags" : 8913432,
"DamageType" : 1,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"AllowedViews" : 0,
"TrackId" : 904625875,
"VehicleClassId" : -112887377,

"PracticeLength" : 0,
"QualifyLength" : 10,
"RaceLength" : 5,

"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 12,

"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : 296956818,
"RaceWeatherSlot3" : 888299130,
"RaceWeatherSlot4" : 270338437
}


version : 7
config : {
"persist_index" : false,

"default" : {
"Flags" : 8912920,
"VehicleClassId" : -112887377,
},
"rotation" : [
{
"TrackId" : 904625875
},
{
"TrackId" : -945967394
},
{
"TrackId" : "Zolder"
},
{
"TrackId" : "Circuit of the Americas GP"
}
]
}

BTW: Yes, I know I'm combining strings and enums in the same file (and I have a trailing comma where it shouldn't have one), but I'm leaving it the way its currently running (and apparently working) I hacked a load of stuff out and changed stuff expecting it not to work, so didn't go for neat, for all I know if I 'fix' those things, it'll stop working.

nohopes
30-09-2017, 11:50
Hey i got some Problems,

how can i config : ServerControlsSetup ? I set it in the session Attributes to 0 , but the Server all time set it to 1

greets

Anything-but
30-09-2017, 11:52
BTW: Yes, I know I'm combining strings and enums in the same file (and I have a trailing comma where it shouldn't have one), but I'm leaving it the way its currently running (and apparently working) I hacked a load of stuff out and changed stuff expecting it not to work, so didn't go for neat, for all I know if I 'fix' those things, it'll stop working.

Got mine working now with no AI, track/car class rotation ok, just need to get time of day progression working....know the commands?

Visceral_Syn
30-09-2017, 13:02
Yay! the server always thinks I want rain, without rain even configured in the sms_rotate...

Minolin
30-09-2017, 13:14
Yay! the server always thinks I want rain, without rain even configured in the sms_rotate...

Which track/date? I had the impression that my broken config just sets the default which may be "real weather". Likely for tracks like Spa and Nürburgring, maybe not so likely for Barcelona.

Visceral_Syn
30-09-2017, 13:18
Daytona 7/4/2017, I attempted to change the attributes before voting to start the session... still made up its own weather...

Visceral_Syn
30-09-2017, 13:52
*sigh*

ipod
30-09-2017, 17:10
you get to not having ia in your sessions create in cfg mode?
Sometime i have IA... exit and return in the party and no IA

Anything-but
30-09-2017, 17:48
Yay! the server always thinks I want rain, without rain even configured in the sms_rotate...


Same, had mine running ok earlier but now i get rain even tho it's not configured for it....best of all, anyone who joins get the clear weather that it should be.

V annoying. :(

Visceral_Syn
30-09-2017, 17:58
I'm done messing with it... maybe, one day someone will feexit...

TOCA2FREAK
30-09-2017, 20:28
Are there any step by step instructions anywhere on how to setup and run a dedicated server. I am having real trouble settings one up. For example I want a dedi server to run where no one can change the car or track when they join.

Practice: 30 mins
Qual: 20 mins
Race: 25 mins
Track: Daytona Road Course
Cars: GT3
Allow custom setup: Yes
ABS: Real
TC: Real
AI: No
Damage: Full
Tire wear: On
Fuel Usage: On

Any help will be much appreciated.

F1_Racer68
30-09-2017, 21:16
Are there any step by step instructions anywhere on how to setup and run a dedicated server. I am having real trouble settings one up. For example I want a dedi server to run where no one can change the car or track when they join.

Practice: 30 mins
Qual: 20 mins
Race: 25 mins
Track: Daytona Road Course
Cars: GT3
Allow custom setup: Yes
ABS: Real
TC: Real
AI: No
Damage: Full
Tire wear: On
Fuel Usage: On

Any help will be much appreciated.

Well, that's a bit of an issue right now....... Setting the server to where the server controls the game means that currently (in my experience at least) only 1 person can join the server :(

It's one of the many bugs I have been encountering while trying to get ours up and running for our next season of racing starting next week. You are better off just leaving it so that you can set it up how you want it when you first enter for now.

HamTyler
30-09-2017, 21:22
Are there any step by step instructions anywhere on how to setup and run a dedicated server. I am having real trouble settings one up. For example I want a dedi server to run where no one can change the car or track when they join.

Practice: 30 mins
Qual: 20 mins
Race: 25 mins
Track: Daytona Road Course
Cars: GT3
Allow custom setup: Yes
ABS: Real
TC: Real
AI: No
Damage: Full
Tire wear: On
Fuel Usage: On

Any help will be much appreciated.

Have a look in your dedicated server folder, there are a bunch of pdfs that are worth reading through.

In essence though, go into your PCars2 - Dedicated Server\lua_config. You are looking for "sms_rotate_config.json". If it isn't there, copy the file in from the Dedicated Server\lua\sms_rotate folder and then modify that...

Open this file. Look for the "Flags" entry.

You need to use this https://docs.google.com/spreadsheets/d/1dSst7oaWrwbzhZCRZnfBlfdM-ob2htHyvS4i0g3M-Qw/edit#gid=0 to figure out the value of what to turn on and off (it's on page 4, last post, of this thread). Set the flags for same car, no AI, TCS, ABS, damage etc. Copy the number from that spreadsheet into the sms_rotate_config.json file "Flags" : Your_number_goes_here

And then, at the bottom of the file, you add something like this:

"rotation" : [
{
// Daytone, GT3.. Racing for great Justice.
"TrackId" : "Daytona​ ​Road​ ​Course ",
"VehicleClassId" : "GT3",
"PracticeLength" : 30
"QualifyLength" : 20,
"RaceLength" : 25,
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : "LightCloud"
}
]



Hope that helps :)

Also, apologies for anything I might have wrong... I'm also still figuring this out.

Ferrari312
30-09-2017, 23:16
I'm having an issue where OpponentDifficulty doesn't seem to have any effect at all. I have GridSize at 24 and MaxPlayers at 4 with the "FILL_SESSION_WITH_AI " flag enabled. I've got it set up with IndyCars at Laguna Seca. Everything seems to be working properly except the AI is dog slow and OpponentDifficulty has no effect. It worked fine in PCars 1.

Anyone else having this issue?

Rantam
01-10-2017, 00:11
Hi guys,

there're a few parameters I don't know how to set. May be someone out there may help me:

- How to set weather progression to "Sync to race". "RaceWeatherProgression" only seems to accept 1 to 30
- How to set time progression to "Sync to race". "RaceDateProgression" only seems to accept 1 to 60
- How do you set Real weather? RaceWeatherSlots : 0?

Thanks in advance!

Cheers

dantonaya
01-10-2017, 00:37
Hi!
Anyone knows what is the flag for prepare a racelenght whit time and not whit laps?
Thx!

F1_Racer68
01-10-2017, 00:39
Hi guys,

there're a few parameters I don't know how to set. May be someone out there may help me:

- How to set weather progression to "Sync to race". "RaceWeatherProgression" only seems to accept 1 to 30
- How to set time progression to "Sync to race". "RaceDateProgression" only seems to accept 1 to 60
- How do you set Real weather? RaceWeatherSlots : 0?

Thanks in advance!

Cheers

For REAL weather, set WeatherSlots : 0 - Be warned, there is currently a bug whereby it seems only the "host" recevies the real weatehr conditions and everyone else in the room recevies clear skies.

For Weather and Time progression, set both to the same value, i.e.:

RaceDateProgression 2
RaceWeatherProgression 2

This will give both the same rate of progression. Accepted values are 1, 2, 5, 10, 12, etc up to 60

Hope that helps.

Also, as mentioned above, check in the Dedicated Server folder for the Server Types PDF. Tis has all the details of each attribute and their acceptable values.

NinjaTrek2891
01-10-2017, 14:13
At the moment a dedicated server first joiner is the admin.

But is it possible to assign admins by steamid?

Visceral_Syn
01-10-2017, 14:17
Hi!
Anyone knows what is the flag for prepare a racelenght whit time and not whit laps?
Thx!

TIMED_RACE or 1048576, answers to configuration settings is the in servertypes.pdf that come with the dedicated server.

dantonaya
01-10-2017, 17:37
Well. I have some issues whit DS. I have some questions that i cant find the answer in the servertypes.pdf
First i want to rotate tracks, it works properly but i have problems whit the weather. I set clear but always its lightraining.
Second is it possible change the admin? I mean..why the first that entered in the server is the admin?
Third. I set manual pit control but only works on my pc..
Im sorry for my english.

dantonaya
01-10-2017, 17:37
Thx!

dantonaya
01-10-2017, 17:38
TIMED_RACE or 1048576, answers to configuration settings is the in servertypes.pdf that come with the dedicated server.

Thx!

Visceral_Syn
01-10-2017, 17:43
Well. I have some issues whit DS. I have some questions that i cant find the answer in the servertypes.pdf
First i want to rotate tracks, it works properly but i have problems whit the weather. I set clear but always its lightraining.
Second is it possible change the admin? I mean..why the first that entered in the server is the admin?
Third. I set manual pit control but only works on my pc..
Im sorry for my english.

These are all issues with the current pCars˛ dedicated server, the devs didn't test it before releasing it? They've patched it at least twice, but have not fixed the server using whatever weather it wants, as opposed to what the server admin configures in either the sms_rotate, or the server config file itself. The first client that connected to the pCars server was always the admin, I'm not surprised this is the same for pCars˛.

Rantam
01-10-2017, 21:15
For REAL weather, set WeatherSlots : 0 - Be warned, there is currently a bug whereby it seems only the "host" recevies the real weatehr conditions and everyone else in the room recevies clear skies.

For Weather and Time progression, set both to the same value, i.e.:

RaceDateProgression 2
RaceWeatherProgression 2

This will give both the same rate of progression. Accepted values are 1, 2, 5, 10, 12, etc up to 60

Hope that helps.

Also, as mentioned above, check in the Dedicated Server folder for the Server Types PDF. Tis has all the details of each attribute and their acceptable values.

Well, first of all thanks. I have read all the documentation and I haven't found that information. Yes, I have seen values for date progression go from 1 to 60 and weather progression go from 1 to 30, but there's no clue about how to set "sync to race" values. And I don't think using the same multiplayer in both of them would make that work, as you're only getting the time and weather changing at the same pace, but that doesn't mean they're synchronized to race length, do they? Or is that the official way to make that work?

I haven't found also where it says that weatherslots = 0 would mean that is real weather, despite I assumed that.

Anyway: thanks again :)

Regards

Brado23
01-10-2017, 22:33
Well. I have some issues whit DS. I have some questions that i cant find the answer in the servertypes.pdf
First i want to rotate tracks, it works properly but i have problems whit the weather. I set clear but always its lightraining.
Second is it possible change the admin? I mean..why the first that entered in the server is the admin?
Third. I set manual pit control but only works on my pc..
Im sorry for my english.

I used to run a league on rFactor many years ago and you could take the admin control of the dedicated server from someone else by entering something like /admin [password] in the chat. You could also change and do a lot of other things from the chat window as there were a whole heap of commands that were preceeded by a / in the chat window. I'd like to see something similar on the pCars2 dedicated server.

See here for the sort of things I mean.... http://racingforjesus.com/joomla_15/index.php?option=com_kunena&func=view&catid=13&id=33&Itemid=71

Ferrari312
01-10-2017, 23:25
I used to run a league on rFactor many years ago and you could take the admin control of the dedicated server from someone else by entering something like /admin [password] in the chat. You could also change and do a lot of other things from the chat window as there were a whole heap of commands that were preceeded by a / in the chat window. I'd like to see something similar on the pCars2 dedicated server.

See here for the sort of things I mean.... http://racingforjesus.com/joomla_15/index.php?option=com_kunena&func=view&catid=13&id=33&Itemid=71

Major +1 to that.

surtic86
02-10-2017, 14:39
Ups. wrong thread.

F1_Racer68
02-10-2017, 15:35
As promised, here is my list of Dedicated Server issues we have encountered in preparation for our upcoming league season.


Server conditions are as follows:
- Using Server.CFG file to manage setup
- Using SMS_BASE and SMS_STATS LUA scripts
- SERVER.CFG file attached (names and addresses have been changed to protect the innocent :) )


"//" : "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 : "info"


// 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 : "CanAm VRL [www.canamvrl.com]"


// 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 : 32


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


// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016


// 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


// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)




///////////////////////////
// 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 : true


// 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 : "xxx.xxx.xxx.xxx"


// Port where the local http server listens.
httpApiPort : 9000


// 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"


// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"


// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}


// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {


// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],


// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "0.0.0.0/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],


// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "0.0.0.0/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],


}


// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
"yyy" : "********",
"yyy" : "********",
}


// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
"private" : [ "yyy", "yyy" ],
"admin" : [ "yyy", "yyy" ],
}


// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"




//////////////////////////
// LuaApi configuration //
//////////////////////////


// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.


// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.


// Master enable/disable toggle.
enableLuaApi : true


// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"


// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"


// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"


// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [


// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",


// Automatic race setup rotation.
//"sms_rotate",


// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
//"sms_motd",


// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]


// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [


"lib_rotate"
]


////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 0,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Timed races.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 90,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1627650792,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 15,
"PitControl" : 1,
"ManualRollingStarts" : 1,
"RaceRollingStart" : 1,
"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : -52972612,

"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : 1740243009,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 1,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 2,
"PracticeWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 1,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 2,
"QualifyWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 1,
"RaceDateHour" : 14,
"RaceDateProgression" : 2,
"RaceWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}






Intention is to have server control rules, Tracks, and vehicle classes. Vehicle classes should be set for the following 3 classes:


LMP2
GTE
GT3



Primary and most serious issues/concerns:


If controlGameSetup : true, all server settings appear to work correctly HOWEVER only one person can join the server. No one else is able to connect either via the online browser or via Steam "Join Game" option
If controlGameSetup : false, then everyone is able to join, but car selection is limited to the same vehicle that the "host" is in. - This item is resolved. There was an issue in my CFG file.



Less critical, yet "annoying" are the following:


Server Status screen does not properly reflect the settings in the SERVER.CFG file, however on track, everything seems to work as set.
Specific attributes affected are:

Session Date shows today's date, not the configured date - Session launches with correct configured dates (Display issue only)
Session indicates COLLISION NO - Display issue only. Collisions are in full effect on track
Session indicates MANUAL PIT CONTROL NO - Manual Pit control is working


14 AI present during first session after server restart. Leave session, server closes session, rejoin and start new session, no AI



I cannot and will not comment on any issues regarding the use of the LUA scripts such as SMS_ROTATION, as I am not using them. While I am sure there are other smaller issues with the DS, the fact that only 1 person can join the server when the server is set to control the game settings is by far the most serious one.

For the record, this SERVER.CFG file is built using the new format, but using the same settings as we used for 2.5 years in pCARS1 DS. Also, the current pCARS2 DS is running at the latest version (patch 1.1.3.2), shown as 1.0.0.45 on http://cars2-stats-steam.wmdportal.com/index.php/servers

epinter
02-10-2017, 16:14
Primary and most serious issues/concerns:

If controlGameSetup : true, all server settings appear to work correctly HOWEVER only one person can join the server. No one else is able to connect either via the online browser or via Steam "Join Game" option

For me, doesn't matter how controlGameSetup is configured, lobby invite and steam join doesn't work... Reports in this thread (http://forum.projectcarsgame.com/showthread.php?54074-Unable-to-Join-over-a-Steam-Friend-on-a-Dedicated-Server)...




If controlGameSetup : false, then everyone is able to join, but car selection is limited to the same vehicle that the "host" is in.

Did you try to set the server flags ?

F1_Racer68
02-10-2017, 16:58
For me, doesn't matter how controlGameSetup is configured, lobby invite and steam join doesn't work... Reports in this thread (http://forum.projectcarsgame.com/showthread.php?54074-Unable-to-Join-over-a-Steam-Friend-on-a-Dedicated-Server)...



Did you try to set the server flags ?

Yes, it's set for FORCE_MULTI_VEHICLE_CLASS, but thanks for double checking. The file above is the version we tried to use once the issue of being able to join was found. Originally, we had these settings:



////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,

epinter
02-10-2017, 17:20
Yes, it's set for FORCE_MULTI_VEHICLE_CLASS, but thanks for double checking. The file above is the version we tried to use once the issue of being able to join was found. Originally, we had these settings:



////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : true


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,



The flag I needed to unset was the FORCE_IDENTICAL_VEHICLES.

erickgoldner
02-10-2017, 19:43
I thought the Join thing was fixed on fridays update ?

epinter
02-10-2017, 19:51
Tested yesterday, Steam join doesn't work with dedicated servers.

Brado23
02-10-2017, 20:17
The join thing was fixed in the last patch for me, but I am using rotation so that may be a difference?

I too am waiting on the bug fixes for all of the DS problems before I start my league. Hopefully they come in the 2.0 patch which is just around the corner.

epinter
02-10-2017, 20:24
The join thing was fixed in the last patch for me, but I am using rotation so that may be a difference?

I too am waiting on the bug fixes for all of the DS problems before I start my league. Hopefully they come in the 2.0 patch which is just around the corner.

I will try to enable rotation... I'm testing without sms_rotate, and with "controlGameSetup: false". Tried to invite a friend through steam after joining other servers using online browser, but the invite button does nothing...

TOCA2FREAK
02-10-2017, 20:26
As from today (2nd October 2017) I can no longer find my dedi server in the game lobby. I have changed NOTHING and I can no longer find it. This is getting frustrating now running dedi servers for this game. SMS please fix and give us step by step instructions on how to set servers up or even better a GUI. :)

imagineer
02-10-2017, 20:42
Sometimes it's not entirely clear in the above posts, as well as in the PDF files, if the suggested settings only work in the Server.cfg or in the sms_rotate_config.json

My questions :

-1 Is it possible in sms_rotate_config.json to have SOME races multiclass (but not 'all classes'), while still enforcing a class or even a car on other races?

-2 How/where can i set the minimal rating for people to enter the server on a dedicated server?

-3 The QualifyWeatherSlots and QualifyWeatherProgression parameters seem to be not working in the sms_rotate_config.json ; when i enter those as the exact same notation as RaceWeatherSlots and RaceWeatherProgression, the server won't load the sms_rotate and bnug back in to server.cfg (ps. great way to test if the config works... have another track at server.cfg compared to the first track in sms_rotate ;) )

- 4 In sms_rotate_config.json, i can specify RaceLength in laps... how do i set it in time?

- 5 In SMS_Motd ... How can i set a Multi line MOTD?

Thanks in advance

epinter
02-10-2017, 21:30
As from today (2nd October 2017) I can no longer find my dedi server in the game lobby. I have changed NOTHING and I can no longer find it. This is getting frustrating now running dedi servers for this game. SMS please fix and give us step by step instructions on how to set servers up or even better a GUI. :)

Did you try to wait 1 minute before you start the server again after a stop ? Almost every time I restart my server, I have to wait, or the server doesn't appear in the list.

TOCA2FREAK
02-10-2017, 21:33
Did you try to wait 1 minute before you start the server again after a stop ? Almost every time I restart my server, I have to wait, or the server doesn't appear in the list.

Yes. I have even waited for over an hour and still nothing. :(

epinter
02-10-2017, 21:39
Yes. I have even waited for over an hour and still nothing. :(

Verify if allowEmptyJoin is set to true... You can try to double-check the server name, secure parameter and bindIP...

imagineer
02-10-2017, 22:00
Yes. I have even waited for over an hour and still nothing. :(

Do you have any special characters in your servername? (my server wouldnt show up if i had a "+", ">" or "<" in it)

MerlinC
02-10-2017, 23:52
...
Another curious thing is there appears to be no way to specify multiple classes, and no indication in the sample config files to limit which grade of player can join ("MinimumOnlineRank","MinimumOnlineStrength" though I assume). Even the maths in the default server.cfg is wrong (8+32+64+128+512+131072+524288 <> 656106).
.

Could a potential root cause for the failure be that you are adding the numbers instead of doing a bitwise OR like stated in the ScriptingGuide on page 15?

P.S.: If just one bit of every flag is set than it should not make a difference but it would'nt be for all values the case e.g.

3+5+8 = 16

but bitwise or with the same values would be

011 or 101 or 111 = 111 => 2^2 + 2^1 + 2^0 = 8





Flags Lists
Similar to “enum” attribute types there are also “flags” types. Flags also associate names to
values, but the attribute value itself can combine several flag values together using binary “or”
(or to be less precise, adding them together).

Shooter80
03-10-2017, 10:19
I had considered that, but it seems with the values they have chosen (for the flags I want at least) the end result is the same no matter which way you 'combine' them. They only use numbers which can be represented by a single bit, which would be why they didn't use numbers like 3 or 5.

Since I'm here, I might as well give an update. With really basic weather settings, and providing I don't try to change anything with the httpapi page, the server now keeps its config past track changes, and doesn't add AI 90% of the time (as opposed to adding them 90% of the time). Its still a mess though, but I'm quite quickly coming to the conclusion that there is little point in running a public dedicated server with this game anyway (even if it worked), since the server filtering is pretty much useless (cant ignore passworded servers, can't filter on session, can't see next track in the search etc, etc, etc).

I doubt they will ever fix that, they probably figure the 10 minutes they spent to make the existing filters is more than enough resources spent already on that aspect, and have moved onto Project CARS 3 by now. At this rate it will have the online feature set of other games by about version 5.

TOCA2FREAK
03-10-2017, 11:24
Do you have any special characters in your servername? (my server wouldnt show up if i had a "+", ">" or "<" in it)


Verify if allowEmptyJoin is set to true... You can try to double-check the server name, secure parameter and bindIP...

This is my server.cfg


"//" : "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 : "info"

// 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 : "REVS SimRacing UK"

// 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 : 24

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "accept" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "accept" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
// "sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 0,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,

// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 24,
"MaxPlayers" : 24,

// Just 3 race laps.
"PracticeLength" : 0,
"QualifyLength" : 0,
"RaceLength" : 3,

"MinimumOnlineRank" : 1,
"MinimumOnlineStrength" : 1000,

// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1197997544,

// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,

// Visual only damage
"DamageType" : 1,

// No tire wear.
"TireWearType" : 8,

// Fuel usage off.
"FuelUsageType" : 2,

// Penalties on.
"PenaltiesType" : 1,

// Any camera view allowed.
"AllowedViews" : 0,

// Track Brands Hatch Indy. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 1988984740,

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : 767810805,

// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 11,

// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}

epinter
03-10-2017, 14:23
This is my server.cfg


"//" : "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 : "info"

// 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 : "REVS SimRacing UK"

// 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 : 24

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "accept" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "accept" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
// "sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////

// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true

// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 0,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,

// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 24,
"MaxPlayers" : 24,

// Just 3 race laps.
"PracticeLength" : 0,
"QualifyLength" : 0,
"RaceLength" : 3,

"MinimumOnlineRank" : 1,
"MinimumOnlineStrength" : 1000,

// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1197997544,

// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,

// Visual only damage
"DamageType" : 1,

// No tire wear.
"TireWearType" : 8,

// Fuel usage off.
"FuelUsageType" : 2,

// Penalties on.
"PenaltiesType" : 1,

// Any camera view allowed.
"AllowedViews" : 0,

// Track Brands Hatch Indy. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 1988984740,

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : 767810805,

// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"RaceDateYear" : 2015,
"RaceDateMonth" : 7,
"RaceDateDay" : 6,
"RaceDateHour" : 11,

// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}


Everything seems to be ok, but you can change the bindIP to:


bindIP : ""


Check if the ports configured are open in your firewall.

TOCA2FREAK
03-10-2017, 15:57
Everything seems to be ok, but you can change the bindIP to:


bindIP : ""


Check if the ports configured are open in your firewall.

Ports are all configured correctly and open.

m00lean
03-10-2017, 16:35
Has someone managed to get a working multiclass configuration? In my tests it shows the different classes ingame, but I can only select cars from the VehicleClassId. If I select anything from MultiClassSlot attributes, it changes back to the first car from VehicleClassId.

F1_Racer68
03-10-2017, 16:47
Has someone managed to get a working multiclass configuration? In my tests it shows the different classes ingame, but I can only select cars from the VehicleClassId. If I select anything from MultiClassSlot attributes, it changes back to the first car from VehicleClassId.

I finally got it working last night for exaclty that. We are running LMP2, GTE and GT3. Below is the code in my server.cfg file. Note that we only do 1 track every other week for the league, so I do not require the use of the LUA scripts. The only ones I am using are "sms_base" and "sms_stats" so that we can post race results details to simresults.net

Also, we are running full realism with the exception of the Track Limit penalties as we have found they have some understandable flaws. We also have tire wear set to 2x (Accelerated) as we want to ensure pit stops are needed during our time accelerated endurance race simulations. This config is for our upciming 2.4 Hours of Daytona which compresses the full 24 hours into 2 and a half hours.





////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Just 3 race laps.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 150,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1638136808,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 0,
"PitControl" : 1,
"ManualRollingStarts" : 1,
"RaceRollingStart" : 1,
"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 467707118,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 10,
"QualifyWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 10,
"RaceWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}


I can confirm that this is now working 100% for multiclass. When players join they can chose from any cars in the 3 classes (LMP2, GTE, GT3) from any manufacturer. No cars from outside of these 3 classes are displayed.

NOTE: We still have the controlGameSetup set to 0 (off) as no one other than the first person into the server can join if this is set to on.

Let me know if you have any questions.

m00lean
03-10-2017, 16:59
Thank you. I was able to find the issue with the help of your config...

I'm using sms_rotate. If you set the vehicleClassId, it automatically sets FORCE_SAME_VEHICLE_CLASS which conflicts with FORCE_MULTI_VEHICLE_CLASS. So you can set 3 classes with the MultiClassSlots, but you must not set a vehicleClassId. Fine. But if you do this, it defaults back to Formula Renault.

Damn this thing is a mess ^^

F1_Racer68
03-10-2017, 17:01
Thank you. I was able to find the issue with the help of your config...

I'm using sms_rotate. If you set the vehicleClassId, it automatically sets FORCE_SAME_VEHICLE_CLASS which conflicts with FORCE_MULTI_VEHICLE_CLASS. So you can set 3 classes with the MultiClassSlots, but you must not set a vehicleClassId. Fine. But if you do, it defaults back to Formula Renault.

Damn this thing is a mess ^^

I too have the issue of being in the FR3.5 when I first join the server, but it seems to only be an issue with the "host" (first person to join). No one else in the room is even able to see that car in their selection list.

Shooter80
03-10-2017, 17:36
..//..NOTE: We still have the controlGameSetup set to 0 (off) as no one other than the first person into the server can join if this is set to on...//..

The, very simple, config I posted the other day (link below) works for limiting people to a single class, has controlGameSetup : true, people can join if there are people in it and it only adds AI about 10% of the time.
http://forum.projectcarsgame.com/showthread.php?51949-Dedicated-Server-configuration&p=1376980&viewfull=1#post1376980

But from the limited time I've been willing to devote to/waste on it, for the most part, if you try to go 'fancy' with weather or multi-classes it all falls apart.

Visceral_Syn
03-10-2017, 17:54
Excellent work F1 Racer68!

F1_Racer68
03-10-2017, 18:29
Excellent work F1 Racer68!

Thanks! It took several hours of experimentation and testing with the help of several league members to make it work. :(

epinter
03-10-2017, 19:18
Ports are all configured correctly and open.

Your server seems to be working, I saw a server with the name "REVS SimRacing UK" few minutes ago in this site: http://cars2-stats-steam.wmdportal.com/index.php/servers

TOCA2FREAK
03-10-2017, 19:35
Your server seems to be working, I saw a server with the name "REVS SimRacing UK" few minutes ago in this site: http://cars2-stats-steam.wmdportal.com/index.php/servers

Cool but also strange as I've changed nothing since starting conversation on here where it wasn't showing up in game. Also the server has been running since this conversation. Strange indeed.

TOCA2FREAK
03-10-2017, 19:37
And I just refreshed that link @epinter and now it's gone

rickard64
03-10-2017, 21:23
Im trying to get my own DS to work but can't get it to list properly ingame and cant join it.

In the HTTP config im able to see that my server is running with IP's and port(which is forwarded correctly).

Under status in the webAPI i see this:
Session

State: Idle
Name:
Joinable: no

How do i make it joinable? Could it be because of an empty sms_base_config file?

Rantam
03-10-2017, 23:18
Be sure dedicatedservercmd.exe outbound traffic is allowed through your firewall. If you're using Windows 10 a rule allowing inbound traffic is usually created by default, but you must create the outbound rule manually.

If that is OK re-check that ports 8766, 27015 and 27016 are being forwarded to the machine hosting the dedicated server.

And it's not a bad idea to give your servers' session a name either ;)

Regards

Meekychunky
04-10-2017, 00:03
I'm sorry to be the bearer of bad tidings to those who've recently joined the tail end of this thread, but dedicated servers are utterly broken at this point in time. Those who started this thread have tried EVERYTHING and given up until the next patches come out. Sadly SMS aren't forthcoming with whatever it is they're doing, and the moderators of this forum are reluctant to confirm any issues we've conveyed to the Devs..... fingers crossed ey!!!!!

Visceral_Syn
04-10-2017, 00:10
On another note, multi-class racing can be set up, in the server config, did use the weather i configured, just not the dates. Otherwise its somewhat playable. I really would like a rotation tho...

Brado23
04-10-2017, 00:24
While we are waiting for fixes to these problems, I have a question on a different matter.....

In pCars1 I used to regularly join a dedicated server called Touristenfahrten which was pretty much non-stop Nordschleife practice. Every time I joined the server it would say in the chat what my best time was on the server in what vehicle, what the best time was for the session/day and some other information. Whenever I beat a previous time it would also post a message in the chat to inform me.

Is this what the sms_stats lua provides or was that some other lua plugin for the dedicated server? If so, does anyone know the name of it as I'd like to set it up on my pCars2 dedicated server once these other problems get sorted out.

Thanks.

Visceral_Syn
04-10-2017, 00:47
While we are waiting for fixes to these problems, I have a question on a different matter.....

In pCars1 I used to regularly join a dedicated server called Touristenfahrten which was pretty much non-stop Nordschleife practice. Every time I joined the server it would say in the chat what my best time was on the server in what vehicle, what the best time was for the session/day and some other information. Whenever I beat a previous time it would also post a message in the chat to inform me.

Is this what the sms_stats lua provides or was that some other lua plugin for the dedicated server? If so, does anyone know the name of it as I'd like to set it up on my pCars2 dedicated server once these other problems get sorted out.

Thanks.

Brado23, ePinter made a few lua scripts that did that in pCars. I used his ping-limit lua script, that thang was great!

Brado23
04-10-2017, 00:53
Thanks, I'll go looking.

I'm also using his pinglimit script too :-). Seems to work on pCars 2 from what I can see so far (with the limited use I have had of the DS itself due to the issues). Thanks ePinter!

EDIT: Was just thinking about that pinglimit script further.... If it kicks people from the race due to slow ping, will those people cop the points hit on their license for a disconnection? Might only be able to use it on non-rated servers if so.

Visceral_Syn
04-10-2017, 01:20
I'm not 100%, but I think they will take a points penalty if they drop or get kicked in the race session. I'm not sure about Qualify or Practice...

epinter
04-10-2017, 02:11
Kick a player will be certainly a bad thing with a competitive lobby... I think more and more lua addons will be created and will have the same problem.

I opened a new thread (http://forum.projectcarsgame.com/showthread.php?54118-Dedicated-Server-Missing-feature-since-PCARS1), I hope the devs look ... We need to have more actions available in lua, currently the only option is kick.

F1_Racer68
04-10-2017, 03:03
I'm not 100%, but I think they will take a points penalty if they drop or get kicked in the race session. I'm not sure about Qualify or Practice...

In my limited experience so far, during Pactice is no hit to rating, but kick/leave during Qualifying is.

Essentially it assumes that once you are into the qualifying session the "race weekend" has officially begun.

Brado23
04-10-2017, 04:09
That's interesting. I thought only Race affected it. I better make sure I don't join any qual sessions then unless I plan to go all the way.

SimonJ
04-10-2017, 08:29
I finally got it working last night for exaclty that. We are running LMP2, GTE and GT3. Below is the code in my server.cfg file. Note that we only do 1 track every other week for the league, so I do not require the use of the LUA scripts. The only ones I am using are "sms_base" and "sms_stats" so that we can post race results details to simresults.net

Also, we are running full realism with the exception of the Track Limit penalties as we have found they have some understandable flaws. We also have tire wear set to 2x (Accelerated) as we want to ensure pit stops are needed during our time accelerated endurance race simulations. This config is for our upciming 2.4 Hours of Daytona which compresses the full 24 hours into 2 and a half hours.





////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Just 3 race laps.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 150,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1638136808,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 0,
"PitControl" : 1,
"ManualRollingStarts" : 1,
"RaceRollingStart" : 1,
"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 467707118,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 10,
"QualifyWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 10,
"RaceWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}


I can confirm that this is now working 100% for multiclass. When players join they can chose from any cars in the 3 classes (LMP2, GTE, GT3) from any manufacturer. No cars from outside of these 3 classes are displayed.

NOTE: We still have the controlGameSetup set to 0 (off) as no one other than the first person into the server can join if this is set to on.

Let me know if you have any questions.

Hi tried this last night all seemed good till mate joined and we could only select the same cars think i need to enable Server controls game to true "controlGameSetup : false"
still not got head around the flag system but will try again when home.
Thanks for posting Multiclass setup showed up fine was lost on it before :)
Sure i can sort it must be flags or the game control setting me thinks :)

After getting home and reading back through the posts I see this change "ServerControlsVehicleClass" : 3,
I set server controls game to true too will try with friend tonight :)

m00lean
04-10-2017, 08:54
In my limited experience so far, during Pactice is no hit to rating, but kick/leave during Qualifying is.

Essentially it assumes that once you are into the qualifying session the "race weekend" has officially begun.

You dont lose any point when leaving a qualifying session.

Aefuan
04-10-2017, 15:09
I can't login on to the HttpAPI. It asks me the user and password, I put it and it doesn't work.

My user is configured on the CFG.


// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
"USERNAME" : "PASSWORD"
}

SimonJ
04-10-2017, 16:42
// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
joe : blogs,
}

should look like this joe user pw blogs

Aefuan
04-10-2017, 16:50
// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
joe : blogs,
}

should look like this joe user pw blogs

Not working bro :/

Marc Wieneke
04-10-2017, 17:58
Im trying to get my own DS to work but can't get it to list properly ingame and cant join it.

In the HTTP config im able to see that my server is running with IP's and port(which is forwarded correctly).

Under status in the webAPI i see this:
Session

State: Idle
Name:
Joinable: no

How do i make it joinable? Could it be because of an empty sms_base_config file?

It is not joinable because it is a dedicated server with "controlGameSetup : false" and there was no running session. At the moment the first driver joins the dedicated server via and creates a setting will switch to "joinable: true".

To achive this use in steam the start parameter for the game: -searchds "YOUR SERVERNAME"
Afterwards go into the menu and "Create an online event" the SESSION name given in this setup will be appear in your list of:

State: active(?)
Name: <--- your session name
Joinable: :yes:

good luck.

SimonJ
04-10-2017, 18:19
Not working bro :/

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
joe : blogs,
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
"private" : [joe ],
"admin" : [joe ],
}


try that

F1_Racer68
04-10-2017, 18:21
It is not joinable because it is a dedicated server with "controlGameSetup : false" and there was no running session. At the moment the first driver joins the dedicated server via and creates a setting will switch to "joinable: true".

To achive this use in steam the start parameter for the game: -searchds "YOUR SERVERNAME"
Afterwards go into the menu and "Create an online event" the SESSION name given in this setup will be appear in your list of:

State: Idle
Name: <--- your session name
Joinable: no

good luck.

Sorry, but I have to disagree. These steps are NOT required.

I currently have 2 active servers running, both show a status of "Joinable = No", yet both are visible on stats website and in in game browser while sitting idle. I have been joining both of them regularly by simply using the in game browser, without any start up arguments.

Both servers are also configured with the "controlGameSetup : false" setting, as enabling that prevents others from joining once the first person has joined (A current, reported bug).

Below are the screen captures proving that this is unnecessary.

241849241850241851241852241853

I am not sure what the exact issue is that @rickard64 is having, but this setting is NOT IT. I suspect, more likely it is the "allowEmptyJoin :" setting. Make sure that it is set to "true" (as shown below in my config)

Here is the current config running on both of my servers:



"//" : "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 : "info"


// 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 : "CanAm VRL [www.canamvrl.com]"


// 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 : 32


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


// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016


// 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


// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)




///////////////////////////
// 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 : true


// 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 : "xxx.xxx.xxx.xxx"


// Port where the local http server listens.
httpApiPort : 9000


// 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"


// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"


// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}


// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {


// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],


// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "0.0.0.0/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],


// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "0.0.0.0/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],


}


// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
"yyy" : "********",
"zzz" : "********",
}


// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
"private" : [ "yyy", "zzz" ],
"admin" : [ "yyy", "zzz" ],
}


// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"




//////////////////////////
// LuaApi configuration //
//////////////////////////


// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.


// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.


// Master enable/disable toggle.
enableLuaApi : true


// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"


// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"


// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"


// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [


// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",


// Automatic race setup rotation.
//"sms_rotate",


// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
//"sms_motd",


// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]


// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [


"lib_rotate"
]


////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Just 3 race laps.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 150,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1612970984,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 0,
"PitControl" : 1,
"ManualRollingStarts" : 0,
"RaceRollingStart" : 0,
"RaceFormationLap" : 1,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 467707118,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 10,
"QualifyWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 10,
"RaceWeatherProgression" : 10,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}



User names, passwords and IP Addresses have been blanked out/masked. Use your own info in these fields.

Also note that I am only using the "sms_base" and "sms_stats" lua files. We have no need fo rthe rotation file for our purposes.

rickard64
04-10-2017, 18:55
i tried F1 Racer68 server cfg and still no luck.

I also tried to find where i name my session? is this in the sms_base_config? which is empty for me. Should it be empty?

Regarding ports i have portfowarding on 8766, 27015-27016 to my local ip and windows firewall has an exception for DedicatedServercmd.exe. Also tried with specified ports on both UDP and TCP...
But when i run netstat -anb in windows cmd DedicatedServercmd.exe is using diffrent ports from whats specified in the cfg.

I.e.
[DedicatedServerCmd.exe]
TCP 127.0.0.1:27060 0.0.0.0:0 LISTENING

[DedicatedServerCmd.exe]
UDP 0.0.0.0:27036 *:*
[DedicatedServerCmd.exe]
UDP 0.0.0.0:64410 *:*

F1_Racer68
04-10-2017, 19:05
i tried F1 Racer68 server cfg and still no luck.

I also tried to find where i name my session? is this in the sms_base_config? which is empty for me. Should it be empty?

Regarding ports i have portfowarding on 8766, 27015-27016 to my local ip and windows firewall has an exception for DedicatedServercmd.exe. Also tried with specified ports on both UDP and TCP...
But when i run netstat -anb in windows cmd DedicatedServercmd.exe is using diffrent ports from whats specified in the cfg.

I.e.
[DedicatedServerCmd.exe]
TCP 127.0.0.1:27060 0.0.0.0:0 LISTENING

[DedicatedServerCmd.exe]
UDP 0.0.0.0:27036 *:*
[DedicatedServerCmd.exe]
UDP 0.0.0.0:64410 *:*

The ports definitely seem to be your issue. I just ran the same netstat command on mine and am getting the expected ports (8766, 27015 and 27016).

At this point, I am not sure how much more I can help. It's looking like it is a Windows/Network config issue on oyur internal network. Definitely have a ogod look at your Windows system to make sure you don't have some 3rd party software running there that might interfere.

You could always map the ports differently in the Server.cfg file. Just make sure to update the firewall rules properly.

SimonJ
04-10-2017, 20:49
Hi F1
which part of your config file does the accelerated time ?
is it this 1 being normal time 10 being 10x accelerated time ? does weather need to match it too ?
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,

F1_Racer68
04-10-2017, 21:17
Hi F1
which part of your config file does the accelerated time ?
is it this 1 being normal time 10 being 10x accelerated time ? does weather need to match it too ?
"PracticeDateProgression" : 10,
"PracticeWeatherProgression" : 10,

Correct. Those are the lines. Weather doesn't "need" to match, but in order to maintain authenticity we do match it. We normally run real weather, but that is currently bugged (fix coming).

SimonJ
05-10-2017, 05:17
Correct. Those are the lines. Weather doesn't "need" to match, but in order to maintain authenticity we do match it. We normally run real weather, but that is currently bugged (fix coming).

Thanks and thanks again for sharing your config it working fine. learnt allot from you posts :)
Had a blast on Bathurst on it last night :)

MerlinC
05-10-2017, 05:51
The ports definitely seem to be your issue. I just ran the same netstat command on mine and am getting the expected ports (8766, 27015 and 27016).

At this point, I am not sure how much more I can help. It's looking like it is a Windows/Network config issue on oyur internal network. Definitely have a ogod look at your Windows system to make sure you don't have some 3rd party software running there that might interfere.

You could always map the ports differently in the Server.cfg file. Just make sure to update the firewall rules properly.


Have had a similar issue with my firewall configuration. I followed the following steps to identify the root cause:
- make sure port forwarding is set correctly in your router
- configure the firewalls thus they allow in- and outbound traffic on the specified ports

If you fail to connect to your DS follow the next steps:
- temporarily switch off all firewalls (router, windows, anti-virus) and start DS.
- by switching on the firewalls one after the other and restarting DS afterwards you should be able to identify which firewall configuration is wrong

In my case it was the Kaspersky firewall included in the anti virus program - there I will have to have a more detailed look.

P.S.: Do not leave firewalls permanently disabled

Rodders
05-10-2017, 10:41
I've not noticed the AI being added issue which many report and below are the burning issues for me.

• Players get stuck with the same car as the host
• Cannot switch between single car/ open class/multiclass on the fly

These 2 issues alone make the dedi server effectively useless for flexible play for my club which is key for day to day play.

The flags appear to be in there to do this but they don't work properly (FORCE_IDENTICAL_VEHICLES, FORCE_SAME_VEHICLE_CLASS, FORCE_MULTI_VEHICLE_CLASS).

I tried every combination I could think of with these and none of them work. In fact when I added FORCE_MULTI_VEHICLE_CLASS (with FORCE_IDENTICAL_VEHICLES not set) it had the exact opposite effect and even the host for the session could not change from the car specified by VehicleModelId. At best the host can select any car but then all other players get forced to it.

Having 24x7 dedi servers online is essential for Racing clubs. It's the hub we all know to meet at and where new players learn to find us. It's really hurting the social gathering aspect of the racing having to spin up p2p everytime we want to race.

Once we managed to get an open car selection for a single class working for one race using the API with servercontrols set to 1. But then the very next race it was back to broken. Managing nightly racing via the API on a race by race basis is not an acceptable option. Please just give us at least what we had in Pcars 1 where the in-game host could choose from race to race whether it was all cars, single class or single car.

F1_Racer68
05-10-2017, 10:53
I've not noticed the AI being added issue which many report and below are the burning issues for me.

• Players get stuck with the same car as the host
• Cannot switch between single car/ open class/multiclass on the fly

These 2 issues alone make the dedi server effectively useless for flexible play for my club which is key for day to day play.

The flags appear to be in there to do this but they don't work properly (FORCE_IDENTICAL_VEHICLES, FORCE_SAME_VEHICLE_CLASS, FORCE_MULTI_VEHICLE_CLASS).

I tried every combination I could think of with these and none of them work. In fact when I added FORCE_MULTI_VEHICLE_CLASS (with FORCE_IDENTICAL_VEHICLES not set) it had the exact opposite effect and even the host for the session could not change from the car specified by VehicleModelId. At best the host can select any car but then all other players get forced to it.

Having 24x7 dedi servers online is essential for Racing clubs. It's the hub we all know to meet at and where new players learn to find us. It's really hurting the social gathering aspect of the racing having to spin up p2p everytime we want to race.

Once we managed to get an open car selection for a single class working for one race using the API with servercontrols set to 1. But then the very next race it was back to broken. Managing nightly racing via the API on a race by race basis is not an acceptable option. Please just give us at least what we had in Pcars 1 where the in-game host could choose from race to race whether it was all cars, single class or single car.

Review my config above. We have multiclass working almost perfectly. We run LMP2, GTE and GT3.

I can confirm and agree that it is not possible to change classes on the fly. A bit annoying, but also not usually what a DS is used for.

Charger
05-10-2017, 12:07
The DS maybe is not used like that but what if you have 30 people in and finish a league race and want to switch to some fun racing in random cars, we could do it on PCars 1 without having to kick everyone out and restart the server.

It's more same class we are looking to do so we can say have a full GT3 class instead of the host picks a GT3 car and everyone has to drive it, as Rodders said sometimes it works once but then it's fixed cars after, bit odd?

surtic86
05-10-2017, 12:39
I have some Dedicated Server why i should not use my Free Server to play some Fun Races on it with always Diffrent Cars / Classes? In pCars 1 it was Possible and awesome to do this! Also it was Possible to change AI.

Best thing would be when you can change everything like on the Creation.

yons
05-10-2017, 13:24
Can anyone give some advice on why anyone can't joined my server?!?

I have a DS configure on my PC. I opened the ports on my router and on the firewall and I can connect to my DS and configurate it.

I can also open the web api with my external IP, but no one can see the server on the server list (I can see an join it) and also I cannot invite anyone in.

The fowarding that I'm doing is something like this

steamPort : 8766
hostPort : 27015
queryPort : 27016

Router:

TCP and UDP: Any local port -> Remote Port 8766
TCP and UDP: Any local port -> Remote Port 27015
TCP and UDP: Any local port -> Remote Port 27016

Firewal:

Inbound Rules:
TCP and UDP: Local Port: 8766 -> Any
TCP and UDP: Local Port: 27015 -> Any
TCP and UDP: Local Port: 27016 -> Any

OutBound Rules:
TCP and UDP: Local Port: Any -> Remote Port 8766
TCP and UDP: Local Port: Any -> Remote Port 27015
TCP and UDP: Local Port: Any -> Remote Port 27016

Any tips?

surtic86
05-10-2017, 13:42
I think you make a mistake with the Inbound and Outbound? And why you do this Any? Just to Port 8766 to Port 8766 and not to ANY.


Right now you can't invite or friends can't Join you over Steam Friends on a Dedicated Server.

F1_Racer68
05-10-2017, 15:41
Can anyone give some advice on why anyone can't joined my server?!?

I have a DS configure on my PC. I opened the ports on my router and on the firewall and I can connect to my DS and configurate it.

I can also open the web api with my external IP, but no one can see the server on the server list (I can see an join it) and also I cannot invite anyone in.

The fowarding that I'm doing is something like this

steamPort : 8766
hostPort : 27015
queryPort : 27016

Router:

TCP and UDP: Any local port -> Remote Port 8766
TCP and UDP: Any local port -> Remote Port 27015
TCP and UDP: Any local port -> Remote Port 27016

Firewal:

Inbound Rules:
TCP and UDP: Local Port: 8766 -> Any
TCP and UDP: Local Port: 27015 -> Any
TCP and UDP: Local Port: 27016 -> Any

OutBound Rules:
TCP and UDP: Local Port: Any -> Remote Port 8766
TCP and UDP: Local Port: Any -> Remote Port 27015
TCP and UDP: Local Port: Any -> Remote Port 27016

Any tips?

Are you saying that you CAN join it from the in game browser? If so, then check that "controlGameSetup : false" is set. If this is set to true, then ONLY the first person to join the server can join. No one else will be able to enter. This is a known and documented bug.

Joining via Steam Friends list, or via Invitation is unfortunately, also not working currently and has been pointed out as well. Hopefully we will get fixes in the upcoming patch (expecting it any day now).

As for the Firewall rules, they should look something like this:

Inbound Rules:
TCP and UDP: Any IP Address Port: 8766 -> Local IP Address, Port: 8766
TCP and UDP: Any IP Address Port: 27015 -> Local IP Address, Port: 27015
TCP and UDP: Any IP Address Port: 27016 -> Local IP Address, Port: 27016

OutBound Rules:
TCP and UDP: Local IP Address Port: 8766 -> Any IP Address, Port: 8766
TCP and UDP: Local IP Address Port: 27015 -> Any IP Address, Port: 27015
TCP and UDP: Local IP Address Port: 27016 -> Any IP Address, Port: 27016

Good luck

SimonJ
05-10-2017, 20:24
@ Rodders
try this change in F1's file works on mine use 3 not 0 or 1. only see GT3 LPM and GTE when selecting class from lobby
I do get Ai trying to get rid of them

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,

TOCA2FREAK
05-10-2017, 21:17
I would say give the DS a miss for now until SMS fix it's issues. We will be going round in circles otherwise trying to get around the bugs. Will be good to have a GUI for the DS too. :cool:

Marlborofranz
05-10-2017, 21:33
Ah damn... and I spent an entire day programming just to find this thread and all the bug reports that come with it.

Can definitely agree on a couple of issues:
- AI fills
- Weather doesn't work properly was setting up heavy clouds. For me it was sunny and for a friend it rained. While for me the track was absolutely dry, he was spinning a lot
- Damage is enabled, however my friend crashed 3 times in the "rain" and didn't suffer any damage
- The date I have set up for the race events is not correct. But it neither shows the current date. The month is two months off...

If I knew that I'd probably have waited a bit before renting a server. :P

Rolz
05-10-2017, 21:50
Going to follow this tread... I have a DS up and running but really want some clear info on some finer points of hosting.
Absolutely no idea on PCars but host a few AC servers (stracker/minorating), just want to expand my driving options :)

1 - Track/Car(s) cycle, possible? Also locked so users can't jump on and change.
2 - AI, have a few on but when real people jump on they will drop off when balance is always 5 drivers (for example) - admittedly a big ask, but coming from way back in the CounterStrike days with aim bot mod you could do this so I always hold out hope :)
3 - What is the use of admin console (webaddress:9000) when you can't actually do much in there...

SimonJ
05-10-2017, 22:06
Hi i have got no Ai working or seems that way tried a few times now all good :)
I used F1's server file config and played with the flags for ages lol :)
GTE,LMP,GT3 multiclass


"//" : "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 : "info"

// 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 : "VRC FUN 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 : "xxxxxxxxx"

// 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 : 24

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

// ports used to communicate with Steam and game, they must all be accessible on the public IP of the server.
steamPort : 8766
hostPort : 27015
queryPort : 27016

// 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

// (blacklist and whitelist is intentionally not included in this basic sample config as they can complicate things a bit.)


///////////////////////////
// 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 : true

// 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 : "127.0.0.1"

// Port where the local http server listens.
httpApiPort : 9000

// 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"

// And similar to hide the help and lists from public
// "api/help" : "private"
// "api/list*" : "private"

// As you can see from the example above, the paths should be written with no initial or trailing slashes.
}

// Filtering rules for the access levels.
// The default access levels are "public", "private" and "admin", but the httpAccessLevels above can define any additional levels.
// This map then tells the server who has access to which level. It's a map from level names to filtering rules.
//
// Filtering rules are then specified as a list of structures, processed in the order as written in the config.
// Each rule structure contains a type" and then type-specific fields. The supported types are:
// - "accept": Accept this request, no additional checks.
// - "reject": Reject this request, no additional checks.
// - "reject-password": Reject this request and let the client know that a password is required, no additional checks.
// - "ip-accept": Accept this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "ip-reject": Reject this request if it matches the "ip" mask in CIDR notation (for example, "192.168.1.0/24")
// - "user": Accept this request if it authenticates as given "user".
// - "group" : Accept this request if it authenticates as given "group".
//
// User/group authentication is done using the standard HTTP basic access authentication (https://en.wikipedia.org/wiki/Basic_access_authentication).
httpApiAccessFilters : {

// Public rules. The default is to accept everything.
"public" : [
{ "type" : "accept" }
],

// Private rules. The default is to accept queries from localhost, queries authenticated as users in the "private" group
// and to reject anything else.
"private" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "private" },
{ "type" : "reject-password" }
],

// Admin rules. The default is to accept queries from localhost, queries authenticated as users in the "admin" group
// and to reject anything else.
"admin" : [
{ "type" : "ip-accept", "ip" : "127.0.0.1/32" },
{ "type" : "group", "group" : "admin" },
{ "type" : "reject-password" }
],

}

// User list. Map from user names to passwords, in plain text.
httpApiUsers : {
// "stepan" : "foo",
// "michal" : "bar",
xxxxxxxx : xxxxxxxx,
}

// User groups. Map from group names to lists of users in said groups.
httpApiGroups : {
// "private" : [ "stepan", "michal" ],
// "admin" : [ "stepan" ],
"private" : [ xxxxx ],
"admin" : [ xxxxx ],
}

// Root directory where the static files for the web tool are located. Relative to current directory.
staticWebFiles: "web_files"


//////////////////////////
// LuaApi configuration //
//////////////////////////

// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.

// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.

// Master enable/disable toggle.
enableLuaApi : true

// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"

// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"

// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"

// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [

// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",

// Automatic race setup rotation.
//"sms_rotate",

// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
//"sms_motd",

// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]

// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [

"lib_rotate"
]

////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 24,
"MaxPlayers" : 24,


// Just 3 race laps.
"PracticeLength" :20,
"QualifyLength" : 20,
"RaceLength" : 30,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : 421004704,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 100,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 0,
"PitControl" : 1,
"ManualRollingStarts" : 0,
"RaceRollingStart" : 0,
"RaceFormationLap" : 0,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 921120824,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 10,
"PracticeDateDay" : 7,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 2,
"PracticeWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 10,
"QualifyDateDay" : 7,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 2,
"QualifyWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 10,
"RaceDateDay" : 7,
"RaceDateHour" : 14,
"RaceDateProgression" : 2,
"RaceWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}

Rolz
05-10-2017, 23:51
Hi Simon, thanks for this! :D

I got a copy of the flag calculator from a previous post but have SFA idea on how to use it properly to calculate... I really would like more info there, like with penalties how do I bring it down to 5seconds instead of 10sec default?

How did u choose "TireWearType" : 5, over the default 8? Where is this info?
Same as car and track ID's... why not supply it in the PDF doco with the install files? Really sorry if this is a dumb question... :topsy_turvy:

thanks again :)

Rolz
06-10-2017, 00:18
for example, when I get the server webcontrol up and I modify these settings, when I select save where can I see this file to set it manually for defaults.

*grumble* have to post more before I can share screenshots...

These options... then I realise its the flags... but the definition/understanding on my side is very poor.

AUTO START ENGINE - YES
FORCE INTERIOR VIEW - YES
FORCE DRIVING LINE OFF - YES
FORCE DEFAULT SETUPS - NO
ALLOW ANTI-LOCK BRAKING SYSTEM (ABS) - NO
ALLOW TRACTION CONTROL (TC) - NO
ALLOW STABILITY CONTROL (SC) - NO
COLLISIONS - YES
DAMAGE TYPE - FULL
MECHANICAL FAILURES - YES
PITSTOP ERRORS - NO
TYRE WEAR - YES
FUEL USAGE - YES
MANUAL PIT CONTROL - NO
MANUAL COOL-DOWN LAP - NO

F1_Racer68
06-10-2017, 00:26
@ Rodders
try this change in F1's file works on mine use 3 not 0 or 1. only see GT3 LPM and GTE when selecting class from lobby
I do get Ai trying to get rid of them

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,

Actually, you can set the "ServerControlsVehicleClass" : 1,

The following lines are what enable the Multiclass:

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,

You can have up to 4 classes.

F1_Racer68
06-10-2017, 00:28
for example, when I get the server webcontrol up and I modify these settings, when I select save where can I see this file to set it manually for defaults.

*grumble* have to post more before I can share screenshots...

These options... then I realise its the flags... but the definition/understanding on my side is very poor.

AUTO START ENGINE - YES
FORCE INTERIOR VIEW - YES
FORCE DRIVING LINE OFF - YES
FORCE DEFAULT SETUPS - NO
ALLOW ANTI-LOCK BRAKING SYSTEM (ABS) - NO
ALLOW TRACTION CONTROL (TC) - NO
ALLOW STABILITY CONTROL (SC) - NO
COLLISIONS - YES
DAMAGE TYPE - FULL
MECHANICAL FAILURES - YES
PITSTOP ERRORS - NO
TYRE WEAR - YES
FUEL USAGE - YES
MANUAL PIT CONTROL - NO
MANUAL COOL-DOWN LAP - NO

The HTTP interface doesn't save anythign to a file. I'm not sure where it stores it. All of the initial setup needs to be done via the server.cfg file. Depending on how oyu set that up, oyu can then owrk with the "sms_rotate" LUA script to build a track/car rotation, or simply adjust from within the lobby or via the HTTP interface.

Not all settings can be changed outside of the server.cfg file though. Some HAVE to be changed there, and then the server restarted to load the new config.

F1_Racer68
06-10-2017, 00:33
Hi Simon, thanks for this! :D

I got a copy of the flag calculator from a previous post but have SFA idea on how to use it properly to calculate... I really would like more info there, like with penalties how do I bring it down to 5seconds instead of 10sec default?

How did u choose "TireWearType" : 5, over the default 8? Where is this info?
Same as car and track ID's... why not supply it in the PDF doco with the install files? Really sorry if this is a dumb question... :topsy_turvy:

thanks again :)

These are all listed in the ENUMS section of the ServerTypes.PDF file (starting on page 23). This file as well as several others are located in the root of your DS folder.

Essentially, for tire wear, the higher the number, the slower the tire wear (8 = tire wear OFF, 5 = 2x tire wear, 0 = 7x tire wear).

Rodders
06-10-2017, 00:34
Review my config above. We have multiclass working almost perfectly. We run LMP2, GTE and GT3.

I can confirm and agree that it is not possible to change classes on the fly. A bit annoying, but also not usually what a DS is used for.

Cheers but it's not quite the way we want it working. I got an open single class working by commenting out the VehicleModelID however it only works for the first host that joins the server after a full server restart. As soon as that host leaves and someone else takes over it's locked back to one car, even if everyone leaves then re-joins.

Closer but not quite there yet.

F1_Racer68
06-10-2017, 00:37
Cheers but it's not quite the way we want it working. I got an open single class working by commenting out the VehicleModelID however it only works for the first host that joins the server after a full server restart. As soon as that host leaves and someone else takes over it's locked back to one car, even if everyone leaves then re-joins.

Closer but not quite there yet.

It's all related ot the "MultiClassSlots :" section which replaces the "VehicleClassID :" entry. That's what will allow the fixed multiple classes. I'm not entirely sure how to get it to do the "ANY" vehicle like the old server used to do. I have not been able to get that option to work yet.

Rolz
06-10-2017, 01:41
These are all listed in the ENUMS section of the ServerTypes.PDF file (starting on page 23). This file as well as several others are located in the root of your DS folder.

Fantastic!! Sometimes u look at a folder so many times u become blind! This has (so far) all the info I'm chasing!! :D
Thank you!!

Rolz
06-10-2017, 03:07
next question :rolleyes:

why if I have this set in server.cfg file

// Track Red Bull Ring GP
"TrackId" : -1933253531,

// Vehicle Class GT3
"VehicleClassId" : -112887377,

Does it still insist on loading up BrandsHatch Indy and Class Road A? (the defaults)

Rolz
06-10-2017, 03:45
Does it still insist on loading up BrandsHatch Indy and Class Road A? (the defaults)

Well I worked it out... don't have enableLuaApi enabled in cfg file :victorious:

SimonJ
06-10-2017, 04:21
i used this from a previous post for flags not tested bar popping in to see no ai :)

https://docs.google.com/spreadsheets/d/1dSst7oaWrwbzhZCRZnfBlfdM-ob2htHyvS4i0g3M-Qw/edit#gid=0

Rodders
06-10-2017, 08:19
It's all related ot the "MultiClassSlots :" section which replaces the "VehicleClassID :" entry. That's what will allow the fixed multiple classes. I'm not entirely sure how to get it to do the "ANY" vehicle like the old server used to do. I have not been able to get that option to work yet.

I'll definitely use the MultiClassSlots when we want specific multiple classes - your config looks spot on for that. However what I want is just to replicate what you can get if you run a p2p set to Same Class. This lets the host pick the class for a given race from any of the classes in the game. As I said it works for the first host that joins after a full server restart but as soon as they leave it returns to locking it to the one car that the host picks.

NinjaTrek2891
06-10-2017, 09:45
RaceDateProgression seems to have no impact? it stays at OFF when you look in game.


"RaceDateProgression" : 24,

Rodders
06-10-2017, 09:57
So have learned something about how the host of a dedi server affects that dedi server. When a player becomes host of a dedi server, it is taking the car selection type (for single car or open single class) from the last P2P multiplayer session that the host saved. I've not experimented with multi-class yet.

So if you want to become host of a dedi server and be able to select a class and have other players be able to select any car in that class, you have to go into setup a P2P session, set "Same Class" then save it and leave the P2P configuration screen (no need to actually start the MP session).

However initial testing shows that subsequent hosts, even when they do the above, can revert back to identical car after they make changes to the server config (when I tested the open class selection worked initially fine but when the new host changed the min driver and safety rating to join, it reverted back to single car only). This didn't happen for me but did for the other player. More testing required to get to the bottom of it but this is a step in the right direction as a workaround to allow running a dedi server with an open class car selection.

SimonJ
06-10-2017, 10:58
Actually, you can set the "ServerControlsVehicleClass" : 1,

The following lines are what enable the Multiclass:

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,

You can have up to 4 classes.

thanks we had few issues in lobby selecting cars see that in one post so tried it and all was good I'm kind of winging it and learning at same time :)
All credit for it should be for you as i just copied you server config and played with settings :)
will flip it back to 1 see if all still good :)

F1_Racer68
06-10-2017, 10:59
RaceDateProgression seems to have no impact? it stays at OFF when you look in game.


"RaceDateProgression" : 24,

There are specific multipliers that you need to use. 2, 5, 10, 12, etc. Up to 60. Make sure you are using a valid one.

SimonJ
06-10-2017, 11:27
There are specific multipliers that you need to use. 2, 5, 10, 12, etc. Up to 60. Make sure you are using a valid one.

thats good to know i changed to 2x from your 10x after i changed your 2.4hr race to length to 30 mins as it got dark in about 3 laps :)
looked cool though getting dark so quick solar eclipse look :)

Marc Wieneke
06-10-2017, 16:19
Actually, you can set the "ServerControlsVehicleClass" : 1,

The following lines are what enable the Multiclass:

// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
//"VehicleClassId" : 1740243009,
"MultiClassSlots" : 3,
"MultiClassSlot1" : -564539194,
"MultiClassSlot2" : 1740243009,
"MultiClassSlot3" : -112887377,

You can have up to 4 classes.

But as described in the ServerTypes.pdf it is only possible to have up to 3 MultiClassSlot entries.

int8 MultiClassSlots
Number of additional vehicle classes (up to 3), used when Multi-class is forced (session flag
FORCE_MULTI_VEHICLE_CLASS is set). If controlled from the server also set attribute
ServerControlsVehicleClass. Number between 1 and 3 to specify ids from predefined
templates in MultiClassSlotN. (ReadWrite)
So I think that the VehicleClassId would be the first entry and the MultiClassSlots are plus 3 so you have a total of 4 possible classes like they are available in offline and p2p races.

I believe that there is a bug while using VehicleClassId + MultiClassSlots which is possible to set but end up in a lobby where all people only may choose from the set VehicleClassId and not from the MultiClassSlots while they are displayed too.

I think I found a good configuration for the dedi server together with sms_rotate but beside the multiclass issue I have the problem that sometimes the weather of the host is different to the other players. This bug is the last thing which keeps me away from using the dedi server and starting to organize events. For now we will to some fun races instead.

F1_Racer68
06-10-2017, 17:10
But as described in the ServerTypes.pdf it is only possible to have up to 3 MultiClassSlot entries.

So I think that the VehicleClassId would be the first entry and the MultiClassSlots are plus 3 so you have a total of 4 possible classes like they are available in offline and p2p races.

I believe that there is a bug while using VehicleClassId + MultiClassSlots which is possible to set but end up in a lobby where all people only may choose from the set VehicleClassId and not from the MultiClassSlots while they are displayed too.


I think I found a good configuration for the dedi server together with sms_rotate but beside the multiclass issue I have the problem that sometimes the weather of the host is different to the other players. This bug is the last thing which keeps me away from using the dedi server and starting to organize events. For now we will to some fun races instead.

You're probably right, and I do read it that way as well. I do know however that before I commented out the "VehicleClassID" :, it wasn't working at all. I would only get that one class. So it may be yet another bug, or possibly just a configuration issue.

I'll experiment more with it next week after our league race.

NinjaTrek2891
06-10-2017, 22:21
So I got multiclass to work. But the first player to join keeps going to Formula Renault. Nowhere in my config is a Formula Renault to be found. It is possible to use VehicleClassId but that keeps the player within that one class. Which is not desirable.

Does anyone have a fix for this ?


"Flags" : "FORCE_MULTI_VEHICLE_CLASS",

"MultiClassSlots" : 3,
"MultiClassSlot1" : -1289517523,
"MultiClassSlot2" : -564539194,
"MultiClassSlot3" : 1740243009,

F1_Racer68
07-10-2017, 00:09
So I got multiclass to work. But the first player to join keeps going to Formula Renault. Nowhere in my config is a Formula Renault to be found. It is possible to use VehicleClassId but that keeps the player within that one class. Which is not desirable.

Does anyone have a fix for this ?


"Flags" : "FORCE_MULTI_VEHICLE_CLASS",

"MultiClassSlots" : 3,
"MultiClassSlot1" : -1289517523,
"MultiClassSlot2" : -564539194,
"MultiClassSlot3" : 1740243009,

Nope. Sadly that FR3.5 is one of the many bugs with the DS currently. It's only the "host" (first person to join) that is able to select it, so while annoying, not really a game breaker. Just have to hope the "host" is an honest individual.

NinjaTrek2891
07-10-2017, 07:33
Nope. Sadly that FR3.5 is one of the many bugs with the DS currently. It's only the "host" (first person to join) that is able to select it, so while annoying, not really a game breaker. Just have to hope the "host" is an honest individual.

I have to discard the saying that only the host can select it. Reading it earlier in this thread I was like. I can live with that. But during qualifying. A FR35 joined unfortunately. Guess for now. The best thing to do is lock up the class and discard multiclass till thats fixed.

I have tried many iterations i've read here.

Multiclass with VehicleclassiD but as soon the latter is inserted. You are locked in class and it ignores the FORCE_MULTI_CLASS flag. Only multiclass puts you in a FR35, no matter which class is selected.

It seems weather is always Clear. Instead of using the before set parameters. Game loads up as set weather. But as soon track is loaded, weather is clear.

B1rdy
07-10-2017, 12:59
Hi,

can anyone provide a config, where the server controls only the minimum of options and the player has full control over the rest? controlGameSetup : false and enableLuaApi : false results in the player can change almost anything but same cars are forced.:(

m00lean
07-10-2017, 14:19
Hi,

can anyone provide a config, where the server controls only the minimum of options and the player has full control over the rest? controlGameSetup : false and enableLuaApi : false results in the player can change almost anything but same cars are forced.:(

That's not possible. If you set controlGameSetup, the only thing you can change is the vehicle/class, given you didnt set the flags for forcing a specific vehicle/class.

Edit: ofc you can also change the track if you set the option to 0

Anthroban
07-10-2017, 16:37
Is there a flag I need to have enabled in Server.cfg to make sms_rotate_config.json control the track and car selection? I've set it up in /lua_config/ I even tried it in /lua/sms_rotate/ but nothing works. The server just ignores it and runs whatever is specified in server.cfg

MerlinC
07-10-2017, 20:14
Is there a flag I need to have enabled in Server.cfg to make sms_rotate_config.json control the track and car selection? I've set it up in /lua_config/ I even tried it in /lua/sms_rotate/ but nothing works. The server just ignores it and runs whatever is specified in server.cfg

Make sure that you enable the LuaAPI and the "sms_rotate" statement is not commented out.



//////////////////////////
// LuaApi configuration //
//////////////////////////


// Lua API allows the server to be extended by in-server scripting in Lua.
// The server is running Lua version 5.3, currently with no sandboxing applied to the add-ons. All standard Lua library functions are available.


// WARNING: The LuaApi is not final and the following breaking changes are planned soon:
// - Rename Lua addon metadata files from *.txt to *.json
// - Remove default config from the metadata and put it into separate file *_default_config.json
// - Separate config and persistent data, so that data saved by addons will not pollute the config files, and the config files will retain all comments from the default files.


// Master enable/disable toggle.
enableLuaApi : true


// Root directory from which the Lua addons are loaded. Relative to current directory if it's not absolute.
luaAddonRoot: "lua"


// Root directory where the addon configs will be stored if written out by addons. Default configs are defined in the addon base text files.
luaConfigRoot: "lua_config"


// Root directory where the addon output will be written, once supported. For now the io functions can write anywhere, but this will be limited to this directory in the future.
luaOutputRoot: "lua_output"


// Names of all Lua addons to load. The addons will be loaded in the specified order. Each addon can list other addons as its dependencies, which attempt to load those first.
// The server will load addons from directory specified in "luaAddonRoot", loading of each addon will start by loading its config from ADDON_NAME/ADDON_NAME.txt
luaApiAddons : [


// Core server bootup scripts and helper functions. This will be always loaded first even if not specified here because it's an implicit dependency of all addons.
"sms_base",


// Automatic race setup rotation.
"sms_rotate",


// Sends greetings messages to joining members, optionally with race setup info, optionally also whenever returning back to lobby post-race.
//"sms_motd",


// Tracks various stats on the server - server, session and player stats.
"sms_stats",
]


// Names of all lua libraries that are allowed to be used by any addons.
luaAllowedLibraries : [


"lib_rotate"
]

F1_Racer68
07-10-2017, 20:16
Also make sure that "sms_base" is not commented out. None of the lua scripts will work without it.

Anthroban
07-10-2017, 22:53
Thanks, I got it working now. :)

martymoose
07-10-2017, 22:54
Im looking i to running a DS, sorry I havent read the full thread but is there a way of setting the server and then giving admin rights to 1 or more people who could then change it up ingame. For everyone else it would be fixed and this way we could keep settings as we like but be able to change it in the lobby if we want to easily.

Visceral_Syn
08-10-2017, 00:34
Soo... we still have not sorted the multi-class settings in rotate lua yet?

B1rdy
08-10-2017, 05:54
That's not possible. If you set controlGameSetup, the only thing you can change is the vehicle/class, given you didnt set the flags for forcing a specific vehicle/class.

Edit: ofc you can also change the track if you set the option to 0What exactly is not possible? With the provided settings above, the first player can change anything as if he is in his own p2p lobby - intended -, but every further player can't choose cars, they get the same as the "host" - not intended. What is the way out?

F1_Racer68
08-10-2017, 06:15
Soo... we still have not sorted the multi-class settings in rotate lua yet?

Apparently not sorted via CFG file either. :(

I tested for the past week to make sure our server was running 100%. All week long everything worked flawlessly. COme race night, and not a damn thing worked.

I entered the server, and saw the correct multiclass selections. I selected my car/livery, everyone else entered the room, and they only had a single make choice, of whichever car I selected. I on the other hand had the entire garage available to me.

The kicker is that NOTHING had changed in my server.cfg file. I still have exactly the same settings that I tested ALL WEEK LONG!

Infuriating is to soft a word for how it felt. I had 31 drivers all frustrated and venting their frustration at me. What should hav ebeen an awesome evenign of racing started off on the VERY wrong foot and only wnet downhill. We finally decide to just run it as a P2P room. Well, that also resulted in it's own set of issues.

SMS, PLEASE get us that 2.0 patch ASAP. These server and online issues will kill the eSports and leagues faster than anything else will. I have already lost at least 1 driver due to the bugs.

Brado23
08-10-2017, 07:57
That's why I'm waiting for the patch to start my league, as I know there are way too many actual problems and potential problems to run a league and keep people happy atm. I gave up on it over a week ago and decided just to wait. Hopefully they address almost all of the dedicated server problems with the 2.0 patch, but only time will tell i guess.

Visceral_Syn
08-10-2017, 12:00
Apparently not sorted via CFG file either. :(

I tested for the past week to make sure our server was running 100%. All week long everything worked flawlessly. COme race night, and not a damn thing worked.

I entered the server, and saw the correct multiclass selections. I selected my car/livery, everyone else entered the room, and they only had a single make choice, of whichever car I selected. I on the other hand had the entire garage available to me.

The kicker is that NOTHING had changed in my server.cfg file. I still have exactly the same settings that I tested ALL WEEK LONG!

Infuriating is to soft a word for how it felt. I had 31 drivers all frustrated and venting their frustration at me. What should hav ebeen an awesome evenign of racing started off on the VERY wrong foot and only wnet downhill. We finally decide to just run it as a P2P room. Well, that also resulted in it's own set of issues.

SMS, PLEASE get us that 2.0 patch ASAP. These server and online issues will kill the eSports and leagues faster than anything else will. I have already lost at least 1 driver due to the bugs.

Strange, I commented out the class ID, and model ID, added the flag for multi-class, configured 3 classes. I then connect to the server to make the Formula 3.5 class go away. No AI in the server even. I went to 'try' to guess on getting multi-class in the rotation, after 45 mins of changing it, i gave up and commented rotation out. Fired up the server config, proceeded to practice a bit, a couple of guys joined, no one complained of single class locked. They all logged in, in different cars. I will attach the server config I'm using, minus hostname, ip address and admin username/pw.



logLevel : "info"
eventsLogSize : 10000
name : ""
secure : true
password : ""
maxPlayerCount : 20
bindIP : ""
steamPort : 8766
hostPort : 27015
queryPort : 27016
sleepWaiting : 50
sleepActive : 10
sportsPlay: false
enableHttpApi : true
httpApiLogLevel : "warning"
httpApiInterface : ""
httpApiPort : 9000
httpApiExtraHeaders : {
"" : "Access-Control-Allow-Origin: *"
}
httpApiAccessLevels : {
// "*" : "public"
// "" : "private"
// "status" : "private"
// "api/help" : "private"
// "api/list*" : "private"
}
httpApiAccessFilters : {
"public" : [
{ "type" : "accept" }
],
"private" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "private" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
"admin" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "admin" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
}
httpApiUsers : {
"" : "",
}
httpApiGroups : {
// "" : "",
"" : "",
}
staticWebFiles: "web_files"
enableLuaApi : true
luaAddonRoot : "lua"
luaConfigRoot : "lua_config"
luaOutputRoot : "lua_output"
luaApiAddons : [
"sms_base",
// "sms_rotate",
"sms_motd",
"sms_stats",
]
luaAllowedLibraries : [
"lib_rotate"
]
allowEmptyJoin : true
controlGameSetup : false
sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicleClass" : 1,
"ServerControlsVehicle" : 0,
"GridSize" : 20,
"MaxPlayers" : 20,

"PracticeLength" : 60,
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 7,
"PracticeDateDay" : 3,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 1,
"PracticeWeatherProgression" : 1,
"PracticeWeatherSlots" : 2,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : 296956818,

"QualifyLength" : 20,
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 7,
"QualifyDateDay" : 3,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 1,
"QualifyWeatherProgression" : 1,
"QualifyWeatherSlots" : 2,
"QualifyWeatherSlot1" : 296956818,
"QualifyWeatherSlot2" : 888299130,

"RaceLength" : 30,
"RaceDateYear" : 2017,
"RaceDateMonth" : 7,
"RaceDateDay" : 4,
"RaceDateHour" : 12,
"RaceWeatherSlots" : 2,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : 296956818,

"Flags" : -1600912360,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 5,
"PitControl" : 1,
"AllowedViews" : 0,
"ManualPitStops" : 1,
"MinimumOnlineRank" : 0,
"MinimumOnlineStrength" : 150,
"RaceRollingStart" : 0,
"TrackId" : -1612023328,
"MultiClassSlots" : 3,
"MultiClassSlot1" : 1740243009,
"MultiClassSlot2" : -112887377,
"MultiClassSlot3" : 1553262379,

// "VehicleClassId" : -112887377,
// "VehicleModelId" : -878083866,
}

SimonJ
08-10-2017, 13:03
Strange, I commented out the class ID, and model ID, added the flag for multi-class, configured 3 classes. I then connect to the server to make the Formula 3.5 class go away. No AI in the server even. I went to 'try' to guess on getting multi-class in the rotation, after 45 mins of changing it, i gave up and commented rotation out. Fired up the server config, proceeded to practice a bit, a couple of guys joined, no one complained of single class locked. They all logged in, in different cars. I will attach the server config I'm using, minus hostname, ip address and admin username/pw.



logLevel : "info"
eventsLogSize : 10000
name : ""
secure : true
password : ""
maxPlayerCount : 20
bindIP : ""
steamPort : 8766
hostPort : 27015
queryPort : 27016
sleepWaiting : 50
sleepActive : 10
sportsPlay: false
enableHttpApi : true
httpApiLogLevel : "warning"
httpApiInterface : ""
httpApiPort : 9000
httpApiExtraHeaders : {
"" : "Access-Control-Allow-Origin: *"
}
httpApiAccessLevels : {
// "*" : "public"
// "" : "private"
// "status" : "private"
// "api/help" : "private"
// "api/list*" : "private"
}
httpApiAccessFilters : {
"public" : [
{ "type" : "accept" }
],
"private" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "private" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
"admin" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "admin" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
}
httpApiUsers : {
"" : "",
}
httpApiGroups : {
// "" : "",
"" : "",
}
staticWebFiles: "web_files"
enableLuaApi : true
luaAddonRoot : "lua"
luaConfigRoot : "lua_config"
luaOutputRoot : "lua_output"
luaApiAddons : [
"sms_base",
// "sms_rotate",
"sms_motd",
"sms_stats",
]
luaAllowedLibraries : [
"lib_rotate"
]
allowEmptyJoin : true
controlGameSetup : false
sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicleClass" : 1,
"ServerControlsVehicle" : 0,
"GridSize" : 20,
"MaxPlayers" : 20,

"PracticeLength" : 60,
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 7,
"PracticeDateDay" : 3,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 1,
"PracticeWeatherProgression" : 1,
"PracticeWeatherSlots" : 2,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : 296956818,

"QualifyLength" : 20,
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 7,
"QualifyDateDay" : 3,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 1,
"QualifyWeatherProgression" : 1,
"QualifyWeatherSlots" : 2,
"QualifyWeatherSlot1" : 296956818,
"QualifyWeatherSlot2" : 888299130,

"RaceLength" : 30,
"RaceDateYear" : 2017,
"RaceDateMonth" : 7,
"RaceDateDay" : 4,
"RaceDateHour" : 12,
"RaceWeatherSlots" : 2,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : 296956818,

"Flags" : -1600912360,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 5,
"PitControl" : 1,
"AllowedViews" : 0,
"ManualPitStops" : 1,
"MinimumOnlineRank" : 0,
"MinimumOnlineStrength" : 150,
"RaceRollingStart" : 0,
"TrackId" : -1612023328,
"MultiClassSlots" : 3,
"MultiClassSlot1" : 1740243009,
"MultiClassSlot2" : -112887377,
"MultiClassSlot3" : 1553262379,

// "VehicleClassId" : -112887377,
// "VehicleModelId" : -878083866,
}


Just used all of this config no Ai so far :)
Will stick with this see how it goes
I like the way it is laid out too I started coping the settings to mine.
But in end used exact file with my settings put into that bit more simplified :)

Thanks for posting :)

F1_Racer68
08-10-2017, 17:01
Strange, I commented out the class ID, and model ID, added the flag for multi-class, configured 3 classes. I then connect to the server to make the Formula 3.5 class go away. No AI in the server even. I went to 'try' to guess on getting multi-class in the rotation, after 45 mins of changing it, i gave up and commented rotation out. Fired up the server config, proceeded to practice a bit, a couple of guys joined, no one complained of single class locked. They all logged in, in different cars. I will attach the server config I'm using, minus hostname, ip address and admin username/pw.



logLevel : "info"
eventsLogSize : 10000
name : ""
secure : true
password : ""
maxPlayerCount : 20
bindIP : ""
steamPort : 8766
hostPort : 27015
queryPort : 27016
sleepWaiting : 50
sleepActive : 10
sportsPlay: false
enableHttpApi : true
httpApiLogLevel : "warning"
httpApiInterface : ""
httpApiPort : 9000
httpApiExtraHeaders : {
"" : "Access-Control-Allow-Origin: *"
}
httpApiAccessLevels : {
// "*" : "public"
// "" : "private"
// "status" : "private"
// "api/help" : "private"
// "api/list*" : "private"
}
httpApiAccessFilters : {
"public" : [
{ "type" : "accept" }
],
"private" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "private" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
"admin" : [
// { "type" : "ip-accept", "ip" : "10.10.10.100/32" },
// { "type" : "group", "group" : "admin" },
// { "type" : "reject-password" }
{ "type" : "accept" }
],
}
httpApiUsers : {
"" : "",
}
httpApiGroups : {
// "" : "",
"" : "",
}
staticWebFiles: "web_files"
enableLuaApi : true
luaAddonRoot : "lua"
luaConfigRoot : "lua_config"
luaOutputRoot : "lua_output"
luaApiAddons : [
"sms_base",
// "sms_rotate",
"sms_motd",
"sms_stats",
]
luaAllowedLibraries : [
"lib_rotate"
]
allowEmptyJoin : true
controlGameSetup : false
sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicleClass" : 1,
"ServerControlsVehicle" : 0,
"GridSize" : 20,
"MaxPlayers" : 20,

"PracticeLength" : 60,
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 7,
"PracticeDateDay" : 3,
"PracticeDateHour" : 12,
"PracticeDateProgression" : 1,
"PracticeWeatherProgression" : 1,
"PracticeWeatherSlots" : 2,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : 296956818,

"QualifyLength" : 20,
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 7,
"QualifyDateDay" : 3,
"QualifyDateHour" : 13,
"QualifyDateProgression" : 1,
"QualifyWeatherProgression" : 1,
"QualifyWeatherSlots" : 2,
"QualifyWeatherSlot1" : 296956818,
"QualifyWeatherSlot2" : 888299130,

"RaceLength" : 30,
"RaceDateYear" : 2017,
"RaceDateMonth" : 7,
"RaceDateDay" : 4,
"RaceDateHour" : 12,
"RaceWeatherSlots" : 2,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : 296956818,

"Flags" : -1600912360,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 5,
"PitControl" : 1,
"AllowedViews" : 0,
"ManualPitStops" : 1,
"MinimumOnlineRank" : 0,
"MinimumOnlineStrength" : 150,
"RaceRollingStart" : 0,
"TrackId" : -1612023328,
"MultiClassSlots" : 3,
"MultiClassSlot1" : 1740243009,
"MultiClassSlot2" : -112887377,
"MultiClassSlot3" : 1553262379,

// "VehicleClassId" : -112887377,
// "VehicleModelId" : -878083866,
}


It's pretty much the same as my config.

As I said.... Worked fine for a full week. We ran multiple test/practice events on it throughout the week. 0 changes to config. Come race night and..... BAM!!! Nothing worked anymore.

Visceral_Syn
08-10-2017, 17:59
Keep the hope alive for a patch soon!

SimonJ
09-10-2017, 06:34
Keep the hope alive for a patch soon!

I still get no Ai so promising not tested with friends yet. but Ai was annoying had 15 of them no matter what i tried.
Had none so far in 2 days so happy :)
patch cant be to far away i hope :)

M. -VIPER- Morgan
09-10-2017, 07:48
I didn't test since the last DS update, but can you please test the following, which works for me in the past:

Add start parameter to your game via Steam Game Start Parameter:

-searchds "NameDS"
"nameDS" must be the same like in the server.cfg the name variable, for example name : "NameDS"

In the server.cfg:


name : "NameDS"
enableLuaApi : false
controlGameSetup : false
allowEmptyJoin : false


Then start the game and don't use Browse for your online session, instead use Create.
If you set a password in the server.cfg then you have to set it in the Create screen under host settings, too.
After that set all you want, "Fill with AI" for example. Important for having AI, the number of Human Player must be lower than the Grid Size. Default both values are equal and then all slots are reserved for Human Players, "Fill with AI" will not help in this case. Btw it is the same logic for server.cfg, MaxPlayers must be lower than GridSize, the difference between these both will be filled with AI if the "Fill with AI" flag is set.
Then start the session, now this session should be created on your DS, you can see it if your DS output show that a Steam user is connecting.

As I know this way is the only one at the moment if you want a multiclass race.

Further infos:
IMO if you have enableLuaApi true in the server.cfg then all variables in the sessionAttributes block of your server.cfg are ignored, because then the Lua config is active and this config is in other files. I don't know exactly if it works if you have enableLuaApi on true and then comment out "sms_rotate", never tested it this way.
@Visceral_Syn:

controlGameSetup : false
"ServerControlsVehicleClass" : 1,
// "VehicleClassId" : -112887377,

This makes no sense, because the first line says that the game controls the setup, not the DS. ServerControlsVehicleClass and VehicleClassId are then ignored.
Further if controlGameSetup would be on true the second line says that the DS controls the Vehicle Class, but then the variable for the ClassID is commented out.

SimonJ
09-10-2017, 08:22
I didn't test since the last DS update, but can you please test the following, which works for me in the past:

Add start parameter to your game via Steam Game Start Parameter:

"nameDS" must be the same like in the server.cfg the name variable, for example name : "NameDS"

In the server.cfg:


Then start the game and don't use Browse for your online session, instead use Create.
If you set a password in the server.cfg then you have to set it in the Create screen under host settings, too.
After that set all you want, "Fill with AI" for example. Important for having AI, the number of Human Player must be lower than the Grid Size. Default both values are equal and then all slots are reserved for Human Players, "Fill with AI" will not help in this case. Btw it is the same logic for server.cfg, MaxPlayers must be lower than GridSize, the difference between these both will be filled with AI if the "Fill with AI" flag is set.
Then start the session, now this session should be created on your DS, you can see it if your DS output show that a Steam user is connecting.

As I know this way is the only one at the moment if you want a multiclass race.

Further infos:
IMO if you have enableLuaApi true in the server.cfg then all variables in the sessionAttributes block of your server.cfg are ignored, because then the Lua config is active and this config is in other files. I don't know exactly if it works if you have enableLuaApi on true and then comment out "sms_rotate", never tested it this way.
@Visceral_Syn:

This makes no sense, because the first line says that the game controls the setup, not the DS. ServerControlsVehicleClass and VehicleClassId are then ignored.
Further if controlGameSetup would be on true the second line says that the DS controls the Vehicle Class, but then the variable for the ClassID is commented out.

I have used that works fine creating and setting up session on my server from my main rig PC.

On a dedi setup
I have rotate disabled and just using the stats part on lua config works fine :)
"sms_base",
// "sms_rotate",
"sms_motd",
"sms_stats",

Visceral_Syn
09-10-2017, 11:41
I didn't test since the last DS update, but can you please test the following, which works for me in the past:

Add start parameter to your game via Steam Game Start Parameter:

"nameDS" must be the same like in the server.cfg the name variable, for example name : "NameDS"

In the server.cfg:


Then start the game and don't use Browse for your online session, instead use Create.
If you set a password in the server.cfg then you have to set it in the Create screen under host settings, too.
After that set all you want, "Fill with AI" for example. Important for having AI, the number of Human Player must be lower than the Grid Size. Default both values are equal and then all slots are reserved for Human Players, "Fill with AI" will not help in this case. Btw it is the same logic for server.cfg, MaxPlayers must be lower than GridSize, the difference between these both will be filled with AI if the "Fill with AI" flag is set.
Then start the session, now this session should be created on your DS, you can see it if your DS output show that a Steam user is connecting.

As I know this way is the only one at the moment if you want a multiclass race.

Further infos:
IMO if you have enableLuaApi true in the server.cfg then all variables in the sessionAttributes block of your server.cfg are ignored, because then the Lua config is active and this config is in other files. I don't know exactly if it works if you have enableLuaApi on true and then comment out "sms_rotate", never tested it this way.
@Visceral_Syn:

This makes no sense, because the first line says that the game controls the setup, not the DS. ServerControlsVehicleClass and VehicleClassId are then ignored.
Further if controlGameSetup would be on true the second line says that the DS controls the Vehicle Class, but then the variable for the ClassID is commented out.

The searchDS feature worked fine on pCars, I don't want to have to configure a session every time. Especially when, the rotate script can rotate an entire season, down to the dates. But, its currently pooping itself about a a global server setting. The controlGameSetup=false, and ServerControlVehicleClass=1 works, in the flags Force_Multi_Class_Vehicles is enabled, go log into "Beale St. vs 18th & Vine St." server, and pick a GTE, or GT3, or GT4 classed car. Logic isn't always applied, sometime thangs just work a way, until a patch is released that makes relearning how to setup a server fun <- sarcasm...

M. -VIPER- Morgan
09-10-2017, 12:33
The searchDS feature worked fine on pCars, I don't want to have to configure a session every time. Especially when, the rotate script can rotate an entire season, down to the dates. But, its currently pooping itself about a a global server setting. The controlGameSetup=false, and ServerControlVehicleClass=1 works, in the flags Force_Multi_Class_Vehicles is enabled, go log into "Beale St. vs 18th & Vine St." server, and pick a GTE, or GT3, or GT4 classed car. Logic isn't always applied, sometime thangs just work a way, until a patch is released that makes relearning how to setup a server fun <- sarcasm...

I don't know if the Lua rotation feature in combination with multiclass will ever work. I only know that the "Online Championship" is still planned for a patch.
The current state shows that most things work if the control logic for Multiplayer is in game and you start a session via searchDS parameter and Create screen. I hope it will also work for the Online Championship in future and will solve your problems.

Visceral_Syn
09-10-2017, 13:47
I will hope they will resolve the rotation lua script too, so that the dedicated server can be pre-configured, and forgotten about until the end of a season.

diknmuis
10-10-2017, 21:21
I have a server that can be controlled by the first player who joins

works fine to change vehicle/track etc but when choosing a car class everyone needs to pick the same car as the host

Is there any way to change that in de server config? I've been searching in the topic here but didn't find an answer


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false

// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 0,

// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 3,

// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,
these are my settings, I'm really a nood in those things
thx in advance

F1_Racer68
10-10-2017, 22:21
Myself and a few others have posted some config files a few pages back that work MOST of the time. I say most of the time because mine worked fine for a full week but then decided to work like yours on race day.

Edit: On phone so hard to provide links to posts. Search back about 2 or 3 pages though.

F1_Racer68
11-10-2017, 01:51
OK, going to try this again.

As of tonight, the revised server.cfg file is giving me EXACTLY what I want for our next race in 2 weeks time. Let's see how well it holds up as we test it out over the next 2 weeks. The only thing we will be changing between now and then is the session durations. For practices we are keeping it to 30/30/30 for P/Q/R. Race night the sessions will be 45/45/90 as shown in the config below.

The server is set for Long Beach, April 8th, 2017 (real IMSA race date), and we are running LMP2, GTE, & GT3 Multiclass.



////////////////////////////////
// Game setup control options //
////////////////////////////////


// Set to true to make this server show up in the browser even if it's empty.
allowEmptyJoin : true


// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// Set to true to enable API that allows the server to control the game's setup. The host will not be able to control the setup if this is set.
// This must be set to "true" for the following attributes to work: ServerControlsTrack, ServerControlsVehicleClass, ServerControlsVehicle
controlGameSetup : false


// Initial attribute values, see /api/list/attributes/session for the full list.
// These attributes will be used when joining an empty server via the borwser (if allowEmptyJoin is true) and as the intial attributes for the set_attributes and set_next_attributes APIs (if controlGameSetup is true)
// The defaults set these values:
sessionAttributes : {
// The host player can control track selection if set to 0. Set to 1 to disable track selection in the game.
"ServerControlsTrack" : 1,


// The host player can change the vehicle class by going through the garage if set to 0. Set to 1 to disallow players changing the class.
// Flag FORCE_SAME_VEHICLE_CLASS (1024) should be also set for this to make sense, otherwise players are able to choose cars from any class.
"ServerControlsVehicleClass" : 1,
"MultiClassSlots" : 3,


// Players can change their vehicle if set to 0. Set to 1 to disallow players changing the vehicle.
// Flag FORCE_IDENTICAL_VEHICLES (2) should be also set for this to make sense.
"ServerControlsVehicle" : 0,


// Grid size up to 32, all reserved to players, so no AI.
// Note that 32-bit clients will not be able to join the game if this is larger than 16.
"GridSize" : 32,
"MaxPlayers" : 32,


// Just 3 race laps.
"PracticeLength" : 45,
"QualifyLength" : 45,
"RaceLength" : 90,


// Race flags - bitfield consisting of many flags, the default is set like this:
// ALLOW_CUSTOM_VEHICLE_SETUP (8) + ABS_ALLOWED (32) + SC_ALLOWED (64) + TCS_ALLOWED (128) + "
// FORCE_SAME_VEHICLE_CLASS (512) + FILL_SESSION_WITH_AI (131072) + AUTO_START_ENGINE (524288) = 656106"
// See /api/list/flags/session in HTTP API, or globals "lists.flags.session" or "SessionFlags" in Lua API for the full list.
"Flags" : -1612970984,


// AI opponent difficulty, from 0 to 100. Applies only on loading if GridSize is larger than MaxPlayers, and the FILL_SESSION_WITH_AI flag is enabled.
"OpponentDifficulty" : 50,


// Visual only damage
"DamageType" : 3,


// No tire wear.
"TireWearType" : 5,


// Fuel usage off.
"FuelUsageType" : 0,


// Penalties on.
"PenaltiesType" : 1,
"PitWhiteLinePenalty" : 1,
"DriveThroughPenalty" : 1,
"AllowablePenaltyTime" : 0,
"PitControl" : 1,
"ManualRollingStarts" : 0,
"RaceRollingStart" : 0,
"RaceFormationLap" : 0,
"MinimumOnlineRank" : 1,
"MinimumOnlineStrength" : 100,


// Any camera view allowed.
"AllowedViews" : 0,


// Track Autodromo Nazionale Monza GP. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
"TrackId" : 1731699995,


// Vehicle class Road A. See /api/list/vehicle_classes/ in HTTP API or globals "lists.vehicle_classes", "id_to_vehicle_class" or "name_to_vehicle_class" in Lua API.
"VehicleClassId" : -564539194,
"MultiClassSlot1" : 1740243009,
"MultiClassSlot2" : -112887377,
//"MultiClassSlot3" : -112887377,


// Vehicle McLaren 720S (but not forced by default flags). See /api/list/vehicles/ in HTTP API or globals "lists.vehicles", "id_to_vehicle" or "name_to_vehicle" in Lua API.
"VehicleModelId" : 1106819298,

// Starting date and time.
"PracticeDateYear" : 2017,
"PracticeDateMonth" : 4,
"PracticeDateDay" : 8,
"PracticeDateHour" : 14,
"PracticeDateProgression" : 1,
"PracticeWeatherProgression" : 1,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"PracticeWeatherSlots" : 1,
"PracticeWeatherSlot1" : -934211870,
"PracticeWeatherSlot2" : -934211870,
"PracticeWeatherSlot3" : -934211870,
"PracticeWeatherSlot4" : -934211870,


// Starting date and time.
"QualifyDateYear" : 2017,
"QualifyDateMonth" : 4,
"QualifyDateDay" : 8,
"QualifyDateHour" : 15,
"QualifyDateProgression" : 1,
"QualifyWeatherProgression" : 1,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"QualifyWeatherSlots" : 1,
"QualifyWeatherSlot1" : -934211870,
"QualifyWeatherSlot2" : -934211870,
"QualifyWeatherSlot3" : -934211870,
"QualifyWeatherSlot4" : -934211870,

// Starting date and time.
"RaceDateYear" : 2017,
"RaceDateMonth" : 4,
"RaceDateDay" : 8,
"RaceDateHour" : 16,
"RaceDateProgression" : 2,
"RaceWeatherProgression" : 2,


// Single weather slot set to "Weather_Clear1". See /api/list/enums/weather in HTTP API or globals "lists.enums.weather" or "Weather" in Lua API.
"RaceWeatherSlots" : 1,
"RaceWeatherSlot1" : -934211870,
"RaceWeatherSlot2" : -934211870,
"RaceWeatherSlot3" : -934211870,
"RaceWeatherSlot4" : -934211870,
}


As I said, so far everything is working as expected. Let's see how well it holds up.

Visceral_Syn
11-10-2017, 11:14
Good Luck F1 Racer68 !!!

Rodders
11-10-2017, 11:46
I have a server that can be controlled by the first player who joins

works fine to change vehicle/track etc but when choosing a car class everyone needs to pick the same car as the host

Is there any way to change that in de server config? I've been searching in the topic here but didn't find an answer


these are my settings, I'm really a nood in those things
thx in advance

Hi,

Currently the dedi server will take the car selection settings from whatever that setting is for the person who becomes the host. The way to control this is that whomever is going to become host, should go into configure a p2p session and set the car selection type (Identical, Same Class, MUltiClass) then save and exit the p2p setup. Then join the dedi as the first user and it will retain your settings so long as you remain the host. If that host leaves and it drops to another player, it will again just take whatever that users last saved car selection option was.

There may well be specific server.cfg settings needing set to also allow this method to work but this is how we currently workaround this problem.

I really hope they add in the ability for the host to change car selection types while hosting the lobby, just as we had in PCars 1. So many classes are so hugely unbalanced you need to be able to force a single car to get a decent race.

M4MKey
11-10-2017, 12:10
This seems very confusing. So this is still working like PC1 ? I mean, what's the point of having a dedicated server if the first person to join it with the game client becomes the "host". That makes no sense to me :(

F1_Racer68
11-10-2017, 12:53
Well, there is a BIG update today which includes a 2.3MB DS update. By DS standards, that is HUGE! Practically a whole new DS :) Let's see what this has done for us shall we?

Marlborofranz
11-10-2017, 13:01
Well, there is a BIG update today which includes a 2.3MB DS update. By DS standards, that is HUGE! Practically a whole new DS :) Let's see what this has done for us shall we?

Curious, too! Already updated my ds. Will then implement some random weather to check if the rian bug in MP has been fixed and whether each and every session still has clear weather and AI problems...

But plus 2,5 mb sounds like a lot of changed code... Pretty confident something has changed...

Rodders
11-10-2017, 13:12
Curious, too! Already updated my ds. Will then implement some random weather to check if the rian bug in MP has been fixed and whether each and every session still has clear weather and AI problems...

But plus 2,5 mb sounds like a lot of changed code... Pretty confident something has changed...

That 2.5Mb is just the DedicatedServer.exe so far as I can see, which has increased in size by 1byte. Doesn't seem like much will have changed and as per the patch notes, might just be a compatibility issue change with no improvements or feature changes.

Marlborofranz
11-10-2017, 13:20
Meeeh...

This is annoying because every day where the DS is not working properly, I might as well burn my money.

F1_Racer68
11-10-2017, 13:48
Still no way to invite anyone into the DS lobby. In game Invite button doesn't work yet, and the Steam Friends list invite tells recipient they are unable to join the session.

So far it seems the only thing that has been fixed is the display of "Tire Wear" in the Realism settings. It now properly shows "Accellerated" instead of "_No_".

Marlborofranz
11-10-2017, 13:55
Still no way to invite anyone into the DS lobby. In game Invite button doesn't work yet, and the Steam Frineds list invite tells recipient they are unable to join the session.

Yes, got the same problem. Friends can just join when searching the ds in the server browser manually. I hope they at least fixed random weather and the rain issue on multiplayer so at least private lobbys can be uses until this is fixed. Bit disappointed tbh.

Rodders
11-10-2017, 14:25
I hate to say it but the MP dedi seems like an afterthought. So far as I can tell it's virtually identical to the PCars 2 dedi with some new parameters added and didn't get much love or attention.

Minolin
11-10-2017, 14:52
Nothing changed for me. Dependend on what config I use I either have AI or I can't join. That's it, thanks for the time.

diknmuis
11-10-2017, 15:42
Hi,

Currently the dedi server will take the car selection settings from whatever that setting is for the person who becomes the host. The way to control this is that whomever is going to become host, should go into configure a p2p session and set the car selection type (Identical, Same Class, MUltiClass) then save and exit the p2p setup. Then join the dedi as the first user and it will retain your settings so long as you remain the host. If that host leaves and it drops to another player, it will again just take whatever that users last saved car selection option was.

There may well be specific server.cfg settings needing set to also allow this method to work but this is how we currently workaround this problem.

I really hope they add in the ability for the host to change car selection types while hosting the lobby, just as we had in PCars 1. So many classes are so hugely unbalanced you need to be able to force a single car to get a decent race.

hey,
thanks for the answer, done some testing and it works most of the time, when you join as none host you also need the 'same class' setting in p2p
looks like the new patch messed up even more
p2p settings also changing to settings by the dedi host...

some simple things are possible as p2p but not as dedi :confused:

did some testing with 'controlGameSetup : true' and the admin panel and it's even a bigger mess

Celebdactyl
11-10-2017, 15:49
So, do I see it right: It is the ServerControlsSetup vasriable that is broken? With it on true, AI randomly joins and weather doesn't work at all, while it set on false just loads the realism options of the first joiner and lets him fiddle the settings around?

Marlborofranz
11-10-2017, 16:28
So, do I see it right: It is the ServerControlsSetup vasriable that is broken? With it on true, AI randomly joins and weather doesn't work at all, while it set on false just loads the realism options of the first joiner and lets him fiddle the settings around?

Exactly. This is what is annoying the hell out of me. A friend and I were renting a 32 slot dedicated server to open it for the puplic. However the problem you described is exactly the pitfall. My plan was to provide around 30-40 different sessions on various maps with various classes for every skill as long people drive safe.

Now making the first joiner the host is a problem because while I want people having fun on the server, I don't want them to drive 10 laps of Kart1 on the Nordschleife with a blizzard coming up in mid July with 28° track temperature. Password protection is of course no option because I want people to race with us on a stable server where you can also ban griefers.

And if I set a fixed series of races with random weather and various classes so you have a bit of variety, then the weather is bugged. But not just the weather... manual pit stops don't work either. The date when the events start is messed up as well. The weather is always sunny for me, even when I set it up to be medium cloudy. And my friend has rain in every single session, needs to use wet tires, while I set it up to just be clouds. Funny thing is that when I am on the server at the same time, for me it's dry with perfect grip and I can see his windscreen wipers and him sliding like on ice...

Of course we want that server to be rated and sooner or later to maybe limit it to higher safety classes so people can have fun AND safe races. But then you randomly have the AI in the race that wrecks you...

And of course not to mention the random disconnects. I was having a fun race with 8 people on the server on Sakitto, of course rated. I was first and then I noticed that at the same time 3 people "lost connection". In the same second... 2 laps later I and 2 other people lost connection at exactly the same time, too. So they lost skill points for no reason. So I can also forget about my server being some kind of safe ranked server...

And whilst I love PCars 2 and already spent over 60 hours in it, I am terribly annoyed by the fact that dedicated servers are still not fixed whereas this is cruicial if want to be a serious sim with serious licensing systems and ratings... You can't just rely on a P2P lobby for nicer events...

I just don't understand how the dedicated server was so abandoned? And how the hell did it come through Beta at all? Everyone who wants safe racing of course sticks with a dedicated server that has rating on it because there you can drive safe, you meet the people, you can race with people regularly, you get to know who is safe and who not... And of course you (should) have a stable server with a stable connection that allows you to run events without the fear of loosing connection every second.

If I knew this, I never would have rent a server to set up a nice racing place open for the community. Not understandable how a game with such amazing and complex features can release such a dedicated server.

Edit: I wrote that I expected more from a 2.0 patch, but I actually have no idea how the heck I came to the idea that this was a major update. Removed the respective section in my post.

Celebdactyl
11-10-2017, 17:26
I can see it being frustrating. It is work-aroundable for my league server, but yeah, not a satifying solution.

NinjaTrek2891
11-10-2017, 18:48
Nothing of our known bugs got fixed. They even stopped looking into these threads. Unfortunately DS is a big pile of scrap atm and we'll have to deal with P2P.

Brado23
11-10-2017, 21:20
EDIT: Not important

m00lean
11-10-2017, 21:35
I guess that other issues have a higher priority than the dedicated server. And I agree. The other issues (which are partly fixed in 2.0) are affecting thousands of thousands of people whereas the dedicated server is only important for a few (hundred) users. I'm sure the mods/devs are aware of our problems. Remember that the game is only out 3 weeks now.
I am one of the users who hosts servers and writes scripts for them; but still I'm asking you to keep patient. Launching a game isnt an easy task and fixing all the bugs you werent aware of before under the pressure of thousands of users is nerve wrecking! Keep the reports coming as detailed as possible and give them some time. If our issues still arent fixed in 1 month or 2, we can grab the torches...

F1_Racer68
11-10-2017, 22:05
I guess that other issues have a higher priority than the dedicated server. And I agree. The other issues (which are partly fixed in 2.0) are affecting thousands of thousands of people whereas the dedicated server is only important for a few (hundred) users. I'm sure the mods/devs are aware of our problems. Remember that the game is only out 3 weeks now.
I am one of the users who hosts servers and writes scripts for them; but still I'm asking you to keep patient. Launching a game isnt an easy task and fixing all the bugs you werent aware of before under the pressure of thousands of users is nerve wrecking! Keep the reports coming as detailed as possible and give them some time. If our issues still arent fixed in 1 month or 2, we can grab the torches...

Well said.

It sucks to have to find work arounds or put plans on hild, but the reality is that bugs that affect thenDS are affecting a small percentagenof the player base.

Issues that exist across all platforms will (and should) get priority as they affect the vast majority of players.

Marlborofranz
12-10-2017, 05:28
Well said.

It sucks to have to find work arounds or put plans on hild, but the reality is that bugs that affect thenDS are affecting a small percentagenof the player base.

Issues that exist across all platforms will (and should) get priority as they affect the vast majority of players.

I agree, I'm working as software developer and develop measurement machines, there is no software or program that is released without issues. I'm just annoyed because I dont have a community website or something similar where I get money from ads I can spend on a dedicated server. I'm using my own one, expected things to work. =/

Anyway... We gonna have to wait. But the DS is cancelled at the moment. Not going to pay 17€ each month unless the dedicated server is worth being called a dedicated server.

Rolz
12-10-2017, 05:35
thankfully mine runs my AC servers... but I did want to load up a few PC2 servers up... being early days it still involves lots of elbow grease to get it going, but I anticipate there will be some enterprising person who will write a nice app that will create all the json files for us...

Vitor Costa
13-10-2017, 23:26
You guys don`t know how lucky you are. Until now I can`t see our ds in lobby and I`m in this by days. Not even once... It´s launched, it`s visible in this page http://cars2-stats-steam.wmdportal.com/index.php/servers but no way in the lobby.

I think it`s conected to the fact that I only see about 50 servers/rooms in the lobby and about 18 DS when there are more then one hungred up junt in DS. How can this be possible?

satco1066
14-10-2017, 00:08
I'm not sure , but there could be also a problem with your provider.
I have on DSL connection with fixed iP and another LTE router from another provider.
On the DSL with fixed, true iP4 everything works, on the LTE Router i'm not visible from outside.
All ports are configured the same by hand in both router settings.
Maybe the LTE provider gives me no true iP4 adress, just some IP6 -> IP4-lite conversion where people from outside have no connect to providers internal IP4 adresses.

If that problem is vacant, you should also not be able to setup any other steam server and be reached from the net.

RomKnight
14-10-2017, 00:25
I don't think that's the issue as other servers run on that server (from other games).
Vitor ofc can correct me and give more details.