EASY AMS 2 Dedicated Server Config Files & Info

Discussion in 'Automobilista 2 - General Discussion' started by muz_j, Sep 25, 2022.

  1. muz_j

    muz_j Active Member

    Joined:
    Apr 27, 2020
    Messages:
    147
    Likes Received:
    100
    Hi All,

    I've made the creation of a dedicated server quicker and easier than it is by default (for me anyway).
    I had considered writing some sort of script or tool to do it, but I'm lazy, and I've found that simply improving the default server.cfg file has made things a lot easier. So I thought I would share what I've done with any people who might want something that they can simply "drag and drop" and have their server working immediately (after removing the ".txt" suffix that I've added to the config files).

    Out of the box, these files will start up a server called "F-Classic Gen 1 - USA/CAN (+4 AI)", running a single class race using the F1 Classic Gen 1 cars.
    The race will have a 15 m qualifying session, then a 6 lap race.
    Driver ratings are ENABLED.
    A Black List file is ENABLED too (the file I have provided is an example with a bogus steam ID in it).
    The race is limited to 16 cars, with 4 AI controlled cars.

    Most of the settings for the server are documented in the config file (including commonly used options, like track conditions, weather options, a track rotation etc).

    The race / session flag options are listed in the config file and I have set things up so that it's preconfigured for a single class, single vehicle or multi-class race, using predefined flag settings (which are detailed in the config file).
    Just comment ONE option in or out before starting the server.
    If you want to check your own flag settings - then this is a good tool made by another forum user:
    AMS2 Flags tool | TROLL SimRacing

    To make this work, you could simply drag and drop the files, but 3 things I suggest anyone does BEFORE using the files are:
    1) rename the server to something relevant - Look for the section at the top of the config file labelled "// server's name"

    2) change the default admin user password - it's currently set to "###admin"
    i.e. edit the password listed under this label "// User list. Map from user names to passwords, in plain text."

    3) edit the blacklist.cfg file and insert any steam IDs that you want to exclude from your server (or don't).
    You can also disable this by prefixing "//" in front of the blacklist.cfg file name, which is listed under this label "// Black list"

    You will also probably want to change the vehicle, track and race options too, but what I've got will work.
    I have also provided reference files (in plain text) of:
    a) track names and IDs
    b) vehicle classes and IDs
    c) vehicle names and IDs

    ..which should make things quick to set up a new track and change things to a different class, multi-class or single vehicle based race.

    If you want a good free text editor for windows, then I personally use Notepad++ and be aware that it recognises a lot of scripting and programming languages. Downloads | Notepad++

    I may update this file to improve things, but I'll see if anyone finds it useful first.
    I did consider embedding the vehicle and track list tables into the config file, but that would obviously increase is length and I thought things might be easier to use as they are.

    The default URLs for the dedicated server API lists are:
    localhost:9000/api/list/
    localhost:9000/api/list/attributes/session
    localhost:9000/api/list/enums/
    localhost:9000/api/list/flags/
    localhost:9000/api/list/flags/session
    localhost:9000/api/list/tracks/
    localhost:9000/api/list/vehicle_classes/
    localhost:9000/api/list/vehicles/
    localhost:9000/api/list/enums/weather

    If anyone has any questions about my example config files, in the first instance - please read the config file comments, but if it's not covered there and/or you're unsure, then by all means ask away.
    For dedicated server technical support - please use the normal help and support forum (I'm not offering to provide support for general dedicated server questions in this thread - sorry).
     

    Attached Files:

    • Like Like x 4
  2. muz_j

    muz_j Active Member

    Joined:
    Apr 27, 2020
    Messages:
    147
    Likes Received:
    100
    I've updated one section from the original server.cfg file to make it easier to read, and I'm having issues re-adding it to my original post, so it's attached to this comment instead.
     

    Attached Files:

    • Like Like x 2
  3. muz_j

    muz_j Active Member

    Joined:
    Apr 27, 2020
    Messages:
    147
    Likes Received:
    100
    Updated the server.cfg config file for ease of reading (reference lists are generally indented for clarity) and added in a couple of small bits of reference info (e.g. damage types) and made a couple of minor corrections to text (a couple of descriptions didn't match the actual settings, but it was obvious, but for newbies, it might be confusing).
     

    Attached Files:

    • Like Like x 1
    • Optimistic Optimistic x 1
  4. Neem

    Neem New Member

    Joined:
    Jun 7, 2021
    Messages:
    21
    Likes Received:
    15
    This is a really good idea. It can be a bit of a dark art sometimes. Appreciate your efforts. Thanks!
     
  5. muz_j

    muz_j Active Member

    Joined:
    Apr 27, 2020
    Messages:
    147
    Likes Received:
    100
    Cool - thanks.
    I made the changes for myself, but thought it might help others too (as there's very little that you need to actually look up, and I've moved a couple of things around to make the flow of the config file a bit more consistent - i.e. related settings close to each other).

    My ulterior motive, is perhaps if the DS is made a bit easier to get running, it might encourage more people to use it (plus maybe I'll get some feedback on something I could improve).
    I kept on meaning to actually make a tool to create the config file (probably using powershell, but perhaps vbscript or something else), but after a while I realised it was probably more time and effort that I don't really need to do (as things are pretty easy if you add in a bit of additional info to the server's config file).

    The idea (from programming & script writing) being that the server config file should be self documenting (unless there's a good reason not to - like having 155 cars or 149 tracks listed in a huge block of text that makes things harder to read - but I'm still tempted to add in the track & car info just to make it "complete", and I doubt the "file bloat" would actually matter, as they would be comments).
     
  6. muz_j

    muz_j Active Member

    Joined:
    Apr 27, 2020
    Messages:
    147
    Likes Received:
    100
    Updated the server.cfg file again and probably the last edit I'll make.
    I moved a couple of items within the "Game setup control options" section, just to put related settings next to each other.
    I don't think there's much more I can do to make this config file any easier to read/use, so unless someone comes back with feedback, I'll likely consider this the final version.
     

    Attached Files:

  7. paulfos81

    paulfos81 New Member

    Joined:
    Mar 15, 2023
    Messages:
    2
    Likes Received:
    0
    Hi, is there any chance I could get a updated vehicle class Id file please.
     
  8. cristian_83

    cristian_83 New Member AMS2 Club Member

    Joined:
    Mar 7, 2020
    Messages:
    8
    Likes Received:
    1
     
  9. cristian_83

    cristian_83 New Member AMS2 Club Member

    Joined:
    Mar 7, 2020
    Messages:
    8
    Likes Received:
    1
    Hello partner, I have a problem, I have created my dedicated server, I have opened the corresponding ports and when I get to the game my server does not appear, I have also disabled firewall and any firewall that could cover it, I don't know what else I could do, greetings.
     
  10. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,491
    Likes Received:
    700
    there is an issue since the latest updates, try changing this setting in steam to 1500 and you should see a lot more servers.
    [​IMG]
    [​IMG]
     
    Last edited: May 1, 2024
  11. smithloo

    smithloo New Member

    Joined:
    May 1, 2024
    Messages:
    1
    Likes Received:
    0
    it can apply for any change?
     
  12. Florent.Neron

    Florent.Neron New Member

    Joined:
    Feb 18, 2024
    Messages:
    18
    Likes Received:
    3
    Hi, I'm trying to configure my server in multi class but it's not working, I don't understand how I should structure my file.
    Does it have to be like this? :
    // OPTIONAL MULTI-SLOT CAR CLASS(ES) SELECTION (UP TO 9 SLOTS)

    Vehicle class(es) = "Group C" & "DPi" & "GT1" & "P1"
    “MultiClassSlots”: 4
    "MultiClassSlot1": 995310913,
    "MultiClassSlot2": -1372148105,
    "MultiClassSlot3": 1323122160,
    "MultiClassSlot4": 1347575036,

    And if I want to use all the class models, I leave this part empty?

    // CAR MODEL SELECTION (FOR FORCED SINGLE TYPE)
    // ---------------------------------------------
    // "id": -1001569309, "name": "McLaren F1 GTR",
    // "VehicleModelId": -1001569309,
     
  13. drak64

    drak64 New Member

    Joined:
    Mar 9, 2020
    Messages:
    24
    Likes Received:
    21

    Something like that, remember that the flags also vary and the corresponding value must be added:
    Code:
    Any Vehicle: 0
    Identical Vehicles: 2
    Same Vehicle Class: 512
    Multi-Class Class: 1024
    
    Code:
    // VehicleClassId : 995310913,  // Group C
    // VehicleModelId : 373176631,  // Chevrolet Corvette GTP
    Flags : 693634296,
    MultiClassSlots : 4,
    MultiClassSlot1 : 995310913,  // Group C
    MultiClassSlot2 : -1372148105,  // DPI
    MultiClassSlot3 : 1323122160,  // GT1
    MultiClassSlot4 : 1347575036,  // P1
    
    With this excel you can easily generate the files:
     
    Last edited: Jul 27, 2024

Share This Page