1. Do you need support for Assetto Corsa Competizione? Please use the proper forum below and ALWAYS zip and attach the WHOLE "Logs" folder in your c:\users\*youruser*\AppData\Local\AC2\Saved. The "AppData" folder is hidden by default, check "Hidden items" in your Windows view properties. If you report a crash, ALWAYS zip and attach the WHOLE "Crashes" folder in the same directory. Do not post "I have the same issue" in an existing thread with a game crash, always open your own thread. Do not PM developers and staff members for personal troubleshooting and support.
  2. As part of our continuous maintenance and improvements to Assetto Corsa Competizione we will be releasing small updates on a regular basis during the esports season which might not go through the usual announcement process detailing the changes until a later version update where these changes will be listed retrospectively.
  3. If ACC doesn't start with an error or the executable is missing, please add your entire Steam directory to the exceptions in your antivirus software, run a Steam integrity check or reinstall the game altogether. Make sure you add the User/Documents/Assetto Corsa Competizione folder to your antivirus/Defender exceptions and exclude it from any file sharing app (GDrive, OneDrive or Dropbox)! The Corsair iCue software is also known to conflict with Input Device initialization, if the game does not start up and you have such devices, please try disabling the iCue software and try again. [file:unknown] [line: 95] secure crt: invalid error is a sign of antivirus interference, while [Pak chunk signing mismatch on chunk] indicates a corrupted installation that requires game file verification.
  4. When reporting an issue with saved games, please always zip and attach your entire User/Documents/Assetto Corsa Competizione/Savegame folder, along with the logs and the crash folder (when reporting related to a crash).

About that maybe-server-api

