[REL] Headlight controls

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

  1. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    740
    Likes Received:
    799
    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:
    48
    Likes Received:
    40
    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:
    72
    Likes Received:
    25
    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:
    740
    Likes Received:
    799
    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:
    48
    Likes Received:
    40
    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:
    72
    Likes Received:
    25
    Did you adjust the value of controller_file to your belongings?
     
  7. Vanisch

    Vanisch Registered

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

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    740
    Likes Received:
    799
    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:
    48
    Likes Received:
    40
  10. Seven Smiles

    Seven Smiles Registered

    Joined:
    Oct 5, 2010
    Messages:
    740
    Likes Received:
    799
    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:
    48
    Likes Received:
    40
    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:
    740
    Likes Received:
    799
    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:
    48
    Likes Received:
    40
    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:
    104
    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:
    44
    Likes Received:
    23
    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:
    740
    Likes Received:
    799
    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. vancstar

    vancstar Registered

    Joined:
    Oct 5, 2010
    Messages:
    131
    Likes Received:
    17
    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:
    740
    Likes Received:
    799
  19. Jamilton

    Jamilton Registered

    Joined:
    Jun 15, 2017
    Messages:
    14
    Likes Received:
    7
    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:
    558
    Likes Received:
    153
    Elevate it to run as administrator...fixed the issue for me
     

Share This Page