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. Dave Stephenson

    Dave Stephenson Administrator Staff Member AMS2 Club Member

    Joined:
    Feb 13, 2016
    Messages:
    873
    Likes Received:
    1,124
    You can adjust the update and save rates in the top of sms_stats.lua if you want to play with them

    (TICK_UPDATE_DELTA_MS, ACTIVE_AUTOSAVE_DELTA_MS, IDLE_AUTOSAVE_DELTA_MS)
     
    • Informative Informative x 2
  2. Redvaliant

    Redvaliant Well-Known Member

    Joined:
    Apr 4, 2020
    Messages:
    136
    Likes Received:
    261
    Is it possible to run two individual cars from two different classes?
    Say I want to run the Mini from Copa B, and the Mini JCW from its own class. I can set the Copa Mini to the "VehicleModelId" but setting the JCW Mini to the Multiclass field fails to work. So multiclass only works between one "VehicleClassId" and one Multiclass "VehicleClassId"?
    Also, how to restrict the car selection within a class - so, again using the Copa B class, say the Mini and the Chevette only and deselecting the others. Is this possible?
     
  3. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,405
    Likes Received:
    645
    No, unfortunately thats not possible, you can only select a single class, which allows everyone to choose from the cars within that class, or the same car for everyone, or a multiclass race, allowing everyone to choose from the cars in those classess.
     
    • Like Like x 1
  4. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    356
    Likes Received:
    159
    Oh very interesting, I looked at the file and understand it. Another question would changing these timers change how quickly the race results get written at the end of a race?

    local TICK_UPDATE_DELTA_MS = 1000
    local ACTIVE_AUTOSAVE_DELTA_MS = 2 * 60 * 1000
    local IDLE_AUTOSAVE_DELTA_MS = 15 * 60 * 1000

    Basically ACTIVE_AUTOSAVE_DELTA_MS states, do the writes to the sms_stats_data.json every 2 minutes. So when a race is just about to end and write occurs before the leader crosses the finish line. Then the leader crosses the finish line after the write occurs, does this mean the write for the results to the json file needs to wait about 2mins after the race leader has crossed the finish line?
    Would changing ACTIVE_AUTOSAVE_DELTA_MS = 1 * 60 * 1000
    (1 minute) reduce the time to write the result to 1 minute after the race has finished?
     
    Last edited: Jan 12, 2023
  5. kmikiwi

    kmikiwi Member

    Joined:
    Jun 19, 2016
    Messages:
    60
    Likes Received:
    24
    We are a colombian/argentinean league we're using ams2, ams1, acc las months the only problem was about latency between drivers, some lag, we fixed it using an aws amazon dedicated server but last 2 months server changed or something in the game... we are trying to finish a a copa montana cup, we have a rolling start races, las 3 races: donington, galeao and buenos aires we had a lot of problems, errors, bugs ... when the race starts a random driver disconnect but thats not the problem, the problem is when a driver disconnect during the rolling start lap.... when the driver disconnect, all drivers get time penalty because the position changed with the disconnected or bugged driver... all drivers get time penalty.... we restarted races few times, we tried the server on a local pc, on aws amazon server or in the other country pc local server and get the same errors randomly... another random problem is race starts without count all the red lights, maybe 1 red light and then green green, there are the floating cars too, ... its really strange every new bug appears, because about 4 months ago and more server was working almost fine but after updates server y getting worse with every bug and unestable synchronization.... maybe you can get error during a race starting but.... today if you have one of these problems to start the race you need to add another one that is that you can't simply restart the race to fix the problem or retry the race start... or reload the race grid to restart race, when it happens you have to shut down the server and start every session again, make a new qualy session and then wait to start a new race.... hope soon you can get important updates for the multiplayer.. thanks guys...

    upload_2023-1-10_23-25-35.png
     
    Last edited: Jan 11, 2023
    • Informative Informative x 2
  6. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,405
    Likes Received:
    645
    Yeah, for us its mostly the floating/invisible cars which causes the most frustration, as you said, that bug didnt seem to be there around 5 or 6 months ago, worst part is, if you see a car floating high above the track, you can still hit that person on track, but you wont know or feel a thing, yet the car affected does get damage.

    We found a workaround for this is at the start of qually go to the monitor, and click on each drivers name, if you see someone floating, leave the server and rejoin again, this seems to workaround/fix the issue.

    If only that bug would get fixed, it would make a massive difference, regarding the rolling starts, we never use that in our races, but we did in the ams2 community cup race, which caused a DQ for myself and the driver right behind me, because someone else had an issue, the whole pack bunched up, and the syncing went berserk, vid from my perspective can be seen here:

    Twitch

    All those issues make it very hard to try and do proper league races, which is a shame, since the driving experience is probably one of the if not the best there is in my opinion.

    At the moment for proper competitive racing i like RF2 combined with LFM, and ams2 to try and have fun with people from our community.
     
    • Informative Informative x 1
  7. Juan Pelizzari

    Juan Pelizzari New Member

    Joined:
    Jul 11, 2022
    Messages:
    14
    Likes Received:
    1
    Soon will be 3 years since the beginning of AMS2 and many of us trust buying ALL the content.

    It would be nice to have some clarification, honestly, if AMS2 will be a single player sim, it has great FFB, nice vintage content and lots of old tracks.

    In that case, we would stop wasting time building leagues and having great disappointments.

    You guys try to understand that we are your customers, we give you our money and you give us a product that, in this case, is defective online.

    Dialogue, clarity and sincerity is all we ask for, gentlemen of Reiza.
     
    • Agree Agree x 4
    • Disagree Disagree x 1
  8. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,405
    Likes Received:
    645
    Yeah, and even singleplayer has still got longstanding bugs, they have been saying multiplayer improvements are coming, but i think they mentioned that for the first time a year ago, when the rating system got added, or should i say enabled, since its the same as the PC2 system, and back then they said it was in beta, and scheduled races would be coming (probably) soon as well, more then a year later and things regarding multiplayer are even worse then they were back then, they make a lot of empty "promises" unfortunately, clarity and communication is key, and just honesty, if you are not sure when you can have a go at multiplayer, let us know that, dont try and keep us happy by saying things will come probably soon, whilst you even dont know what your getting into
     
    • Like Like x 2
    • Agree Agree x 1
    • Disagree Disagree x 1
  9. Redvaliant

    Redvaliant Well-Known Member

    Joined:
    Apr 4, 2020
    Messages:
    136
    Likes Received:
    261
    Just noticed the damage scale has changed - 0 is now low, and 1 is now medium, and so on.
     
    • Agree Agree x 1
  10. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,405
    Likes Received:
    645
    Yes, indeed, we found that out the hard way as well, would be nice to get a mention of this in the changelog thats posted with the game updates, as this sort of change has quite an effect on scheduled races for instance.

    I know there is a changelog in the server folder, but a bit more info with an update would be appreciated
     
    • Agree Agree x 1
  11. Dave Stephenson

    Dave Stephenson Administrator Staff Member AMS2 Club Member

    Joined:
    Feb 13, 2016
    Messages:
    873
    Likes Received:
    1,124
    Calls to save() don't just happen in the update tick, they also happenin response to some events. Search the file for 'save()' and you'll get a rundown of which trigger it.
     
    • Like Like x 1
    • Informative Informative x 1
  12. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    356
    Likes Received:
    159
    Oh man that's a lot of member functions calling the save() function. I haven't looked at Object Oriented programming in about 23 years since I left college yikes!
     
  13. Kro

    Kro Active Member AMS2 Club Member

    Joined:
    Aug 29, 2020
    Messages:
    239
    Likes Received:
    106
    Makes me feel kind of lucky we only have the issues we have with MP LOL:D:D
     
    • Like Like x 1
  14. DaWorstPlaya

    DaWorstPlaya Active Member

    Joined:
    Aug 5, 2020
    Messages:
    356
    Likes Received:
    159
    Question, @Dave Stephenson any chance the whole AMS2 server might get rewritten as client/server system vs peer to peer? Or is this something the now defunct SMS team would have to do?
     
    • Like Like x 1
    • Optimistic Optimistic x 1
  15. basscodp

    basscodp New Member

    Joined:
    Aug 27, 2022
    Messages:
    2
    Likes Received:
    0
    Beware: this may be kind of a rant, but I assure you it's with good intentions. Hopefully someone picks this up and may act upon what's being said. Or not, but at least I got it off my chest.

    I would love to see a response to the message I quoted. So far, many of us have been pacient because we feel that the quality is there but still needs to be uncovered. However, the multiplayer experience has been taking a turn for the worst incrementally as the last couple of updates were released and I'm getting less and less interested in using this particular sim, even though I love the feelings at the wheel and its looks. And this is most special for any of us who live in LATAM and don't always have the best internet connections. (Before you answer back with the typical response: I never had this many issues with AMS1, iRacing or even AC/ACC)

    There are several things that need to be addressed right now IMHO:

    1) There's no place where we can receive, as customers, some kind of reply about this (or not that of an evident way to do so), either direct or as a general announcement. The only time I wanted to report this type of behavior I got smashed with a process that basically requires me to be prepared everytime I use the sim to even record a video in order to at least feel like I'm being listened to. First time I wanted to report an issue, I'm pretty sure no one read it. And when the issue is within the multiplayer, it's not always easy to give steps in order to reproduce. Sometimes some of the issues seem like a result of a poor QA process (or the complete lack of one). I also don't think that having a support email address can solve this, as being able to share this kind of issues with other fellow users can improve the experience for both us and you as devs. Maybe it could be a good idea putting some ticketing system in place that everyone can vote upon?

    2) It's not only the fact that the experience is bad overseas (and even sometimes between neighbouring cities/areas). It's also about leagues that want to back up this project by organizing fun races, events and even whole championships but have no real way of having useful race direction commands, as we had for AMS1 (which where obviously inherited from rFactor but very cool anyways). You can't apply live penalites or remove incorrect ones, you can't start a race from the pitlane, starting grid cannot be edited... and the list goes on. Guys, many of these leagues are backing you up A LOT, and if you don't believe me, take a tour around the "Automobilista 2 - Reiza Studios" group in FB.

    3) This is what I think it's the thing that I understand the least: What's the reasoning behind having the Dedi Server Tool if the MP is ultimately P2P? I've tried this locally, with a server on AWS (both in Sao Paulo and in the US datacenters) and with dedicated fiber optics connections... The end result is always the same: Awful netcoding, as soon as a user with a semi-high ping hops onboard we get issues like failing rolling starts, ghosting cars, cars that do not see each other, and many other things.


    There's two things I hope from this. Firstly, that everyone understands this is a mix between frustration of issues that should have been addressed earlier and wanting AMS2 to keep on improving. And secondly, that the MP needs to be sorted ASAP. Updates on it have been too little and too far between. It's time to let us know at least a somewhat detailed fix/dev plan and/or come clean and state that AMS2's main focus will be single player / sandboxing.

    Again, this comes as a constructive comment, don't want to shine light on anyone's fault neither steer the thread away from it's main topic, but I took the shot considering this was being talked about.

    Have a great day/night, whenever and wherever you're reading this! :D
     
    • Agree Agree x 7
  16. Roy Niessink

    Roy Niessink Well-Known Member AMS2 Club Member

    Joined:
    Mar 27, 2020
    Messages:
    1,405
    Likes Received:
    645
    Yeah, absolutely, I also think that most of us in here wouldn't mind helping Reiza out where we can, in terms of testing/logging/reporting, at least i know i wouldn't mind doing that, especially if in the end we can all benefit from it and have a much better user experience in return.

    As you said, the whole driving experience in general is very good, which is probably the main reason myself and many from our league/community are still racing online on AMS2.

    Since as mentioned they planned on working on the multiplayer side of AMS2, i hope the enxt update will have a changelog with a multiplayer section and some fixes mentioned below that, as its taken long enough now i would say....
     
    • Agree Agree x 3
  17. Budgetek

    Budgetek Active Member AMS2 Club Member

    Joined:
    Nov 28, 2017
    Messages:
    212
    Likes Received:
    123
    I believe it was already said by Renato. The devs focus is single player. They try to improve MP at least a bit but they cannot guarantee that it will ever get on par with other serious sims. Thats what I understood. The fact is that MP is so incredibly bugged that making it usable for serious racing would probably mean re-writing this code from scratch. Unfortunately AI is also a hit and miss for me so more or less hot lap sim.
     
    • Agree Agree x 1
  18. GeekyDeaks

    GeekyDeaks Member AMS2 Club Member

    Joined:
    Jan 17, 2022
    Messages:
    83
    Likes Received:
    47
    Hey all, I have recently started playing with the dedicated server and was digging around a bit to see if there were some simple quality-of-life hacks that could be leveraged.

    This might be common knowledge, but I found that the old status page on the web UI had two interesting buttons that hit the following endpoints:
    Code:
    /api/session/advance
    /api/restart
    The advance seems really useful as it not only appears to allow you to skip practice and qualy, but also restarts a running race, so if there is carnage in T1, or someone forgets to press ready and is DQ, you can restore a bit of normality and put everyone back on the grid

    The restart one is a bit quirky. It does a sort of soft restart which kicks everyone off. The problem is that it doesn't play nice with sms_rotate and seems to pickup the settings from server.cfg. From what I can gather it's due to the way sms_rotate.lua checks the old and new events e.g.

    Code:
    if ( oldState == "Starting" ) and ( newState == "Running" ) then
    When the restart takes place, oldState == '<unknown state>'. So you have to add the extra check for this.

    For convenience, I added the advance and restart buttons to the new UI by modifying web_files/js/webtool.js and having it inject the buttons into the DOM:

    Code:
    $("ul").first()
        .append('<li><a href="#" class="active" id="advance"><span class="glyphicon glyphicon-forward"></span>&nbsp;Advance</a></li>')
        .append('<li><a href="#" class="active" id="restart"><span class="glyphicon glyphicon-refresh"></span>&nbsp;Restart</a></li>')
    
    $("#advance").on("click", function(event) {
        $.get('/api/session/advance', () => {
            setTimeout( () => window.location.reload(true), 1000)
        })
        console.log("/api/session/advance")
    })
    
    $("#restart").on("click", function(event) {
        $.get('/api/restart', () => {
            setTimeout( () => window.location.reload(true), 3000)
        })
        console.log("/api/restart")
    })
    It looks like this:
    upload_2023-1-29_22-38-19.png

    Anyone got any other hints and tips or little mods they have done to help when running events?
     
    • Like Like x 3
  19. Kro

    Kro Active Member AMS2 Club Member

    Joined:
    Aug 29, 2020
    Messages:
    239
    Likes Received:
    106
    It would be great if this actually worked! For us when using it out of the box as it is set by default we have had 0% success using the API .It would work when I tested it on the server but then when trying to use it to advance the session from P to Q it fails every time when players are on the server & takes the API to some random blank page LOL, IDK what we are doing wrong ..the API is all set up prober from Emperor servers...
     
  20. GeekyDeaks

    GeekyDeaks Member AMS2 Club Member

    Joined:
    Jan 17, 2022
    Messages:
    83
    Likes Received:
    47
    Uh oh, that doesn't sound promising! I tried to look at the Emperor docs and they appear to have been removed which also doesn't bode well :rolleyes:

    All my testing so far has been with just me on the session as I didn't want to subject others to continual restarts whilst I tried to figure out the interaction. We have a race scheduled tomorrow, so I'll see if I can get a few people to hang around after and do a few quick tests.

    Out of curiosity, did Emperor expose a button for the advance on their management page or were you using the one on the old status page? I found the one on the old status page a bit inconsistent as it does a redirect back to the status page from the API endpoint, which was the reason for the convoluted bit of javascript in my previous post where it first does a GET on the API endpoint in the background, then refreshes the page.
     

Share This Page