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).

DOCS ACC Shared Memory Documentation

Discussion in 'ACC Blog' started by Fernando Barbarossa, Aug 28, 2019.

  1. Iko Rein

    Iko Rein Gamer

    Hi Ensi,

    Great work on the documentation.

    I don't know, if you follow the broadcast developers thread. There was a question about the penalty enum, which relates to the Shared Memory documentation.

    Any change, you could get a updated list of the Penalty codes for Shared Memory? I assume they are the same as for Broadcasting API.

    Cheers.
     
  2. DennisF89

    DennisF89 Rookie

    Hi,

    I'm currently working on a small app using the shared memory of ACC and I was wondering if there is a flag or something in there to detect wether a lap is valid or not?
    Basically I'd like to know when if the user cutted and the laptime is displayed red in game. I couldn't find anything yet, so any help is appreciated :)
     
  3. Ensi Ferrum

    Ensi Ferrum Racer

    What you're looking for is in SPageFileGraphic:
    int isValidLap
    - 0(zero) indicates Non Valid Lap (Red timing in the HUD);
    - 1 indicates Valid Lap
     
    ..LeRenard! likes this.
  4. DennisF89

    DennisF89 Rookie

    Thank you!:)
    I was only looking at the code sample, which apparently does not include some newer fields, so I never saw those new field.
     
  5. Tom Shane

    Tom Shane Racer

    Doesn't work for race and hot stint sessions. It always returns 1.
     
  6. Ensi Ferrum

    Ensi Ferrum Racer

    Really :eek:
    Will have a look at it over the weekend.
     
    Last edited: May 22, 2020
    Tom Shane likes this.
  7. ProBosch

    ProBosch Rookie

    Hey guys, I just noticed that fields like fuelXLap, ABS, TC, TCUT, usedFuel in graphics are always 0 for me. Do they work for you guys?
     
  8. Ensi Ferrum

    Ensi Ferrum Racer

    They work very well on my side.
     
  9. AL612

    AL612 Rookie

    It does stay as true, I think it was mentioned earlier in the thread. As you said it's tied to the current time going red, the superficial level rather than the ratings and lap record chart level.


    In c#? Check the string encoding, when I leave it default the result is as you get, but setting charset to unicode it reads fine.
     
    ..LeRenard! likes this.
  10. ProBosch

    ProBosch Rookie

    Thanks, I figured it out using a package meant for AC. Gonna fork it and prepare one for ACC in C# tomorrow.
     
  11. ProBosch

    ProBosch Rookie

  12. Doug Duthie

    Doug Duthie Hardcore Simmer

    Hi,
    I use shared memory, for among other things, to tell me when new sessions start and when I need to ask for a Broadcast connection to record the session. At the moment I determine a new session
    • If the session type (Race/qualifying etc) changes
    • If the lap number is less than the last
    • AND the status is ACC_LIVE (as i don't want to try to record when the user has exited a session and/or ACC)
    Someone has just reported an issue with multiplayer driver changes. This driver wasn't the first stint and I think what happened is that the status for him was ACC_OFF until his stint started. Therefore, I didn't record the first stint as it looked as though it wasn't in a session.

    Does this sound right? Is the status supposed to be ACC_OFF if a driver is just spectating the first stint? If so, how do I differentiate this from when a driver isn't in a session at all? Interestingly, it looks as though when his stint finished, and he went back to spectating, the status remained as ACC_LIVE

    Thanks
     
  13. AL612

    AL612 Rookie

    Not worked with those two elements, but I'll take a shot.
    My understanding of the driver swapping, is that non-driving team members are in a spectator condition - think iRacing - so telemetry doesn't exist.

    As such the broadcast api is geared around the spectate concept, and also provides session status beyond the graphic.status ACC_LIVE/ACC_OFF when I had a cursory look previously. I imagine it might work nicer for you to flip the concept and use the broadcast api as the outer control, given the increased states.
     
  14. AL612

    AL612 Rookie

    Brake Pressure, the constants given in appendix 3, do these get multiplied with the corner values to give a value in bar?

    Also it appears that 488 is FWD o_O
     
  15. Doug Duthie

    Doug Duthie Hardcore Simmer

    My problem with driving it around the broadcast api is while that is geared around the spectate concept, it appears to be designed around manual interaction (ie you know a session has started so you start spectating). There's nothing to tell you a new session is starting so you need to get a new connection. This is really why I was trying to drive it around shared memory, and when the status/session/track/laps changed it was an indication that a new session had started.

    I was working on the assumption that status of ACC_OFF always meant that ACC wasn't in a race (ie not between pressing Start Event and session ending/quitting). I'm just wondering if this is supposed to be like that. It would be nice if there were an extra state of Spectate.
     
  16. AL612

    AL612 Rookie

    I get that, it's actually the same for the shared memory. Whether you close the memory file is another matter.

    Just done some testing, whilst spectating, the graphic.status returns ACC_OFF. Which will be your problem right?

    I think many are doing something similar to below with the memory files, where catch filenotfound exceptions occur they return success = false. Here it's looking at the broadcast response instead.

    Code:
    System.Timers.Timer broadcastControlTimer = new System.Timers.Timer(1500);
    int ConnectionId = 0;
    ACCUdpRemoteClient broadcast;
    
    public ctor()
    {
        broadcast = new ACCUdpRemoteClient(ip, port, displayName, connectionPassword, commandPassword, msRealtimeUpdateInterval)
        broadcast.MessageHandler.OnConnectionStateChanged += ConnectionStateChanged;
     
        broadcastControlTimer += OnTimerElapsed_Waiting;
        broadcastControlTimer.AutoReset = true;
        broadcastControlTimer.Enabled = true;
    }
    
    protected void OnTimerElapsed_Waiting(object sender, ElapsedEventArgs e)
    {
        broadcast.ConnectAndRun();
    }
    
    protected void ConnectionStateChanged(int connectionId, bool connectionSuccess, bool isReadonly, string error)
    {
        if (connectionSuccess)
        {
            broadcastControlTimer.Enabled = false;
            ConnectionId = connectionId;
        }
        else
        {
            System.Console.WriteLine(error);
            broadcastControlTimer.Enabled = true;
        }
    }
    edit: not even close to trying that code out

    For reference aswell, the game engine looks like;
    1. Menu - nothing exists,
    2. Session loaded - memory file created, broadcast accepting connections -> Spectate state
    3. Player car loaded - memory files being written to.
     
    Last edited: Jun 10, 2020
  17. Doug Duthie

    Doug Duthie Hardcore Simmer

    OK - thanks for your confirmation - I just need to still poll broadcast when ACC_OFF to see if we are spectating
    Cheers
     
  18. johmix

    johmix Rookie

    thanks man
     
  19. Doug Duthie

    Doug Duthie Hardcore Simmer

    Given all the GT4 cars coming in the DLC have now been teased in the preview video, is there any chance we can have a list of all the codes used for the new cars (shared memory car model code and the enums used for broadcast and results files). It would give me a chance to get my app ready

    Thanks
     
    Iko Rein, AL612 and Tom Shane like this.
  20. WallyM

    WallyM Alien

    Has anyone figured out if you can calculate some measure of understeer/oversteer from what's available in the shared memory? E.g. maybe using a combination of localAngularVel, tyreContactHeading, heading etc?
     
Similar Threads
Forum Title Date
ACC Physics Differentiate AC and ACC Shared Memory With Different Naming. Jan 3, 2024
ACC Troubleshooting ACC Shared Memory: AC version still reports 1.7 Apr 19, 2023
ACC Troubleshooting ACC Shared Memory Example Apr 23, 2020
Programming Language - Apps - GUI Themes Shared Memory or UDP Reference for ACC ? Sep 13, 2018
ACC PS4/PS5/XB1/XBX/S General Discussions ACC Will it get cross party not just cross play on consoles? Saturday at 3:02 PM
ACC Physics Does ACC not implement real life braking mechanics?(Need some insights on this recent youtube video) Mar 16, 2024
ACC Multiplayer Communicating with accServer.exe (previously acRemoteServerUDP) Mar 14, 2024
Multiplayer Bugs & Issues Time of Day adjustment on AC Server Maker stuck at 8:00-18:00 even though I have full version ACCM Mar 2, 2024
ACC Screenshots & Videos ACC on PC with Controller | Race Element /ps5 controller activate triggers Feb 28, 2024
ACC Tools ACC will not recognise my Elgato steamdeck Feb 15, 2024
Bug reports ACC Restrictor parameter Feb 7, 2024
ACC Online Leagues / Championships room ACC Official Server higher requirement Jan 30, 2024
ACC Online Leagues / Championships room ACC LEAGUE AUSTRALIA Jan 29, 2024
ACC Tools ACC Time Trial Jan 24, 2024
ACC Troubleshooting ACC me funciona mal Jan 17, 2024

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