Discussion in 'Chit Chat Room' started by Minolin, Jun 11, 2015.

  1. Thomas Gocke

    Thomas Gocke Alien

    I can confirm, the end session event is thrown.

    @f_deutsch, did you create a results folder next to the server.exe?

    Maybe the folder should be created automatically.
     
    Last edited: Aug 1, 2015
    Jaye and Minolin like this.
  2. ears1991

    ears1991 Alien

    hey Thomas, by any chance are you making a plugin to go alongside your track rotation script, to send a message at the end of session to say quit, refresh rejoin?
     
  3. Thomas Gocke

    Thomas Gocke Alien


    Yes, already done. Will release in the next days.
     
    GRFOCO, ears1991, tabis and 2 others like this.
  4. Thomas Gocke

    Thomas Gocke Alien

    @Lord Kunos
    At first I was uncertain which way to go for collecting stats, using an UDP plugin or simply using the report.json, because both bring different info to the table, for example the ballast weight is only accessible from the json atm. I'm going for the UDP plugin now because I want to collect driven distances (odometer) and I want a complete drivers list, not only the last connected driver. Plus it's more fun with a plugin ;)
    I think it would be best if we wouldn't need both ways to get the full info, and since we can create a json report from a plugin ourselves (almost done) I think it would be good if the UDP plugin has access to the complete info. Would also make it easier for you if you don't need to maintain both.

    Cheers
     
    f_deutsch likes this.
  5. f_deutsch

    f_deutsch Hardcore Simmer

    That did the trick. I did not had a results folder and after creating it I got the results. Thanks @Thomas Gocke and @Lord Kunos for your help.

    Fernando
     
  6. f_deutsch

    f_deutsch Hardcore Simmer

    I am on the same situation. JSON info seems is not as complete, so I be ending creating some structures on realtime and send the json result to an external server once done.

    I have one week vacation next week, but we will not be traveling at all, so I may take the time to build something interesting to gather stats. May provide both end points, one that generates and the other that receives and stores the data.
     
  7. f_deutsch

    f_deutsch Hardcore Simmer

    Is there a way to get the car current position from the UDP ACSProtocol.ACSP_LAP_COMPLETED event?

    I see there is the LEADERBOARD information when processing the ACSP_LAP_COMPLETED event, my questions are:

    • Is the order of the cars on the for iteration the same order it shows the leaderboard inside AC ? So the current position of the rcar_id inside the collection represents its position when iterating over it?
    • Could it be possible to get the ACSP_NEW_SESSION with information about on which track we are? Otherwise we would have to parse the resulting JSON and gather the information from there, which is not that bad but is kind of extra work.

    It is very, very hard to test the server plugin with only one car on the track. This is going to be hard to debug and fine tune without the help of people willing to race on a specific server just to gather data for the plugin.

    I am enjoying coding this stuff.
     
  8. Jaye

    Jaye Alien

    Sir you are my hero of the day :) Without that folder my servers keep crashing and crashing since yesterday, created folder and stable again. Will write an Issue Thread. Thx a lot again!!!

    Edit:
    Survived one race, crashed again :(:(:(:(
     
    Last edited: Aug 1, 2015
  9. Thomas Gocke

    Thomas Gocke Alien

    Yeah, I'm having a ball too :)

    • Yes, I think iterating over the leaderboard should give the correct position.
    • I'm parsing the server cfg to get info like track and server name atm, since the plugin will most likely have to be run locally it's not a bit problem, imho.


    Does anyone have luck with reading the cut count from the ACSP_LAP_COMPLETED event? At least for a race it showed me 0 cuts although I was cutting heavily (trying to get a feel for the relative impact velocity ;)).
     
  10. Minolin

    Minolin Staff Member KS Dev Team

    Do you "cut" like X tyres out or do you cut in a way so the kunos penatly triggers? Is it on?
     
  11. Thomas Gocke

    Thomas Gocke Alien

    "X tyres out", didn't get a penalty. In race session the sim didn't say anything, in qualify it said "invalid lap" although I'm not sure if the cuts were collected in Q and too tired to do more tests tonight. Will do some more debugging tomorrow.



    I pushed a first version of my server apps to
    https://github.com/flitzi/AC_SERVER_APPS

    If everything runs well I plan to run a DB on Azure and host a service that allows/denies player access based on their "distance per incident" ratio and probably a small stats page.
    I tried to create some reusable parts, so feel free to take a look :) If someone wants to contribute please let me know, or just create a pull request. If someone wants to join the project, my web page and web service skillz are really low, so I'd happily get some help there.
    Btw. thx Minolin for your plugin base! I created a pull request with some small changes.
     
    snyperal likes this.
  12. f_deutsch

    f_deutsch Hardcore Simmer

    I got the warning on AC and got the cuts: 2 on the ACSP_LAP_COMPLETED in qualifying. On race I went off track on straight and did not got any warning on AC neither the cuts: on ACSP_LAP_COMPLETED.

    I would really like a confirmation from someone like @Lord Kunos about the positions on the LEADERBOARD iteration on the ACSP_LAP_COMPLETED event. That would simply a lot of things.

    I am too complementing my generated JSON from the resulting JSON. Will provide a results section and will prepare the JSON transfer to an external server. Will provide a PHP sample probably to process it. I am targeting a simple client that is commonly used on hosting systems.
     
    Thomas Gocke likes this.
  13. f_deutsch

    f_deutsch Hardcore Simmer

    Also, what would happen if for example first place driver (A) crosses the checkered flag, he wins the race, then he exists AC. If second place driver (B) passes the checkered flag after first place (A) got disconnected, what will be the info received on ACSP_LAP_COMPLETED? Will it include driver A and B or just B?
     
  14. Thomas Gocke

    Thomas Gocke Alien

    Ah thx. I would have liked to also get those "cuts" in race, but ok , if it's only counted if you had an advantages makes sense too.


    Pretty sure driver A won't be included, but good question, will test it today. I'm trying not to rely on the leaderboard for overall position for exactly this reason, but for the individual lap positions I'm using it.
     
    Last edited: Aug 2, 2015
  15. Minolin

    Minolin Staff Member KS Dev Team

    Just checked in a bigger update of the .Net plugin API / fake server, so please be careful if you are working with that.
    Biggest change: The plugin/server ports are exchanged (now they are correct according to stefano's example) in the app.config.

    Also notable: The fakeServer now contains a (regular) entry_list.ini file and will use this one to answer GetCarInfo requests automatically. Change this to your needs (file-based, or on-the-fly in the gui):

    upload_2015-8-2_12-18-25.png
    upload_2015-8-2_12-17-51.png

    As last hint: Be very cautious about the networking. Going deeper in the plugins I've experienced some kind of deadlock potential. I've changed UDP-part so the received messages should instantly fork threadwise, but somehow it seems much slower than it should be - and VS gives a warning I don't understand, nor agree. Will come back with a better solution soon.
     
  16. Thomas Gocke

    Thomas Gocke Alien

    Ok did a test on this:
    Your case works fine, but it fails if driver C connects and takes the car of driver A, which will probably happen every time on a populated server where people wait for someone to disconnect. Then basically everything is wrong, the leaderboard in the UDP lap_completed event but also the result in the json. So we need to calculate the leaderboard ourselves, or live with bugged info (did I mention it somewhere, *damn entry list* ;))


    more things I stumbled upon:

    -when a player connects after the race has started his first lap is calculated only from the time of his connection, not from the race start. So summing up the lap times to get a total time and calculating the race result from this info will fail. I already implemented a TimeStamp for the lap completed events, so I will use this for now for the race result. But of course I can only use the plugin msg receive time, which might be inaccurate. Would be cool if we could get a Timestamp for the lap completed event (in the json there already is a Timestamp for every lap). Please add the Timestamp to the UDP "lap completed" event.

    -sometimes the collision event is not thrown for both involved drivers equally, I get (Driver A with Driver B) and (Driver A with Driver B) for the same event.
    Code:
            {
                "Type": "COLLISION_WITH_CAR",
                "CarId": 1,
                "Driver": {
                    "Name": "dengo",
                    "Team": "",
                    "Guid": "76561197969347946"
                },
                "OtherCarId": 0,
                "OtherDriver": {
                    "Name": "bummler",
                    "Team": "",
                    "Guid": "76561197960368219"
                },
                "ImpactSpeed": 1.5909791,
                "WorldPosition": {
                    "X": 3.6521368,
                    "Y": 190.37587,
                    "Z": 146.1238
                },
                "RelPosition": {
                    "X": -0.21703148,
                    "Y": -0.12744333,
                    "Z": 2.5536318
                }
            },
            {
                "Type": "COLLISION_WITH_CAR",
                "CarId": 1,
                "Driver": {
                    "Name": "dengo",
                    "Team": "",
                    "Guid": "76561197969347946"
                },
                "OtherCarId": 0,
                "OtherDriver": {
                    "Name": "bummler",
                    "Team": "",
                    "Guid": "76561197960368219"
                },
                "ImpactSpeed": 1.406181,
                "WorldPosition": {
                    "X": 3.8800602,
                    "Y": 190.37378,
                    "Z": 145.59912
                },
                "RelPosition": {
                    "X": -0.17792147,
                    "Y": -0.12657754,
                    "Z": 2.5640335
                }
            }
    Same happens in the UDP messages. Not a big problem, will just have to give both parties incident points for every event.

    -please make ballast weight accessible via UPD plugin, either in "new_connection" or "car_info"

    -please report tyre compound in the UDP "lap completed" event
     
    Last edited: Aug 2, 2015
  17. Minolin

    Minolin Staff Member KS Dev Team

    OH. I was aware that both collision data (velocity and stuff) will have different values, but A->B & A->B? Did I misunderstand the event completly?
    I can hear my backend calling "HOUSTON!" now.
     
  18. Minolin

    Minolin Staff Member KS Dev Team

    Another question about collisions: Did you guys compare the relative velocity? Hagen did some env-collisions with low speeds ~50 and 30:
    upload_2015-8-2_13-37-48.png

    The server notes 129 and 130 kph (?).
     
  19. mark3

    mark3 Gamer

    I think we need some way to detect car collisions and off-track.
     
  20. Minolin

    Minolin Staff Member KS Dev Team

    Pretty good news:

    You can close and open the plugin as you wish, the server handles this well. I even exchanged my ratingplugin and chat plugin to communicate to the drivers logged in. Very well done @Lord Kunos , testing and updating will be pretty cool. Of course the plugin can run into lifecycle-problems; My solution is that a new_session is a always-clean init, so it'll work again soon after a restart

    Bad news:
    I'm totally confused about the ports. Guys, what do you see here:
    Code:
    UDP_PLUGIN_LOCAL_PORT=12000
    UDP_PLUGIN_ADDRESS=127.0.0.1:11000
    
    12000 should be the listening port of the acServer, and the PLUGIN_ADDRESS is the listening port of the plugin?
    So a corresponding plugin config would be
    Code:
      <add key="acServer_port" value="12000"/>
      <add key="plugin_port" value="11000"/>
    
    ?
    (I think I've broken the .net api without reason)
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice