1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

AMS2 Dedicated Server Tool / SteamCMD Support

Discussion in 'Automobilista 2 - General Discussion' started by Dave Stephenson, May 29, 2020.

  1. SoulMaTriX

    SoulMaTriX New Member

    Joined:
    Oct 31, 2020
    Messages:
    22
    Likes Received:
    0
    I do not use Lua API as it is confusing for me. Able to run a single race with four classes using just the server file. On this file, without using the Lua API, can I set up another race on the same track to immediately follow? Basically two 15 min Sprint races. I currently run a 40-45 min race with no issues.
     
  2. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,283
    Likes Received:
    1,368
    if you want a rotating shema, you'l have to use LUA.
    Or you use the Webpage of the server to configure the next race
     
  3. Mike Shelton

    Mike Shelton New Member

    Joined:
    Mar 11, 2023
    Messages:
    10
    Likes Received:
    10
    Does anyone know how to configure adaptive ai, like rco is doing?
     
  4. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,232
    Likes Received:
    564
    thats not an AMS2 function, what i believe RCO does is look at your track record/speed and adjusts the AI difficulty level accordingly, probably by using some code/calculation to generate the ai when there are several people on the server
     
    • Like Like x 1
  5. SoulMaTriX

    SoulMaTriX New Member

    Joined:
    Oct 31, 2020
    Messages:
    22
    Likes Received:
    0
    Does the custom AI Drivers XML work on a dedicated server?
     
  6. sgsfabiano

    sgsfabiano Well-Known Member AMS2 Club Member

    Joined:
    Oct 28, 2019
    Messages:
    1,981
    Likes Received:
    1,190
    Afaik, no. For sure the names displayed do not work, not sure about skill/personalities though. However I believe none of them work.

    To be able to make it work, with this p2p architecture we unfortunately have in AMS2, the original host would have to transfer the AI files to all the peers, since a host migration could happen and the new host would not have the AI file to read from.

    Can Reiza overcome that limitation? I believe so. Everytime a player joins the lobby the host sends him the AI files in case that node becomes the new host in the future. There would be implications to it though.

    All in all, online AI racing is bound to be a pain in the ass to anybody who is not the host, not only because the host has MASSIVE advantage due to his 0 ping, but also because the world state is calculated by the host and sent to all the other nodes, and sometimes this calculation disregards the other players current/actual position due to latency, which means you will likely get rammed by the AI if you are racing too close to it.
     
  7. Racing Bears TV

    Racing Bears TV Member

    Joined:
    Oct 8, 2021
    Messages:
    16
    Likes Received:
    39
    Could anyone tell me if there is a way to run the barcelona track on the dedicated server because it is in release candidate? If yes, what would be the flag for the server.cfg?
     
  8. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,232
    Likes Received:
    564
    I dont think so unfortunately, would be nice to get a RC version of the dedi as well
     
    • Like Like x 2
  9. sgsfabiano

    sgsfabiano Well-Known Member AMS2 Club Member

    Joined:
    Oct 28, 2019
    Messages:
    1,981
    Likes Received:
    1,190
    Try -2045930240 for Barcelona (no chicane) or 788137081 for Barcelona (chicane).

    No idea if that is actually available, though.
     
  10. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,283
    Likes Received:
    1,368
    w/o a DS update it will not work
     
    • Like Like x 1
  11. Dave Stephenson

    Dave Stephenson Administrator Staff Member AMS2 Club Member

    Joined:
    Feb 13, 2016
    Messages:
    862
    Likes Received:
    1,100
    DS for latest build is now live
     
    • Like Like x 4
  12. Ben35390

    Ben35390 Member AMS2 Club Member

    Joined:
    Feb 13, 2020
    Messages:
    43
    Likes Received:
    8
    despite the update , the tracks of barcelona and the last cars released (junior And F2023) do not appear in the API list, an idea ?
     
  13. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,232
    Likes Received:
    564
    thats strange, i think something went wrong with your update then, as they are showing for me, maybe try verifying the dedi server files through steam?
    upload_2023-6-12_20-18-25.png
     
  14. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,283
    Likes Received:
    1,368
    maybe he looked for Barcelona and not for Circuit de Catalunya

    Reiza is a bit inconsistent in naming the track here ;)
    game list: BARCELONA
    track selection: CIRCUIT DE BARCELONA - CATALUNYA
    dedicated server: CIRCUIT DE CATALUNYA

    Screenshot 2023-06-13 001626.jpg
     
    • Like Like x 1
  15. Dave Stephenson

    Dave Stephenson Administrator Staff Member AMS2 Club Member

    Joined:
    Feb 13, 2016
    Messages:
    862
    Likes Received:
    1,100
    The base naming of the files is out of my control but if you query the main api list or the tracks/vehicles endpoits with parameter 'extra_data=1' it will return all the associated translated names and additional metadata as used in the game ui which can help searching by translated name or country. It's pretty noisy which is why it's opt-in

    Code:
    http://localhost:9000/api/list/vehicles?extra_data=1
    http://localhost:9000/api/list/tracks?extra_data=1
    http://localhost:9000/api/list?extra_data=1
    
    That being said it wouldn't explain why F-Junior was missing so seems more like a failed update on face value. Exe still running during the update perhaps.
     
  16. Ben35390

    Ben35390 Member AMS2 Club Member

    Joined:
    Feb 13, 2020
    Messages:
    43
    Likes Received:
    8
    The problem is solved, after several tests on our dedicated update is passed,but why, I don't know.
     
  17. jota.191

    jota.191 (I'm Lando Garlando in AMS2 lobbies) AMS2 Club Member

    Joined:
    Jul 3, 2022
    Messages:
    394
    Likes Received:
    266
    I have a couple of questions about dedicated servers.

    1- Is the dedicated server AI equal to single player AI? I read somewhere that dedicated server AI is less developed, but I am not sure if this is a thing or it was just a belief of who posted that.

    2- is there a way to get tyre state of a car such as the mTerrain field in local shared memory? Basically my goal is to know programmatically when an offtrack occurs.

    Thank you!
     
  18. GeekyDeaks

    GeekyDeaks Member AMS2 Club Member

    Joined:
    Jan 17, 2022
    Messages:
    83
    Likes Received:
    47
    From experience, the AI is the same if you are the host. If you are not the host, then things can vary a bit as the aggression is based on the setting of the host and the AI can sometimes struggle with close racing and high RTT to the host.

    I did try seeing if the DS had it's own shared memory a while back, but it appeared to not be the case. You can see the events in the lua scripts though. If you take a look at sms_stats/sms_stats.lua and look for
    Code:
    event.name == "CutTrackStart" or event.name == "CutTrackEnd"
    you can see where the events are handled. Reporting those events to another service might be a bit tricky though.
     
    • Like Like x 1
    • Informative Informative x 1
  19. Wolfgang Herold

    Wolfgang Herold I Like Liveries :) AMS2 Club Member

    Joined:
    Apr 3, 2016
    Messages:
    2,283
    Likes Received:
    1,368
    DS has no own AI. Did you check the size of the exe? Not possible with this low bite to have AI code inside. Just a bit networking and a websever ;)
    AI is controlled by the host PC
     
    • Informative Informative x 2
    • Like Like x 1
  20. RnageyRover

    RnageyRover Member AMS2 Club Member

    Joined:
    Aug 8, 2022
    Messages:
    47
    Likes Received:
    52
    Hi All,
    In an effort to understand how the dedi server works normally vs dedi server with Sportsplay enabled vs P2P hosting in game, and reading through large chunks of this thread, I came up with this description. I'm still interested in the role of the steam networking port in all of this, other than announcing all the lobbies in game. Any comments on where I've got it wrong or what the hell steam does in this would be welcomed.

    AMS2 Dedi Server normal behaviour
    [​IMG]
    AMS2 Dedi "hosts" the race until someone comes along and joins it. They are now the host. Dedi Server acts as a rebroadcaster for the host. Pings are therefore AMS2 Player - AMS2 Dedi server - AMS2 Host. it's imperative that the host has the lowest possible ping to the dedi server, and also has a pretty strong setup. Home hosted dedi server make sense here, as all players ping will have the host's ping included in their own ping.

    AMS2 Dedi Server Sportsplay Behaviour

    [​IMG]

    AMS2 Dedi "hosts" the race until someone comes along and joins it. They are now the host. Dedi Server acts as a rebroadcaster for the host. Pings are therefore AMS2 Player - AMS2 Dedi server - AMS2 Host. it's imperative that the host has the lowest possible ping to the dedi server, and also has a pretty strong setup. Home hosted dedi again makes sense here, as all players ping will have the host's ping included in there own ping. This cuts out steams networking API tho, so if Steam is struggling, this method has the advantage that the race still goes ahead. Has the disadvantage that sportsplay needs to be called in the launch parameters as the race wasn't announced to steam so cant be seen in the lobby. Launching with sportsplay parameters is easyish, and a good standby when the server is being unreliable. Example here "steam://rungameid/1066890 -sportsplay XXX.XXX.XXX.XXX:27015" note add -vr if needed


    AMS P2P behaviour
    [​IMG]
    AMS2 host sets up and hosts the race, they are the host. Pings are AMS2 Player - AMS Host. Again it's imperative that the host has a pretty strong setup, probably more for bandwidth as they are getting hit with a multitude of IP connections rather than just one to the AMS2 Dedi server, which I also think does some aggregating of connections (Speculation). This is why with a decent setup P2P in game should always be a bit quicker for pings, provided that steam is behaving itself.
     
    • Like Like x 6
    • Agree Agree x 1
    • Informative Informative x 1

Share This Page