Search The Support Knowledgebase


(database of technical support questions and answers):
   

Author Topic: help with DRS scripting in iRacing

Offline johndough247

  • Standard Level
  • Newbie
  • *
  • *
  • Posts: 2
help with DRS scripting in iRacing
« on: May 08, 2023, 08:07:48 AM »
I'm editing the script for my shift lights to reflect the DRS status in the new Mercedes W12/W13 F1 cars in iRacing. The file I'm editing is slifanatecbodnar_shiftlights.lua and I use the final shifting method (Absolute Modern F1 DRS-F-K2).

In the new cars, there are 3 different DRS values, but only 2 seem to be represented in SLIMax:
1) When the car passes the DRS Detection line and within 1 second of the driver ahead, represented by (GetCarInfo("drs_legal"))
2) When the car is within the allowed zone to use DRS (This value I don't know the name of in SLIMax, or if it is even coded)
3) When the DRS is activated on the car, represented by (GetCarInfo("drs"))

I want to map a yellow light on my fanatecbodnar wheel to represent each DRS state. Can this be added? If it is already added, what is the GetCarInfo name for that?
« Last Edit: May 08, 2023, 09:34:45 AM by Software Support Staff »
  • My SLI Devices List:
    SLIFANATEC-BODNAR

Offline Software Support Staff

  • Management
  • Master Guru
  • *
  • *
  • Posts: 3224
    • eksimracing website
Re: help with DRS scripting in iRacing
« Reply #1 on: May 08, 2023, 09:33:28 AM »
Hello,

Thanks for you inquiry. This information (i.e. car currently in DRS zone when DRS IS LEGAL) is not available in almost all API of games so this is why it's not available in SLIMax Mgr Pro which is supposed to manage more than 60 games.

Even if this is maybe possible by tracking car position/distance within track and knowing the portion of the circuit concerned, please note that we no longer do scripting support, so you're on your own, however we recommend to create a custom shiftlights script rather than modify the main shiftlights script of your device (see the beginning of the script to understand how this works, make the hook and return 1 to bypass main script if needed). Custom scripts are not affected by updates.

Regards,
EKSIMRacing Team
REMINDER: contact your hardware supplier/manufacturer for hardware issue, this support area is for software assistance only. Read the rules. Thank you.