Page 1 of 56 1231151 ... LastLast
Results 1 to 10 of 584

Thread: Dedicated Server API

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Stepan Vondrak
    Guest

    Dedicated Server API

    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. 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 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 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/st...s&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:
    Code:
    {
      "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:
    Code:
    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
    GameGuide.pdf

    User Guide: Server administration and setup information
    UserGuide.pdf

    Scripting Guide: All about Lua scripting
    ScriptingGuide.pdf

    Server Values and Types: Reference with various useful data types / lists: all attributes, events, id lists, enums, flags.
    ServerTypes.pdf
    Last edited by Alexandru Marian; 09-05-2016 at 09:34.

  2. #2
    Stepan Vondrak
    Guest
    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

    22.9.2015
    Lua addons: separated customized configuration from persistent data saved by the addon. Details in this post.

    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 by Ph0eNiX.

    Project Cars Dedicated Server GUI Launcher (PCDSG) by cogent
    Last edited by Alexandru Marian; 09-05-2016 at 09:32.

  3. #3
    Superkart Pilot Ramiboo's Avatar
    Join Date
    May 2015
    Location
    Surrey, UK
    Posts
    288
    Platform
    PC
    Quote Originally Posted by Stepan Vondrak View Post
    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.
    Where can I find these updated docs? I've looked through the PDF's at the bottom of the OP and can't find the information on grip spots per track, am I being blind?
    PS4 and PC | CPU i7 4790K @ 4 GHz | RAM 8GB 2400MHz | GPU 1x GTX1080Ti 11GB | Mainboard Gigabyte GA-Z97X | OS Win 10 | 3 x Dell S2716DG | Wheel Fanatec CSW v2 + BMW GT Rim + Fanatec CSP v3 Pedals | Custom 80/20 rig

  4. #4
    WMD Member
    Join Date
    Jan 2012
    Location
    Brasília, Brasil
    Posts
    107
    Platform
    PC
    Quote Originally Posted by Ramiboo View Post
    Where can I find these updated docs? I've looked through the PDF's at the bottom of the OP and can't find the information on grip spots per track, am I being blind?
    The files get updated directly on your dedicated server folder (steam).

  5. #5
    Superkart Pilot Ramiboo's Avatar
    Join Date
    May 2015
    Location
    Surrey, UK
    Posts
    288
    Platform
    PC
    Quote Originally Posted by erickgoldner View Post
    The files get updated directly on your dedicated server folder (steam).
    Thanks, didn't think to look there and I'm on a linux server so no native pdf support.... Doh!
    PS4 and PC | CPU i7 4790K @ 4 GHz | RAM 8GB 2400MHz | GPU 1x GTX1080Ti 11GB | Mainboard Gigabyte GA-Z97X | OS Win 10 | 3 x Dell S2716DG | Wheel Fanatec CSW v2 + BMW GT Rim + Fanatec CSP v3 Pedals | Custom 80/20 rig

  6. #6
    Umer Ahmad
    Guest
    Reserve 3 and sticky

  7. #7
    WMD Member bmaytum's Avatar
    Join Date
    Apr 2012
    Location
    No. California USA
    Posts
    40
    Platform
    PC
    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.
    Asus Sabertooth Z77 powered by Intel i7-3770K @ 4.2GHz, 2 x 8GB DDR3 @ 1867MHz, EVGA GTX-1080Ti SC2Hybrid/ 11GB, Logitech G25 Wheel & Pedals.
    Racer name "EZTarget". Also play Project Cars, GRID Autosport, GRID 2, Assetto Corsa, RRRE, TDU 2, Shift2, GGE & other racing games
    I am a Silver Level pCARS2 development supporter.

  8. #8
    Rookie
    Join Date
    May 2015
    Posts
    1
    Platform
    PC
    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

  9. #9
    Stepan Vondrak
    Guest
    Quote Originally Posted by crashmax View Post
    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.

  10. #10
    Kart Driver
    Join Date
    May 2015
    Posts
    23
    Platform
    PC
    Hi Patrick,
    Quote Originally Posted by crashmax View Post
    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<<

    If you need to have such tables as temp. solution too you can take the info from WMD-leaderboard html-source code:
    >>click<<

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

    cheers,
    Uwe

Similar Threads

  1. Dedicated Server
    By OzDeaDMeaT in forum Multiplayer
    Replies: 9
    Last Post: 14-09-2015, 14:02
  2. Dedicated server browser is down
    By optimalspieler in forum PC - Technical Help & Support
    Replies: 4
    Last Post: 23-05-2015, 08:41
  3. Dedicated Server Browser Not Working
    By flyoffacliff in forum Multiplayer
    Replies: 0
    Last Post: 17-05-2015, 02:59
  4. Dedicated Server High Latency
    By Winpoks in forum Multiplayer
    Replies: 2
    Last Post: 09-05-2015, 06:24
  5. Dedicated Server - HTTP API Request
    By Ph0eNiX in forum PC - Technical Help & Support
    Replies: 3
    Last Post: 08-05-2015, 11:18

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •