PDA

View Full Version : Dedicated Server API



Pages : [1] 2 3

Stepan Vondrak
19-05-2015, 14:34
Documentation

At the bottom of this post you will be able to find all dedicated server documents attached. The latest version of these documents is also always available in the root folder of the dedicated server package downloaded from Steam.

---

I am really glad that the community already maintains a basic Dedicated Server HowTo (http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-%28Work-in-Progress%29). It is lacking information about the server's API, so I've decided to write some stuff down about it.

First, why does/will the API even exist...

DS without the API

Without the API the functionality of the dedicated server is quite limited. The usage flow is nearly the same as when running a peer to peer multiplayer session, and so are the features. The major usage difference for users is only the session creation, which now requires a special command-line to create a session on a dedicated server instead of a peer to peer session (hopefully maybe one day there will be GUI for that!).

Joining is then the same, and so is the overall flow of the gameplay on a DS. The "host" is still the creating player until the player disconnects, then it migrates to another player. And the host still controls the gameplay settings.

So the DS in this form does not provide much more than potentially improved networking. Instead of everyone communicating with everyone else during gameplay, which can be quite tricky and unstable as the session size grows too much, the simulation network traffic is routed through the DS. That should be much more friendly to uplink bandwidth of all players, and evade all kinds of NAT and router problems associated with peer to peer networking, leading to overall more reliable online experience.

Why the API

But player expect more from the dedicated server. And that's mostly being able to monitor and control the game from the server, which could mean anything from just deciding who can join the server (which we already support to some extent by password-protection, blacklist and whitelist options), to server rotating tracks, to server running automatic leagues with overall scores as well as live race details displayed on a website.

Instead of implementing all kinds of those features directly into the server, the aim is to make the server as open as possible, or "moddable". This will allow the community to then implement any additional functionality based on their needs, instead of being restricted to what we might design and code in our unfortunately rather limited time.

Two API types

The server implements two kinds of API:

1. HTTP API, documented in this post

2. Lua API / scripting, documented in the attached pdf.

What does the API do

The API is intended to work in two ways:

1. It provides information about the server's and gameplay status / other data. The game sends the data to the server, and the API can be used to read the data. This can be split into few sub-categories.
1a. Static information. Such as self-generated help about the API, or various lists (all known vehicles, tracks, session attributes and so on)
1b. Server/session/gameplay status. A snapshot of current state of the server, multiplayer game running on it (if any), players connected to the session, and cars racing.
1c. Events. The server also receives events and provides a history of the events via the API. This range from "game started on the server" to "player joined/left the game" to "John collided with Joe, impact strength 500".

2. It provides a way for third-party apps to control the server, and via the server control the game. Controlling the game is an optional "mode" of the server, in which it will take over the host's duties. In this mode the host will no longer be significant in the game, lose access to the game's settings, and the server will control the settings instead. How exactly will it behave is then entirely up to the community that writes the "scripts" or whatever else will communicate via the API. It could be any of:

