When I’m driving a recent Formula One, I would like to know the state of the rain light. Based on what I saw the state are: 1-OFF, most of the time. 2-Flashing, when the pit limiter enabled or the battery is recharging. 3-ON, under rain condition. Do you have any idea where can I seek to fulfill those three different states? So far, the AC Remote Telemetry UDP daemon seems to address the pit zone state. Does anybody know how can I get the other information? Sincerely,
two examples from user Xela1 on CSP discord, those are additions to the cars config, whether in "...assettocorsa\content\cars\_carname_\extension\ext_config.ini" or "...assettocorsa\extension\config\cars\_carname_.ini" Code: ; ks_Audi R8 GT3 [EMISSIVE_WIPERS_MODE_...] ; FOGLIGHT rear NAME=LIGHT_m_brake COLOR=15,1,1,80 ; ks BMW Z4_GT3 [EMISSIVE_WIPERS_MODE_...] ; FOGLIGHT rear Xela1 NAME=LIGHT_CENTRAL_STOP COLOR=15,1,1,30
@Dany Hillary maybe its interesting for others too: you put it in 'extended' CSP car config, whether in \assettocorsa\content\cars\yourcar\extension\ext_config.ini or \assettocorsa\assettocorsa\extension\config\cars\yourcar.ini (here you should search any sub folder for existing configs) You have to know the name of the thing you want to have as that rain light, you can find out in showroom (or ingame with ObjectInspector): In case of the vrc_formula_alpha_2007 there is no config in "loaded" folder, it has its own config: "...cars\vrc_formula_alpha_2007_f07\extension\ext_config.ini" There simply insert this: Code: [EMISSIVE_WIPERS_MODE_...] NAME=EXT_rainlight COLOR=15,1,1,30
@Dany Hillary if you want it to blink add this: BLINK_REPEAT=1 BLINK_FREQENCY_HZ=4 ;;; make it blink faster (Hz is per second) updated the CSP wiki on Github with correct info about this.
it worked. yep i checked it. is this one for adjusting the brightness of tail light? BRAKELIGHT_LIGHT_MULT = 0.2 BRAKELIGHT_LIGHT_RANGE_MULT = 0.5
no, its in the color line: COLOR = r, g, b, brightness COLOR=15, 1, 1, 60 ; 60 is twice as bright than 30
First that for your help. This is my first app and my spare time is limited but I hope to finish a first release this month. After reading your comments, I used Object Inspector with a “Formula Hybrid 2021” car. I found under the mesh ERS_Harvest, the variable ksEmissive was 0,0,0 when light OFF and 333,0,0 when the light is ON. I can't comment if this is the right way or not. What I can say is I don’t think this is the right approach for me because each car model will use a different object name. I am sure there is another way having those informations. My goal is to activate a real F1 light (McLaren Rainlight-3) when the virtual one is activated. That light is fully programable and so far, I can do anything with it. Honestly any light can do the job, I just want to learn what a thru one can do including CAN protocol. My missing part is how can I bridge the light activation with games like AC. For now, I will limit myself to F1 cars. The light can also accommodate LMP FIA rules with two zones (rain, braking). This maybe consider for another release, but I don't have the interest for now. On my initial question, I was wrong with the 3 different states. Under rain the light isn’t always ON anymore, it is always flashing like when ERS is recharging. I will keep searching/testing into the share memory to make sure I can cover all the scenarios. Sincerely,
there is no standard way to access stuff, every car is different, everyone needs a different config then...
what works in an app is this: RainParams = ac.ext_rainParams() # get current rain/wipers state from patch print( RainParams[0] * 100 + ' percent rainy')
see all available new "ac.ext_..." python-functions in this file: Documents\Assetto Corsa\logs\custom_shaders_patch.log For usage of a particular one, just ask here
some (also unfinished) doc of those is here: https://github.com/ac-custom-shaders-patch/acc-extension-apps/blob/master/_doc_python.ini
My Python app working fine (rain, KERS charge, pit limiter). I was able doing it without being restricted to any specific car light object. My last error is with with a USB-Serial relay to activate or not the rear light. I don't know why but I can't import the serial lib that all Python bundle have. Does anybody having an idea? ***py.log*** [backLight: error] Traceback (most recent call last): File "apps/python/backLight\backLight.py", line 20, in <module> import serial ImportError: No module named 'serial' ***backlight.py*** 16 import os 17 import sys 18 import math 19 import time 20 import serial 21 import ac 22 import acsys 23 24 import platform 25 if platform.architecture()[0] == "64bit": 26 sysdir='apps/python/backLight/third_party/stdlib64' 27 else: 28 sysdir='apps/python/backLight/third_party/stdlib' 29 sys.path.insert(0, sysdir) 30 os.environ['PATH'] = os.environ['PATH'] + ";." 31 sys.path.insert(len(sys.path), 'apps/python/backLight/third_party') 32 from sim_info import info Sincerely
AC uses its own implementation/pack of python 3.3, if you unpack assettocorsa\system\x64\Python33.zip there is no serial module You have to provide it yourself in the app folder maybe, but it might be that it needs other modules...
Thanks, serial is a add-on. https://stackoverflow.com/questions/33267070/no-module-named-serial Will try that tomorrow. Thanks