Results 1 to 4 of 4

Thread: Dedicated Server Can't change cars from Host.

  1. #1
    Kart Driver
    Join Date
    Jan 2018
    Location
    Atlanta
    Posts
    11
    Platform
    PC

    Dedicated Server Can't change cars from Host.

    I've got a hosted DS running. Everything is great but I can't seem to get it to allow other players to pick a different car from the host. Anyone see anything wrong with my code?

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

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

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

    // Master enable/disable toggle. ****************
    enableLuaApi : false

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

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

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

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

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

    // Automatic race setup rotation.
    "sms_rotate",

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

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

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

    "lib_rotate"
    ]




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

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

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

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

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

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

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

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

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

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

    //REALISM SETTINGS

    // Visual only damage
    "DamageType" : 0,

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

    //"ManualPitStops" : 0,

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

    // Penalties on.
    "PenaltiesType" : 1,
    "PitWhiteLinePenalty" : 1,
    "DriveThroughPenalty" : 1,
    "AllowablePenaltyTime" : 5,


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

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

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

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

    // Starting date and time.
    "RaceDateYear" : 2018,
    "RaceDateMonth" : 9,
    // "CurrentDay" : 0,
    "RaceDateDay" : 8,
    "RaceDateHour" : 11,

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

  2. #2
    Superkart Pilot
    Join Date
    May 2017
    Posts
    115
    Platform
    PC
    Quote Originally Posted by weapon2057 View Post
    "VehicleClassId" : -718294614,
    Maybe a stupid question, but did everyone have the Porsche-DLC? This ID belongs to Group4, and afaik there are only two cars withing this group. The BMW Procar and the 924 Porsch.

    Also
    Quote Originally Posted by weapon2057 View Post
    controlGameSetup : false
    imho has to be set to true.

  3. #3
    Forum Whore Tom Curtis's Avatar
    Join Date
    Sep 2011
    Location
    Greenwich
    Posts
    103
    We have tried to repro this here this morning, and cannot repro what you are talking about in the post. Do you have any other details which may help us try and track it down? Were you running Quali and people JIPing in, or people joining the lobby before launching? Have you grabbed the latest DS, then verified, then copied back over your config? Also could be good practice to verify your PC2 install as the final game setup verification is done on the client.

  4. #4
    Kart Driver
    Join Date
    Jan 2018
    Location
    Atlanta
    Posts
    11
    Platform
    PC
    controlGameSetup : false
    enableLuaApi : false

    I changed these both too True and it fixed the problem but now I have a new problem. The track selection crashes every time after the first race. I started a new thread for it.

    http://forum.projectcarsgame.com/sho...ter-first-race

    Also now when I force "same class flag" even the host can not change class..
    TWITCH: ATL_RIOT
    MIXER: ATL_RIOT
    YOUTUBE: ATL RIOT

Similar Threads

  1. Replies: 34
    Last Post: 13-08-2018, 09:18
  2. Dedicated server question: host migration?
    By bloozmahn in forum Multiplayer
    Replies: 1
    Last Post: 04-11-2017, 15:55
  3. Dedicated Server Host Reserved Slot
    By JackBourbon in forum Multiplayer
    Replies: 0
    Last Post: 26-10-2017, 20:06
  4. Replies: 21
    Last Post: 03-10-2017, 19:42
  5. Dedicated server, how to enforce certain cars?
    By whip in forum Multiplayer
    Replies: 12
    Last Post: 24-09-2017, 08:52

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
  •