GUI tool that will let people allowed to control the server do so via the provided GUI, outside of the game.
A simple script that will force specific settings, monitor the events and change the track/vehicle class whenever players return back to the lobby. So a simple track/settings rotation.
A script that would monitor chat from players, recognize special commands and act upon them. Players with specific IDs would be allowed to change some settings directly via the commands, non-privileged players could vote for settings changes.
Much more complex app implementing an automatic league. It could implement persistent ranking of players, open the server with specific settings when the next league round starts, control who can join the race, archive positional status and various events for post-race review (we won't provide full replays automatically though), and so on.

Note that all of this is just the ideal goal, and up to the community to implement. We just plan to provide the tools to do so.

How to enable the HTTP API

By default the HTTP-based API is disabled. Please read the HowTo (http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-%28Work-in-Progress%29) for the full list of available setup options.

To enable the API, change the enableHttpApi setting to true. By default the API will be then available via HTTP at 127.0.0.1:9000 . This can be reconfigured by the options httpApiInterface and httpApiPort .

API security

The HTTP API is running on a simple internal HTTP server based on the libwebsockets (https://libwebsockets.org/trac/libwebsockets) library. Only http access is enabled, there is no https support (at least not yet). The server also does not implement any other security features yet, there is no password/key-protected access to the API or IP blacklisting/whitelisting. Be aware of that when exposing the access to the API via the server settings. You might want to setup some kind of proxy based on Apache or anything else, and control the access at that level.

Or just limit it to the computer the server is running on (which is the default) or the local network where the server is hosted, with anything public "sitting behind" the scripts you implement on top of the API. So as a simple example, you could run the server on the same computer as your website, and write a simple PHP script that would access the server's status and present it in a pretty way on the web. And with some additional scripting, it could live-update the car status and display that. Without ever exposing the server's API itself to the public.

API usage

The API is a simple HTTP-based thingy, you run HTTP GET queries and it returns responses, mostly JSON-encoded. The JSON responses contain these fields:

"result" - for now just "ok", but for some API calls the result could be something else. That will apply mostly to calls that request game changes.
"message" - optional user friendly message
"response" - JSON object with the actual data returned by the call


So as an example, assuming the DS is running on your local machine, you could query it with http://127.0.0.1:9000/api/session/status?attributes&members&participants . This returns JSON response with the full status, with all attributes of the session itself, as well as its members and participants. The middle of the response might look like this:


{
"result" : "ok",
"response" : {
...
"attributes" : {
...
"NumParticipantsDisqualified" : 0,
"NumParticipantsRetired" : 0,
"NumParticipantsDNF" : 0,
"NumParticipantsFinished" : 0
},
"members" : [
{
"index" : 0,
"refid" : 19008,
"steamid" : STEAMID_REMOVED,
"state" : "Connected",
"name" : "REMOVED",
"jointime" : 1432039628,
"host" : true,
"attributes" : {
"VehicleId" : 1023089804,
"LiveryId" : 64,
"LoadState" : "ADMIN_STARTED_RACE",
"RaceStatFlags" : 1073797090,
"Ping" : 53
}
}
],
"participants" : [
{
"attributes" : {
"RefId" : 19008,
"Name" : "REMOVED",
"IsPlayer" : 1,
"GridPosition" : 1,
"VehicleId" : 1023089804,
"LiveryId" : 64,
"RacePosition" : 1,
"CurrentLap" : 0,
...




API - help

The endpoint /api/version will return server version details (build, protocol and Lua API).

The API provides automatically generated help at /api/help URL. This will return the list of all available methods implemented by the API, their parameters, result format and a short description.

Lists associated with the gameplay and the server data are available at /api/list and its various sub-calls. This can include the list of all session attributes, or track or vehicle lists.
(attributes and event descriptions have been implemented so far)

API - status

You can query the session status at /api/session/status. Without any query parameters it just returns basic data about the session, you can request all session attributes, member list and participant (car) list as well. For more information please check the /api/help.

API - events

In addition to current status snapshot the game also reports various events to the server. The server keeps certain amount of the events in its internal log, the size of the log can be configured in server.cfg, in setting eventsLogSize.

The events log is available via the API at /api/log:

/api/log/overview: Returns the number of events stored in the log, and index of the oldest event.
/api/log/range: Returns count of events from the logs, starting at index offset. You can use negative offset to request specify the offset relative to the end of the log, so "offset=-100&count=100" would return 100 most recent events. This call also returns the same info as the overview in addition to the events.


API - controlling the server

The control mode can be configured by these two variables:

allowEmptyJoin: true - this is set to true by default, and will make the server appear in the session browser when it's empty. When someone joins an empty server, the game's setup will start with sessionAttributes, and the first member will become the session's host. When the game is not controlled be the server, the host will then be able to change this setup to anything else. Please refer to /api/list/attributes/session for the list of attributes that can be specified in sessionAttributes, only the ReadWrite or WriteOnly attributes can be set here.
controlGameSetup: false - this is set to false by default. If changed to true, the server will take over the game's control. Such server must also have allowEmptyJoin set to true, because it will no longer be joinable via the command-line driven Create flow. When the server controls the game, the host will no longer be able to modify the game's setup in the lobby, instead the server's API can be used to do that.


Two session attributes fine-tune the game-controlling mode:

ServerControlsTrack: If set to non-zero, the server takes over track selection in addition to the game's setup. The host will no longer be able to select the track.
ServerControlsVehicle: If set to non-zero, the server takes over vehicle selection in addition to the game's setup. This is not fully implemented yet, so players will still be able to choose their cars even if this is set to true.


The control API itself is:

/api/session/set_next_attributes: This modifies "next session attributes". The initial values are set from the config file's sessionAttributes. "Next session attributes" are used when the first player joins an empty server - the game will start with these settings. In addition to that, if the server control's the game's attributes, these will be also applied to the lobby whenever a race is finished and the game loads to the lobby. So in short, if the server is not game controlling, this provides the defaults for empty servers, and if the server is game controlling, this can be also used to modify the setup of the next race, automatically applied when the current race finishes.

/api/session/set_attribtes: This API call is available only if the server is running in game controlling mode. It modifies the current game's setup while in the lobby.

/api/session/send_chat: While not directly used to control the game, this can be used to send chat texts to the game from the server. It can be used to welcome new lobby members and send some info about the server to them, or to notify them about any changes applied by the server.

The set_next_attributes and set_attributes have similar argument structure. But the set_next_attributes command can modify only the session attributes, none of the participant or player arguments will be used (note that the game currently does not define any modifiable player or participant attributes anyway)

copy_to_next: Boolean optional argument to set_attributes. This will make any session attribute changes also modify the "next session attributes" list. It defaults to false but you will quite often want to use this, otherwise the set_attributes call modifies only the current lobby settings, and the next lobby will revert back to the "next session attributes". If the session is not in a lobby, then the set_attributes call will still succeed if this argument is set to true, and do the exact same thing as set_next_attributes (since there are not current lobby attributes to modify)
refid: RefId of the player to modify if any player attributes are set
participantid: Participant id of the participant to modify if any participant attributes are set
session_NAME: Set value of session attribute NAME. See /api/list/attributes/session for the list of all valid attribute names and types. Only writable attributes can be set
player_NAME: Set value of player attribute NAME. Currently no player attributes are writable
participant_NAME: Set value of participant attribute NAME. Currently no participant attributes are writable


Example:

http://127.0.0.1:9000/api/session/set_attributes?copy_to_next&session_Practice1Length=15&session_RaceLength=10&session_TrackId=1300627020
(assuming the default local server port is used)
This will modify the current lobby and the next session attributes to use 15 minute practice 1 session, 10 laps, on Brands Hatch Indy

Status web

The internal server also hosts a simple web page at /status. This is similar to information provided by the /api/session/status as well as the event log, but formatted as a simple human-readable web page. It's intended mostly for debugging the server while developing the API, not as something to be made available to the public.

Documentation
Last updated 01.03.2016, latest PDF documents are always available in the server tool downloaded from Steam.

Game Guide: A simple short guide about joining the servers from the browser
228672

User Guide: Server administration and setup information
228675

Scripting Guide: All about Lua scripting
228673

Server Values and Types: Reference with various useful data types / lists: all attributes, events, id lists, enums, flags.
ServerTypes.pdf (http://forum.projectcarsgame.com/attachment.php?attachmentid=232726&d=1462544914)

Stepan Vondrak
19-05-2015, 14:35
Dedicated Server Changelog

20.5.2015
Added access to event logs at /api/log/overview and /api/log/range. Descriptions of all available log events have been added to /api/list/events

21.5.2015
Added config option httpApiExtraHeaders. This can be used to add extra headers to all responses from the HTTP API server. The sample config adds "Access-Control-Allow-Origin: *".

25.5.2015
Added /api/list/vehicles and api/list/tracks. Fixed Unicode JSON formatting sometimes crashing the server in the API. All headers returned by the API now correctly specify the content's charset as UTF-8.

29.5.2015
Added /api/list/liveries

1.6.2015
Crash in logging fixed

9.6.2015
Participant list is cleared when returning back to lobby, the server no longer reports duplicate/obsolete participants from older races.
Added more methods to /api/list: .../vehicle_groups, .../enums and .../flags (enums and flags also with several subqueries to specific enums and flags)
Vehicle and livery lists now also include vehicle groups.
Updated descriptions of various attributes to point to appropriate lists/enums/flags, or list the valid values explicitly where it's just a bunch of strings.

12.6.2015Updated DS to protocol version 1.0.1.18, matching game patch 1.4

1.7.2015
Updated DS to protocol version 1.0.1.20, matching game patch 2.0

17.7.2015
Updated DS to protocol version 1.0.1.21, matching game patch 2.5

22.7.2015
Updated DS track and vehicle lists to match Ruapuna/Audi/freecar#2 content

14.8.2015
The big game-controlling mode updates:

Protocol version 1.0.1.27, matching patch 3.0
Empty servers are now visible in the session browser if they set the allowEmptyJoin config value to true (defaults to false in code, and to true in the sample config). They use different ping icon to distinguish them from peer to peer session. Non-empty sessions hosted on a server will now also show different ping icon.
Implemented game-controlling server mode. In this mode the server takes over the session setup, and those host will no longer be able to modify the setup. These servers use slightly different ping icon, with a tiny lock on the server icon.
The server can also be configured to take over the track selection and vehicle selection (vehicle selection restrictions not fully implemented by the game yet)
The config variables to control this are allowEmptyJoin, controlGameSetup and sessionAttributes (initial attributes for new sessions), added to sample configs with basic documentation
The /api/list/attributes API call now specifies which attributes are ReadOnly (just reported by the game) and which are ReadWrite or WriteOnly (can be modified by the server)
Added /api/list/session/set_attributes, /api/list/session/set_next_attributes calls that let the server modify the game's settings
Added /api/list/session/send_chat call that lets the server send chat messages to individual or all session members
Added /api/list/enums/weather listing valid weather constants used by WeatherSlot* attributes
Added new session attributes:

ServerControlsSetup (read write, but writes are ignored, in this case it means the server can write this to the game, but it's not modifiable via the API): The value of the controlGameSetup config variable
ServerControlsTrack (read write): Does the server also take over track selection?
ServerControlsVehicle (read write): Does the server also take over vehicle selection? (not fully implemented by the game yet)
Track location (read only): Latitude, Longitude, Altitude
Current race date and time (as opposed to starting date/time which already had attributes, read only): CurrentYear, CurrentMonth, CurrentDay, CurrentHour, CurrentMinute
Current weather conditions (read only): RaindDensity, WetnessOnPath, WetnessOffPath, WetnessAverage, WetnessPredictedMax, WetnessMaxLevel, TemperatureAmbient, TemperatureTrack, AirPressue
Changed attribute VehicleGroupId to VehicleClassId, and all vehicle lists now use classes instead of groups - the multiplayer is changing to use class-based restrictions instead of group-based.
Tagged many session attributes as read-write, those can be now modified by the server

Added new events:

ServerChat: Chat message logged by the server (not implemented yet, the server does not log these
PlayerChat: Public chat message sent by a player from the game (actually works!).



All API changes are documented via the usual /api/help and /api/list calls

18.9.2015

Update to protocol version 1.0.1.29, compatible with patch 4.0
Updates to track/vehicle lists to match new content introduced with patch 4.0
Introducing Lua API - Lua-based server-side scripting, with several sample addons. This is still work in progress but already quite usable. It will be properly documented later, you will have to experiment for now
Major changes to server config, please update your customized config based on the sample
The game now respects server running in "controls track", "controls vehicle" and "controls vehicle class" modes, and won't allow players choosing different track/vehicle/class
Cleaned up the Weather enum list. The names no longer contain redundant "Weather_" prefixes, and "Weather_Clear1" is now simply called "Clear" (without the prefix or '1' suffix)

Some basic additional notes about this patch are available in this forum post (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1122186&viewfull=1#post1122186)

22.9.2015
Lua addons: separated customized configuration from persistent data saved by the addon. Details in this post (http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1126527&viewfull=1#post1126527).

23.9.2015
Fixed server crashing on host migration if Lua API is disabled. Added simple GameGuide.pdf with some information about joining server-hosted sessions from the game.

24.9.2015
Documentation updates - added missing Vintage GT3 class to lists, added ServerTypes.pdf doc with the most important lists, significant updates to UserGuide.pdf, including documentation of existing addons.

6.10.2015
Documentation updates - more information in ServerTypes.pdf, added ScriptingGuide.pdf.

7.10.2015
Executable updates:

All platforms: Switched from Steam 1.29a to 1.34
Win32: Switched from Visual Studio 2010 to Visual Studio 2012
Linux: Tweaked the build and added 32-bit libstdc++ library, there should be no need to copy libraries into lib32 anymore, the Linux build should run as is as long as 32-bit libc is available on the system


8.10.2015

The server processes all session attribute change requests, and changes some attribute combinations that are known to cause issues in the game. It will fixup grid size and player count to always make sense, and disable the "fill with AI" flag if there all grid spots are reserved for players.
Tweaked exposed enum/flag lists, values that are not relevant for the server or not implemented in the game have been removed.


9.10.2015

Bumped protocol version to 1.30, compatible with patch 5.0.
Addon update - first iteration of the sms_stats history tracking. Not finished yet.
Documentation updates - exported new Values and Types doc with updates from previous DS patch. Added information about Extended Session Attributes, Normalization and Stringification to the Scripting Guide.


9.10.2015
sms_stats addon updates:

Few fixes to history management.
UserGuide.pdf now contains sms_stats documentation.
The addon is enabled by default in the sample config.


13.10.2015 - build 70

Fixed Lua callback handling events, the event is finalized before the callback happens, so more events generated from the callback now work correctly.
Added server build version, printed at startup.
Added HTTP API endpoint /api/version, which returns the build version, protocol version and Lua API version.
Added Lua builtins GetBuildVersion() and GetProtocolVersion(), updated the Scripting Guide document and bumped the API version to 3.1.


14.10.2015 - build 71
Addon sms_stats updates:

Added configuration controlling new features: limit history length, enable/disable recording of events and results.
Default config limits the history to 50 sessions, with results tracking enabled but events tracking disabled.
Added "index" field to session history, to uniquely identify individual sessions even after old ones are discarded.
Updated user guide.

Also fixed GetServerUptimeMs() value jumping significantly after the first tick. Now it also starts at zero (but do not rely on that)

26.10.2015 - build 72
HTTP API access levels and filtering rules have been implemented. You can now restrict access to individual API endpoints, IP-based filtering and Basic user authentication are supported. Please refer to UserGuide.pdf and sample configs for more information.
This build also removes standalone steamclient libraries automatically installed by Steam, and replaces them by libraries included in the server's depot, to prevent latest updates from Valve breaking the server.

26.10.2015 - Build 73 (built 72 hotfix)

Setting "httpApiInterface" to empty string will now bind the server's listen socket to all interfaces. Use this for public HTTP API.
Fixed filtering rules in sample server config. Now "private" and "admin" rules correctly end with "reject-password", which responds with correct headers (instead of closing the socket without responding) and triggers password query when accessing the endpoints from a browser.


28.10.2015 - Build 74

Implemented fixup of session attributes. Now if the server requests and attribute change, and the game does not update the attribute, the server will retry the request, while in the lobby. So far only applied to the WeatherSlots attribute when setting it to 0, because the game ignores the request until real weather data are downloaded for the location.
Updated vehicle lists in DS and documentation with Japanese Car Pack vehicles.
Updated Renault vehicle names missing to "Renault Type" where needed to match the in-game names.


12.11.2015 - Build 75
Protocol version 1.31, compatible with game patch 6.0.

25.11.2015 - Build 77
Protocol version 1.32, compatible with game patch 6.2.
Changes:

Updated track and vehicle lists with new DLC content.
Updated support for VAC bans, servers configured as not secure will now correctly let VAC-banned players join them.
The server will no longer allow TrackId to be set to an invalid id, or to id of a track with grid sizes that's too small for the session. When such TrackId is set in the config, it will find a different track with valid grid size instead and use that (and print a warning).
The sms_rotate addon and library have been updated to check the config for invalid TrackIds in advance and warn about them.
The session size and grid size in the default sample config have been reduced from 32 to 24, to allow for more valid tracks (for example the default Brands track has only 30 grid spots).
The documentation and HTTP API/Lua API track lists now include track grid sizes.


1.12.2015 - Build 78
Implemented basic in-server profiling. The performance counters are available via HTTP API at /api/performance

2.12.2015 - Build 79
Added detailed profiling of game packet resends.

10.12.2015 - Build 80
Protocol version 1.33, compatible with game patch 7.0. No other visible changes.

10.12.2015 - Build 81
Now really compatible with patch 7.0. OpponentDifficulty added to session properties.

23.12.2015 - Build 82
Updated vehicle lists and documentation with Renault DLC.

26.12.2015 - Build 83
Added missing vehicle classes to DS lists and documentation. Fixes issues with using some vehicles and their new classes in DS or sms_rotate config (it was not possible to enforce those vehicles or their classes).

20.01.2016 - Build 84
Protocol version 1.34, compatible with game patch 8.0. No other visible changes.

29.01.2016 - Build 85
Added Stanceworks Track Expansion and Free Car #8 (January DLC content) to DS lists and documentation.

12.02.2016 - Build 86
Protocol version 1.35, compatible with game patch 9.0. No other visible changes.

01.03.2016 - Build 87
Added US Race Car Pack, Free Car #9 and Liveries #5 (February DLC content) to DS lists and documentation.

22.03.2016 - Build 88
Protocol version 1.36, compatible with game patch 10.0. No other visible changes.


15.04.2016 - Build 89
Added Free Car #10 to DS lists and documentation.

06/05/2016 - Build 90
Added Pagani Nürburgring Combined Track Expansion (May DLC content) to the DS lists and documentation.

04/11/2016 - Build 91
Protocol version 1.37, compatible with game patch 11.1. No other visible changes.

Apps and services utilizing the API
(please start a new thread dedicated to your work if you think it's worth publishing here, it should be something people can download or use in any other way for their DS, not just your own private thing ; then PM me to get listed here)

Dedicated Server Live App (http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App) by Ph0eNiX.

Project Cars Dedicated Server GUI Launcher (PCDSG) (http://forum.projectcarsgame.com/showthread.php?31634-Project-Cars-Dedicated-Server-GUI-Launcher-with-%93live-timing%93-%28results-timetable%29) by cogent

Umer Ahmad
19-05-2015, 14:47
Reserve 3 and sticky

bmaytum
19-05-2015, 14:50
Thanks for that API info Stefan. I'll check back here as you update with changelogs. And thanks to you and SMS for providing the pCARS Dedicated Server code to the user community. :semi-twins:

crashmax
19-05-2015, 21:08
Hi Stefan

Thank you for this Info!

I plane to develop a Server controller App.

May I ask how to get Info like this ""VehicleId" : 1023089804," to a human readable one? I mean how can I translate this ID to a name like "BMW Z4 GT3" or even get more attributes like I can get from steam for each user?


Best regards
Patrick

bmaytum
19-05-2015, 21:10
@ Stephan:

I've modified my server.cfg file to attempt enabling the HttpApi, BUT then my DS rejects it. Can you tell me how to fix my server.cfg file please.

Here's DS output (I masked my WAN IP & Steam ID):

</code>[2015-05-19 13:54:52] INFO: Starting up the Dedicated Server Library.
[2015-05-19 13:54:52] WARNING: Unknown config variable 'false', or the variable has invalid type
[2015-05-19 13:54:52] WARNING: Unknown config variable 'true', or the variable has invalid type
[2015-05-19 13:54:52] WARNING: Unknown config variable 'warning', or the variable has invalid type
[2015-05-19 13:54:52] INFO: Server configuration loaded:
- protocol version: 116 (1.0.1.16)
- server name: EZ's pCARS Ded Server
- max session size: 6
- details: secure, bind IP INADDR_ANY, Steam port 8766, host port 27015, query port 27016, password protected yes
- whitelist size: 0
- blacklist size: 0

Setting breakpad minidump AppID = 234630
[2015-05-19 13:54:52] INFO: HttpApi disabled
[2015-05-19 13:54:52] INFO: Dedicated server is starting...
[2015-05-19 13:54:54] INFO: Connection to Steam established
[2015-05-19 13:54:54] INFO: Received public IP 50.184.***.***
[2015-05-19 13:54:54] INFO: Server logged in with Steam id 90095599294313*** ; server is secure
[2015-05-19 13:54:54] INFO: Server startup finished: AppId 234630, public IP 50.184.***.***.40, Steam id 90095599294313*** ;
switching to running state</code>

Here's my server.cfg file:
<code>"//" : "You can use dummy entries like this to write comments into the config. 'rem' and '#' are also supported as comment entries."

"//" : "--- Basic server options ---"
"//" : "- logLevel: logging level of the server. Messages of this severity and more important will be logged. Can be any of debug/info/warning/error."
"//" : "- eventsLogSize : number of gameplay events stored on the server. Oldest ones will be discarded once the game logs more."
"//" : "- name: 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."
"//" : "- secure: authenticate users with Steam to check VAC ban when set to true."
"//" : "- password: password required to create sessions on the server as well as to join the sessions, password set in Create options is ignored on DS."
"//" : "- maxPlayerCount: maximum size of sessions that can be created on this server."
"//" : "- bindIP: IP address where the server's sockets should be bound. Leave empty for 'all interfaces'."
"//" : "- steamPost, hostPort, quaryPort: ports used to communicate with Steam and game, they must all be accessible on the public IP of the server."
"//" : "- sleepWaiting, sleepActive: delay between ticks in milliseconds, when not hosting and when hosting a game, respectively."

logLevel : "info"
eventsLogSize : 10000
name : "EZ's pCARS Ded Server"
secure : true
password : "Bo"
maxPlayerCount : 6
bindIP : ""
steamPort : 8766
hostPort : 27015
queryPort : 27016
sleepWaiting : 250
sleepActive : 10

"//" : "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"
"//" : "- enableHttpApi: master enable/disable toggle."
"//" : "- httpApiLogLevel: similar to logLevel above but 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."
"//" : "- httpApiInterface: interface name or IP where to bind the local http server providing the API and web-based controls.."
"//" : "- httpApiPort: port where the local http server listens."

"//" : enableHttpApi : false
enableHttpApi : true
httpApiLogLevel : "warning
"//" : httpApiLogLevel : "info"
httpApiInterface : "127.0.0.1"
httpApiPort : 9000<code/>

Thanks in advance.

Stepan Vondrak
20-05-2015, 08:42
Hi Stefan

Thank you for this Info!

I plane to develop a Server controller App.

May I ask how to get Info like this ""VehicleId" : 1023089804," to a human readable one? I mean how can I translate this ID to a name like "BMW Z4 GT3" or even get more attributes like I can get from steam for each user?


Best regards
Patrick

That's what the /api/list method is for. Now it knows only about the various attributes, but in the future it will returns car/track lists and other info as well.

Stepan Vondrak
20-05-2015, 08:47
"//" : enableHttpApi : false
enableHttpApi : true
httpApiLogLevel : "warning
"//" : httpApiLogLevel : "info"
httpApiInterface : "127.0.0.1"
httpApiPort : 9000

These attempts at commenting out some lines are wrong.

The config format is still JSON object, so key-value pairs in format


key : value

You can't comment a key-value pair out by prepending it with "//" :, then you have A:B:C in the file which completely confuses the parser. It's just that when the key is "//", the value is ignored. But "//" : key : value does not make any sense to the server. So just remove the lines where you tried to comment-out the original values.

Also the "warning" value is missing a quote.

Stepan Vondrak
20-05-2015, 14:48
In an hour or two a new update to the DS will be published. This adds access to event logs at /api/log/overview and /api/log/range. A range of log events might look like this:



...
{
"index" : 7,
"time" : 1432133017,
"name" : "StateChanged",
"attributes" : {
"PreviousState" : "Loading",
"NewState" : "Race"
}
},
{
"index" : 8,
"time" : 1432133017,
"name" : "ParticipantCreated",
"refid" : 21952,
"participantid" : 0,
"attributes" : {
"Name" : "Stouie",
"IsPlayer" : 1,
"VehicleId" : 1023089804,
"LiveryId" : 64
}
},
{
"index" : 9,
"time" : 1432133024,
"name" : "State",
"refid" : 21952,
"participantid" : 0,
"attributes" : {
"PreviousState" : "InGarage",
"NewState" : "ExitingPits"
}
},
{
"index" : 10,
"time" : 1432133037,
"name" : "State",
"refid" : 21952,
"participantid" : 0,
"attributes" : {
"PreviousState" : "ExitingPits",
"NewState" : "Racing"
}
},
{
"index" : 11,
"time" : 1432133040,
"name" : "Impact",
"refid" : 21952,
"participantid" : 0,
"attributes" : {
"OtherParticipantId" : -1,
"CollisionMagnitude" : 830
}
},
...

Or in English - loading finished, my car was created, I exited the pits and hit the wall.

All available log events are documented at /api/list/events. For example the "Impact" event has entry:


...
{
"name" : "Impact",
"type" : "Participant",
"description" : "Participant collided with something. Always reported by the local participant (player or AI). Because of the assymetric nature of physical collisions in MP the other participant might report (a similar) event too",
"attributes" : [
{
"name" : "OtherParticipantId",
"type" : "int32",
"description" : "Other participant's id, or -1 if not collided into a participant"
},
{
"name" : "CollisionMagnitude",
"type" : "int32",
"description" : "Magnitude of the impact. Value reported by physics * 1000"
}
]
},
...

Ph0eNiX
20-05-2015, 16:43
Are there Steam public ID for drivers to have his uniqid, because on steam we can change our name, it can cause confusion.

Kamel
20-05-2015, 17:23
Are there Steam public ID for drivers to have his uniqid, because on steam we can change our name, it can cause confusion.Each player gets a "session" ID as he connects.
You can use "/api/session/status?members=true" to map that id to the name and the steam id.

Also the log api contains a PlayerJoined entry with name and steamid.

Ph0eNiX
20-05-2015, 18:14
Great thx let's go, NodeJs i'm back !

optimalspieler
20-05-2015, 22:57
the aim is to make the server as open as possible, or "moddable". This will allow the community to then implement any additional functionality based on their needs, instead of being restricted to what we might design and code in our unfortunately rather limited time.

Awesome, love it! :)

This might be a naive question, but since the server uses libwebsockets: Is the API only for REST calls or is it possible that the server sends data to a 3rd party app on its own?

Stepan Vondrak
21-05-2015, 11:03
Awesome, love it! :)

This might be a naive question, but since the server uses libwebsockets: Is the API only for REST calls or is it possible that the server sends data to a 3rd party app on its own?

You will have to poll the server regularly, it won't send anything out on its own.

derDumeklemmer
21-05-2015, 13:23
Hi Patrick,

Hi Stefan

Thank you for this Info!

I plane to develop a Server controller App.

May I ask how to get Info like this ""VehicleId" : 1023089804," to a human readable one? I mean how can I translate this ID to a name like "BMW Z4 GT3" or even get more attributes like I can get from steam for each user?


Best regards
Patrick

seems this will be resolved by API lookup soon (cross fingers)

Up to this moment you will have to maintain you own lookup table like I'm doing here;

>>click<< (http://www.malzbierbude.de/component/option,com_pcreporter/Itemid,953/Mode,bestlaps/lang,de/?logdate=2015-05-21&country=*&track=*&driver=*&class=*&vehicle=*&limit=25)

If you need to have such tables as temp. solution too you can take the info from WMD-leaderboard html-source code:
>>click<< (http://cars-stats-steam.wmdportal.com/index.php/leaderboard)

But how's about liveryIDs?
Does anyone has an idea how to resolv a liveryid to human readable text ?

cheers,
Uwe

thuro76
21-05-2015, 14:45
Sorry guys, I need to have and what to do to get the information to be collected in a web space?

bmaytum
21-05-2015, 17:24
These attempts at commenting out some lines are wrong.

The config format is still JSON object, so key-value pairs in format


key : value

You can't comment a key-value pair out by prepending it with "//" :, then you have A:B:C in the file which completely confuses the parser. It's just that when the key is "//", the value is ignored. But "//" : key : value does not make any sense to the server. So just remove the lines where you tried to comment-out the original values.

Also the "warning" value is missing a quote.

Thanks Stepan

derDumeklemmer
21-05-2015, 21:39
Hi,

Sorry guys, I need to have and what to do to get the information to be collected in a web space?

I mean that part of the source code:



<!-- Track select combo box -->
<td class="track">
<label for="select_leaderboard_track">Track:</label>
<select name="track" id="select_leaderboard_track">
<option value="4241994684">Autodromo Nazionale Monza GP</option>
<option value="368740158">Autodromo Nazionale Monza Short</option>
<option value="832629329">Azure Circuit</option>
<option value="560711985">Azure Coast</option>
<option value="550129415">Azure Coast Stage 1</option>
<option value="3514087720">Azure Coast Stage 2</option>
<option value="2557706171">Azure Coast Stage 3</option>
<option value="2358176792">Azure Coast Westbound</option>
<option value="921120824">Bathurst</option>
<option value="1988984740">Brands Hatch GP</option>
<option value="1300627020">Brands Hatch Indy</option>
<option value="3387066030">Brno</option>
<option value="328972919">Cadwell Club Circuit</option>
<option value="1876749797">Cadwell GP</option>
<option value="2886778255">Cadwell Woodland</option>
<option value="2701023129">California Highway Full</option>
<option value="928006536">California Highway Reverse</option>
<option value="1676943041">California Highway Stage 1</option>
<option value="940391868">California Highway Stage 2</option>
<option value="3963464445">California Highway Stage 3</option>
<option value="2559054883">Chesterfield</option>
<option value="3252038398">Circuit de Barcelona-Catalunya Club</option>
<option value="521933422">Circuit de Barcelona-Catalunya GP</option>
<option value="3296775302">Circuit de Barcelona-Catalunya National</option>
<option value="904625875">Circuit de Spa-Francorchamps</option>
<option value="1740968730">Circuit des 24 Heures du Mans</option>
<option value="354022214">Donington Park GP</option>
<option value="3100947921">Donington Park National</option>
<option value="1735854797">Dubai Autodrome Club</option>
<option value="3633079779">Dubai Autodrome GP</option>
<option value="3584254603">Dubai Autodrome International</option>
<option value="4263239849">Dubai Autodrome National</option>
<option value="4062453922">Dubai Kartdrome</option>
<option value="3228224516">Glencairn</option>
<option value="766599953">Glencairn East</option>
<option value="3848172327">Glencairn East Reverse</option>
<option value="2774122716">Glencairn Reverse</option>
<option value="2886187703">Glencairn West</option>
<option value="3381341938">Glencairn West Reverse</option>
<option value="3134524219">Greenwood Karting Circuit</option>
<option value="1695182971">Hockenheim GP</option>
<option value="2317824311">Hockenheim National</option>
<option value="1768660198">Hockenheim Short</option>
<option value="920145926">Imola</option>
<option value="3267032607">Le Circuit Bugatti</option>
<option value="2682943968">Mazda Raceway Laguna Seca</option>
<option value="697498609">Nordschleife</option>
<option value="1459212514">Nordschleife Stage 1</option>
<option value="3994580005">Nordschleife Stage 2</option>
<option value="1128950148">Nordschleife Stage 3</option>
<option value="3348999902">Nürburgring GP</option>
<option value="4048000896">Nürburgring Müllenbach</option>
<option value="3585230195">Nürburgring Sprint</option>
<option value="3484251453">Nürburgring Sprint Short</option>
<option value="2935667702">Oschersleben C Circuit</option>
<option value="3100781576">Oschersleben GP</option>
<option value="816601966">Oschersleben National</option>
<option value="2273942801">Oulton Park Fosters</option>
<option value="545979690">Oulton Park International</option>
<option value="2417267773">Oulton Park Island</option>
<option value="3634666530">Road America</option>
<option value="2535224250">Sakitto GP</option>
<option value="2820797104">Sakitto International</option>
<option value="3034141030">Sakitto National</option>
<option value="3415685177">Sakitto Sprint</option>
<option value="1641471184">Silverstone GP</option>
<option value="1101719627">Silverstone International</option>
<option value="1952936927">Silverstone National</option>
<option value="1600840139">Silverstone Stowe</option>
<option value="3427627286">Snetterton 100</option>
<option value="1058872832">Snetterton 200</option>
<option value="1508903068">Snetterton 300</option>
<option value="2840687665">Sonoma Raceway GP</option>
<option value="3299764567">Sonoma Raceway National</option>
<option value="1035110721">Sonoma Raceway Short</option>
<option value="4250218976">Summerton</option>
<option value="1408845203">Summerton National</option>
<option value="2689053728">Summerton Sprint</option>
<option value="2509185801">Watkins Glen GP</option>
<option value="1590386668">Watkins Glen Short</option>
<option value="2445435734">Willow Springs Horse Thief Mile</option>
<option value="4191654388">Willow Springs International Raceway</option>
<option value="1836888499">Zhuhai International Circuit</option>
<option value="3934256239">Zolder</option>
</select>
</td>

<!-- Vehicle select combo box -->
<td class="vehicle">
<label for="select_leaderboard_vehicle">Vehicle:</label>
<select name="vehicle" id="select_leaderboard_vehicle">
<option value="0" selected="selected">Overall best</option>
<option value="844159614">125cc Shifter Kart</option>
<option value="3357033447">250cc Superkart</option>
<option value="2022787216">Alpine A450</option>
<option value="2524566288">Ariel Atom 300 Supercharged</option>
<option value="607772150">Ariel Atom 500 V8</option>
<option value="526708607">Ariel Atom Mugen</option>
<option value="3970726840">Aston Martin Rapide S Hydrogen Hybrid</option>
<option value="1452261378">Aston Martin V12 Vantage GT3</option>
<option value="2086246081">Aston Martin V8 Vantage GT4</option>
<option value="3227065186">Audi R18 TDI</option>
<option value="1884411907">Audi R8 LMS Ultra</option>
<option value="1469658023">Audi R8 V10 plus</option>
<option value="1400443574">BAC Mono</option>
<option value="987814806">Bentley Continental GT3</option>
<option value="3800867225">Bentley Speed 8</option>
<option value="3068790356">BMW 1-Series M Coupe</option>
<option value="779111340">BMW 320 Turbo Group 5</option>
<option value="1368036017">BMW M1 Procar</option>
<option value="3360868789">BMW M3 E30 Group A</option>
<option value="2929049241">BMW M3 GT</option>
<option value="2749517114">BMW M3 GT4</option>
<option value="975104023">BMW V12 LMR</option>
<option value="1161219858">BMW Z4 GT3</option>
<option value="578910088">Caper Monterey Stockcar</option>
<option value="3408754612">Caterham Seven Classic</option>
<option value="675194619">Caterham SP/300.R</option>
<option value="4132283684">Caterham Superlight R500</option>
<option value="1639105598">Ford Escort Mk1 RS1600</option>
<option value="2556846404">Ford Focus RS</option>
<option value="2520631554">Ford MkIV</option>
<option value="1111049682">Ford Mustang Boss 302R1</option>
<option value="4283632081">Ford Mustang Cobra TransAm</option>
<option value="3041492578">Ford Sierra RS500 Cosworth Group A</option>
<option value="1817703058">Ford Zakspeed Capri Group 5</option>
<option value="1909945073">Formula A</option>
<option value="2976119256">Formula B</option>
<option value="3253292325">Formula C</option>
<option value="2588707625">Formula Gulf 1000</option>
<option value="2219682419">Formula Rookie</option>
<option value="310900789">Ginetta G40 Junior</option>
<option value="3124293020">Ginetta G55 GT3</option>
<option value="2091910841">Ginetta G55 GT4</option>
<option value="3620711768">GUMPERT apollo S</option>
<option value="578969971">Lotus 49 Cosworth</option>
<option value="2974350450">Lotus 72D Cosworth</option>
<option value="2459105748">Lotus 78 Cosworth</option>
<option value="1959097924">Lotus 98T Renault Turbo</option>
<option value="1355771595">Marek RP 219D LMP2</option>
<option value="2264479929">Marek RP 339H LMP1</option>
<option value="3850842786">McLaren 12C</option>
<option value="3128055308">McLaren 12C GT3</option>
<option value="307010432">McLaren F1</option>
<option value="3293397987">McLaren F1 GTR Long Tail</option>
<option value="2546290331">McLaren P1™</option>
<option value="262982797">Mercedes-Benz 190E 2.5-16 Evolution2 DTM</option>
<option value="4209306796">Mercedes-Benz 300SEL 6.8 AMG</option>
<option value="2772044758">Mercedes-Benz A45 AMG</option>
<option value="3769906724">Mercedes-Benz AMG C-Coupe DTM</option>
<option value="1979398129">Mercedes-Benz CLK-LM</option>
<option value="2565700839">Mercedes-Benz SLS AMG</option>
<option value="274862187">Mercedes-Benz SLS AMG GT3</option>
<option value="998947753">Mitsubishi Lancer Evolution X FQ400</option>
<option value="4196902797">Oreca 03 Nissan</option>
<option value="2232288208">Pagani Huayra</option>
<option value="2677051185">Pagani Zonda Cinque Roadster</option>
<option value="2228078825">Pagani Zonda R</option>
<option value="2373461986">Palmer Jaguar JP-LM</option>
<option value="1231996358">Radical SR3-RS</option>
<option value="152867459">Radical SR8-RX</option>
<option value="3646257473">Renault Clio Cup</option>
<option value="1694837381">Renault Megane R.S. 265</option>
<option value="558051123">Ruf CTR3</option>
<option value="2248141984">Ruf CTR3 SMS-R</option>
<option value="462547146">Ruf RGT-8</option>
<option value="2274208491">Ruf RGT-8 GT3</option>
<option value="146414985">RWD P20 LMP2</option>
<option value="1023089804">RWD P30 LMP1</option>
<option value="65306143">Sauber C9 Mercedes-Benz</option>
<option value="4114837419">W Motors Lykan HyperSport</option>
</select>
</td>


cheers,
Uwe

thuro76
22-05-2015, 09:36
Hi,


I mean that part of the source code:



<!-- Track select combo box -->
<td class="track">
<label for="select_leaderboard_track">Track:</label>
<select name="track" id="select_leaderboard_track">
<option value="4241994684">Autodromo Nazionale Monza GP</option>
<option value="368740158">Autodromo Nazionale Monza Short</option>
<option value="832629329">Azure Circuit</option>
<option value="560711985">Azure Coast</option>
<option value="550129415">Azure Coast Stage 1</option>
<option value="3514087720">Azure Coast Stage 2</option>
<option value="2557706171">Azure Coast Stage 3</option>
<option value="2358176792">Azure Coast Westbound</option>
<option value="921120824">Bathurst</option>
<option value="1988984740">Brands Hatch GP</option>
<option value="1300627020">Brands Hatch Indy</option>
<option value="3387066030">Brno</option>
<option value="328972919">Cadwell Club Circuit</option>
<option value="1876749797">Cadwell GP</option>
<option value="2886778255">Cadwell Woodland</option>
<option value="2701023129">California Highway Full</option>
<option value="928006536">California Highway Reverse</option>
<option value="1676943041">California Highway Stage 1</option>
<option value="940391868">California Highway Stage 2</option>
<option value="3963464445">California Highway Stage 3</option>
<option value="2559054883">Chesterfield</option>
<option value="3252038398">Circuit de Barcelona-Catalunya Club</option>
<option value="521933422">Circuit de Barcelona-Catalunya GP</option>
<option value="3296775302">Circuit de Barcelona-Catalunya National</option>
<option value="904625875">Circuit de Spa-Francorchamps</option>
<option value="1740968730">Circuit des 24 Heures du Mans</option>
<option value="354022214">Donington Park GP</option>
<option value="3100947921">Donington Park National</option>
<option value="1735854797">Dubai Autodrome Club</option>
<option value="3633079779">Dubai Autodrome GP</option>
<option value="3584254603">Dubai Autodrome International</option>
<option value="4263239849">Dubai Autodrome National</option>
<option value="4062453922">Dubai Kartdrome</option>
<option value="3228224516">Glencairn</option>
<option value="766599953">Glencairn East</option>
<option value="3848172327">Glencairn East Reverse</option>
<option value="2774122716">Glencairn Reverse</option>
<option value="2886187703">Glencairn West</option>
<option value="3381341938">Glencairn West Reverse</option>
<option value="3134524219">Greenwood Karting Circuit</option>
<option value="1695182971">Hockenheim GP</option>
<option value="2317824311">Hockenheim National</option>
<option value="1768660198">Hockenheim Short</option>
<option value="920145926">Imola</option>
<option value="3267032607">Le Circuit Bugatti</option>
<option value="2682943968">Mazda Raceway Laguna Seca</option>
<option value="697498609">Nordschleife</option>
<option value="1459212514">Nordschleife Stage 1</option>
<option value="3994580005">Nordschleife Stage 2</option>
<option value="1128950148">Nordschleife Stage 3</option>
<option value="3348999902">Nürburgring GP</option>
<option value="4048000896">Nürburgring Müllenbach</option>
<option value="3585230195">Nürburgring Sprint</option>
<option value="3484251453">Nürburgring Sprint Short</option>
<option value="2935667702">Oschersleben C Circuit</option>
<option value="3100781576">Oschersleben GP</option>
<option value="816601966">Oschersleben National</option>
<option value="2273942801">Oulton Park Fosters</option>
<option value="545979690">Oulton Park International</option>
<option value="2417267773">Oulton Park Island</option>
<option value="3634666530">Road America</option>
<option value="2535224250">Sakitto GP</option>
<option value="2820797104">Sakitto International</option>
<option value="3034141030">Sakitto National</option>
<option value="3415685177">Sakitto Sprint</option>
<option value="1641471184">Silverstone GP</option>
<option value="1101719627">Silverstone International</option>
<option value="1952936927">Silverstone National</option>
<option value="1600840139">Silverstone Stowe</option>
<option value="3427627286">Snetterton 100</option>
<option value="1058872832">Snetterton 200</option>
<option value="1508903068">Snetterton 300</option>
<option value="2840687665">Sonoma Raceway GP</option>
<option value="3299764567">Sonoma Raceway National</option>
<option value="1035110721">Sonoma Raceway Short</option>
<option value="4250218976">Summerton</option>
<option value="1408845203">Summerton National</option>
<option value="2689053728">Summerton Sprint</option>
<option value="2509185801">Watkins Glen GP</option>
<option value="1590386668">Watkins Glen Short</option>
<option value="2445435734">Willow Springs Horse Thief Mile</option>
<option value="4191654388">Willow Springs International Raceway</option>
<option value="1836888499">Zhuhai International Circuit</option>
<option value="3934256239">Zolder</option>
</select>
</td>

<!-- Vehicle select combo box -->
<td class="vehicle">
<label for="select_leaderboard_vehicle">Vehicle:</label>
<select name="vehicle" id="select_leaderboard_vehicle">
<option value="0" selected="selected">Overall best</option>
<option value="844159614">125cc Shifter Kart</option>
<option value="3357033447">250cc Superkart</option>
<option value="2022787216">Alpine A450</option>
<option value="2524566288">Ariel Atom 300 Supercharged</option>
<option value="607772150">Ariel Atom 500 V8</option>
<option value="526708607">Ariel Atom Mugen</option>
<option value="3970726840">Aston Martin Rapide S Hydrogen Hybrid</option>
<option value="1452261378">Aston Martin V12 Vantage GT3</option>
<option value="2086246081">Aston Martin V8 Vantage GT4</option>
<option value="3227065186">Audi R18 TDI</option>
<option value="1884411907">Audi R8 LMS Ultra</option>
<option value="1469658023">Audi R8 V10 plus</option>
<option value="1400443574">BAC Mono</option>
<option value="987814806">Bentley Continental GT3</option>
<option value="3800867225">Bentley Speed 8</option>
<option value="3068790356">BMW 1-Series M Coupe</option>
<option value="779111340">BMW 320 Turbo Group 5</option>
<option value="1368036017">BMW M1 Procar</option>
<option value="3360868789">BMW M3 E30 Group A</option>
<option value="2929049241">BMW M3 GT</option>
<option value="2749517114">BMW M3 GT4</option>
<option value="975104023">BMW V12 LMR</option>
<option value="1161219858">BMW Z4 GT3</option>
<option value="578910088">Caper Monterey Stockcar</option>
<option value="3408754612">Caterham Seven Classic</option>
<option value="675194619">Caterham SP/300.R</option>
<option value="4132283684">Caterham Superlight R500</option>
<option value="1639105598">Ford Escort Mk1 RS1600</option>
<option value="2556846404">Ford Focus RS</option>
<option value="2520631554">Ford MkIV</option>
<option value="1111049682">Ford Mustang Boss 302R1</option>
<option value="4283632081">Ford Mustang Cobra TransAm</option>
<option value="3041492578">Ford Sierra RS500 Cosworth Group A</option>
<option value="1817703058">Ford Zakspeed Capri Group 5</option>
<option value="1909945073">Formula A</option>
<option value="2976119256">Formula B</option>
<option value="3253292325">Formula C</option>
<option value="2588707625">Formula Gulf 1000</option>
<option value="2219682419">Formula Rookie</option>
<option value="310900789">Ginetta G40 Junior</option>
<option value="3124293020">Ginetta G55 GT3</option>
<option value="2091910841">Ginetta G55 GT4</option>
<option value="3620711768">GUMPERT apollo S</option>
<option value="578969971">Lotus 49 Cosworth</option>
<option value="2974350450">Lotus 72D Cosworth</option>
<option value="2459105748">Lotus 78 Cosworth</option>
<option value="1959097924">Lotus 98T Renault Turbo</option>
<option value="1355771595">Marek RP 219D LMP2</option>
<option value="2264479929">Marek RP 339H LMP1</option>
<option value="3850842786">McLaren 12C</option>
<option value="3128055308">McLaren 12C GT3</option>
<option value="307010432">McLaren F1</option>
<option value="3293397987">McLaren F1 GTR Long Tail</option>
<option value="2546290331">McLaren P1™</option>
<option value="262982797">Mercedes-Benz 190E 2.5-16 Evolution2 DTM</option>
<option value="4209306796">Mercedes-Benz 300SEL 6.8 AMG</option>
<option value="2772044758">Mercedes-Benz A45 AMG</option>
<option value="3769906724">Mercedes-Benz AMG C-Coupe DTM</option>
<option value="1979398129">Mercedes-Benz CLK-LM</option>
<option value="2565700839">Mercedes-Benz SLS AMG</option>
<option value="274862187">Mercedes-Benz SLS AMG GT3</option>
<option value="998947753">Mitsubishi Lancer Evolution X FQ400</option>
<option value="4196902797">Oreca 03 Nissan</option>
<option value="2232288208">Pagani Huayra</option>
<option value="2677051185">Pagani Zonda Cinque Roadster</option>
<option value="2228078825">Pagani Zonda R</option>
<option value="2373461986">Palmer Jaguar JP-LM</option>
<option value="1231996358">Radical SR3-RS</option>
<option value="152867459">Radical SR8-RX</option>
<option value="3646257473">Renault Clio Cup</option>
<option value="1694837381">Renault Megane R.S. 265</option>
<option value="558051123">Ruf CTR3</option>
<option value="2248141984">Ruf CTR3 SMS-R</option>
<option value="462547146">Ruf RGT-8</option>
<option value="2274208491">Ruf RGT-8 GT3</option>
<option value="146414985">RWD P20 LMP2</option>
<option value="1023089804">RWD P30 LMP1</option>
<option value="65306143">Sauber C9 Mercedes-Benz</option>
<option value="4114837419">W Motors Lykan HyperSport</option>
</select>
</td>


cheers,
Uwe

I've seen it but my problem, since they are not very practical, is how to collect the information going to question the HttpApi

Ph0eNiX
22-05-2015, 13:43
Ok I found something like little strange for me,

When the race is finished, we go back to the lobby, but when we do an other session the server attribute an other participantID for all players, one for the older session, and one for new session, etc ...

Why after back to the lobby for the next session it create an other particpant for the same player why it don't use the older for the next session? it will cause confusion to retrieve datas

204005



"members" : [
{
"index" : 0,
"refid" : 8640,
"steamid" : 76561198023156518,
"state" : "Connected",
"name" : "-Ph0eNiX-",
"jointime" : 1432301223,
"host" : true,
"attributes" : {
"VehicleId" : -1041674971,
"LiveryId" : 59,
"LoadState" : "ADMIN_STARTED_RACE",
"RaceStatFlags" : 1073751042,
"Ping" : 11
}
}
],
"participants" : [
{
"attributes" : {
"RefId" : 8640,
"Name" : "-Ph0eNiX-",
"IsPlayer" : 1,
"GridPosition" : 2,
"VehicleId" : -1041674971,
"LiveryId" : 59,
"RacePosition" : 1,
"CurrentLap" : 0,
"CurrentSector" : 2,
"Sector1Time" : 0,
"Sector2Time" : 0,
"Sector3Time" : 2419,
"LastLapTime" : 0,
"FastestLapTime" : 0,
"State" : "Disqualified",
"HeadlightsOn" : 0,
"WipersOn" : 0,
"Speed" : 0,
"Gear" : 1,
"RPM" : 0,
"PositionX" : 86260,
"PositionY" : -3810,
"PositionZ" : -113400,
"Orientation" : 256
},
"id" : 3
},
{
"attributes" : {
"RefId" : 8640,
"Name" : "-Ph0eNiX-",
"IsPlayer" : 1,
"GridPosition" : 1,
"VehicleId" : -1041674971,
"LiveryId" : 59,
"RacePosition" : 1,
"CurrentLap" : 0,
"CurrentSector" : 0,
"Sector1Time" : 0,
"Sector2Time" : 0,
"Sector3Time" : 0,
"LastLapTime" : 0,
"FastestLapTime" : 0,
"State" : "InGarage",
"HeadlightsOn" : 0,
"WipersOn" : 0,
"Speed" : 0,
"Gear" : 0,
"RPM" : 0,
"PositionX" : 88670,
"PositionY" : -3960,
"PositionZ" : -122200,
"Orientation" : 256
},
"id" : 4
}
]

derDumeklemmer
22-05-2015, 14:35
Hi,

after malzbierbude.de is now reporting the tracks and car-models used at our game servers I would like to implement pictures of the diferent liveries as well.

I've found the mapping and tried to implement it for the first car (Formula_Rookie), but then I found something I can't understand:



<NAME LIVERY="51" NAME="RST Motorsports #61" />
<NAME LIVERY="52" NAME="Borda Racing #17" />
<NAME LIVERY="53" NAME="Southern Cars #36" />
<NAME LIVERY="54" NAME="Drag and Drop #99" />
<NAME LIVERY="55" NAME="Flatout Alliance #74" />
<NAME LIVERY="56" NAME="Sheriftizer #35" />
<NAME LIVERY="57" NAME="Fnix Racing #3" />
<NAME LIVERY="58" NAME="Baysted Racing #9" />
<NAME LIVERY="59" NAME="Garton Racing #39" />
<NAME LIVERY="60" NAME="Bolton Touristic #60" />
<NAME LIVERY="61" NAME="Cassius Racing #1" />
<NAME LIVERY="62" NAME="Cassius Racing #2" />
<NAME LIVERY="63" NAME="Tiger Racing #4" />
<NAME LIVERY="64" NAME="Bolting Motorsports #8" />
<NAME LIVERY="71" NAME="Bolting Motorsports #9" />
<NAME LIVERY="65" NAME="Domutech #46" />
<NAME LIVERY="66" NAME="Jiffy Trans #5" />
<NAME LIVERY="67" NAME="Jiffy Trans #6" />
<NAME LIVERY="68" NAME="Kerozen Racing #10" />
<NAME LIVERY="69" NAME="Kerozen Racing #11" />
<NAME LIVERY="70" NAME="Amator team #101" />
<NAME LIVERY="71" NAME="Race Community Center #27" />
<NAME LIVERY="72" NAME="Race Community Center #28" />
<NAME LIVERY="99" NAME="Custom Livery" />


How comes that liveryID 71 is assigend two times ?
Can someone give me a helping hand in this issue ?

cheers,
Uwe

flynny75
22-05-2015, 17:49
Hi,

after malzbierbude.de is now reporting the tracks and car-models used at our game servers I would like to implement pictures of the diferent liveries as well.

cheers,
Uwe

Can we get that list here? Or link to it?

derDumeklemmer
22-05-2015, 23:41
Hi flynny75,

Can we get that list here? Or link to it?

this currently one vehicleID, as you know we have some more in pCARS, will take a while sort, I'm working on that.
...but this will take some time of course.

After all data is completed no problem to forward the data to you.
(Seems not to be a secret to me since the dedi will provide the data as well one day)

cheers,
Uwe

Ph0eNiX
23-05-2015, 00:24
Hi flynny75,


this currently one vehicleID, as you know we have some more in pCARS, will take a while sort, I'm working on that.
...but this will take some time of course.

After all data is completed no problem to forward the data to you.
(Seems not to be a secret to me since the dedi will provide the data as well one day)

cheers,
Uwe


They working on it "TODO: ..." maybe it will be changed

Source : GET /api/list/attributes/session



{
"name" : "TrackId",
"type" : "int32",
"description" : "Track id. TODO: link to track list"
},
{
"name" : "VehicleGroupId",
"type" : "int32",
"description" : "Vehicle group id. TODO: used?"
},
{
"name" : "VehicleModelId",
"type" : "int32",
"description" : "Vehicle model id. TODO: used?"
},


Anyone have an idea to solve this problem ? http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=934510&viewfull=1#post934510

derDumeklemmer
23-05-2015, 19:01
Hi,


They working on it "TODO: ..." maybe it will be changed


sure! It's only a temporary solution for our websites until the dedi is reporting everything....

This is what I've found so far:



vehicleid;liveryid;description
1909945073;51;Formula A - Jancon Mobile #7
1909945073;52;Formula A - Jancon Mobile #7
1909945073;53;Formula A - Beezart Racing #3
1909945073;54;Formula A - Beezart Racing #4
1909945073;55;Formula A - Mixlub Racing #1
1909945073;56;Formula A - Mixlub Racing #2
1909945073;57;Formula A - Nextrako Racing #5
1909945073;58;Formula A - Nextrako Racing #6
1909945073;59;Formula A - SMS Racing #9
1909945073;60;Formula A - SMS Racing #10
1909945073;61;Formula A - Slightly Mad Studios #11
1909945073;62;Formula A - Slightly Mad Studios #12
1909945073;63;Formula A - KayOS #14
1909945073;64;Formula A - KayOS #15
1909945073;65;Formula A - Bolting #16
1909945073;66;Formula A - Bolting #17
1909945073;67;Formula A - Peoples Bank #18
1909945073;68;Formula A - Peoples Bank #19
1909945073;69;Formula A - Sheriftizer #20
1909945073;70;Formula A - Sheriftizer #21
1909945073;71;Formula A - Panasonic #24
1909945073;72;Formula A - Panasonic #25
1909945073;73;Formula A - FLANC #81
1909945073;74;Formula A - FLANC #82
1909945073;75;Formula A - enGUAGE #22
1909945073;76;Formula A - enGUAGE #23
1909945073;77;Formula A - Unistars #42
1909945073;99;Formula A - Custom Livery
2219682419;51;Formula Rookie - RST Motorsports #61
2219682419;52;Formula Rookie - Borda Racing #17
2219682419;53;Formula Rookie - Southern Cars #36
2219682419;54;Formula Rookie - Drag and Drop #99
2219682419;55;Formula Rookie - Flatout Alliance #74
2219682419;56;Formula Rookie - Sheriftizer #35
2219682419;57;Formula Rookie - Fnix Racing #3
2219682419;58;Formula Rookie - Baysted Racing #9
2219682419;59;Formula Rookie - Garton Racing #39
2219682419;60;Formula Rookie - Bolton Touristic #60
2219682419;61;Formula Rookie - Cassius Racing #1
2219682419;62;Formula Rookie - Cassius Racing #2
2219682419;63;Formula Rookie - Tiger Racing #4
2219682419;64;Formula Rookie - Bolting Motorsports #8
2219682419;65;Formula Rookie - Domutech #46
2219682419;66;Formula Rookie - Jiffy Trans #5
2219682419;67;Formula Rookie - Jiffy Trans #6
2219682419;68;Formula Rookie - Kerozen Racing #10
2219682419;69;Formula Rookie - Kerozen Racing #11
2219682419;70;Formula Rookie - Amator team #101
2219682419;71;Formula Rookie - Bolting Motorsports #9
2219682419;99;Formula Rookie - Custom Livery
2976119256;51;Formula B - SciFlex Group #11
2976119256;52;Formula B - SciFlex Group #12
2976119256;53;Formula B - Hauminator #19
2976119256;54;Formula B - Hauminator #20
2976119256;55;Formula B - Benefit Pro #1
2976119256;56;Formula B - Benefit Pro #2
2976119256;57;Formula B - Mixlub #9
2976119256;58;Formula B - Mixlub #10
2976119256;59;Formula B - Sheriftizer #15
2976119256;60;Formula B - Sheriftizer #16
2976119256;61;Formula B - Cobalt #5
2976119256;62;Formula B - Cobalt #6
2976119256;63;Formula B - Bastier #3
2976119256;64;Formula B - Bastier #4
2976119256;65;Formula B - Jancon Mobile #21
2976119256;66;Formula B - Jancon Mobile #22
2976119256;67;Formula B - Stichmuller #17
2976119256;68;Formula B - Stichmuller #18
2976119256;69;Formula B - Petrolos #23
2976119256;70;Formula B - Petrolos #24
2976119256;99;Formula B - Custom Livery
3253292325;51;Formula C - RST #53
3253292325;52;Formula C - RST #54
3253292325;53;Formula C - Runforged #58
3253292325;54;Formula C - Runforged #59
3253292325;55;Formula C - Stargenley #3
3253292325;56;Formula C - Stargenley #4
3253292325;57;Formula C - Nextrako #38
3253292325;58;Formula C - Maple Leaf #19
3253292325;59;Formula C - JAE #1
3253292325;60;Formula C - JAE #2
3253292325;61;Formula C - Quasol #7
3253292325;62;Formula C - Beezart #99
3253292325;63;Formula C - Cassius Racing #14
3253292325;64;Formula C - Celticom Network #5
3253292325;65;Formula C - Celticom Network #6
3253292325;66;Formula C - Volzen #22
3253292325;67;Formula C - Petrolos #50
3253292325;68;Formula C - Petrolos #51
3253292325;69;Formula C - Roboil #44
3253292325;70;Formula C - Roboil #45
3253292325;71;Formula C - Race Community Center #27
3253292325;72;Formula C - Race Community Center #28
3253292325;99;Formula C - Custom Livery
3357033447;51;250cc Superkart - Quasol #3
3357033447;52;250cc Superkart - Bolting #17
3357033447;53;250cc Superkart - Luquitas #26
3357033447;54;250cc Superkart - SimmSon #5
3357033447;55;250cc Superkart - Auryn #33
3357033447;56;250cc Superkart - Hauminator #11
3357033447;57;250cc Superkart - Demonio #21
3357033447;58;250cc Superkart - CTD #36
3357033447;59;250cc Superkart - Kolomiets #9
3357033447;60;250cc Superkart - Lublix #18
3357033447;61;250cc Superkart - FineKarts #29
3357033447;62;250cc Superkart - Vittorio #7
3357033447;63;250cc Superkart - Suei #4
3357033447;64;250cc Superkart - sptcar #25
3357033447;65;250cc Superkart - jeschke #2
3357033447;66;250cc Superkart - Green Arrow #14
3357033447;67;250cc Superkart - Tengco #43
3357033447;68;250cc Superkart - Machuca #71
3357033447;69;250cc Superkart - ToK #45
3357033447;70;250cc Superkart - Mestron #31
3357033447;99;250cc Superkart - Custom Livery


cheers,
Uwe

Stepan Vondrak
25-05-2015, 09:13
Ok I found something like little strange for me,

When the race is finished, we go back to the lobby, but when we do an other session the server attribute an other participantID for all players, one for the older session, and one for new session, etc ...

Why after back to the lobby for the next session it create an other particpant for the same player why it don't use the older for the next session? it will cause confusion to retrieve datas

New participants with new ids - that's correct, it's a new car for the game when going back to the lobby and starting another race. You can match participants to players by the "RefId" value.

What's incorrect is that the old participants are not removed from the list when you return back to the lobby. I'll have to fix that, but it might require a new game patch, not just DS change, so it could take a while.

Stepan Vondrak
25-05-2015, 09:14
I've found the mapping and tried to implement it for the first car (Formula_Rookie), but then I found something I can't understand:

How comes that liveryID 71 is assigend two times ?
Can someone give me a helping hand in this issue ?


Thanks for noticing this. It might be a genuine bug in the data, I've reported it to the vehicle team.

Ph0eNiX
25-05-2015, 09:25
If you will remove old participants when we go back to the lobby, it will be solved, that's only the problem on my request. Thx in advance ! Keep pushing, we support your good work.

Stepan Vondrak
25-05-2015, 15:44
New DS version has been released. It fixes some Unicode-related issues and one crash, and adds /api/list/vehicles and /api/list/tracks. Liveries and other lists will be added later.

Alexease
25-05-2015, 16:48
THX!!!!!!!!!!!!!!!!!! Working!

But server "name" not work (sometimes):/



{
"result" : "ok",
"response" : {
"state" : "Idle",
"name" : "",
"lobbyid" : "0",
"joinable" : false,
"max_member_count" : 0,
"now" : 1432572382,
"attributes" : {
"GridSize" : 0,
"MaxPlayers" : 0,
"Practice1Length" : 0,
"Practice2Length" : 0,

derDumeklemmer
25-05-2015, 21:13
Hi Stephan,

New DS version has been released. It fixes some Unicode-related issues and one crash, and adds /api/list/vehicles and /api/list/tracks. Liveries and other lists will be added later.

GREAT! Thank you so much!
(that makes life much easier for the community websites)

cheers,
Uwe

derDumeklemmer
25-05-2015, 21:35
Hi,

Liveries and other lists will be added later.

update for the LiveryIDs I've found so far:



vehicleid;liveryid;description
526708607;51;Ariel Atom Mugen - Mugen #01
526708607;52;Ariel Atom Mugen - Mugen #02
526708607;53;Ariel Atom Mugen - Mugen #03
526708607;54;Ariel Atom Mugen - Mugen #04
526708607;55;Ariel Atom Mugen - Mugen #05
526708607;56;Ariel Atom Mugen - Mugen #06
526708607;57;Ariel Atom Mugen - Mugen #07
526708607;58;Ariel Atom Mugen - Mugen #08
526708607;59;Ariel Atom Mugen - Mugen #09
526708607;60;Ariel Atom Mugen - Mugen #10
578910088;51;Caper Monterey Stockcar - 10 Wallington
578910088;52;Caper Monterey Stockcar - 26 Double Six
578910088;53;Caper Monterey Stockcar - 27 TexCo
578910088;54;Caper Monterey Stockcar - 81 Dambreville
578910088;55;Caper Monterey Stockcar - 80 WMD
578910088;56;Caper Monterey Stockcar - 77 Rapa Olio
578910088;57;Caper Monterey Stockcar - 90 Baysted Acoustics
578910088;58;Caper Monterey Stockcar - 79 Tiger
578910088;59;Caper Monterey Stockcar - 11 Exodus
578910088;60;Caper Monterey Stockcar - 22 Storms
578910088;61;Caper Monterey Stockcar - 83 Brewster
578910088;63;Caper Monterey Stockcar - 82 Zipanol
578910088;64;Caper Monterey Stockcar - 59 Project Cars
578910088;65;Caper Monterey Stockcar - 50 Kings
578910088;66;Caper Monterey Stockcar - 09 peak-end
578910088;67;Caper Monterey Stockcar - 14 WMD
578910088;68;Caper Monterey Stockcar - 30 Petroblast
578910088;69;Caper Monterey Stockcar - 2 Acesits
578910088;70;Caper Monterey Stockcar - 1 Kratos
578910088;71;Caper Monterey Stockcar - 40 Long Dogs
578910088;72;Caper Monterey Stockcar - 78 Boomer
578910088;73;Caper Monterey Stockcar - 88 Dominum Musk
578910088;74;Caper Monterey Stockcar - 31 Mudino
578910088;75;Caper Monterey Stockcar - 70 Marvelous Stew
578910088;76;Caper Monterey Stockcar - 35 Quasol
578910088;77;Caper Monterey Stockcar - 21 Pippu
578910088;78;Caper Monterey Stockcar - 45 Summers Boats
578910088;79;Caper Monterey Stockcar - 9 Chew
578910088;80;Caper Monterey Stockcar - 76 Stumpy McGees
578910088;81;Caper Monterey Stockcar - 34 Curtis
578910088;82;Caper Monterey Stockcar - 51 Qerex
578910088;83;Caper Monterey Stockcar - 66 Si+Mons
578910088;84;Caper Monterey Stockcar - 72 Black Dog
578910088;86;Caper Monterey Stockcar - 62 Roboil
578910088;87;Caper Monterey Stockcar - 49 Vulcan
578910088;89;Caper Monterey Stockcar - 41 Briik
578910088;90;Caper Monterey Stockcar - 61 Rexergie
578910088;91;Caper Monterey Stockcar - 7 Casino
578910088;92;Caper Monterey Stockcar - 08 Bayesian
578910088;93;Caper Monterey Stockcar - 40 Jewel
607772150;51;Ariel Atom 500 V8 - Uff #38
607772150;52;Ariel Atom 500 V8 - Rosso Bianco #02
607772150;53;Ariel Atom 500 V8 - sptcar #09
607772150;54;Ariel Atom 500 V8 - Bolton Touristic #06
607772150;55;Ariel Atom 500 V8 - Petrolos #05
607772150;56;Ariel Atom 500 V8 - Petroblast #08
607772150;57;Ariel Atom 500 V8 - Rapa Olio #03
607772150;58;Ariel Atom 500 V8 - Tashimo #04
607772150;59;Ariel Atom 500 V8 - Team UK #12
607772150;60;Ariel Atom 500 V8 - Mixlub Motor Oil #16
607772150;61;Ariel Atom 500 V8 - Sheriftizer #30
607772150;62;Ariel Atom 500 V8 - Tool Safe #22
607772150;63;Ariel Atom 500 V8 - Jancon Mobile #26
607772150;64;Ariel Atom 500 V8 - Garton Racing #69
607772150;65;Ariel Atom 500 V8 - Asymbon #01
607772150;66;Ariel Atom 500 V8 - Vollmer Racing #10
607772150;67;Ariel Atom 500 V8 - FUEA #11
607772150;68;Ariel Atom 500 V8 - Hauminator #20
607772150;69;Ariel Atom 500 V8 - Truran Air #21
607772150;70;Ariel Atom 500 V8 - Four C Motorsport #14
779111340;51;BMW 320 Turbo Group 5 - Dambreville #3
779111340;52;BMW 320 Turbo Group 5 - Lublix #8
779111340;53;BMW 320 Turbo Group 5 - Stetz + Grindner #12
779111340;54;BMW 320 Turbo Group 5 - Liezenbach #14
779111340;55;BMW 320 Turbo Group 5 - Gerhardt Electronics #18
779111340;56;BMW 320 Turbo Group 5 - Gerstenfelder #21
779111340;57;BMW 320 Turbo Group 5 - Kolomiets #30
779111340;58;BMW 320 Turbo Group 5 - Bastier #31
779111340;59;BMW 320 Turbo Group 5 - Tespot #41
779111340;60;BMW 320 Turbo Group 5 - Rexxar #50
779111340;61;BMW 320 Turbo Group 5 - GJL #51
779111340;62;BMW 320 Turbo Group 5 - Nextrako #54
779111340;63;BMW 320 Turbo Group 5 - Luigo Spark Plugs #55
779111340;64;BMW 320 Turbo Group 5 - Greif Oil #63
779111340;65;BMW 320 Turbo Group 5 - Galsferd #66
779111340;66;BMW 320 Turbo Group 5 - Hoffmann Automobile #71
779111340;67;BMW 320 Turbo Group 5 - Ringley Engineering #74
779111340;68;BMW 320 Turbo Group 5 - Karsten #75
779111340;69;BMW 320 Turbo Group 5 - Vollmer #77
779111340;70;BMW 320 Turbo Group 5 - Fried + Prinz #88
779111340;71;BMW 320 Turbo Group 5 - Gassolini #32
844159614;51;125cc Shifter Kart - Mudino #4
844159614;52;125cc Shifter Kart - Luquitas #11
844159614;53;125cc Shifter Kart - Project CARS #14
844159614;54;125cc Shifter Kart - Tex Racing #10
844159614;55;125cc Shifter Kart - RS Motorsport #29
844159614;56;125cc Shifter Kart - KOMO Corse #18
844159614;57;125cc Shifter Kart - G+Z Motorsport #23
844159614;58;125cc Shifter Kart - Bad Sauna #21
844159614;59;125cc Shifter Kart - Turbo-Motors #42
844159614;60;125cc Shifter Kart - Nitroniumx #83
844159614;61;125cc Shifter Kart - Rosso+Bianco #15
844159614;62;125cc Shifter Kart - Dibleys #12
844159614;63;125cc Shifter Kart - Team Zenon #25
844159614;64;125cc Shifter Kart - Harden #8
844159614;65;125cc Shifter Kart - Adrenaline #53
844159614;66;125cc Shifter Kart - Wester #74
844159614;67;125cc Shifter Kart - Bellflex #17
844159614;68;125cc Shifter Kart - Demonio #22
844159614;69;125cc Shifter Kart - Runner #99
844159614;70;125cc Shifter Kart - Viktoria #71
1161219858;51;BMW Z4 GT3 - BMW Motorsport #19
1161219858;52;BMW Z4 GT3 - BMW Motorsport #20
1161219858;53;BMW Z4 GT3 - Neutronics #11
1161219858;54;BMW Z4 GT3 - Keon #98
1161219858;55;BMW Z4 GT3 - Zipanol #23
1161219858;56;BMW Z4 GT3 - Illocom #35
1161219858;57;BMW Z4 GT3 - Illocom #36
1161219858;58;BMW Z4 GT3 - Pro9 #7
1161219858;59;BMW Z4 GT3 - Quasol #50
1161219858;60;BMW Z4 GT3 - Quasol #78
1161219858;61;BMW Z4 GT3 - Rosso+Bianco #24
1161219858;62;BMW Z4 GT3 - Yirotires #88
1161219858;63;BMW Z4 GT3 - Rosso+Bianco #15
1161219858;64;BMW Z4 GT3 - Bastier #6
1161219858;65;BMW Z4 GT3 - Adler Tag #27
1161219858;66;BMW Z4 GT3 - Sheriftizer #9
1161219858;67;BMW Z4 GT3 - Oilzanol #22
1161219858;68;BMW Z4 GT3 - Team Evo #37
1161219858;69;BMW Z4 GT3 - Aikyo #90
1161219858;70;BMW Z4 GT3 - Clarky #85
1161219858;71;BMW Z4 GT3 - Nvidia #82
1161219858;72;BMW Z4 GT3 - Nvidia #83
1161219858;73;BMW Z4 GT3 - ADL #70
1161219858;74;BMW Z4 GT3 - Panasonic #34
1161219858;75;BMW Z4 GT3 - pArispherique #28
1161219858;76;BMW Z4 GT3 - Hana Racing #53
1161219858;77;BMW Z4 GT3 - Hexa Dynamics #37
1161219858;78;BMW Z4 GT3 - Montgolfier #72
1161219858;79;BMW Z4 GT3 - Zipanol #27
1161219858;80;BMW Z4 GT3 - David Drive Systems #44
1161219858;100;BMW Z4 GT3 - Thrustmaster #99
1368036017;51;BMW M1 Procar - BMW Motorsport #1
1368036017;52;BMW M1 Procar - BMW Motorsport #6
1368036017;53;BMW M1 Procar - Vittorio #7
1368036017;54;BMW M1 Procar - Alban #24
1368036017;55;BMW M1 Procar - DeStijl Team #27
1368036017;56;BMW M1 Procar - Candy #69
1368036017;57;BMW M1 Procar - Gerhardt Motorsport #19
1368036017;58;BMW M1 Procar - Garrett Racing #86
1368036017;59;BMW M1 Procar - Turbolio #81
1368036017;60;BMW M1 Procar - Forpi #32
1368036017;61;BMW M1 Procar - Fried + Prinz #87
1368036017;62;BMW M1 Procar - Petroblast #17
1368036017;63;BMW M1 Procar - Saltz Video Cassette #72
1368036017;64;BMW M1 Procar - Zipanol #76
1368036017;65;BMW M1 Procar - Kings #35
1368036017;66;BMW M1 Procar - Piston #78
1368036017;67;BMW M1 Procar - Slightly Mad Art #79
1368036017;68;BMW M1 Procar - Dambreville #33
1368036017;69;BMW M1 Procar - True North Racing #22
1368036017;70;BMW M1 Procar - SUEI Racing Wheels #9
1368036017;71;BMW M1 Procar - CPDE Rennsport #4
1400443574;1;BAC Mono - Robot White / Gloss Black
1400443574;2;BAC Mono - Robot White / Matte Carbon
1400443574;3;BAC Mono - Raptor Grey / Gloss Black
1400443574;4;BAC Mono - Raptor Grey / Matte Carbon
1400443574;5;BAC Mono - Seal Grey / Gloss Black
1400443574;6;BAC Mono - Seal Grey / Matte Carbon
1400443574;7;BAC Mono - Tronic Black / Matte Carbon
1400443574;8;BAC Mono - Green Pearl Metallic / Gloss Black
1400443574;9;BAC Mono - Green Pearl Metallic / Matte Carbon
1400443574;10;BAC Mono - Blue Pearl Metallic / Gloss Black
1400443574;11;BAC Mono - Blue Pearl Metallic / Matte Carbon
1400443574;12;BAC Mono - Red Pearl Metallic / Gloss Black
1400443574;13;BAC Mono - Red Pearl Metallic / Matte Carbon
1400443574;14;BAC Mono - Yellow Pearl Metallic / Gloss Black
1400443574;15;BAC Mono - Yellow Pearl Metallic / Matte Carbon
1400443574;16;BAC Mono - White Pearl Metallic / Gloss Black
1400443574;17;BAC Mono - White Pearl Metallic / Matte Carbon
1400443574;18;BAC Mono - Titanium Metallic / Gloss Black
1400443574;19;BAC Mono - Titanium Metallic / Matte Carbon
1400443574;20;BAC Mono - Gun Metal Grey Metallic / Gloss Black
1400443574;21;BAC Mono - Gun Metal Grey Metallic / Matte Carbon
1400443574;51;BAC Mono - RST #23
1400443574;52;BAC Mono - Petroblast #10
1400443574;53;BAC Mono - Vik Builder #21
1400443574;54;BAC Mono - SRT #16
1400443574;55;BAC Mono - Special classic #5
1400443574;56;BAC Mono - RSAcademy white
1400443574;57;BAC Mono - RSAcademy red
1400443574;58;BAC Mono - SMS Racing #17
1400443574;59;BAC Mono - SMS Racing #18
1400443574;60;BAC Mono - Pure Wild #3
1400443574;61;BAC Mono - Pure Wild #4
1400443574;62;BAC Mono - Warm Chrome #1
1400443574;63;BAC Mono - Warm Chrome #2
1400443574;64;BAC Mono - Sober flow #6
1400443574;65;BAC Mono - Sober flow #7
1400443574;66;BAC Mono - Full carbon #9
1400443574;67;BAC Mono - RST #8
1400443574;68;BAC Mono - Kerozen Racing #7
1400443574;69;BAC Mono - Jeschke Racing #20
1400443574;70;BAC Mono - FUEA #46
1400443574;71;BAC Mono - pArisperique #28
1400443574;72;BAC Mono - Deadmau5
1452261378;51;Aston Martin Vantage GT3 - 2014 Aston Martin Racing #007
1452261378;52;Aston Martin Vantage GT3 - Aigo #13
1452261378;53;Aston Martin Vantage GT3 - Adrenaline #108
1452261378;54;Aston Martin Vantage GT3 - Mackeroy #101
1452261378;55;Aston Martin Vantage GT3 - Rexergie #111
1452261378;56;Aston Martin Vantage GT3 - HPF #107
1452261378;57;Aston Martin Vantage GT3 - Imochi #56
1452261378;58;Aston Martin Vantage GT3 - Frowdex #55
1452261378;59;Aston Martin Vantage GT3 - People's Bank #104
1452261378;60;Aston Martin Vantage GT3 - Kings #103
1452261378;61;Aston Martin Vantage GT3 - Runner #81
1452261378;62;Aston Martin Vantage GT3 - Rapa #100
1452261378;63;Aston Martin Vantage GT3 - Wintermoon #65
1452261378;64;Aston Martin Vantage GT3 - Curley's #112
1452261378;65;Aston Martin Vantage GT3 - Vollmer #31
1452261378;66;Aston Martin Vantage GT3 - W W W #43
1452261378;67;Aston Martin Vantage GT3 - Petroblast #102
1452261378;68;Aston Martin Vantage GT3 - Fuente #45
1452261378;69;Aston Martin Vantage GT3 - Fuente #46
1452261378;70;Aston Martin Vantage GT3 - Zero DF #21
1452261378;72;Aston Martin Vantage GT3 - NeedRacingCom #99
1452261378;73;Aston Martin Vantage GT3 - Andresen Design #43
1452261378;74;Aston Martin Vantage GT3 - RaceOn OZ #55
1452261378;75;Aston Martin Vantage GT3 - Craach Racing #77
1452261378;76;Aston Martin Vantage GT3 - Matthews #88
1452261378;77;Aston Martin Vantage GT3 - Point #91
1452261378;78;Aston Martin Vantage GT3 - Rexergie #112
1452261378;79;Aston Martin Vantage GT3 - Runner #82
1469658023;1;Audi R8 V10 Plus - Brilliant Red
1469658023;2;Audi R8 V10 Plus - Ibis White
1469658023;3;Audi R8 V10 Plus - Ice Silver Metallic
1469658023;4;Audi R8 V10 Plus - Samoa Orange Metallic
1469658023;5;Audi R8 V10 Plus - Suzuka Grey Metallic
1469658023;6;Audi R8 V10 Plus - Teak Brown Metallic
1469658023;7;Audi R8 V10 Plus - Daytona Grey Pearl
1469658023;8;Audi R8 V10 Plus - Phantom Black Pearl
1469658023;9;Audi R8 V10 Plus - Sepang Blue Pearl
1469658023;10;Audi R8 V10 Plus - Estoril Blue Chrystal
1469658023;11;Audi R8 V10 Plus - Panther Black Chrystal
1469658023;12;Audi R8 V10 Plus - Sepang Blue Matte
1884411907;51;Audi R8 LMS Ultra - Audi R8 LMS Ultra
1884411907;52;Audi R8 LMS Ultra - No Regret #4
1884411907;53;Audi R8 LMS Ultra - JAE Glass #5
1884411907;54;Audi R8 LMS Ultra - Prism Engineering #14
1884411907;55;Audi R8 LMS Ultra - Pedace #17
1884411907;56;Audi R8 LMS Ultra - Mestron Electronics #18
1884411907;57;Audi R8 LMS Ultra - Pedace #19
1884411907;58;Audi R8 LMS Ultra - Ringley Engineering #24
1884411907;59;Audi R8 LMS Ultra - Race-It Simulators #27
1884411907;60;Audi R8 LMS Ultra - No Regret #29
1884411907;61;Audi R8 LMS Ultra - JAE Brakes #47
1884411907;62;Audi R8 LMS Ultra - Sakume #52
1884411907;63;Audi R8 LMS Ultra - Darkwood Motorsport #62
1884411907;64;Audi R8 LMS Ultra - The Gentlemen's Club #66
1884411907;65;Audi R8 LMS Ultra - Milinea #74
1884411907;66;Audi R8 LMS Ultra - Frischkorn Suspension #76
1884411907;67;Audi R8 LMS Ultra - Glacier #84
1884411907;68;Audi R8 LMS Ultra - Carter #85
1884411907;69;Audi R8 LMS Ultra - Evo Auto #91
1884411907;70;Audi R8 LMS Ultra - Fox Motorsport #98
1884411907;71;Audi R8 LMS Ultra - Calsnager #105
1884411907;72;Audi R8 LMS Ultra - Hextronic #50
1884411907;73;Audi R8 LMS Ultra - Afanasyev Racing #96
1884411907;74;Audi R8 LMS Ultra - Flatout Alliance #46
1884411907;75;Audi R8 LMS Ultra - Team Imochi #42
1884411907;76;Audi R8 LMS Ultra - Enviral #3
1909945073;51;Formula A - Jancon Mobile #7
1909945073;52;Formula A - Jancon Mobile #7
1909945073;53;Formula A - Beezart Racing #3
1909945073;54;Formula A - Beezart Racing #4
1909945073;55;Formula A - Mixlub Racing #1
1909945073;56;Formula A - Mixlub Racing #2
1909945073;57;Formula A - Nextrako Racing #5
1909945073;58;Formula A - Nextrako Racing #6
1909945073;59;Formula A - SMS Racing #9
1909945073;60;Formula A - SMS Racing #10
1909945073;61;Formula A - Slightly Mad Studios #11
1909945073;62;Formula A - Slightly Mad Studios #12
1909945073;63;Formula A - KayOS #14
1909945073;64;Formula A - KayOS #15
1909945073;65;Formula A - Bolting #16
1909945073;66;Formula A - Bolting #17
1909945073;67;Formula A - Peoples Bank #18
1909945073;68;Formula A - Peoples Bank #19
1909945073;69;Formula A - Sheriftizer #20
1909945073;70;Formula A - Sheriftizer #21
1909945073;71;Formula A - Panasonic #24
1909945073;72;Formula A - Panasonic #25
1909945073;73;Formula A - FLANC #81
1909945073;74;Formula A - FLANC #82
1909945073;75;Formula A - enGUAGE #22
1909945073;76;Formula A - enGUAGE #23
1909945073;77;Formula A - Unistars #42
2022787216;50;Alpine A450 - Signatech Alpine #36
2086246081;51;Aston Martin V8 Vantage GT4 - Aston Martin Racing #70
2086246081;52;Aston Martin V8 Vantage GT4 - Aston Martin Racing #100
2086246081;53;Aston Martin V8 Vantage GT4 - Adrenaline/White #19
2086246081;55;Aston Martin V8 Vantage GT4 - Mestron Electronics #33
2086246081;56;Aston Martin V8 Vantage GT4 - Gerhardt Electronics #44
2086246081;57;Aston Martin V8 Vantage GT4 - Eagle Racing #66
2086246081;58;Aston Martin V8 Vantage GT4 - Jenwest #4
2086246081;60;Aston Martin V8 Vantage GT4 - W.H. Purvis #27
2086246081;61;Aston Martin V8 Vantage GT4 - FUEA #77
2086246081;62;Aston Martin V8 Vantage GT4 - Dorny #43
2086246081;63;Aston Martin V8 Vantage GT4 - Kings #34
2086246081;64;Aston Martin V8 Vantage GT4 - HFA'F #63
2086246081;65;Aston Martin V8 Vantage GT4 - Nevermore #31
2086246081;66;Aston Martin V8 Vantage GT4 - Unsen #53
2086246081;67;Aston Martin V8 Vantage GT4 - BRPS #74
2086246081;68;Aston Martin V8 Vantage GT4 - Horbsner automotive #68
2086246081;69;Aston Martin V8 Vantage GT4 - Glertstone #45
2086246081;70;Aston Martin V8 Vantage GT4 - Vittorio #30
2086246081;71;Aston Martin V8 Vantage GT4 - Andersson #07
2086246081;72;Aston Martin V8 Vantage GT4 - TGC Sim Racing Leagues #16
2086246081;73;Aston Martin V8 Vantage GT4 - Frowdex #81
2086246081;74;Aston Martin V8 Vantage GT4 - Kume #3
2086246081;75;Aston Martin V8 Vantage GT4 - Adrenaline/Black #18
2086246081;76;Aston Martin V8 Vantage GT4 - Izzy Springs #56
2219682419;51;Formula Rookie - RST Motorsports #61
2219682419;52;Formula Rookie - Borda Racing #17
2219682419;53;Formula Rookie - Southern Cars #36
2219682419;54;Formula Rookie - Drag and Drop #99
2219682419;55;Formula Rookie - Flatout Alliance #74
2219682419;56;Formula Rookie - Sheriftizer #35
2219682419;57;Formula Rookie - Fnix Racing #3
2219682419;58;Formula Rookie - Baysted Racing #9
2219682419;59;Formula Rookie - Garton Racing #39
2219682419;60;Formula Rookie - Bolton Touristic #60
2219682419;61;Formula Rookie - Cassius Racing #1
2219682419;62;Formula Rookie - Cassius Racing #2
2219682419;63;Formula Rookie - Tiger Racing #4
2219682419;64;Formula Rookie - Bolting Motorsports #8
2219682419;65;Formula Rookie - Domutech #46
2219682419;66;Formula Rookie - Jiffy Trans #5
2219682419;67;Formula Rookie - Jiffy Trans #6
2219682419;68;Formula Rookie - Kerozen Racing #10
2219682419;69;Formula Rookie - Kerozen Racing #11
2219682419;70;Formula Rookie - Amator team #101
2219682419;71;Formula Rookie - Bolting Motorsports #9
2524566288;51;Ariel Atom 300 - Snake #132
2524566288;52;Ariel Atom 300 - Marsupilami #56
2524566288;53;Ariel Atom 300 - Sptcar #26
2524566288;54;Ariel Atom 300 - Kerozen Racing #89
2524566288;55;Ariel Atom 300 - Slightly Mad Studios #69
2524566288;56;Ariel Atom 300 - Zipanol #31
2524566288;57;Ariel Atom 300 - Bolting #6
2524566288;58;Ariel Atom 300 - Flames #666
2524566288;59;Ariel Atom 300 - tek21 Racing #216
2524566288;60;Ariel Atom 300 - ER Motorsports #73
2524566288;61;Ariel Atom 300 - Rosso Bianco #10
2524566288;62;Ariel Atom 300 - Tiger Energy #47
2524566288;63;Ariel Atom 300 - Camouflage #116
2524566288;64;Ariel Atom 300 - Orange Blue #41
2524566288;65;Ariel Atom 300 - Luigo #8
2524566288;66;Ariel Atom 300 - Blue #3
2524566288;67;Ariel Atom 300 - Fire #161
2524566288;68;Ariel Atom 300 - Zectrol #88
2524566288;69;Ariel Atom 300 - Blue Yellow #49
2524566288;70;Ariel Atom 300 - White Green #7
2749517114;51;BMW M3 GT4 - BMW Motorsport #1
2749517114;52;BMW M3 GT4 - BMW Motorsport #25
2749517114;53;BMW M3 GT4 - Strodia #2
2749517114;54;BMW M3 GT4 - Makuma #5
2749517114;55;BMW M3 GT4 - Arc Sun #7
2749517114;56;BMW M3 GT4 - Start n Go #17
2749517114;57;BMW M3 GT4 - Semtler Systems #20
2749517114;58;BMW M3 GT4 - Pantera #22
2749517114;59;BMW M3 GT4 - Vamos #23
2749517114;60;BMW M3 GT4 - Illocom #24
2749517114;61;BMW M3 GT4 - Seven Savors #30
2749517114;62;BMW M3 GT4 - Bersmann #32
2749517114;63;BMW M3 GT4 - WW Comics #35
2749517114;64;BMW M3 GT4 - 1M Pixel Photo #36
2749517114;65;BMW M3 GT4 - Kuebler #51
2749517114;66;BMW M3 GT4 - Slightly Mad Studios #66
2749517114;67;BMW M3 GT4 - JAE Brakes #73
2749517114;68;BMW M3 GT4 - Angry Ant #76
2749517114;69;BMW M3 GT4 - Schivelly #78
2749517114;70;BMW M3 GT4 - Nevermore #88
2749517114;71;BMW M3 GT4 - 4K VOD #42
2749517114;72;BMW M3 GT4 - Pantera #23
2749517114;73;BMW M3 GT4 - Kuebler #52
2749517114;74;BMW M3 GT4 - Kujin #78
2929049241;51;BMW M3 GT2 - BMW Motorsport #55
2929049241;52;BMW M3 GT2 - BMW Motorsport #56
2929049241;53;BMW M3 GT2 - Curtis Cams #40
2929049241;54;BMW M3 GT2 - Curtis Cams #41
2929049241;55;BMW M3 GT2 - Zipanol #28
2929049241;56;BMW M3 GT2 - Zipanol #29
2929049241;57;BMW M3 GT2 - RST #64
2929049241;58;BMW M3 GT2 - RST #65
2929049241;59;BMW M3 GT2 - Jancon Mobile #1
2929049241;60;BMW M3 GT2 - Jancon Mobile #2
2929049241;61;BMW M3 GT2 - Oilzanol #45
2929049241;62;BMW M3 GT2 - Oilzanol #46
2929049241;63;BMW M3 GT2 - RGB #14
2929049241;64;BMW M3 GT2 - Grizzly #99
2929049241;65;BMW M3 GT2 - Vail #85
2929049241;66;BMW M3 GT2 - Vail #86
2929049241;67;BMW M3 GT2 - 10 Strikes Team #25
2929049241;68;BMW M3 GT2 - 10 Strikes Team #26
2929049241;69;BMW M3 GT2 - Strodia #4
2929049241;70;BMW M3 GT2 - Sheriftizer #76
2929049241;71;BMW M3 GT2 - Race-It Simulators #27
2929049241;72;BMW M3 GT2 - Houser Shoes #8
2929049241;73;BMW M3 GT2 - pArispherique #28
2929049241;74;BMW M3 GT2 - PVS #20
2976119256;51;Formula B - SciFlex Group #11
2976119256;52;Formula B - SciFlex Group #12
2976119256;53;Formula B - Hauminator #19
2976119256;54;Formula B - Hauminator #20
2976119256;55;Formula B - Benefit Pro #1
2976119256;56;Formula B - Benefit Pro #2
2976119256;57;Formula B - Mixlub #9
2976119256;58;Formula B - Mixlub #10
2976119256;59;Formula B - Sheriftizer #15
2976119256;60;Formula B - Sheriftizer #16
2976119256;61;Formula B - Cobalt #5
2976119256;62;Formula B - Cobalt #6
2976119256;63;Formula B - Bastier #3
2976119256;64;Formula B - Bastier #4
2976119256;65;Formula B - Jancon Mobile #21
2976119256;66;Formula B - Jancon Mobile #22
2976119256;67;Formula B - Stichmuller #17
2976119256;68;Formula B - Stichmuller #18
2976119256;69;Formula B - Petrolos #23
2976119256;70;Formula B - Petrolos #24
2976119256;71;Formula B - Race Community Center #27
2976119256;72;Formula B - Race Community Center #28
3068790356;1;BMW 1-Series M Coupe - Valencia Orange Metallic
3068790356;2;BMW 1-Series M Coupe - Jet Black
3068790356;3;BMW 1-Series M Coupe - Alpine White
3068790356;51;BMW 1-Series M Coupe - M Stripes
3068790356;52;BMW 1-Series M Coupe - RST
3068790356;53;BMW 1-Series M Coupe - Galileo
3068790356;54;BMW 1-Series M Coupe - Pican Tuning
3068790356;55;BMW 1-Series M Coupe - Bersmann
3068790356;56;BMW 1-Series M Coupe - Uracan
3068790356;57;BMW 1-Series M Coupe - Kortex Sport
3068790356;58;BMW 1-Series M Coupe - XPS Suspension
3068790356;59;BMW 1-Series M Coupe - Cassius Racing
3068790356;60;BMW 1-Series M Coupe - Vane
3068790356;61;BMW 1-Series M Coupe - Panzer Race Tuning
3068790356;62;BMW 1-Series M Coupe - M Stripes/Silver metallic
3068790356;63;BMW 1-Series M Coupe - MoTweak
3068790356;64;BMW 1-Series M Coupe - Yellow Metallic
3068790356;65;BMW 1-Series M Coupe - OCH Racing
3068790356;66;BMW 1-Series M Coupe - Dark Bronze Metallic
3068790356;67;BMW 1-Series M Coupe - Base One
3068790356;68;BMW 1-Series M Coupe - Yellow
3068790356;69;BMW 1-Series M Coupe - Black
3068790356;70;BMW 1-Series M Coupe - Ringley Engineering
3227065186;51;Audi R18 TDI - #1
3227065186;52;Audi R18 TDI - #3
3227065186;53;Audi R18 TDI - #3
3253292325;51;Formula C - RST #53
3253292325;52;Formula C - RST #54
3253292325;53;Formula C - Runforged #58
3253292325;54;Formula C - Runforged #59
3253292325;55;Formula C - Stargenley #3
3253292325;56;Formula C - Stargenley #4
3253292325;57;Formula C - Nextrako #38
3253292325;58;Formula C - Maple Leaf #19
3253292325;59;Formula C - JAE #1
3253292325;60;Formula C - JAE #2
3253292325;61;Formula C - Quasol #7
3253292325;62;Formula C - Beezart #99
3253292325;63;Formula C - Cassius Racing #14
3253292325;64;Formula C - Celticom Network #5
3253292325;65;Formula C - Celticom Network #6
3253292325;66;Formula C - Volzen #22
3253292325;67;Formula C - Petrolos #50
3253292325;68;Formula C - Petrolos #51
3253292325;69;Formula C - Roboil #44
3253292325;70;Formula C - Roboil #45
3253292325;71;Formula C - Race Community Center #27
3253292325;72;Formula C - Race Community Center #28
3357033447;51;250cc Superkart - Quasol #3
3357033447;52;250cc Superkart - Bolting #17
3357033447;53;250cc Superkart - Luquitas #26
3357033447;54;250cc Superkart - SimmSon #5
3357033447;55;250cc Superkart - Auryn #33
3357033447;56;250cc Superkart - Hauminator #11
3357033447;57;250cc Superkart - Demonio #21
3357033447;58;250cc Superkart - CTD #36
3357033447;59;250cc Superkart - Kolomiets #9
3357033447;60;250cc Superkart - Lublix #18
3357033447;61;250cc Superkart - FineKarts #29
3357033447;62;250cc Superkart - Vittorio #7
3357033447;63;250cc Superkart - Suei #4
3357033447;64;250cc Superkart - sptcar #25
3357033447;65;250cc Superkart - jeschke #2
3357033447;66;250cc Superkart - Green Arrow #14
3357033447;67;250cc Superkart - Tengco #43
3357033447;68;250cc Superkart - Machuca #71
3357033447;69;250cc Superkart - ToK #45
3357033447;70;250cc Superkart - Mestron #31
3360868789;51;BMW M3 E30 Group A - BMW Motorsport #1
3360868789;52;BMW M3 E30 Group A - Stichmueller #2
3360868789;53;BMW M3 E30 Group A - SUEI #7
3360868789;54;BMW M3 E30 Group A - Mingelo #8
3360868789;55;BMW M3 E30 Group A - Jeschke #14
3360868789;56;BMW M3 E30 Group A - Nalan #15
3360868789;57;BMW M3 E30 Group A - Wild Antonio #20
3360868789;58;BMW M3 E30 Group A - RST Motorsport #21
3360868789;59;BMW M3 E30 Group A - Kings #26
3360868789;60;BMW M3 E30 Group A - Pilaro #27
3360868789;61;BMW M3 E30 Group A - Quasol #32
3360868789;62;BMW M3 E30 Group A - Gerhardt Motorsport #33
3360868789;63;BMW M3 E30 Group A - Z5 Air Cooling #38
3360868789;64;BMW M3 E30 Group A - S+A #39
3360868789;65;BMW M3 E30 Group A - 10 Strikes #44
3360868789;66;BMW M3 E30 Group A - RobOil #50
3360868789;67;BMW M3 E30 Group A - Mudino #56
3360868789;68;BMW M3 E30 Group A - GJL #77
3360868789;69;BMW M3 E30 Group A - Schivelly #78
3360868789;70;BMW M3 E30 Group A - Gerhardt Motorsport #88
3970726840;51;Aston Martin Rapide Hybrid - 2013 Aston Martin Racing #100
3970726840;52;Aston Martin Rapide Hybrid - Vane Cooling Systems #9
3970726840;53;Aston Martin Rapide Hybrid - Aotech Racing #12
3970726840;54;Aston Martin Rapide Hybrid - Kings #14
3970726840;55;Aston Martin Rapide Hybrid - Curtis #22
3970726840;56;Aston Martin Rapide Hybrid - Imperativ #26
3970726840;57;Aston Martin Rapide Hybrid - Emerald Plaza #36
3970726840;58;Aston Martin Rapide Hybrid - Project CARS #40
3970726840;59;Aston Martin Rapide Hybrid - Akyaten Cooling Systems #41
3970726840;60;Aston Martin Rapide Hybrid - Volzen Air Filters #49
3970726840;61;Aston Martin Rapide Hybrid - Regeta Electronice #54
3970726840;62;Aston Martin Rapide Hybrid - Burn Springs #64
3970726840;63;Aston Martin Rapide Hybrid - Base One #65
3970726840;64;Aston Martin Rapide Hybrid - Togussi Fashion #79
3970726840;65;Aston Martin Rapide Hybrid - Framing Noise #82
3970726840;66;Aston Martin Rapide Hybrid - Gassolini #84
3970726840;67;Aston Martin Rapide Hybrid - Marshall Edgeworth #86
3970726840;68;Aston Martin Rapide Hybrid - TGC Sim Racing Leagues #89
3970726840;69;Aston Martin Rapide Hybrid - Fractal Solutions #91
3970726840;70;Aston Martin Rapide Hybrid - Raeon Heavy Industries #95
3970726840;71;Aston Martin Rapide Hybrid - Adrenaline #96
3970726840;72;Aston Martin Rapide Hybrid - Cell Storming #107
3970726840;73;Aston Martin Rapide Hybrid - Cell Storming #108


(Custom livery for the vehicles is 99)


..so it can look like this:
>>> Click <<< (http://www.malzbierbude.de/component/option,com_pcreporter/Itemid,51/lang,en/?option=com_pcreporter&Itemid=51&class=*&vehicle=*&limit=500)


cheers,
Uwe

thuro76
25-05-2015, 22:56
I have some problem for the extraction of this:

204491

for php.

Can anyone help me please?

Ph0eNiX
25-05-2015, 22:59
And ? what's the problem ? You give us only a json object, but no information with your problem.

If you don't know work with Json:

PHP Italian doc: http://php.net/manual/it/function.json-decode.php
Or PHP English doc: http://php.net/manual/en/function.json-decode.php

If you need to parse a Json object for Javascript:

http://www.w3schools.com/json/json_eval.asp

thuro76
25-05-2015, 23:17
We but everything else we could have it and add it to the database, not that

Ph0eNiX
25-05-2015, 23:27
@Stepan Vondrak

Just to be sure, no socket connection possible? So no emmited event from Server Api, right?

I will try to do an open source livetiming, with NodeJs and sailsJS framework with socket.io embedded. If it will be possible to connect by a socket to the Api it will be perfect. I just have to work with emmited data, not by a GET loop all secondes.

Because some API events have the same timestamp, and if i called only the last one event all secondes or millisecondes by:

http://localhost:9000/api/log/range?offset=-1&count=1

Result for example: http://img11.hostingpics.net/pics/629948CaptureEvents.png

I can pass through some events.

If socket connection will be not allowed, i will try by an other way. It's only to be sure.

At this point I'm just in process of thinking about how best to work with the API, so i just ask clear informations, before start coding.

Ph0eNiX
25-05-2015, 23:30
We but everything else we could have it and add it to the database, not that

Sorry i not understand well your english. You just want to store this data on your database, correct?

thuro76
25-05-2015, 23:39
Sorry i not understand well your english. You just want to store this data on your database, correct?

sorry use google translate, we would like to take the necessary data, import them into the database, and then create a web page type hotlaps / livetiming, but we are in trouble with ARRAY participants......response and members is ok.

Ph0eNiX
25-05-2015, 23:53
sorry use google translate, we would like to take the necessary data, import them into the database, and then create a web page type hotlaps / livetiming, but we are in trouble with ARRAY participants......response and members is ok.

I think the first thing to do is to create your own topic to avoid polluting it by many post.

I could explain you how, but it will may be long. You certainly are a novice, and I doubt that you know object-oriented programming for exemple? Your website is done with what? there will be a relationship with the site already in place, or standalone? How do you make your request to the server?

Make a new topic detailed with a good headline like: "[PHP] How to work with dedicated server API" and explain well your situation.

Use service like this to share code please: http://pastebin.com/

Ph0eNiX
26-05-2015, 00:20
sorry use google translate, we would like to take the necessary data, import them into the database, and then create a web page type hotlaps / livetiming, but we are in trouble with ARRAY participants......response and members is ok.

Ok you don't work well with PHP object, try the code i linked:

http://pastebin.com/RQXHKZ19

thuro76
26-05-2015, 00:32
Ok you don't work well with PHP object, try the code i linked:

http://pastebin.com/6EDmzhNQ

This is my code php : http://pastebin.com/wUFCnNBn

thuro76
26-05-2015, 00:59
Ok you don't work well with PHP object, try the code i linked:

http://pastebin.com/RQXHKZ19

Parse error: syntax error, unexpected '$participant' (T_VARIABLE)
$participant->attributes->RefId

Ph0eNiX
26-05-2015, 01:07
Normal I had wrote particpant on my foreach in place of participant I forget one i. I'm working on an other thing on the same time sorry.

I send you a private message with your code modified, but your reflexion IS NOT good. If there are more than one player how you will insert data?.

Tomorow or maybe after tomorow I will write a basic PHP library for accessing to data, and I will explain you how to work with.

thuro76
26-05-2015, 01:12
Meanwhile Thanks for your help and I hope not I wasted your time , for other people thought like a FOR loop, but after

Ph0eNiX
26-05-2015, 01:22
Don't worry, it's all time a pleasure to read Spaghetti code, especially written by an Italian :o I laugh, I particularly know what is learning, go ahead and push hard, the best is yet to come! May the developer's force be with you!

thuro76
26-05-2015, 01:29
Don't worry, it's all time a pleasure to read Spaghetti code, especially written by an Italian :o I laugh, I particularly know what is learning, go ahead and push hard, the best is yet to come! May the developer's force be with you!

ps. corrected some things and it works, thanks

I'm not a programmer as you could see, until now I have always been involved in modding, rendering and sometimes with 3D programs

Kamel
26-05-2015, 17:00
@Stepan Vondrak

Just to be sure, no socket connection possible? So no emmited event from Server Api, right?

I will try to do an open source livetiming, with NodeJs and sailsJS framework with socket.io embedded. If it will be possible to connect by a socket to the Api it will be perfect. I just have to work with emmited data, not by a GET loop all secondes.

Because some API events have the same timestamp, and if i called only the last one event all secondes or millisecondes by:

http://localhost:9000/api/log/range?offset=-1&count=1

Result for example: http://img11.hostingpics.net/pics/629948CaptureEvents.png

I can pass through some events.

If socket connection will be not allowed, i will try by an other way. It's only to be sure.

At this point I'm just in process of thinking about how best to work with the API, so i just ask clear informations, before start coding.Use the index instead?

Calling /api/log/range?offset=16&count=1 yields a response with
first: 0 and count: 52 so you know there are more events in the log. Just iterate and call it with incremented offset and/or count.

Ph0eNiX
26-05-2015, 22:07
It's what i'm doing.

Ph0eNiX
27-05-2015, 08:38
I'm not really doing so.

I'm query the full log on a loop and i check if there are new entry:



if( data.response.count != lastlog ) {

if (i >= lastlog-1) {
do the job;
if (jobDone){ //for exemple
lastlog = data.response.count
}
}
}


it's working well but often is it impossible to parse the query on the log url, and sometimes status url also.

Accuracy: I query the server all 2500 milliseconds. And is it impossible to do a JSON.parse () on the reponse

** PROBLEM SOLVED ** With an other HTTP client "request-json".

Are there some dev with NodeJs knowledge, sailsJS framework, and GIT ? Because i will do an open source repository on Github.

Features planned:

* Start the livetiming by a web interface
* Manage connected by a web interface "Kick/Ban"
* Stop the livetiming by a web interface
* Show live by sockets connection
* Show all laps by tracks/cars/players
* Show session's results
* Championship's manager
* Datastore-agnostic, to link users from an other database like your website for exemple.
- - Database supported "Mongo, PostGre, Mysql" can work together
- - It will can work without any database also.
* Some stats for Drivers/Tracks/Cars/Sessions

derDumeklemmer
27-05-2015, 19:56
Hi Stephan,


Thanks for noticing this. It might be a genuine bug in the data, I've reported it to the vehicle team.

I believe that I've found another one...



<NAMES INPUT ="LIVERY">
<NAME LIVERY="51" NAME="Dubai Autodrome #1" />
<NAME LIVERY="52" NAME="Skydive Dubai #2" />
<NAME LIVERY="53" NAME="Gulf Oil #3" />
<NAME LIVERY="54" NAME="Lime #4" />
<NAME LIVERY="55" NAME="Towers Rotana #5" />
<NAME LIVERY="56" NAME="RSeat #6" />
<NAME LIVERY="57" NAME="Gulf Sport #7" />
<NAME LIVERY="58" NAME="XPS Suspension #8" />
<NAME LIVERY="59" NAME="Campbell #11" />
<NAME LIVERY="60" NAME="Celticom Network #21" />
<NAME LIVERY="61" NAME="Curved Lines #22" />
<NAME LIVERY="62" NAME="Four C Motorsport #24" />
<NAME LIVERY="63" NAME="Evenshock #28" />
<NAME LIVERY="64" NAME="Murray #72" />
<NAME LIVERY="65" NAME="Strata Group #77" />
<NAME LIVERY="66" NAME="Populous Bank #80" />
<NAME LIVERY="67" NAME="Racetek Simulators #82" />
<NAME LIVERY="68" NAME="Project CARS #85" />
<NAME LIVERY="69" NAME="Slightly Mad Studios #89" />
<NAME LIVERY="61" NAME="Project CARS #99" />
<NAME LIVERY="99" NAME="Custom Livery" />
</NAMES>


LiveryID 61 is double and ID99 (Custom Livery) is missing ingame.
Could you pls. forward the information as well ?

cheers,
Uwe

derDumeklemmer
28-05-2015, 07:16
Hi Stepan,

seems Gumpert Apollo has double asignments for same livery:




<NAMES INPUT ="LIVERY">
<NAME LIVERY="1" NAME="Blue Metallic" />
<NAME LIVERY="2" NAME="Orange Metallic" />
<NAME LIVERY="3" NAME="Red Metallic" />
<NAME LIVERY="4" NAME="Turquois Metallic" />
<NAME LIVERY="5" NAME="Silver Metallic" />
<NAME LIVERY="6" NAME="Yellow Metallic" />
<NAME LIVERY="7" NAME="Matte Black" />
<NAME LIVERY="8" NAME="Matte Silver" />
<NAME LIVERY="51" NAME="Light Blue Metallic" />
<NAME LIVERY="52" NAME="Orange Metallic" />
<NAME LIVERY="53" NAME="Purple Matte" />
<NAME LIVERY="54" NAME="Blue Sky" />
<NAME LIVERY="55" NAME="Red Matte" />
<NAME LIVERY="56" NAME="Dark Blue Matte Metallic" />
<NAME LIVERY="57" NAME="Yellow" />
<NAME LIVERY="58" NAME="Chrome Special" />
<NAME LIVERY="59" NAME="White/Black stripe" />
<NAME LIVERY="60" NAME="Silver Metallic/Red" />
<NAME LIVERY="61" NAME="Dark Blue Metallic" />
<NAME LIVERY="62" NAME="Yellow Metallic" />
<NAME LIVERY="63" NAME="White/Red stripe" />
<NAME LIVERY="64" NAME="Turquoise Metallic" />
<NAME LIVERY="65" NAME="Silver Metallic/Black" />
<NAME LIVERY="66" NAME="Orange/Black stripe" />
<NAME LIVERY="67" NAME="Gun Metal" />
<NAME LIVERY="68" NAME="Neon Green Metallic" />
<NAME LIVERY="69" NAME="Copper Metallic" />
<NAME LIVERY="70" NAME="Black" />
<NAME LIVERY="99" NAME="Custom Livery" />

</NAMES>


Could you pls. forward the information as well ?

cheers,
Uwe

Kamel
28-05-2015, 17:32
Where do you get those from anyways? :-o

Stepan Vondrak
29-05-2015, 16:21
He's a dirty hacker, obviously ;)

Anyway, the API now finally also includes the list at /api/list/liveries . It's very similar to the vehicle list, just with liveries field added to each vehicle. Beware, it's quite long!

Note that this list is built from game data that are slightly more recent than the latest patch. So they have some of the reported livery assignment bugs resolved already (but not all yet).

t0daY
30-05-2015, 00:28
Hey guys,

me and a friend are workin with the api atm :) We are trying to get a livetimeview through googlemaps (google maps api is great btw! :D)

Here you can have a look what we have accomplished so far, first attempt was on the Imola GP :)


205237205238

derDumeklemmer
30-05-2015, 23:14
Hi Stepan,

He's a dirty hacker, obviously ;)

Anyway, the API now finally also includes the list at /api/list/liveries . It's very similar to the vehicle list, just with liveries field added to each vehicle. Beware, it's quite long!

Note that this list is built from game data that are slightly more recent than the latest patch. So they have some of the reported livery assignment bugs resolved already (but not all yet).

pls. don't call me dirty, I just only try to implement a nice reporting at our Malzbierbude.de ;-)

http://www.malzbierbude.de/component/option,com_pcreporter/Itemid,51/lang,en/?option=com_pcreporter&Itemid=51&class=*&vehicle=*&limit=500

(uff, just only ~300 skins left to implement)

Thank you so much for the new API list, that's what we were waiting for, so no need for me anymore to decrypt the game data, hehe ;-)

cheers,
Uwe

PS: andandand: we do have a double assignment for Pagani_Huayra_Orange_Carbon, maybe you could forward the information to the cars team as well ?

PPS: can't wait to have a first lap with the upcoming bonus cars ;-)


"id" : 987814806,
"name" : "Bentley Continental GT3",

Stepan Vondrak
01-06-2015, 13:09
PS: andandand: we do have a double assignment for Pagani_Huayra_Orange_Carbon, maybe you could forward the information to the cars team as well ?


Are you sure that's a duplicate? I see one livery called "Orange + Carbon" and one called "Orange/Carbon" and those look different in the game. Or you meant something else?

Stepan Vondrak
01-06-2015, 15:58
A new version has been released, fixing rare crash in logging. Hopefully that was the source of all crashes, but if not it should at least fix the crash that might happen when join is quickly cancelled.

derDumeklemmer
01-06-2015, 16:27
Hi Stepan,

Are you sure that's a duplicate? I see one livery called "Orange + Carbon" and one called "Orange/Carbon" and those look different in the game. Or you meant something else?

I mean ID2 & ID52.

cheers,
Uwe

Stepan Vondrak
02-06-2015, 10:04
Hi Stepan,


I mean ID2 & ID52.

cheers,
Uwe

Do you mean that they look visually the same? Because Pagani Huayra #2 is "Red Metallic + Carbon" while #52 is "Silver Metallic"

Ph0eNiX
02-06-2015, 13:02
Hi Stepan!

On /api/list/liveries or /api/list/vehicles it must will be possible to have the category id also and so an other get for categories like /api/list/categories?

Alexease
04-06-2015, 22:43
Maybe "VehicleGroupID"? :)

derDumeklemmer
05-06-2015, 07:09
Hi Stepan,

Do you mean that they look visually the same? Because Pagani Huayra #2 is "Red Metallic + Carbon" while #52 is "Silver Metallic"

uh, sorry my fault. You're right, no problem with the Huayra!

...seems this was a bit to much working hour in sorting all these skins for me the last days ;-)

cheers,
Uwe

Ph0eNiX
05-06-2015, 15:31
A point on my open source project


For now, I get all the necessary data from the server, the data is saved in database like that:

Here the tables: see attachments

To store the cars and tracks, there will be an action that directly synchronize queries /api/list/vehicles and /api/list/tracks in the database

All the 5000ms, I get the "/api/log/range" request like that:

Logs = /api/log/range?Offset='+ lastlog +'&count=100

where "lastlog" is a variable, and at the end of the loop, "lastlog" takes the value of "logs.response.count"

===========================================================================

Features available at this point

- Registration of live data every 5000ms. "Laps / session / driver"
- View the best times sorted by "Track or / and Car or / and Driver"
- Recording a result file for each session


Result file Example: see attachments

Need to be cleaned at some points

===========================================================================

Requirements before v0.1:

- view of live data by websocket
- view of the Session's File Result
- Redesign

Future Features :

- Some stats
- Internationalization
- Championship Manager
- Management of events hotlap "track/weather/car"
- An external application to manage the server "Launch / restart / stop / kick / ban" with nodewebkit

===========================================================================

Specification needed:

- NodeJs installed on the server or on your local machine
- Specified ports open

Technology used

- NodeJs > Link (https://nodejs.org/)
- Sails Framework with socket.io > Link (http://sailsjs.org/#!/)
- Bootstrap Framework > Link (http://getbootstrap.com/)
- Ejs Js template library > Link (http://www.embeddedjs.com/)
- Mustache Js Template library > Link (http://mustache.github.io/)
- Jquery > Link (https://jquery.com/)

===========================================================================

Some questions for Project-Cars developper:

- Will it be possible to have the current weather slot on the lap's log event?
- Can we have the list of car's categories
- Can we have the correspondance of all field like "DamageType/TireWearType/etc..."

Thanks in advance!

PS: I will create a new thread for v0.1.

david42fr
05-06-2015, 20:16
What a job! hope you can make it simple to use/implement for league admins!

Robert Gerke
05-06-2015, 20:38
Great Job, please still go on, Thanks!

Stepan Vondrak
09-06-2015, 13:14
New update to the server has been released, this should finish the base work on status reporting:

Participant list is cleared when returning back to lobby, the server no longer reports duplicate/obsolete participants from older races.
Added more methods to /api/list: .../vehicle_groups, .../enums and .../flags (enums and flags also with several subqueries to specific enums and flags)
Vehicle and livery lists now also include vehicle groups.
Updated descriptions of various attributes to point to appropriate lists/enums/flags, or list the valid values explicitly where it's just a bunch of strings.

Next I'll start working on the server being able to control the game, and such kind of servers will also appear in the browser directly, even when empty (because they don't need a host to control the settings). This will finally make the servers much more useful, especially if the community develops good tools around the API. I'll probably also try to hack together an open-source GUI frontend to it in my free time as an example/proof of concept. But this will all take some time, so please be patient!

david42fr
09-06-2015, 13:35
Keep on working on it, it's a great news ;)

Robert Gerke
09-06-2015, 14:18
Stepan, big thaks for your work.

What´s about these much-needed features? Can we enjoy this soon?

- After DS races a complete detailed race data and results, directly from the Server sending API?

- A real stand alone DS, no need to join to activate the server

These things ( among others ) are the currently worst, sorry.

Stepan Vondrak
09-06-2015, 14:23
- After DS races a complete detailed race data and results, directly from the Server sending API?

What kind of results are you missing from the event logs?



A real stand alone DS, no need to join to activate the server

This is all the "next I'll start working on" paragraph is about.

Ph0eNiX
09-06-2015, 15:25
A really f***g great job !

So my last questions:

----------------------------------------------------
Some questions for Project-Cars developper:

- Will it be possible to have the current weather slot on the lap's log event?
- Can we have the list of car's categories DONE
- Can we have the correspondance of all field like "DamageType/TireWearType/etc..." DONE

Thanks in advance!
-----------------------------------------------------------------------------------------------

Current weather on the lap's log event, maybe? Never ?

Robert Gerke
09-06-2015, 15:37
What kind of results are you missing from the event logs?


This is all the "next I'll start working on" paragraph is about.

Stepan, show...this one => http://wobspeed.uveso.de/cliocup.php

But this came not from the logs from DS, this come from every Driver client
together in a complicated process. Far too complicated. Maybe we'll do something wrong, but
the DS automatically does not write data in a log file. We must cobble together the laborious
each by any driver.

What we need ist one log file after a DS Session, who has all Data inklusive. Than i want to upload
this log file to a web application called: resultsviewer, or race report...and then come this results here...

look please Stepan... ONE LOG FILE = ONE DETAILED RESULTS => link (http://www.virtualracing.org/vrmodules/rfactorreport/index.php?qualyfile=http%3A%2F%2Fdownloads.virtualracing.org%2Frfactor%2FRMC%2FResults%2F2015-1%2FSpa_Q.xml&racefile=http%3A%2F%2Fdownloads.virtualracing.org%2Frfactor%2FRMC%2FResults%2F2015-

so easy to handle, with this wonderfully detailed results, must go for everyone.

We need and we want so much1%2FSpa_R.xml&cssstyle=) (Please check out the tab above the menu.)

Ph0eNiX
09-06-2015, 16:40
Wich langage you use to ask the server?

On my future Web interface it will be done.

A quick example because i deleted all others.

206862

Is building in Live like this:



{
Session: {"the session attributes"},
Drivers:[
{
member: {"members DS attributes"},
car: {"Stored car on the BDD"},
participant: {"participant DS linked"},
driver: {"Stored driver on the BDD"},
Laps: {
Practice1:["The lap's log event"],
Practice2:["The lap's log event"],
Qualifications: ["The lap's log event"],
Warmup:["The lap's log event"],
Race1:["The lap's log event"],
Race2: ["The lap's log event"]
}
}
],
Logs: ["All the logs"]
}



EDIT: An example with full Race weekend done.
206960

Ph0eNiX
10-06-2015, 14:59
The weather is calculated on the total duration of the race weekend, on a basis of 4 segments is that right?

How do I know the current slot when calling the API?

Stepan Vondrak
11-06-2015, 07:59
The weather is calculated on the total duration of the race weekend, on a basis of 4 segments is that right?

How do I know the current slot when calling the API?

The weather settings are just used to set many more internal properties in the weather system, and then we interpolate between those. You can't say that the weather is "cloudy" for example at any point afterwards, it's many different variables changing smoothly. Also I think the time slots are a bit randomized, it's not even evenly split. So I'd have to report some of the internal weather properties, I can't tell you which slot is active because that's not how it works.

What kind of values would you be mostly interested in? There are tons of them, but I guess most of use would be:
- Location information (geo coordinates of the track)
- Date and time of day
- Wetness data (on-path, off-path, average, predicted max wetness if available)
- Temperatures (ambient, track)
- Air (wind speed, direction, air pressure)

Anything else?

Robert Gerke
11-06-2015, 08:02
Very nice, all of this ...Stepan ;-) Thanks

Ph0eNiX
11-06-2015, 11:50
Thank's to Reply Stepan.

I like to know when a driver completed a lap or when i called the status, what are the track values, if you can provide to us " track wetness on-path, track temperatures, ambiant temperatures, location information " will be so good !

I explain why. I've done something where i can compare the best laps, but i don't know if all laps was done on the same conditions. And if i want to check all best laps with rain conditions , i can't at the moment.

Stepan Vondrak
11-06-2015, 12:04
A slightly bad news warning though. Because I already started working on the DS being able to control the game's settings, we most likely won't be able to release the build with weather reporting until the control bits are release-worthy. So you might have to wait for some time before any updates are released (DS update for the upcoming patch has been already prepared, and it will have no other updates than compatibility with the patch).

Ph0eNiX
11-06-2015, 12:57
Not really a problem, i know when we develop, patience is at the end of our devlist, but it's the price to have something like we want released.

if you say that the features will be on a futur update, i'm happy.

t0daY
12-06-2015, 14:21
Hey Stepan,

first of all a big thank you for your work so far :) But one short question :D :D

Is the compatibility patch already out/released? Updated the server through steam.. and it says the server is up to date but I cannot create a lobby through the ds :( (doublechecked everything, it should work probably^^)

Stepan Vondrak
12-06-2015, 14:29
DS compatible with patch 1.4 has been now released. Please update to let you use DS again. My old brain forgot to push the update with the game patch, I had it prepared already :\

t0daY
12-06-2015, 14:33
DS compatible with patch 1.4 has been now released. Please update to let you use DS again. My old brain forgot to push the update with the game patch, I had it prepared already :\

No problem Stepan, ur doin really good work, so its kinda okay you forgot to push the update besides the game patch :) :) thanks for your fast response!! :)

*edit* Updated the serverfiles, everything is working to 100% again, thanks again :) :)

[PSR]Painkiller
14-06-2015, 21:14
Wip livetiming, just getting the server attributes for now ,waiting for more server updates...great work Stepan .
207768

t0daY
14-06-2015, 21:17
Looks naice Painkiller, workin also on a livetiming site with a maptracking feature :)

david42fr
15-06-2015, 08:11
Hope to see soon some of your work for our server! keep pushing ;)

[PSR]Painkiller
15-06-2015, 11:24
Thanks

Ph0eNiX
17-06-2015, 11:27
Ok i'm near something well, just a screen without a full complete design:

[PSR]Painkiller
17-06-2015, 11:35
Looking good....

david42fr
17-06-2015, 13:35
step by step, things get their right place!

Ph0eNiX
17-06-2015, 15:45
And the stats. For drivers i need to do some work before but it will be like this ~ . When it will be done, i will release the first version.

PS: I have only 1 lap recorded and 1 session

208108

david42fr
18-06-2015, 09:21
There's a problem! you don't have any time to drive now ;)

flynny75
18-06-2015, 22:32
I've got live mapping working, but I want to see it work with more than one player. AI used to be working, now they dont get added. Does this happen to anyone else?

Also Stephan, what is the update rate of the server? I am polling at 500ms, but the data only seems to change every second or so. Will this be sped up?

[PSR]Painkiller
19-06-2015, 11:04
Hotlaps also in dev
208365

dohmien
21-06-2015, 01:40
Hello everyone,

Just to show you what I'm working right now, an application that allows to manage the DS and save diferent sessions of each race.
First top left, the max number of players, the status of the server and its name. Top right the progress of the race.
overview with the list of players in the lounge and the list of players in the race.

The ability to kick or ban a player (to finish)
On the 2nd tab have can see the list of games already played with the classification of each session.

I would then implement a point system in order to organize tournaments
208557
208558

Robert Gerke
21-06-2015, 05:23
very nice

Luke Townsend
21-06-2015, 14:23
Hello everyone,

Just to show you what I'm working right now, an application that allows to manage the DS and save diferent sessions of each race.
First top left, the max number of players, the status of the server and its name. Top right the progress of the race.
overview with the list of players in the lounge and the list of players in the race.

The ability to kick or ban a player (to finish)
On the 2nd tab have can see the list of games already played with the classification of each session.

I would then implement a point system in order to organize tournaments

Absolutely fantastic so far! :) Good luck on this. It could be awesome!

ZiggyUK
22-06-2015, 00:32
It's great to see so many guys working on variations of the live timing, keep it up people :encouragement:

Ph0eNiX
23-06-2015, 07:21
Ok so, if some of you want to show my work running on a production server http://eracing.fr:1337/

Not be afraid by the design, it will be fully modifiable, is written with .less and bootstrap 3.

What are the events? The events allow the application to verify the track conditions , to ensure fairness for a contest hotlap for example. Just write our conditions, and when the server is launched and respects the conditions, it will record the time normally but add the fact that it relates to the event selected.

This will enable us subsequently to sort lap times events and thus be sure of fair conditions for each one . In the near future they will serve mainly to create championship rounds.

It remains to do the reader for session results, a complete redesign of the administration, events pages, and I could share with you this work, a few more days for those who are interested .

an exemple of the new result file : 208806


PS: I don't working with car's liveries at this time

david42fr
23-06-2015, 07:53
Nice work!

Maddox
23-06-2015, 13:15
looks great

Stepan Vondrak
23-06-2015, 14:47
Some updates on recent DS development. Unfortunately I have been quite busy with other things that needed urgent attention so it does not go as fast as I hoped, but I have the protocol and API to control the game from the DS ready now. The game receives the requests but does not handle them in any way yet, that will be the fun part!

While adding this protocol I also added another that has been requested several times - server interaction with the in-game. Player's chat will now appear in the server events log (to be done actually, but it will be simple), and the server has an API to send chat to the game. You could use this to send informational messages to the lobby, or even to implement server-side voting via the chat.

The API on the server:
208839

The message in the client chat:
208838
For now it's using the "notification" color which is not very visible. I'll try to add a new color for server messages, but that will require larger modification of the game code and data, so it's not the highest priority right now.

So that's the first proof-of-concept handling of server requests in the game. Handling all the various settings that could be modified will be of course a bit more complicated than a simple chat line, but the foundations are there.

Ph0eNiX
23-06-2015, 16:17
Ah looks great for welcome message or other things! I will implement it. I know how i will, really great thanks.

PS : If you can add the gap from leader, and gap from previous and next please , on sectors logs for example or only on laps logs, where you want, i forget this last time.

Mattias
24-06-2015, 06:34
Very nice!
This means you can warn a specific player (I assume you will also be able to message a single member) if they behave badly, and then automagically kick or even ban if doing something too many times, like too many impacts into other players!
Just awesome!

On another note, I see a few of you have also started on creating nice applications. I guess I'm not the only one.

So far I've created an enjin html-module, which is simply just html/css/javascript to show live data from the dedicated server if a lobby/session is up for our group called UKCD. (http://ukcd.enjin.com/dsoverview sorry, this requires registration to be viewable, screenshot in action here: http://files.enjin.com.s3.amazonaws.com/1002310/modules/forum/attachments/ukcdmodule_1434827091.png )
Few bugs which will get fixed like grid spots open, apparently the data I thought showed valid participants is not what I thought it was.
I was also planning on creating a standalone application for more advanced stuff such as saving history of races and even show who crashed into who etc.

I'm wondering if anyone is creating their application open source? If not, I guess I will start one.
Plan is to use laravel to fetch data from the server every now and then to save, then create a simple api there to use that data.
Angular would be my choice for the frontend stuff.

For the open source part, I'm planning to have it here: https://github.com/mattias/pcdsh
So far only the laravel framework with not much else. But more to come as soon as I find some free time ;)
Probably will make the frontend standalone as well, so that will be opened in another repository as soon as the api is done.

david42fr
24-06-2015, 06:51
Great news and one question: why all of you developpers don't work with each others? When I see what is coming from various sources, I think that it could be developped a great app for controling and having live data on a website.

Ph0eNiX
24-06-2015, 09:38
Because we do not work with the same language , I already asked if some of the guys had some knowledge with NodeJS , without any response .

For example , I work with NodeJS , and he, like many others with PHP, but you can choose .

Why nodejs ? Because he working on the server side and that this is an asynchronous language, which is perfect for live data , and that requires no dependence aside from having nodejs installed, and a database. For explain with PHP the client have to request the server to refresh datas, whereas on NodeJs the server can send data to clients.

For example every 2 seconds my App call the API of Project Cars server and analyzes the data and performs operations "Send new data to the live, save the data in the database , create a results file . .. " And this is not possible with basic Php

I will soon make content available , and I hope some of you will try and help me develop in the future .

david42fr
24-06-2015, 12:45
Thanks for answer, that's quite clear for me!

Kamel
24-06-2015, 12:53
Because we do not work with the same language , I already asked if some of the guys had some knowledge with NodeJS , without any response .

For example , I work with NodeJS , and he, like many others with PHP, but you can choose .

Why nodejs ? Because he working on the server side and that this is an asynchronous language, which is perfect for live data , and that requires no dependence aside from having nodejs installed, and a database. For explain with PHP the client have to request the server to refresh datas, whereas on NodeJs the server can send data to clients.

For example every 2 seconds my App call the API of Project Cars server and analyzes the data and performs operations "Send new data to the live, save the data in the database , create a results file . .. " And this is not possible with basic Php

I will soon make content available , and I hope some of you will try and help me develop in the future .
Hey, I'm surely interested in the source but not sure if I can help very much. I don't even manage to finish my current project (rewrite of pcars-rank.kamelstall.de with React and db backend)

Mattias
24-06-2015, 13:47
Actually, why not make this all written in Google Go? Don't even need to have anything installed on the server except the application you write.
And Go is very good with API's... might reconsider... the rest is just html/css/javascript anyways.
With Go the bottleneck would probably end up being the database, it's just that fast.

Thinking about maybe writing it in both php and Go just for the fun of it.
The choices we have these days... :)

It's not very complicated though, like Ph0eNiX pointed out already... all you do is fetch some data from the dedicated server to save to a permanent database.
Write a new/extended API with more features to use that data.
Create frontends using that new API. Could be a smartphone app, could be just another webpage, maybe even a desktop application.

Would anyone else be interested in using Google Go for writing an extended api?

Edit:
I've decided, and started on writing this in Google Go instead.
It's blazing fast, no dependencies needed and just lovely to code in.

flynny75
24-06-2015, 15:37
I hope the chat will be behind some sort of permissions system...

For example, there could be a flag to allow spectators, and api calls to supply a username and password. Then these user details can be sent along with whatever request (like kick).

So for VDash's Race Monitor, anyone could 'watch' a race (if enabled at server), and if they enter credentials then they could also kick / ban players as well, with different credentials providing different levels of control

Mattias
24-06-2015, 21:03
I hope the chat will be behind some sort of permissions system...

You can already do this if you code that way when extending the api.
First you need to proxy it through a server such as nginx that can add http auth.
Secondly you need to create your extended api with the permission system :)
And if you have the api open to the public, you should at least close down the kick command with http auth by using nginx like mentioned above.
Otherwise anyone can kick people from your server ;)

flynny75
24-06-2015, 23:50
You can already do this if you code that way when extending the api.
First you need to proxy it through a server such as nginx that can add http auth.
Secondly you need to create your extended api with the permission system :)
And if you have the api open to the public, you should at least close down the kick command with http auth by using nginx like mentioned above.
Otherwise anyone can kick people from your server ;)

Right, but as Im sure you can imagine, setting all that up could be pretty intimidating, and it doesn't exactly help with the standardisation of the DS. The API should allow... It would be nice if the API provided access levels with users and passwords specified in the config

Ph0eNiX
25-06-2015, 13:06
Okay now, results's file are done: http://eracing.fr:1337/results

PS: I had to reset some table because there have been big changes in the meantime, and I was a bit abrupt , that's why it displays 0 driver.

Next Step:

1. Admin design
2. Refactoring
3. First Release

MatthiasB
25-06-2015, 13:38
looking forward to it

Stepan Vondrak
26-06-2015, 07:56
Yes ultimately I plan to implement access control to the API. It will probably use API keys configured in the settings, so you could config it like this:


accessGroups : {
"status" : [ "/api/session/status", "/api/log*" ],
"chat" : [ "/api/session/send_chat" ],
"all" : [ "/api*" ],
},
accessKeys : {
"" : [ "status" ],
"CHATKEYSECRET" : [ "status", "chat" ],
"ADMINKEYSECRET" : [ "all" ],
},

And then you would need to pass a "key=CHATKEYSECRET" to chat API calls.

In addition to that I'd like to also have IP filters defined in the config, not sure if just for overall access or as an alternative to the keys.

But it's rather likely that the first version with admin API won't have these, so either make sure you secure your API access or just hope people won't be too mean. After all, the kick API has been there from day 1.

flynny75
26-06-2015, 10:17
That is good news!

Stepan Vondrak
26-06-2015, 17:59
Some progress on DS controlling the game. I have implemented several attributes that already work and can be changed via the API.

Game settings before:
209313

API command:
209314

Game settings after:
209312
I'd have to wait for the practice length to show up on that tiny little square showing the options... yep I am not happy with that UI either :) But the "Start" button has enabled because the practice is now enabled.

This is of course just the beginning. I have yet to implement DS-controlled updates of most of the attributes, and then all the supporting features to make this work:

Option for the server to advertise the session as DS-controlled
In this mode disable the host's ability to control the settings
In this mode enable clients to join the game through the browser even when it's empty
Send initial settings to the first client on join

And that's the core required features. The server should also be able to control when the clients can proceed to loading (so it can set all options before), and optionally control session phase switching.

Mattias
28-06-2015, 16:01
So, since I decided to go with Google Go I've managed to create an application which can run in the background and fetch new log entries from a dedicated server, once a minute, to a local database.
As far as that goes it's done and can be found here: https://github.com/mattias/go-pcdsh

Next up, creating a restful api to do nice things with this collected data. And breaking out code into multiple files and perhaps a little refactoring.

Do we have any Google Go coders? Let me know either here or on github if interested in helping.
Next week I'll create a basic version of the api just to get it started.

Edit: Basic API is done. Now for the more fun API endpoints.

Ph0eNiX
30-06-2015, 06:46
Yesterday we were talking with a friend, and it would be really interesting for league can edit the starting grid during the warmup for example as in Rfactor .

Snoopy
30-06-2015, 14:04
Hi guys,

i see some Projects like this one [1] http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1014978&viewfull=1#post1014978 or also like this one [2] http://forum.projectcarsgame.com/showthread.php?31634-Project-Cars-Dedicated-Server-GUI-Launcher-with-%93live-timing%93-(results-timetable)&p=995667&viewfull=1#post995667

Should'nt those Projects be splittet into a own Thread [1] and stickied [1] & [2]?

Ph0eNiX
30-06-2015, 15:46
I will create a thread for first release, soon

thuro76
30-06-2015, 17:11
Probably you need a patch for the Dedicated Server, so you can not create the room , thanks

http://forum.projectcarsgame.com/showthread.php?33533-Dedicated-server-missing-with-today-s-update

Mattias
30-06-2015, 18:58
Yeah, dedicated server didn't get an update with the new project cars patch.

derDumeklemmer
30-06-2015, 19:29
same situation as with 1.4 patch, all worldwide dedi servers not available.

Cross fingers, that a solution will be available soon.

cheers,
Uwe

Stepan Vondrak
01-07-2015, 09:37
The DS has been updated now.

Stepan Vondrak
01-07-2015, 09:41
Hi guys,

i see some Projects like this one [1] http://forum.projectcarsgame.com/showthread.php?26520-Dedicated-Server-API&p=1014978&viewfull=1#post1014978 or also like this one [2] http://forum.projectcarsgame.com/showthread.php?31634-Project-Cars-Dedicated-Server-GUI-Launcher-with-%93live-timing%93-(results-timetable)&p=995667&viewfull=1#post995667

Should'nt those Projects be splittet into a own Thread [1] and stickied [1] & [2]?

Yep it makes sense for anyone working on interesting app/web utilizing the API to start a new thread with description/screenshots/changelogs and so on. Then feel free to PM me the link and I'll link it from the first post here.

flynny75
01-07-2015, 10:57
Can we get a sub-forum for them? Rather than lumping them in with general Multiplayer

Snoopy
01-07-2015, 14:21
Can we get a sub-forum for them? Rather than lumping them in with general Multiplayer
Hi,

atm i see 2 Projects, which directly point to the dedicated Server.
For those 2 i don't see a new subforum...

With those 2 i think it is o.K. in the Multiplayer Sub.

Maybe if more and more Projects will be made, this will be another thing.
Then it would make sense, but i think if this happens, we can go into discussion about that again.

Ph0eNiX
01-07-2015, 15:11
If my tests are successful tonight , I would put the beta project online on github tomorrow. I'd make a thread in the multiplayer section simultaneously. Strong fingers crossed because I think it will be cool.

xrichard
01-07-2015, 15:19
I'm using the log to pull together stats from old and new games, and I've noticed that some stats that are available in the session query (the live stats) do not show up in the log, like RaceStatFlags from attributes/member.

derDumeklemmer
01-07-2015, 21:17
Hi Stepan,


The DS has been updated now.

thank you so much, it's working now.


cheers,
Uwe

Ph0eNiX
02-07-2015, 15:37
Okay not stable but first release: http://forum.projectcarsgame.com/showthread.php?33757-Project-Cars-Dedicated-Server-Live-App&p=1027672#post1027672

-IGN- Spinster
02-07-2015, 19:45
I am still not able to connect to my Ded.Server :(..

I see it on the page "cars-stats-steam.wmdportal", but when I try to start up my game I still get server not found

Both updated

Stepan Vondrak
03-07-2015, 15:41
A short update on the progress on game-controlling DS mode:
- Now I can control all options that are available to the host in the lobby.
- Also today I added a new API method that lets me change settings for the "next session". Those are applied to any new session created on the server, or to the lobby when there is an active session and players return back from the race. With this the scripts won't have to listen to all events regularly and push the setup to lobby asap when transitioning to it, it will be possible to setup everything in advance.

Next week I'll extend this to be able to configure the "next session setup" from the settings file, and I'll probably include a simple support for trivial automatic rotation for the basic usage without an API.

xrichard
03-07-2015, 15:45
How will the AI be handled with the game-controlling DS mode, by the DS or the person that joins first?

flynny75
03-07-2015, 15:53
Queueing the next event is nice

Is the Chat api functional? I get 404. Also, how are you able to send a message with spaces without the %20 in your address bar?

How frequent does the DS update its responses? I am polling at 500ms and the data only changes every second or so.

EDIT: Are the servers not in Steam's Master Server? Why cant I filter on Project Cars when using Steam's own server browser? (View > Servers)

thuro76
04-07-2015, 17:34
Stepan can do something about this: http://forum.projectcarsgame.com/showthread.php?33879-Lowering-framerate

side dedicated server ?

Stepan Vondrak
06-07-2015, 07:25
How will the AI be handled with the game-controlling DS mode, by the DS or the person that joins first?
Most likely by the server. The game does not allow much AI customization once a session is created, so this needs to be configured before the session is created.



Is the Chat api functional? I get 404. Also, how are you able to send a message with spaces without the %20 in your address bar?
Not yet, it will be in the big update with controlling DS. Hopefully soon enough (tm). You can send spaces as spaces or %20 in the URL, both work.



How frequent does the DS update its responses? I am polling at 500ms and the data only changes every second or so.

It depends, events for the log are usually sent immediately, status updates such as vehicle positions approximately once per 2 seconds


Are the servers not in Steam's Master Server? Why cant I filter on Project Cars when using Steam's own server browser? (View > Servers)
Yes they register to Steam Master Server but we've not asked Valve to show pCARS in the Steam's browser, because the game can't support joining via the browser yet. That's something we can enable only after the DS-controlling mode is implemented, and empty sessions are joinable. Also I don't know if it's possible to configure the Steam's browser to not show empty sessions that are configured in host-controlled mode, those still have to be allocated with Create, with the host supplying the settings. So it might be a bit confusing if those show up there.


Stepan can do something about this: http://forum.projectcarsgame.com/showthread.php?33879-Lowering-framerate
No, that's the game stalling while loading assets/initializing physics/etc for the new joining player. Hopefully it will improve in future patches.

Stepan Vondrak
07-07-2015, 16:16
A short update. I now have all lobby settings controllable from the DS, so if I create a session hosted on my testing DS, I can then change everything via the API.

This means it's finally time to let the game join empty servers, without going through the extra "host needs to allocate DS first" step, via the Create flow with command-line arguments. I now have empty servers showing up in the browser, together with running sessions:
211039
This will still need some work to have all the properties show up correctly, the track name and vehicle class restriction are hardcoded now. But the server already advertises them in the key-value pairs. Then I will start working on the join flow for empty servers, which might be a bit tricky ; it's actually much more similar to the create flow, just with few differences here and there, and automagic fallback to standard join if someone else joins first and allocates the server.

Ph0eNiX
07-07-2015, 17:05
Keep pushing !!! you doing a great job

bmaytum
07-07-2015, 17:42
A short update. I now have all lobby settings controllable from the DS, so if I create a session hosted on my testing DS, I can then change everything via the API.

This means it's finally time to let the game join empty servers, without going through the extra "host needs to allocate DS first" step, via the Create flow with command-line arguments. I now have empty servers showing up in the browser, together with running sessions:
.... (snipped graphic)
This will still need some work to have all the properties show up correctly, the track name and vehicle class restriction are hardcoded now. But the server already advertises them in the key-value pairs. Then I will start working on the join flow for empty servers, which might be a bit tricky ; it's actually much more similar to the create flow, just with few differences here and there, and automagic fallback to standard join if someone else joins first and allocates the server.


Stepan-
Very nice ! Have you uploaded this DS version to Steam yet, or will you do so after completing "... some work ... which might be a bit tricky..."?
Either way, what other file(s) do / will we need for controlling DS as you've described?

Torsten Schmitt
07-07-2015, 20:48
very good. its comming along :)

wolfscastle
07-07-2015, 21:20
Stepan big thanks, a great step forward!

Dalhil
08-07-2015, 09:21
I don't know if it was already asked... Stepan, do you think it's possible to add a "dedicated servers" filter in game lobby? Or add dedicated/p2p icons near the server name in lobby?

People don't see any difference now between p2p and dedicated in lobby.

FalkeGT
08-07-2015, 14:18
Hey,

I'm looking for some info on how a d-server is currently operating, haven't found something on the forum here (but sure I may have missed it), maybe you can help me on.
When I'm thinking of a dedicated (game) server, I think of a soft or appliance which is basically running the game without UI, but all necessary calculations and code is run by the servers cpu.

I've read a sentence somewhere in here which said the server in it's current state is more like proxy or gateway, which lead me to the assumption that calcs are not done by the servers cpu, but on the
host which is running the gameclient and the server beeing more a kind of network-gateway.

Can someone explain how this is working?

I'm also looking for infos on network bandwith usage - how much bandwith is needed when hosting a race with lets say 10/20/30 racers.

Krobo
08-07-2015, 16:42
..

look here to answer some of your Q's ..

http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-(Work-in-Progress)

FalkeGT
08-07-2015, 17:19
..

look here to answer some of your Q's ..

http://forum.projectcarsgame.com/showthread.php?22370-Dedicated-Server-HowTo-(Work-in-Progress)

That thread has it all! Thank you!

M. -VIPER- Morgan
10-07-2015, 06:16
...


It depends, events for the log are usually sent immediately, status updates such as vehicle positions approximately once per 2 seconds


...

Hi Stepan,

is there any chance that you can higher the update rate for vehicle positions?
I'm working with a friend on the following (@ 40sec begins a qualifying), an update interval of 500 ms or lower would be great (the lower the better ;-) ):


https://www.youtube.com/watch?v=6R2b0Y0zAgI

norbs
10-07-2015, 12:35
Not sure if it has been discussed, but is there any chance we could get results logging in a file to use on sites like http://simresults.net/

It would make running leagues a bit easier.

Thanks.

Mattias
10-07-2015, 14:03
Not sure if it has been discussed, but is there any chance we could get results logging in a file to use on sites like http://simresults.net/

It would make running leagues a bit easier.

Thanks.

You need to implement a project cars server log reader for this.
Since they have their project on github, you can create one and send in a pull request.

Might write one if I have time. Need to check out the code and see how it works.
But lately I haven't had much free time. Maybe someone interested in this could write such a reader.
I'd probably write my own specifically for project cars. Something which allows you to select which games/stages should be in the league results.
Simresults just looks like it takes all data in the log file.

norbs
11-07-2015, 12:41
You need to implement a project cars server log reader for this.
Since they have their project on github, you can create one and send in a pull request.

Might write one if I have time. Need to check out the code and see how it works.
But lately I haven't had much free time. Maybe someone interested in this could write such a reader.
I'd probably write my own specifically for project cars. Something which allows you to select which games/stages should be in the league results.
Simresults just looks like it takes all data in the log file.

I probably cant create one. The last code I wrote was something like.

10 PRINT "DICK"
20 GOTO 10




:)

Stepan Vondrak
13-07-2015, 07:16
Direct support for logging into files is not planned at this moment, right now I focus on getting the controlling http api done and release. Then I have some ideas on what to improve next, one of the features would help with logging into files, but I am not ready to announce that one yet :)

Stepan Vondrak
16-07-2015, 07:35
The game-controlling mode is working quite well so far, and Dedicated Servers are finally joinable from the browser even when they are empty:

If the empty DS is configured as game-controlling, it will provide the settings to the user who joins first and it won't be possible to modify the setup from within the game, the server can change it at any time in the lobby. The HttpAPI can be used to script it in any way, from simple track rotation to something more complex. I'll try to provide a script (probably something hacked in Perl) with a fixed track rotation example before this all is released. Controlling the server via the HttpAPI like this can be a bit clumsy for simple scripting that's not talking to a web server, so I already have some plans how to make this more comfortable.
If the empty DS is configured as host-controls-the-game, it just provides the initial setup, which then can be modified by the host in the same way as the game works now.


I also already hooked the additional attributes I promised, such as track geo location or current weather status, and chat logging and sending chat via the API. So the first version of these changes is pretty much ready for release. It won't make it into patch 2.5 which is currently now in testing, but it will be included in 3.0 which should follow shortly after, hopefully in few weeks/a month max.

david42fr
16-07-2015, 14:22
Don't know if you had seen it but there's a bug when displaying players on the server: the last entered is displayed with a blank name.... maybe you could have a look? ;)

