Package: pyaccsharedmemory
PyAccSharedMemoryACC shared memory reader written in python 😀.PyAccSharedMemoryInstallationUsageDataClassACC_mapPhysicsMapGraphicsMapStaticsMapWheelsCarDamageVector3fContactPointadditional informationEnumsACC_STATUSACC_SESSION_TYPEACC_FLAG_TYPEACC_PENALTY_TYPEACC_TRACK_GRIP_STATUSACC_RAIN_INTENSITYCar ModelGT3GT4TCCup carsInstallationSimply install the package or copy the pyaccsharedmemory.py file in your projectpip install pyaccsharedmemoryUsageBasic code example.frompyaccsharedmemoryimportaccSharedMemoryasm=accSharedMemory()sm=asm.read_shared_memory()if(smisnotNone):print("Physics:")print(f"Pad life:{sm.Physics.pad_life}")print("Graphics:")print(f"Strategy tyre set:{sm.Graphics.penalty.name}")print("Static: ")print(f"Max RPM:{sm.Static.max_rpm}")asm.close()DataClassDescription are moslty a copy past of the ACCSharedMemoryDocumentationV1.x.x.pdfACC_mapFieldTypeDescriptionPhysicsPhysicsMapData that change at each graphic step. They all refer to the player’s car.GraphicsGraphicsMapData that are updated at each graphical step. They mostly refer to player’s car except for carCoordinates and carID, which refer to the cars currently on track.StaticsStaticsMapData that are initialized when the instance starts and never changes until the instance is closed.PhysicsMapFieldTypeDescriptionCommentpacked_idintCurrent step indexgasfloatGas pedal input valueFrom 0.0 to 1.0brakefloatBrake pedal input valueFrom 0.0 to 1.0fuelfloatAmount of fuel remaining in litersgearintCurrent gearrpmintengine rpmsteer_anglefloatSteering input valueFrom 0.0 to 1.0speed_kmhfloatCar speedvelocityVector3fCar velocity vector in global coordinatesContain 3 floats x, y, zg_forceVector3fCar acceleration vector in global coordinatesContain 3 floats x, y, zwheel_slipWheelsTyre slip for each tyrewheel_pressureWheelsTyre pressurewheel_angular_sWheelsWheel angular speed in rad/styre_core_tempWheelsTyre rubber core temperaturesuspension_travelWheelsSuspension traveltcfloatTC in actionheadingfloatCar yaw orientationpitchfloatCar pitch orientationrollfloatCar roll orientationcar_damageCarDamageCar damagepit_limiter_onboolPit limiter is onabsfloatABS in actionautoshifter_onboolAutomatic transmission onturbo_boostfloatCar turbo levelair_tempfloatAir temperatureroad_tempfloatRoad temperaturelocal_angular_velVector3fCar angular velocity vector in local coordinatesContain 3 floats x, y, zfinal_fffloatForce feedback signalbrake_tempWheelsBrake discs temperaturesclutchfloatClutch pedal input valueFrom 0.0 to 1.0is_ai_controlledboolCar is controlled by the AItyre_contact_pointList ofContactPointTyre contact point global coordinatestyre_contact_normalList ofContactPointTyre contact normaltyre_contact_headingList ofContactPointTyre contact headingbrake_biasfloatFront brake biaslocal_velocityVector3fCar velocity vector in local coordinatesslit_ratioWheelsTyre slip ratioslit_angleWheelsTyre slip anglesuspension_damageWheelsDamage of the suspensionFrom 0.0 to 0.1 (x30 for in s)water_tempfloatWater Temperaturebrake_pressurefloatBrake pressurefront_brake_compoundintBrake pad compund frontrear_brake_compoundintBrake pad compund rearpad_lifeWheelsBrake pad wearPad start at 29mmdisc_lifeWheelsBrake disk wearDisc start at 32mmignition_onboolIgnition is onstarter_engine_onboolEngine starter onis_engine_runningboolEngine runningkerb_vibrationfloatKerb vibrations sent to the FFBslip_vibrationfloatSlip vibrations sent to the FFBg_vibrationfloatG force vibrations sent to the FFBabs_vibrationfloatAbs vibrations sent to the FFBGraphicsMapFieldTypeDescriptionCommentpacked_idintCurrent step indexstatusACC_STATUSsession_typeACC_SESSION_TYPEcurrent_time_strstringCurrent lap time in stringLimited to 15 charlast_time_strstringLast lap time in stringLimited to 15 charbest_time_strstringBest lap time in stringLimited to 15 charlast_sector_time_strstringLast split time in wide stringLimited to 15 charcompleted_lapintNumber of completed lapspositionintCurrent player positioncurrent_timeintCurrent lap time in millisecondslast_timeintLast lap time in millisecondsbest_timeintBest lap time in millisecondssession_time_leftfloatSession time leftdistance_traveledfloatDistance travelled in the current stintis_in_pitboolCar is pittingcurrent_sector_indexintCurrent track sectorlast_sector_timeintLast sector time in millisecondsnumber_of_lapsintNumber of completed lapsOnly has a value when the session is overtyre_compoundstringTyre compound usednormalized_car_positionfloatCar position on track splineactive_carsintNumber of cars on trackcar_coordinatesList ofVector3fCoordinates of cars on track60 car maxcar_idList of intCar IDs of cars on track60 car maxplayer_car_idintPlayer Car IDpenaltyTimefloatPenalty time to waitflagACC_FLAG_TYPEpenaltyACC_PENALTY_TYPEAdded DSQ for driving the wrong way with value 22, 18 seems not used anymore.ideal_line_onboolIdeal line onis_in_pit_laneboolCar is in pit lanemandatory_pit_doneboolMandatory pit is completedwind_speedfloatWind speedIn m/swind_directionfloatwind directionIn Radianis_setup_menu_visibleboolIs in setup menumain_display_indexintCurrent car main display indexsecondary_display_indexintCurrent car secondary display indextc_levelintTraction control leveltc_cut_levelintTraction control cut levelengine_mapintCurrent engine mapabs_levelintABS levelfuel_per_lapfloatAverage fuel consumed per lap in litersrain_lightboolRain lights onflashing_lightboolFlashing lights onlight_stageintCurrent lights stageexhaust_tempfloatExhaust temperaturewiper_stageintCurrent wiper stagedriver_stint_total_time_leftintTime the driver is allowed to drive/raceIn milliseconddriver_stint_time_leftintTimethe driverisallowed to drive/stintIn millisecondrain_tyresboolAre rain tyres equippedsession_indexintidk wtf is thisused_fuelfloatUsed fuel since last time refuelingdelta_lap_time_strstringDelta time in stringdelta_lap_timeintDelta time time in millisecondsestimated_lap_time_strstringEstimated lap time in stringestimated_lap_timeintEstimated lap time in millisecondsis_delta_positiveboolIs delta positivelast_sector_timeintLast split time in millisecondsis_valid_lapboolIs Lap is valid for timingfuel_estimated_lapsfloatLaps possible with current fuel leveltrack_statusstringTrack statusGreen, Fast, Optimum, Greasy, Damp, Wet, Floodedmissing_mandatory_pitsintMandatory pitstops the player still has to doclockintTime of day in secondsodirection_light_leftboolIs Blinker left ondirection_light_rightboolIs Blinker right onglobal_yellowboolYellow Flag is out ?global_yellow_s1boolYellow Flag in Sector 1 is out ?global_yellow_s2boolYellow Flag in Sector 2 is out ?global_yellow_s3boolYellow Flag in Sector 3 is out ?global_whiteboolWhite Flag is out ?global_greenboolGreen Flag is out ?global_chequeredboolCheckeredFlag is out ?global_redboolRedFlag is out ?mfd_tyre_setintNumber of tyre set on the MFDmfd_fuel_to_addfloatHow much fuel to add on the MFDmfd_tyre_pressureWheelsTyre pressure to addtrack_grip_statusACC_TRACK_GRIP_STATUSTrack grip statusrain_intensityACC_RAIN_INTENSITYRain intensityrain_intensity_in_10minACC_RAIN_INTENSITYRain intensity in 10 minrain_intensity_in_30minACC_RAIN_INTENSITYRain intensity in 30 mincurrent_tyre_setintTyre Set currently in usestrategy_tyre_setintNext tyre set per strategyOriginal tyre set used for this strategygap_aheadintGap to the next car in msgap_behindintGap to the previous car in msStaticsMapFieldTypeDescriptionCommentsm_versionstringShared memory versionac_versionstringAssetto Corsa versionnumber_of_sessionintNumber of sessionsnum_carsintNumber of carscar_modelstringName of the carseecarmodeltrackstringTrack nameplayer_namestringPlayer nameplayer_surnamestringPlayer surnameplayer_nickstringPlayer nicknamesector_countintNumber of sectorsmax_rpmintMaximum rpmmax_fuelfloatMaximum fuel tank capacitywhy float ? idk ask kunospenalty_enabledboolPenalties enabledaid_fuel_ratefloatFuel consumption ratefrom 0.0 to 1.0aid_tyre_ratefloatTyre wear ratefrom 0.0 to 1.0aid_mechanical_damagefloatMechanical damage ratefrom 0.0 to 1.0aid_stabilityfloatStability control usedfrom 0.0 to 1.0aid_auto_clutchboolAuto clutch usedpit_window_startintPit window opening timepit_window_endintPit windows closing timeis_onlineboolIf is a multiplayer sessiondry_tyres_namestringName of the dry tyreswet_tyres_namestringName of the wet tyresWheelsFieldTypeDescriptionCommentfront_leftfloatFront left tyrefront_rightfloatFront right tyrerear_leftfloatRear left tyrerear_rightfloatRear right tyreCarDamageFieldTypeDescriptionCommentfrontfloatDamage at the front of the carfrom 0.0 to idfk (multiply by 0.284 to get the time in second)rearfloatDamage at the rear of the carfrom 0.0 to idfk (multiply by 0.284 to get the time in second)leftfloatDamage at the left of the carfrom 0.0 to idfk (multiply by 0.284 to get the time in second)rightfloatDamage at the right of the carfrom 0.0 to idfk (multiply by 0.284 to get the time in second)centerfloatTotal damage of the carfrom 0.0 to idfk (multiply by 0.284 to get the time in second)Vector3fFieldTypexfloatyfloatzfloatContactPointFieldTypefront_leftVector3ffront_rightVector3frear_leftVector3frear_rightVector3fadditional informationEnumsACC_STATUSNameValueACC_OFF0ACC_REPLAY1ACC_LIVE2ACC_PAUSE3ACC_SESSION_TYPENameValueACC_UNKNOW-1ACC_PRACTICE0ACC_QUALIFY1ACC_RACE2ACC_HOTLAP3ACC_TIME_ATTACK4ACC_DRIFT5ACC_DRAG6ACC_HOTSTINT7ACC_HOTLAPSUPERPOLE8ACC_FLAG_TYPENameValueACC_NO_FLAG0ACC_BLUE_FLAG1ACC_YELLOW_FLAG2ACC_BLACK_FLAG3ACC_WHITE_FLAG4ACC_CHECKERED_FLAG5ACC_PENALTY_FLAG6ACC_GREEN_FLAG7ACC_ORANGE_FLAG8ACC_PENALTY_TYPENameValueUnknown-1No_penalty0DriveThrough_Cutting1StopAndGo_10_Cutting2StopAndGo_20_Cutting3StopAndGo_30_Cutting4Disqualified_Cutting5RemoveBestLaptime_Cutting6DriveThrough_PitSpeeding7StopAndGo_10_PitSpeeding8StopAndGo_20_PitSpeeding9StopAndGo_30_PitSpeeding10Disqualified_PitSpeeding11RemoveBestLaptime_PitSpeeding12Disqualified_IgnoredMandatoryPit13PostRaceTime14Disqualified_Trolling15Disqualified_PitEntry16Disqualified_PitExit17Disqualified_WrongWay????18DriveThrough_IgnoredDriverStint19Disqualified_IgnoredDriverStint20Disqualified_ExceededDriverStintLimit21Disqualified_WrongWay22ACC_TRACK_GRIP_STATUSNameValueACC_GREEN0ACC_FAST1ACC_OPTIMUM2ACC_GREASY3ACC_DAMP4ACC_WET5ACC_FLOODED6ACC_RAIN_INTENSITYNameValueACC_NO_RAIN0ACC_DRIZZLE1ACC_LIGHT_RAIN2ACC_MEDIUM_RAIN3ACC_HEAVY_RAIN4ACC_THUNDERSTORM5Car ModelGT3NameKunos IDAston Martin Vantage V12 GT3 2013amr_v12_vantage_gt3Audi R8 LMS 2015audi_r8_lmsBentley Continental GT3 2015bentley_continental_gt3_2016Bentley Continental GT3 2018bentley_continental_gt3_2018BMW M6 GT3 2017bmw_m6_gt3Emil Frey Jaguar G3 2012jaguar_g3Ferrari 488 GT3 2018ferrari_488_gt3Honda NSX GT3 2017honda_nsx_gt3Lamborghini Gallardo G3 Reiter 2017lamborghini_gallardo_rexLamborghini Huracan GT3 2015lamborghini_huracan_gt3Lexus RCF GT3 2016lexus_rc_f_gt3McLaren 650S GT3 2015mclaren_650s_gt3Mercedes AMG GT3 2015mercedes_amg_gt3Nissan GTR Nismo GT3 2015nissan_gt_r_gt3_2017Nissan GTR Nismo GT3 2018nissan_gt_r_gt3_2018Porsche 991 GT3 R 2018porsche_991_gt3_rAston Martin V8 Vantage GT3 2019amr_v8_vantage_gt3Audi R8 LMS Evo 2019audi_r8_lms_evoHonda NSX GT3 Evo 2019honda_nsx_gt3_evoLamborghini Huracan GT3 EVO 2019lamborghini_huracan_gt3_evoMcLaren 720S GT3 2019mclaren_720s_gt3Porsche 911 II GT3 R 2019porsche_991ii_gt3_rFerrari 488 GT3 Evo 2020ferrari_488_gt3_evoMercedes AMG GT3 Evo 2020mercedes_amg_gt3_evoBMW M4 GT3 2021bmw_m4_gt3Audi R8 LMS Evo II 2022audi_r8_lms_evo_iiGT4NameKunos IDAlpine A110 GT4 2018alpine_a110_gt4Aston Martin Vantage AMR GT4 2018amr_v8_vantage_gt4Audi R8 LMS GT4 2016audi_r8_gt4BMW M4 GT4 2018bmw_m4_gt4Chevrolet Camaro GT4 R 2017chevrolet_camaro_gt4rGinetta G55 GT4 2012ginetta_g55_gt4Ktm Xbow GT4 2016ktm_xbow_gt4Maserati Gran Turismo MC GT4 2016maserati_mc_gt4McLaren 570s GT4 2016mclaren_570s_gt4Mercedes AMG GT4 2016mercedes_amg_gt4Porsche 718 Cayman GT4 MR 2019porsche_718_cayman_gt4_mrTCNameKunos IDBMW M2 Cup 2020bmw_m2_cs_racingCup carsNameKunos IDPorsche9 91 II GT3 Cup 2017porsche_991ii_gt3_cupLamborghini Huracan ST 2015lamborghini_huracan_stFerrari 488 Challenge Evo 2020ferrari_488_challenge_evoLamborghini Huracan ST Evo2 2021lamborghini_huracan_st_evo2Porsche 992 GT3 Cup 2021porsche_992_gt3_cup