Dedicated server multiclass setup - asking for help

Discussion in 'Automobilista 2 - Help & Support' started by HollPick#51, Nov 9, 2024 at 5:21 PM.

  1. HollPick#51

    HollPick#51 New Member

    Joined:
    Jan 1, 2022
    Messages:
    28
    Likes Received:
    1
    Hi all,

    I'm trying to setup a dedicated server and struggle to get it up and running.
    It runs 24/7 for some time but with a simple 1 car and circuit setup.
    The first user who logs in true AMS2 can edit everything except AI or MULTICLASS.

    For a special occasion, I'd like to edit our server.cfg like following and if possible I'd like to let it run like now until raceday. And no one can edit the server while in the game.

    Can someone point me out how to do this, even better, were I am wrong?
    I'll try it first on my local server before I shoot the file on the real server.

    Thanks in advance.

    SETUP:

    Practice: from now until 10 november 21PM
    Qualifying: (10 november) starts at 21PM and duration is 15 minutes
    Race: (10 november) 60 minutes

    Circuit: Spielberg Modern "id" : 735562025
    Car 1: Sigma P 1 "id" : -1870819346
    Car 2: Sigma P1 "id" : -1720554236

    Wishlist:

    Multiclass
    FCY
    No AI
    Acc tire: and fuel x2 or x3
    Damage on: perf impacting light
    fixed setups
    Auto Pitstop
    Wait for race ready input
    Force realistic driving aids
    Only the 2 assigned cars can be taken
    Server is password protected
    Pitspeed limit

    If possible:

    Practice: track surface: Light rubber
    Quali: track surface: default progressing
    Race: track surface: default progressing


    --------------------------------------------------------------------------
    Part of my server.cfg + flag value calculated
    --------------------------------------------------------------------------

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

    // 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 3 race laps.
    "PracticeLength" : 1500,
    "QualifyLength" : 15,
    "RaceLength" : 60,

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


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

    // Visual only damage 0 Off, 1 Visual, 2 Perf, 3 Full
    //"DamageType" : 0,
    "DamageType" : 2,
    //"DamageType" : 2,
    //"DamageType" : 3,


    // Tire Wear - 8 off, 7 slow, 6 standard, 5,4,3,2,1,0 x2,x3,x4,x5,x6,x7
    "TireWearType" : 4,
    //"TireWearType" : 4

    // Fuel usage 0 standard, 1 slow, 2 off
    "FuelUsageType" : 0,

    // Penalties on.
    "PenaltiesType" : 1,
    "PitWhiteLinePenalty" : 1,
    "DriveThroughPenalty" : 1,
    "AllowedCutsBeforePenalty" : 3,
    // "AllowablePenaltyTime" : 10,

    //SET License
    "MinimumOnlineRank" : "U",
    "MinimumOnlineStrength" : 1100,

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

    // Track Spielberg Modern. See /api/list/tracks/ in HTTP API or globals "lists.tracks", "id_to_track" or "name_to_track" in Lua API.
    "TrackId" : 735562025,

    // Vehicle class Stock Car Brasil. 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" : 492525831,

    // Vehicle Stock Car Chevy Cruze (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" : -1870819346,

    // Starting date and time.
    "RaceDateYear" : 2024,
    "RaceDateMonth" : 11,
    "RaceDateDay" : 10,
    "RaceDateHour" : 14,
    "QualifyDateHour" : 13,
    "PracticeDateHour" : 12,

    // Single weather slot set to "Weather_Clear1". See /api/list/enums/weather
    "RaceWeatherSlots" : 4,
    "RaceWeatherSlot1" : 2067843977,
    "RaceWeatherSlot2" : 888299130,
    "RaceWeatherSlot3" : 296956818,
    "RaceWeatherSlot4" : -934211870,
    "QualifyWeatherSlots" : 1,
    "PracticeWeatherSlots" : 1,

    // value 1 - 60 allowed
    //"RaceDateProgression" : 10,

    // Auto 0 manual 1
    "ManualPitStops" : 0,
    //"RaceMandatoryPitStops" : 1,
    //"RaceFormationLap" : 1,
    //"RaceRollingStart" : 1,

    "MultiClassSlots" : 2,
    "MultiClassSlot1" : -1720554236,
    "MultiClassSlot2" : -1870819346,


    //Grid 0 normal, 4 random
    //"GridLayout" : 4,
    }
    upload_2024-11-9_18-55-27.png

    upload_2024-11-9_18-56-20.png

    upload_2024-11-9_18-58-2.png
    upload_2024-11-9_19-2-4.png

    upload_2024-11-9_18-18-53.png
     
    Last edited: Nov 9, 2024 at 6:02 PM
  2. Asturbo

    Asturbo Member AMS2 Club Member

    Joined:
    Apr 8, 2017
    Messages:
    40
    Likes Received:
    47
    At first glance, you have set in "MultiClassSlot1" & "MultiClassSlot2" the car model but you have to set there the class of the car. I think you also should have to REM also the "VehicleClassId" & "VehicleModelId".
    If you need it I could pass you a CFG file with GT3 Gen1 & 2 multiclass file with comments.
     
    Last edited: Nov 11, 2024 at 9:56 AM
  3. HollPick#51

    HollPick#51 New Member

    Joined:
    Jan 1, 2022
    Messages:
    28
    Likes Received:
    1
    @Asturbo:
    I figured the multiclassslot out and changed the vehicle numbers to class numbers.
    So that worked.
    Issue that remains is that after the race, we cannot just go on selecting different cars etc.
    I think I have to dive deeper into the LUA rotate thing, for that.

    CFG file with comments is always welcome.
     
  4. Asturbo

    Asturbo Member AMS2 Club Member

    Joined:
    Apr 8, 2017
    Messages:
    40
    Likes Received:
    47
    Yes, if you lock the server with a setup, the cycle repeats itself after the race. You need LUA for a different combination after that. Or you can start the server, change the CFG file and restart the server when the race finishes (the CFG file is read only once when server starts).

    BTW here is my template modfied with your settings (but not tested)
     

    Attached Files:

Share This Page