Thanks for developpement.

Kamel
17-07-2015, 18:16
There is a new dedi for protocol version: 121 (1.0.1.21) available.

@Stephan: Any chance to add the current server version to the status page?

Mattias
17-07-2015, 20:35
Just noticed a bug in the dedicated server related to vehicles list (/api/list/vehicles)
The vehicle with id "2082176226" is missing which is for the "Audi A1 quattro".
I noticed my application was behaving strangely when the vehicle id all players were using did not exist in the vehicle list.

For now I've done an extra check for this id, just wanted to notify about it missing.

xrichard
19-07-2015, 22:07
It would be great if the server could get a replay file once all participants have finished racing/the session has ended.

derDumeklemmer
21-07-2015, 20:56
Hi,

I fear the content (cars&tracks) of the new DLC is missing in the server API ?
By starting online sessions I've found out:

RuapunaPark A = ID 619694160
RuapunaPark Club = ID 1446378877

But somehow I can't host sessions for the other layouts. ;-(
Does anybody here has an idea why ?
(any clue would by appreciated)

cheers,
Uwe

Stepan Vondrak
22-07-2015, 09:28
I'll update the vehicle/track lists in the current DS version asap today. Overall, any apps using the API should be able to cope with the session using unknown vehicle/track, but of course it's my fault for not updating in advance (as my excuse, we try not to add these things until the DLC content is officially announced, and that makes it hard when I change half of the DS for patch 3.0 meanwhile, and the announcement+release happen more or less on the same day :) )

