[REL] Headlight controls

Discussion in 'Other' started by Seven Smiles, Aug 20, 2019.

  1. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    Ah yes,
    Code:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\rFactor 2\\Userdata\\player\\controller.json'
    I thought I’d trapped that, anyway you can specify it in headlightControls.ini.
     
  2. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
    the new version makes a script error at startup. Strange, I never had ..

    [​IMG]
     
  3. Felix Schendel

    Felix Schendel Registered

    Joined:
    May 31, 2014
    Messages:
    132
    Likes Received:
    83
    You need to specify where your controller.json is stored. Open headlightControls.ini and add controller_file = E:/Steam/steamapps/common/rFactor 2/UserData/player/controller.json under [miscellaneous].
     
    Seven Smiles likes this.
  4. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    I've made a change to trap that and give a warning but the script to pack it up into an .exe has stopped working again :mad:
     
  5. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
    Thank you, but unfortunately that does not help either. Script error still appears.

    So is the error in the new exe file?
     
  6. Felix Schendel

    Felix Schendel Registered

    Joined:
    May 31, 2014
    Messages:
    132
    Likes Received:
    83
    Did you adjust the value of controller_file to your belongings?
     
  7. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
    yes....
    and checked again ..:(
     
  8. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    Please download the debug version of the exe from the same location, it may give more information.

    I haven’t uploaded a new version yet, I can’t build it.
     
  9. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
  10. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    Same error
    Code:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\rFactor 2\\Userdata\\player\\controller.json'
    1. Where is your rFactor installed?
    2. What controller_file entry do you have in headlightControls.ini?
     
  11. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
    1.
    D:/Zusatz/Steam/steamapps/common/rfactor 2/
    2.
    controller_file = D:/Zusatz/Steam/steamapps/common/rfactor 2/UserData/player/controller.json
     
    Seven Smiles likes this.
  12. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    OK, that looks fine. I've fixed the problem creating an .exe and there are a pair of new V0.7.61 .exes with an error trap if the program can't open controller.ini. The DEBUG version also prints extra clues.
     
  13. Vanisch

    Vanisch Registered

    Joined:
    Oct 21, 2018
    Messages:
    130
    Likes Received:
    80
    Thank you very much for your help and effort.

    addendum:
    Hey, Seven
    it works perfectly again! Thanks for your great Job and fantastic Tool...
     
    Last edited: Nov 3, 2019
    Seven Smiles likes this.
  14. MrMaverick

    MrMaverick Registered

    Joined:
    Feb 20, 2012
    Messages:
    119
    Likes Received:
    15
    If you dont set a key to turn your lights on and off, the sim will automatically do it for you.
     
    Seven Smiles and philmcqueen like this.
  15. Paulus_NL

    Paulus_NL Registered

    Joined:
    Jul 28, 2019
    Messages:
    73
    Likes Received:
    37
    Does it need to be a keyboard key or can the lights in rF2 also be mapped to a wheel button (instead of H) and will this work?
     
  16. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
    It has to be a keyboard button because I haven't found a way to send wheel buttons to a game. I don't see this as a shortcoming, you can map wheel buttons to operate rF2headlights - there are controls for On, Off and Toggle as well as Flash.
     
  17. Vance Le Garde

    Vance Le Garde Registered

    Joined:
    Oct 5, 2010
    Messages:
    223
    Likes Received:
    31
    Fair enough but the idea is to be able to turn them on and off as well ;)
     
  18. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,099
    Likes Received:
    1,152
  19. Jamilton

    Jamilton Registered

    Joined:
    Jun 15, 2017
    Messages:
    20
    Likes Received:
    11
    Hi there. Useful tool to have, however I can't get the "Select Flash Headlights" option to work. It will automatically flash in the pitlane, however does not accept the command for a manual flash. Any ideas on what I can look at or change?
     
  20. elbo

    elbo Registered

    Joined:
    Feb 19, 2012
    Messages:
    625
    Likes Received:
    182
    Elevate it to run as administrator...fixed the issue for me
     

Share This Page