As for "can't host sessions for the other layouts". What's the problem, do you not see them in the track selection? Or does it crash somewhere? That should just work, even on DS, it should not care about which track you use.

Stepan Vondrak
22-07-2015, 10:42
A new DS build has been released, with updated built-in track/vehicle lists.

Jan Studenski
22-07-2015, 11:06
A new DS build has been released, with updated built-in track/vehicle lists.

Just outta curiousity (and if the answer is Soon or we dont know, i would understand that :D ):

Any new features for this planned - would love to see more possibilites for DS :D

P.s. Our league found out lately that you should restart the server from time to time, other wise DS hosted sessions become laggy and a huge problem aswell :(

Mattias
22-07-2015, 17:54
P.s. Our league found out lately that you should restart the server from time to time, other wise DS hosted sessions become laggy and a huge problem aswell :(

That does not happen for our server, we can run hundreds of games and no lag even after that many.
So very strange indeed.

derDumeklemmer
23-07-2015, 06:38
Hi Stepan,


A new DS build has been released, with updated built-in track/vehicle lists.

thank you so much!

cheers,
Uwe

derDumeklemmer
23-07-2015, 06:56
Hi Stepan,



As for "can't host sessions for the other layouts". What's the problem, do you not see them in the track selection? Or does it crash somewhere? That should just work, even on DS, it should not care about which track you use.

the button for "start session" is missing for these three layouts, the two others are fine.

cheers,
Uwe

Little Bastard
27-07-2015, 12:55
Hi Stepan,

have you guys considered an ARM build of the DS ? Is it possible ? I hear steamcmd is not available, however one would only need the DS binary , right ?

Stepan Vondrak
28-07-2015, 07:52
Hi Stepan,

have you guys considered an ARM build of the DS ? Is it possible ? I hear steamcmd is not available, however one would only need the DS binary , right ?

Not really, and I don't think ARM builds of Steam exist, so it's not really possible at this moment either.

ONT
28-07-2015, 14:57
Looks like there is some progress here :cool:


A wish list from another forum :

"I don't want to use some mish mash player made API that i download from joe blows web site.
Some even been reported to have Trojan..screw that.

I want a nice clean client either direct from SMS web site or from steam please :)

1 I want to have a AI car picker to choose what cars /classes are in my race
2 track rotation so that the server can work on a loop
3 session length (race length all the same stuff you can choose offline)
4 auto save results to file after each race.
5 and I'm sure this is a huge reach... but allow fixed set ups to load with each track in rotation

Having the above is a tool that would promote growth to the sales by giving leagues the proper tools they need to exist and grow.

Or just allow few friends to enjoy a multiplayer series in a custom way of choice."


I'm a big fan of "Fixed Car setup" racing where driver skill is the only factor so +1 (don't think this feature falls under DS, more a game setting) :cool:

Stepan Vondrak
29-07-2015, 09:09
Yeah and everyone wants something else, which is why we go for community-based fully customizable scripting first, rather than implement everything ourselves - because we can never implement scripts that satisfy everyone's needs. However in the future I plan to ship simple scripts directly with the DS, for things like fixed rotation - as an example, and as the most trivial thing for people who don't want to customize things too much.

Stepan Vondrak
29-07-2015, 10:00
The big DS patch is coming! It will be released with the game's patch 3.0 in few weeks. Since I will most likely be on my summer holidays during that time, I have already updated the documentation and changelog in this thread. This update is not live yet. But you can already read what will change. Major updates:

You will see empty servers in the Session Browser, no need to use command-line to "allocate" dedicated servers anymore. The server needs to be configured to allow this, the default sample configs have this enabled.
Sessions hosted on the servers will use different ping icon (empty or running)
The server can now be configured to run in game-controlling mode, stealing some setup controls from the host. New APIs have been added to control this. Servers in game control mode have slightly different ping icon (with a tiny lock overlayed)
The game reports chat to server event logs, server can send chat to the game
The game reports the track's location (longitude/latitude/altitude), current date and time, and current weather conditions
Multiplayer vehicle restrictions are changing from groups to classes (the same classes as in quick race weekend and shown by the icon in vehicle selection). These classes have much smaller vehicle sets, and the vehicles are much closer to each other in performance.

Stepan Vondrak
29-07-2015, 10:12
When the 1.0.1.27 build goes live, make sure to update your server configuration to enable the new features. Just compare your customizations to what's new in the sample configs.

cogent
30-07-2015, 10:34
That's nice.
Waiting for it to add it to the launcher.

Seems that control of the penalties /server restrictions are not planned for the future?
Did anyone have a look at the empty name issue regarding the last joined participant?
With a workaround it's possible to get the matching name from the members list but this extra loop could be saved if they are not empty in the participants list.

gandaDK
01-08-2015, 06:40
That's nice.
Waiting for it to add it to the launcher.

Seems that control of the penalties /server restrictions are not planned for the future?
Did anyone have a look at the empty name issue regarding the last joined participant?
With a workaround it's possible to get the matching name from the members list but this extra loop could be saved if they are not empty in the participants list.

to get all data you need to "loop" both [members] and [partispants] the way i do it: loop partispants inside the the member.

here's a cut-out of some of the old php code i ran.


foreach ($data['members'] as $member) {
$refid = $member['refid'];
$steamid = $member['steamid'];
$state = $member['state'];
$name = $member['name'];
$jointime = $member['jointime'];
$host = $member['host'];
$VehicleId = $member['attributes']['VehicleId'];
$LiveryId = $member['attributes']['LiveryId'];
$LoadState = $member['attributes']['LoadState'];
$Ping = $member['attributes']['Ping'];
foreach ($data['participants'] as $participant) {
$participant = $participant['attributes'];
if ($participant['RefId'] === $refid) {
...
// etc...
...
}
}
}

cogent
01-08-2015, 12:55
to get all data you need to "loop" both [members] and [partispants] the way i do it: loop partispants inside the the member.

here's a cut-out of some of the old php code i ran.


foreach ($data['members'] as $member) {
$refid = $member['refid'];
$steamid = $member['steamid'];
$state = $member['state'];
$name = $member['name'];
$jointime = $member['jointime'];
$host = $member['host'];
$VehicleId = $member['attributes']['VehicleId'];
$LiveryId = $member['attributes']['LiveryId'];
$LoadState = $member['attributes']['LoadState'];
$Ping = $member['attributes']['Ping'];
foreach ($data['participants'] as $participant) {
$participant = $participant['attributes'];
if ($participant['RefId'] === $refid) {
...
// etc...
...
}
}
}


I have them all, that's not the point.
I don't use php, but thanks anyway.

In the meantime it does the job, but as I wrote it is not necessary if the name in participants list is not empty.
Only wanted to know if this will be fixed in future DS update.

xrichard
04-08-2015, 22:45
Using long/lat to get the track from google maps could work as a substitute for a map, but i think it would be great if one could get an abstract vector map (like the in-game minimap).

DoctorKajita
05-08-2015, 18:40
Sorry if this has been asked in this thread already, but I want to know if there are plans to be able to implement a rotation of tracks instead of just being relegated to one.

RomKnight
06-08-2015, 12:39
Yes. It is written here already somewhere (in the OP)

erickgoldner
07-08-2015, 22:13
Just to confirm, the updates posted on 1st post are still going live with 3.0 patch, right ?

I´m asking because there´s nothing about it on the patch notes!

wolfscastle
14-08-2015, 14:17
Any News after Patch 3.0?

kjay
14-08-2015, 19:23
Confirmed

kjay
14-08-2015, 19:24
Just to confirm, the updates posted on 1st post are still going live with 3.0 patch, right ?

I´m asking because there´s nothing about it on the patch notes!
Confirmed updates from post #167.

TOCA2FREAK
14-08-2015, 21:06
When setting up a dedi and setting "VehicleClassId", "VehicleModelId" and "TrackId" where do I find these ID's??

Config files says look in "- sessionAttributes: initial attribute values, see /api/list/attributes/session for the full list." I can't find this.

Thanks. ;)

gbriden
14-08-2015, 22:36
Yes I am having same issue were do we find the list containing the various API Attributes and there IDs we need some form of manual.

I think to start a list of the cars, class's and track IDs would be a great help.

G

Eyud
15-08-2015, 03:03
Here's all the output from the API that looks relevant to configuring dedicated servers:

http://harm.io/misc/pcars/

satco1066
15-08-2015, 10:27
Great . so many new features.

here a simple XLS Flags Calculator

https://onedrive.live.com/redir?resid=EB00C7C2F8FD51E4!8461&authkey=!ALBw65wRRGMmrlM&ithint=file%2crar

[PSR]Painkiller
15-08-2015, 11:16
i dont know if i am making someting wrong , but when i change the track in the lobby (dedicated server)..the duration of all the sessions (practice,qualy, etc) change to 0

erickgoldner
15-08-2015, 12:56
Did anyone noticed this setting: FORCE_IDENTICAL_VEHICLE_SETUP on the Flag options ?

Does it mean what i think it is ?

Another question:
On the enums_weather i didn´t find an option for Real Weather? Is it missing or what?

[PSR]Painkiller
15-08-2015, 13:05
Did anyone noticed this setting: FORCE_IDENTICAL_VEHICLE_SETUP on the Flag options ?

Does it mean what i think it is ?

Another question:
On the enums_weather i didn´t find an option for Real Weather? Is it missing or what?

Overcast -1293634875
http://harm.io/misc/pcars/enums_weather.txt

TOCA2FREAK
15-08-2015, 14:51
Would also like to know how to set server so every player can only select one car for example the RUF GT3. I can get it so the server locks the track but the first person who joins the server can choose any GT3 car and then which ever car has been chosen by the first person has then locked that car for anyone else who joins. So how do I get it so the server has just the RUF GT3 locked even for the first person who joins the server?

Thanks.

erickgoldner
15-08-2015, 15:40
Painkiller;1085058']Overcast -1293634875
http://harm.io/misc/pcars/enums_weather.txt

Overcast is the Real Weather option?! Why would it be, since there's an option for Overcast in game?

erickgoldner
15-08-2015, 15:45
Would also like to know how to set server so every player can only select one car for example the RUF GT3. I can get it so the server locks the track but the first person who joins the server can choose any GT3 car and then which ever car has been chosen by the first person has then locked that car for anyone else who joins. So how do I get it so the server has just the RUF GT3 locked even for the first person who joins the server?

Thanks.

Doesn´t work If you set the "ServerControlsVehicle" : 1 and the "VehicleModelId" attribute to "id" : -2020758805 ("Ruf RGT-8 GT3") ?

RomKnight
15-08-2015, 16:02
TOCA2FREAK is right. The 1st person to enter the server CAN choose any or same class car (depending on the server flags) no matter what the settings are.

Maybe it works if you join with an 3rd party API that can control the server?

I've struggle with it to :)

Also, i've read something somewhere about the track not being locked in the gui but the track IS locked. The car is not.

TOCA2FREAK
15-08-2015, 16:09
Doesn´t work If you set the "ServerControlsVehicle" : 1 and the "VehicleModelId" attribute to "id" : -2020758805 ("Ruf RGT-8 GT3") ?

To lock the track I set the value to -1 so also set the "ServerControlsVehicle" : -1. It seems this option only sets the "Force identical car" once the first person who joins the server chooses a car. Setting it to "ServerControlsVehicle" : 1 crashes the game for anyone joining the server. :confused:

RomKnight
15-08-2015, 16:15
TOCA, I had that issue with the crash. First it was the flags but after a while it was my router. Whenever those crashes happened i could see timeouts. I've posted somewhere here.

After a few hours I just rebooted the router and voila... same config (with 1 instead of -1 and whatever flags sum i could come up with) worked.

But i'm now curious about the -1 value :)

gbriden
15-08-2015, 20:08
Thanks very much for the links to the server settings everything worked perfect.

Little bit of editing and I have my basic Dedicated server up and running.

Hopefully a user interface is not far behind but this is a GREAT step for Project Cars.

Glenn

TOCA2FREAK
15-08-2015, 20:09
I have also noticed that in the server.cfg file there isn't a line to set Warmup. I tried adding "WarmupLength" : 10, to the config file but that doesn't work. How do you set warmup?

Thanks.

Snoopy
16-08-2015, 08:37
Hi,

i still have the possibility to change the Car as "first Person on Server".
I see the proposed Cars, but with the way "Garage" i can go and take another Car than proposed.

I also tried the "Flags" Option
"Flags" : 656616,
With this Output http://harm.io/misc/pcars/flags_session.txt i summate the digits i want to have, but if i set the result, my Server isn't shown in the Online-Browser anymore.

Are your Servers react like that also?

TOCA2FREAK
16-08-2015, 10:57
Yes same happens to my server. Don't think dedi is configured yet to let that option work. Give it till end of Monday to see if Stepan fixes it. ;)

silicijevadolina
16-08-2015, 13:53
Can anyone write the code for mechanical failure. I would like to have a mechanical failures turned on on my server :) :confused:

erickgoldner
16-08-2015, 14:56
Can anyone write the code for mechanical failure. I would like to have a mechanical failures turned on on my server :) :confused:

"MECHANICAL_FAILURES" is 262144. You have to sum it to the other codes you're using on the Flags field.

silicijevadolina
16-08-2015, 16:08
I wrote this:


"//" : " ALLOW_CUSTOM_VEHICLE_SETUP (8) + TCS_ALLOWED (128) + AI_ALLOWED (0) + "
"//" : " FORCE_SAME_VEHICLE_CLASS (1024) + MECHANICAL_FAILURES (262144) + "
"//" : " FORCE_SAME_VEHICLE_GROUP (1024) + AUTO_START_ENGINE (524288) = 656616"

allowEmptyJoin : true
controlGameSetup : true
sessionAttributes : {
"ServerControlsTrack" : 0,
"ServerControlsVehicle" : 0,
"GridSize" : 22,
"MaxPlayers" : 22,
"Practice1Length" : 10,
"Practice2Length" : 0,
"QualifyLength" : 10,
"Race1Length" : 8,
"Flags" : 656616,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"AllowedViews" : 0,
"TrackId" : 1988984740,
"VehicleClassId" : -1529501352,
"VehicleModelId" : -648709823,
"DateYear" : 2015,
"DateMonth" : 7,
"DateDay" : 6,
"DateHour" : 11,
"DateMinute" : 0,
"DateProgression" : 1,
"ForecastProgression" : 1,
"WeatherSlots" : 4,
"WeatherSlot1" : 129238383,
"WeatherSlot2" : 270338437,
"WeatherSlot3" : -1592958063,
"WeatherSlot4" : 1461703858,
}

....and there is mechanical failure still off

Snoopy
16-08-2015, 17:04
Hi,

atm (i think) Multiclass Definitions are also not set-able.
If you want to drive with GT2, GT3, GT4 (something like VLN) it isn't possible.

If the Dedi will let only defined Classes choiceable, a Multiclass Definition should be definable.

erickgoldner
16-08-2015, 17:40
Hi,

atm (i think) Multiclass Definitions are also not set-able.
If you want to drive with GT2, GT3, GT4 (something like VLN) it isn't possible.

If the Dedi will let only defined Classes choiceable, a Multiclass Definition should be definable.

This is not possible, at least no yet!

2 really important settings that would allow more control from the Dedi:

1) Allow to set multi class vehicle, just like you said. This option though, would probably require a change in the game itself, unless the car selection filter can already read from multiple values and list then correctly (-564539194; 1300724070, would let you choose from LMP2 and Road B cars).

2) Allow multiple tracks on the "TrackId" setting, in a way that the server would understand the amount of tracks and keep rotating on that when races are finished ( For example: "TrackId" : 904625875; 545979690;920145926, this would start the server with SPA, after the end of this race, it would come back to lobby on Oulton Park and then Imola. After that it would come back to Spa again and so on.)

RomKnight
16-08-2015, 17:56
Hoping for car classes at least for leagues.

As for those who run public servers, rotating tracks would be cool as well.

gandaDK
16-08-2015, 21:26
just make "VehicleClassId""VehicleModelId" : comma separated that will give us the option for multi class races and the option to exclude some cars from a class if we want

satco1066
16-08-2015, 22:11
I have also noticed that in the server.cfg file there isn't a line to set Warmup. I tried adding "WarmupLength" : 10, to the config file but that doesn't work. How do you set warmup?

Thanks.

i tried this

"GridSize" : 14,
"MaxPlayers" : 14,
"Practice1Length" : 0,
"Practice2Length" : 0,
"WarmupLength" : 15,
"QualifyLength" : 15,
"Race1Length" : 10,

and it worked :yes:

satco1066
16-08-2015, 23:56
PCars Crash when connecting to DS

215303
could it be a firewall problem on the server/client side ?
I can't connect to many DSs
before updating everything worked fine!

logLevel : "info"
eventsLogSize : 10000
name : "MMTEST"
secure : true
password : ""
maxPlayerCount : 16
bindIP : ""
steamPort : 8766
hostPort : 27015
queryPort : 27016
sleepWaiting : 250
sleepActive : 10

allowEmptyJoin : true
controlGameSetup : false
sessionAttributes : {
"ServerControlsTrack" : 0,
"ServerControlsVehicle" : 0,
"GridSize" : 16,
"MaxPlayers" : 16,
"Practice1Length" : 90,
"Practice2Length" : 0,
"QualifyLength" : 15,
"Race1Length" : 15,
"Flags" : 908330,
"DamageType" : 2,
"TireWearType" : 3,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"AllowedViews" : 0,
"TrackId" : 904625875,
"VehicleClassId" : 2111151040,
"VehicleModelId" : 1909945073,
"DateYear" : 2015,
"DateMonth" : 7,
"DateDay" : 6,
"DateHour" : 11,
"DateMinute" : 0,
"DateProgression" : 1,
"ForecastProgression" : 1,
"WeatherSlots" : 1,
"WeatherSlot1" : -934211870,
"WeatherSlot2" : -934211870,
"WeatherSlot3" : -934211870,
"WeatherSlot4" : -934211870,
}

Ademir
17-08-2015, 12:54
Hello to all.
The server is set with the GT3, Spa track, and the various sessions of P1, P2, Qualy, Warmup, and Race.

allowEmptyJoin : true
controlGameSetup : true
sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicle" : 1,
"GridSize" : 32,
"MaxPlayers" : 32,
"Practice1Length" : 15,
"Practice2Length" : 15,
"QualifyLength" : 15,
"WarmupLength" : 5,
"Race1Length" : 8,
"Flags" : 787736,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"AllowedViews" : 3,
"TrackId" : 521933422,
"VehicleClassId" : -112887377,
"VehicleModelId" : ,
"DateYear" : 2015,
"DateMonth" : 7,
"DateDay" : 6,
"DateHour" : 14,
"DateMinute" : 0,
"DateProgression" : 1,
"ForecastProgression" : 1,
"WeatherSlots" : 1,
"WeatherSlot1" : -934211870,
"WeatherSlot2" : ,
"WeatherSlot3" : ,
"WeatherSlot4" : ,
}

Despite having set the time to 14.00 the session P1 always starts at night.
Does anyone know why? I have done something wrong in the end configuration?
Thanks to those who will help me :)

erickgoldner
17-08-2015, 13:16
Try removing the Vehicle model id parameter if you are not using it.
I have noticed some weird behavior with empty parameters.

RomKnight
17-08-2015, 13:23
maybe parameters being 0 are the problem as well? some at least?

satco1066
17-08-2015, 15:00
maybe parameters being 0 are the problem as well? some at least?

it seems the config reader routine of DS has no error prevention/correction system.
It reads until the false entry ""VehicleModelId" : ," and then stops reading in the following parameters.

RomKnight
17-08-2015, 16:51
I've noticed that when I've experimenting with this for the 1st time but not the "if error stop reading" :)

Mattias
18-08-2015, 05:58
Anyone knows how to set real weather?

RomKnight
18-08-2015, 12:07
Suppose i'd like to try my luck using the API, where do I start and what programming language suits this best ?

erickgoldner
18-08-2015, 12:42
Anyone knows how to set real weather?


I've managed to get it working by removing the last five parameters that are related to the weather
WeatherSlots" : 1,
"WeatherSlot1" : -934211870,
"WeatherSlot2" : ,
"WeatherSlot3" : ,
"WeatherSlot4" : ,
When i remover these yesterday and created a Lobby at SPA it was with Light Rain, which was the actual weather there.

Snoopy
18-08-2015, 15:21
I've managed to get it working by removing the last five parameters that are related to the weather
WeatherSlots" : 1,
"WeatherSlot1" : -934211870,
"WeatherSlot2" : ,
"WeatherSlot3" : ,
"WeatherSlot4" : ,
When i remover these yesterday and created a Lobby at SPA it was with Light Rain, which was the actual weather there.

Hi Erick,

my Experience with missing Parameters is, that the Server makes what he wants.
Are you sure, that this weather wasn't made by a fluke?

erickgoldner
18-08-2015, 16:51
Hi Erick,

my Experience with missing Parameters is, that the Server makes what he wants.
Are you sure, that this weather wasn't made by a fluke?

Hey..
I've experienced this as well with another tests.
But with these changes, the server was exactly like i configured.
I Will make some others tests today to see if rly works.
Just need to figure why my server (the same pc in which i play) is not visible to others on game Lobby, only when i enter the server.

gandaDK
18-08-2015, 17:43
this gives some kind of "realweather"



"WeatherSlots" : 0,
"WeatherSlot1" : ,
"WeatherSlot2" : ,
"WeatherSlot3" : ,
"WeatherSlot4" : ,

Ademir
18-08-2015, 21:46
Try removing the Vehicle model id parameter if you are not using it.
I have noticed some weird behavior with empty parameters.

I tried to put a value, but the situation does not change. The session always begins at night ...

DeBuG
24-08-2015, 18:43
Hi all,

I wanted to find a company that hosts dedicated servers for Project Cars and found a company called Rack Service. The only problem is, I can't see or find out how I'd use an API or how I'd view the API?

Can someone help me? I'm not very software literate in this department. But the availability to kick / ban in this department would be amazing.

Many thanks

Woodshock
25-08-2015, 16:06
How to set the flag(s) option true the API?

I want GT3 server only and its really pissing me off because its not working!


allowEmptyJoin : true
controlGameSetup : false
sessionAttributes : {
"ServerControlsTrack" : 0,
"ServerControlsVehicle" : 0,
"GridSize" : 24,
"MaxPlayers" : 24,
"Practice1Length" : 600,
"Practice2Length" : 0,
"QualifyLength" : 950,
"Race1Length" : 6,
"Flags" : 908522,
"DamageType" : 1,
"TireWearType" : 8,
"FuelUsageType" : 2,
"PenaltiesType" : 1,
"AllowedViews" : 0,
"TrackId" : 1988984740,
"VehicleClassId" : -112887377,
"DateYear" : 2015,
"DateMonth" : 7,
"DateDay" : 6,
"DateHour" : 11,
"DateMinute" : 0,
"DateProgression" : 1,
"ForecastProgression" : 1,
"WeatherSlots" : 1,
"WeatherSlot1" : -934211870,
"WeatherSlot2" : -934211870,
"WeatherSlot3" : -934211870,
"WeatherSlot4" : -934211870,
}

gbriden
25-08-2015, 17:52
Ok I am anything but a PRO at this but I think there is a change you could try to get what you want.

1) SET ( "ServerControlsVehicle" : 0, ) To 1

This should set your vehicle class ID as priority.

Let me know if it works I am learning this stuff too.

Glenn

Woodshock
25-08-2015, 18:36
Ok I am anything but a PRO at this but I think there is a change you could try to get what you want.

1) SET ( "ServerControlsVehicle" : 0, ) To 1

This should set your vehicle class ID as priority.

Let me know if it works I am learning this stuff too.

Glenn

That made my game crash when joining my own server :o

Edit: Changed it back and still crashing :(

Snoopy
25-08-2015, 19:47
Hi,

"nailing" the server to one Class only is not possible this time.
The Class will be suggested, but with the way to your Garage you can also take other cars of other Classes.
Must be fixed...

Just a example of a server.cfg with GT3 and Nordschleife
logLevel : "info"
eventsLogSize : 100000
name : "YOUR_SERVERNAME"
secure : true
password : "YOUR_PWD"
maxPlayerCount : 32
steamPort : YOUR_PORT
hostPort : YOUR_PORT
queryPort : YOUR_PORT
sleepWaiting : 250
sleepActive : 10
enableHttpApi : true
httpApiLogLevel : "info"
httpApiInterface : "YOUR_LISTENING_IP"
httpApiPort : YOUR_PORT

allowEmptyJoin : true
controlGameSetup : true

sessionAttributes : {
"ServerControlsTrack" : 1,
"ServerControlsVehicle" : 1,
"ServerControlsSetup" : 1,
"GridSize" : 32,
"MaxPlayers" : 32,
"Practice1Length" : 0,
"Practice2Length" : 0,
"QualifyLength" : 30,
"WarmupLength" : 0,
"Race1Length" : 2,
"Race2Length" : 0,
"Flags" : 656616,
"Privacy" : 2,
"DamageType" : 3,
"TireWearType" : 6,
"FuelUsageType" : 0,
"PenaltiesType" : 1,
"AllowedViews" : 0,
"TrackId" : 697498609,
"VehicleClassId" : -112887377,
"DateYear" : 2015,
"DateMonth" : 7,
"DateDay" : 6,
"DateHour" : 15,
"DateMinute" : 0,
"WeatherSlots" : 1,
"WeatherSlot1" : 296956818,
"WeatherSlot2" : 888299130,
"WeatherSlot3" : 888299130,
"WeatherSlot4" : 296956818,
}

Snoopy
25-08-2015, 19:51
Hi all,

I wanted to find a company that hosts dedicated servers for Project Cars and found a company called Rack Service. The only problem is, I can't see or find out how I'd use an API or how I'd view the API?

Can someone help me? I'm not very software literate in this department. But the availability to kick / ban in this department would be amazing.

Many thanks
Hi,

the answer we cannot deliver, this is a Hoster-Thing.
There are many ways (Ports) which can be configured in the Server...
Different Ports, or maybe the API completely not present/configured, this are things we don't know.

Maybe a Mail to the Hoster will be better.

Stepan Vondrak
03-09-2015, 13:20
Sorry for being absent for so long, after I returned from holidays I was way too busy to answer here. Quick answers while catching up in this thread:

1. Specific vehicle and vehicle class restrictions

Those do not work correctly yet, and the documentation of the respective attributes should say so if you look at /api/list. They will work in DS released with the upcoming patch 4.0

2. Flag FORCE_IDENTICAL_VEHICLE_SETUP

There are several flags in the game that are defined but have never been implemented. Such is game development :) (or any software development). My scripts that extract the values for DS autodocumentation do not hide those flags, maybe I should apply some filters to make only the working bits public. Only these flags can be modified by the server:
FORCE_IDENTICAL_VEHICLES, FORCE_REALISTIC_DRIVING_AIDS
ABS_ALLOWED, SC_ALLOWED, TCS_ALLOWED, FORCE_MANUAL
ROLLING_STARTS
FORCE_SAME_VEHICLE_CLASS
FILL_SESSION_WITH_AI
MECHANICAL_FAILURES
AUTO_START_ENGINE

In patch 4.0 this flag will also work: ALLOW_CUSTOM_VEHICLE_SETUP

3. Warmup

Attribute WarmupLength exists, I just forgot to include it in the sample default setup. It will be included in the sample default setup in patch 4.0. I never tried it in the game myself, but I think it should work.

4. Mutliclass sessions

This is not supported by the game, and at this moment the DS can't do much about it. We might add support for the DS modifying some player or participant attributes later (but not in patch 4.0), which would allow you to script the restriction fully in the server - setup the session to allow any vehicle, but force the selection to something else if the player chooses car that's not in one of the classes the server is configured for. And ideally the game would support it directly. But currently it's impossible, and it won't be possible in 4.0. The only option for now is using private sessions with no car restrictions, and rely on the players not cheating when selecting their cars (or just kick them if they choose mismatching car! )

5. Track rotations

A little teaser... :)

This will be possible in the patch 4.0, thanks to a big change I have already implemented and running here. In the next update the server will support Lua-based addons, so you will be able to script such rotations in the DS, without fiddling with the clumsy HTTP API. HTTP API is great for tracking/reporting the DS state on a website or to a database, but it's not very comfortable for scripting the server's settings, which is why I integrated Lua while bored on planes during my holidays, and continue adding stuff to Lua integration now. And track rotation is actually one of the sample addons/scripts already included with the DS. It can also rotate various vehicle/class restrictions and different setups, not just tracks. Hopefully I'll be able to document all of this in more detail before the release, it's getting quite complicated. But for those that might be getting too excited, Lua won't get much more access to the game's state than the HTTP API, you won't be able do anything with the actual game simulation as that runs mostly on the clients ; in the future I'd like to extend it to for example support giving out penalties, but you will most likely never have too detailed info about the car state in the script to be able to decide the penalties in server-side scripting, it will have to be a human applying them.

6. Crashes when connecting to DS with some specific settings, mostly when attempting non-working vehicle restrictions

Unfortunately I don't know anything about these, the game should not crash no matter how you configure the server. Patch 4.0 will fix some problems so we'll see if the situation will improve then, if not I'd need more detailed repro steps or crash logs.

7. Missing values in configs

Do not write things like


{
SomeValue : 1,
OtherValue : ,
YetAnotherValue : ,
}

The JSON parser I use is very efficient and one nice thing about it is that it does not require strictly-formatted JSON, making it more convenient for config files. But things like this will confuse it, so always include values, do not leave that empty. The sample above will most likely be understood as:


{
SomeValue : 1,
OtherValue : YetAnotherValue,
}

which explains why the server "ignores" anything after the missing values (it just gets confused). I might look into tweaking the parser to be a bit more strict and require the colons between keys and values at least, and explode if it finds something else.

The default values for anything not set are zero, so just use that if you do not want to set a value, or simply do not include it at all. So write something like:


{
SomeValue : 1,
OtherValue : 0,
YetAnotherValue : 0,
}

or


{
SomeValue : 1,
}


I already implemented one improvement to the parser few days ago, it will finally support proper comments instead of the hacks of using "//" as key names.

8. Real weather

I think that just setting the number of slots to 0 does this. The values in the individual slots should then be ignored, so set them to whatever (just not empty strings, see above). I'd have to check in more detail though.

Dmitry Afanasyev
03-09-2015, 13:50
3. Warmup

Attribute WarmupLength exists, I just forgot to include it in the sample default setup. It will be included in the sample default setup in patch 4.0. I never tried it in the game myself, but I think it should work.
Yep, it works

Thanks for your work Stepan. Is there any plans on rejoin functionality? Currently if players leave qualifying session and then rejoin they lose their lap time. And also it would be nice to have an opportunity to finish current flying lap after Q time is over (not sure if it's related to DS)

kevinnn
03-09-2015, 21:04
Sorry for being absent for so long, after I returned from holidays I was way too busy to answer here. Quick answers while catching up in this thread:

Thanks for the update Stepan, we needed that ;) Hope to see 4.0 soon!

Big_Racer
04-09-2015, 13:59
Hi all,

yesterday I started to develop my own tool to control the Project cars server. I´m implementing the session flags ("/api/list/flags") right now, so that i can control the flags with my tool via th API. This is working! :) But I also want to show the user the actual configuration of the server after starting the tool. Is there a possibility to read out the actual configuration of the session flags via the API? It would be a nice feauture to read out that actual configuration of the flags.

Any ideas?

satco1066
04-09-2015, 14:32
DS 3.0 Crash, hint.
We found out, if you setup a session on DS and the host ( first user) selects "Fill With KI", many users crash when entering / synchronising session.

cogent
04-09-2015, 15:08
DS 3.0 Crash, hint.
We found out, if you setup a session on DS and the host ( first user) selects "Fill With KI", many users crash when entering / synchronising session.

Thanks.
I disabled "Fill With KI" and now my game don't crash anymore.
Now I know the reason for that, was a little bit frustrated about that crashing issues.

thmxvr
05-09-2015, 00:26
A little teaser... :)

This will be possible in the patch 4.0, thanks to a big change I have already implemented and running here. In the next update the server will support Lua-based addons, so you will be able to script such rotations in the DS, without fiddling with the clumsy HTTP API. HTTP API is great for tracking/reporting the DS state on a website or to a database, but it's not very comfortable for scripting the server's settings, which is why I integrated Lua while bored on planes during my holidays, and continue adding stuff to Lua integration now. And track rotation is actually one of the sample addons/scripts already included with the DS. It can also rotate various vehicle/class restrictions and different setups, not just tracks. Hopefully I'll be able to document all of this in more detail before the release, it's getting quite complicated. But for those that might be getting too excited, Lua won't get much more access to the game's state than the HTTP API, you won't be able do anything with the actual game simulation as that runs mostly on the clients ; in the future I'd like to extend it to for example support giving out penalties, but you will most likely never have too detailed info about the car state in the script to be able to decide the penalties in server-side scripting, it will have to be a human applying them.


I am really liking this. What Lua implementation did you use? I hope it is LuaJIT which is dead fast, my server is pretty low end on CPU power;), also it is ultra easy to bind it to C API.

Do you think this will permit to implement cheat detection and ban/blacklisting?
With the addition of penalty to the API, would it be possible to enforce rules like:
- If you hit somebody in the back under braking you receive a drive trough or a stop and go"?
- If you pass under yellow you receive a black flag/disqualification.

Also one feature I would really like (although more related to multiplayer than the HTTP or Lua APIs) is the ability to change the delays before a race start, 5 second is not enough IMO.

Lat thing, is it possible to restart a session/race or a whole week-end or to force switching to the next session through the API? I could not figure it out exactly, it seems you can set session attribute or send chat message, but I could not find a attribute that can be set to restart or skip a session.

Big_Racer
11-09-2015, 16:41
A short question regarding Ping information. I´m writing a feature the reads out the Ping of a member and if this ping is very instable or to high i will kick him automatically. But how is it possible to get the ping information?

I thought that i can use the http://127.0.0.1:9000/api/session/status?members to get the ping information. But i`m only getting:
{
"result" : "ok",
"response" : {
"state" : "Running",
"name" : "??????",
"lobbyid" : "??????",
"joinable" : true,
"max_member_count" : 25,
"now" : 1441989624,
"members" : [
{
"index" : 0,
"refid" : ??????,
"steamid" : "??????",
"state" : "Connected",
"name" : "??????",
"jointime" : 1441989620,
"host" : true
}
]
}
}

Can someone help me?

cogent
12-09-2015, 11:19
A short question regarding Ping information. I´m writing a feature the reads out the Ping of a member and if this ping is very instable or to high i will kick him automatically. But how is it possible to get the ping information?

I thought that i can use the http://127.0.0.1:9000/api/session/status?members to get the ping information. But i`m only getting:
{
"result" : "ok",
"response" : {
"state" : "Running",
"name" : "??????",
"lobbyid" : "??????",
"joinable" : true,
"max_member_count" : 25,
"now" : 1441989624,
"members" : [
{
"index" : 0,
"refid" : ??????,
"steamid" : "??????",
"state" : "Connected",
"name" : "??????",
"jointime" : 1441989620,
"host" : true
}
]
}
}

Can someone help me?

I read it from members data to display the Ping for everyone who joined the Server in User History , Name is "Ping".
Easy to find, search for it in members data.

You can use for example this to get it.
http://127.0.0.1:9000/api/session/status?attributes&members&participants

In members section you can find the ping for everyone on the server.
I read it every 15 seconds and save them to an Array.
If I want to do some actions I do not have only a snapshot and can compare it.

Big_Racer
13-09-2015, 07:23
@cogent Thanks for your help! Now it works. I did not know that it is necessary to read the attributes of the members.

dohmien
14-09-2015, 07:16
Hello,

I can not use a send_chat function on my server. Is this function is implemented in the current version?

When I made ​​a request of the kind
http://127.0.0.1:9000/api/send_chat?message=helloworld

I get an error

404 Not found , Oops

Snoopy
14-09-2015, 07:48
Hello,

I can not use a send_chat function on my server. Is this function is implemented in the current version?

When I made ​​a request of the kind
http://127.0.0.1:9000/api/send_chat?message=helloworld

I get an error

404 Not found , OopsHi,

the Message works in the API yes.
I think you used the wrong part in the API...i don't have the correct String available atm...

But i have a Problem with the Messages when using more words, i only see the first word in the Chat, the second (and all others behind) weren't send.

dohmien
14-09-2015, 07:59
Hi,

the Message works in the API yes.
I think you used the wrong part in the API...i don't have the correct String available atm...

But i have a Problem with the Messages when using more words, i only see the first word in the Chat, the second (and all others behind) weren't send.

I am willing to order when you have on hand.

I think your problem well spaces.

We can send space on a browser, try to replace them with '%20'
Example message = hello%20guys
to send 'hello guys'

Stepan Vondrak
14-09-2015, 10:02
I am really liking this. What Lua implementation did you use? I hope it is LuaJIT which is dead fast, my server is pretty low end on CPU power;), also it is ultra easy to bind it to C API.

Do you think this will permit to implement cheat detection and ban/blacklisting?
With the addition of penalty to the API, would it be possible to enforce rules like:
- If you hit somebody in the back under braking you receive a drive trough or a stop and go"?
- If you pass under yellow you receive a black flag/disqualification.

Also one feature I would really like (although more related to multiplayer than the HTTP or Lua APIs) is the ability to change the delays before a race start, 5 second is not enough IMO.

Lat thing, is it possible to restart a session/race or a whole week-end or to force switching to the next session through the API? I could not figure it out exactly, it seems you can set session attribute or send chat message, but I could not find a attribute that can be set to restart or skip a session.

Standard Lua 5.3, I don't want to experiment with any not-so-official branches, also JIT is really not needed as speed is not a problem for DS scripting.

The physics simulation itself will be more or less peer to peer, always, that's how the game is written and the DS can't change how the gameplay itself works without me rewriting the whole game. The DS does not participant in simulation details, it mostly just manages the gameplay at higher level and rebroadcasts gameplay packets, which helps with p2p networking issues. The scripts won't be able to interact with the simulation itself, at least not for now, so evaluating "who is at fault" will always be quite hard to do server-side, harder than in the game (but with the benefit of the server being scriptable, while the game is really not). In the future I'll try to do two things:

Let the script control flags/penalties/disqualifications
Parse the gameplay packets and let the script optionally receive positional updates of all participants at much higher frequency. This will still be only the center-of-mass positions/orientations, with no extra physics available to Lua, so evaluating collisions will not be simple, so I am not sure if I will even do this, it might not be very useful.


Forcing session restarts/progress from the server is something I'd also like to add, it's currently not possible. But it's already possible to kick all and make the server available for use for a new session in Lua in the new version (not via http api yet).

Stepan Vondrak
14-09-2015, 10:03
A short question regarding Ping information. I´m writing a feature the reads out the Ping of a member and if this ping is very instable or to high i will kick him automatically. But how is it possible to get the ping information?

I thought that i can use the http://127.0.0.1:9000/api/session/status?members to get the ping information. But i`m only getting:
...

Ping is one of the attributes, you will have to request those by adding "&attributes" to the query.
But if I were you I'd wait for the next patch, and implement this functionality as a Lua addon. You won't need anything running via http then, it will be much more simple to write and use.

Big_Racer
14-09-2015, 10:25
@ dohmien: You have to add session! Like: http://127.0.0.1:9000/api/session/send_chat?message=helloworld

@ Stepan Vondrak: Thanks for the informations!

dohmien
14-09-2015, 13:12
@ dohmien: You have to add session! Like: http://127.0.0.1:9000/api/session/send_chat?message=helloworld

@ Stepan Vondrak: Thanks for the informations!

Even with the address / api / session / send_chat home ... it's not working .

Is there something has to change in the configuration?

thmxvr
14-09-2015, 18:24
The physics simulation itself will be more or less peer to peer, always, that's how the game is written and the DS can't change how the gameplay itself works without me rewriting the whole game. The DS does not participant in simulation details, it mostly just manages the gameplay at higher level and rebroadcasts gameplay packets, which helps with p2p networking issues. The scripts won't be able to interact with the simulation itself, at least not for now, so evaluating "who is at fault" will always be quite hard to do server-side, harder than in the game (but with the benefit of the server being scriptable, while the game is really not). In the future I'll try to do two things:

Let the script control flags/penalties/disqualifications
Parse the gameplay packets and let the script optionally receive positional updates of all participants at much higher frequency. This will still be only the center-of-mass positions/orientations, with no extra physics available to Lua, so evaluating collisions will not be simple, so I am not sure if I will even do this, it might not be very useful.


Forcing session restarts/progress from the server is something I'd also like to add, it's currently not possible. But it's already possible to kick all and make the server available for use for a new session in Lua in the new version (not via http api yet).

Thanks a lot for the info that was interesting. I knew the physics is simulated on each players computer and the DS only rebroadcast "delta game states" (what has changed in the player's level since the last successful communication with the server), but I thought it had already read access to the info in the packets it rebroadcast.

Trying to evaluate who is at fault must be a nightmare to code, that is why I try to concentrate on enforcing simple rules that keep racers "in line" and are much simpler to code; like:
- Did not make 10 laps prior to the race (practice and quali) -> Cannot participate in the race
- Did not qualify at time that is lower then 110% of the pole man -> Cannot participate in the race
- Bump somebody in the back under braking on lap 1 -> You are banned for the day. You are welcome back tomorrow".
I name those rules specifically because in my experience it give good results in getting clean first laps and racers that prepares (at least the bare minimum) and do not want to wreck or be wrecked.



Standard Lua 5.3, I don't want to experiment with any not-so-official branches, also JIT is really not needed as speed is not a problem for DS scripting.

Technically LuaJIT is a not official at all and totally different implementation, not even a branch; but it is more actively developed and used in the industry than the official implementation. What sold it for me id the FFI tech that permit to bind C/C++ code out of the box (including the standard libs) and to use native datatype and arrays. http://luajit.org/ext_ffi.html Sorry if that was too much out of topic and I understand you already have something functional so not interested in switching but just tough you might be interested in the info.

Anyway thanks again.

thmxvr
14-09-2015, 18:37
Even with the address / api / session / send_chat home ... it's not working .

Is there something has to change in the configuration?

Sorry if this sound basic, but did you chack the http api is accessible? Can you acces http://127.0.0.1:9000/status

dohmien
14-09-2015, 19:16
The API is acessible Yes wellI do pay Bottom query a lot without my list of participants Concerns

Snoopy
15-09-2015, 05:39
The API is acessible Yes wellI do pay Bottom query a lot without my list of participants Concerns
Hi,

mine worked like this:

http://127.0.0.1:9000/api/session/send_chat?message=Testmessage

Tried with curl
curl -i -H "Accept: application/json" -H "Content-Type: application/json" http://127.0.0.1:9000/api/session/send_chat?message=Testmessage

Snoopy
15-09-2015, 06:45
Hi,

mine worked like this:

http://127.0.0.1:9000/api/session/send_chat?message=Testmessage

Tried with curl
curl -i -H "Accept: application/json" -H "Content-Type: application/json" http://127.0.0.1:9000/api/session/send_chat?message=Testmessage
Hi,

i'va forgotten to say, this Message i saw in the Lobby, the Session wasn't started...
Maybe this is the Problem you/we have?

Stepan Vondrak
18-09-2015, 10:09
Just a small warning, a new patch of the game has just been pushed to Steam. I am still fixing a sample Lua addon with server-side persistent stat tracking for the DS, so the DS will follow in few hours max, it won't be ready immediately. Also few updates and documentation of the Lua scripting engine will follow, they won't be ready with the release.

dohmien
18-09-2015, 10:55
Hi,

i'va forgotten to say, this Message i saw in the Lobby, the Session wasn't started...
Maybe this is the Problem you/we have?

actually works! the problem was that no one was in the lobby : /

Stepan Vondrak
18-09-2015, 12:53
Updated DS is now up on Steam, compatible with patch 4.0, and with Lua scripting available. The sample config has changed significantly, so please review it and update your customized config, or just copy and edit the sample over. I'll try to document it all asap, but meanwhile, few quick notes:

The JSON-based configs now support standard C++ style single-line comments
Added section for Lua addon configuration. This is enabled by default, with two sample addons running unless you edit the configuration. These addons are "sms_rotate" and "sms_motd".
You will most likely want to disable or reconfigure the "sms_rotate" addon if you enable "controlGameSetup"
Note that "controlGameSetup" defaults to false in the sample config, so the "sms_rotate" addon will just print a warning that it can't do anything because it can not control the server


Addon "sms_motd":
Simple addon that sends text chat to joining members with some information about the server.
Warning: While this addon worked fine when I tested it locally, it does not seem to send me anything when it's running on our testing server. This might be due to joining latencies, perhaps it sends the texts too soon and the game does not display them. For this reason I'll experiment on the server soon, and stop/start it very often. So please do not try to play any games on it, as I'll have to kick you out often.

Addon "sms_rotate":
This addon can be used for relatively simple server control. You must set "controlGameSetup" to true in the config for the addon to work. It set, it will then automatically configure new and returning lobbies according to the rotation of setups stored in its config. The default config rotates two setups (simple quali+race on Brands Hatch, and quali+race on Silverstone GP with a bit silly weather/time of day setup)

Configuring Lua addons:

First edit "server.cfg" and enable the addons you want to use in "luaApiAddons". Run the server and then quit it - this will save out the addon configurations.
Go to lua_config directory and open "addon_name.txt" - this is the addon's config. Edit this file and change the behaviour of the addon


WARNING: Soon the way addon configuration works will change. The current method has two drawbacks. First, the contents of lua_config/addon_name.txt mix the configuration and persistent data saved by the addon - for example the sms_rotate addon stores the index of the rotation there, so it continues rotating the setups from where it stopped last time even after server restart. Second, since the addon can save over this file, it loses user-made formatting, so any comments will be lost, and the order might randomly changed because that's how Lua tables work.

In update to be released soon this will change. Most likely on Monday. The file names will be different, the config and persistent data will be separated, and the config will never be overwritten by the addons, so it will retain all comments and formatting.

thmxvr
18-09-2015, 13:31
Very nice, thanks a lot and keep up the awesome good work.

Stepan Vondrak
18-09-2015, 14:17
A DS hotfix has been released to Steam, fixing the Lua builtin GetServerUptimeMs() on Linux, which was breaking the "sms_motd" addon.

fresquito
18-09-2015, 14:39
I've updated the DS and restarted it. I can't find it in the browser. Any tips?

BTW, there're few servers open, so I'm guessing it's not only in my end?