1. Before reporting issues or bugs, please check the up-to-date Bug Reporting Thread for the current version.
    0.23 Bug Reporting thread
    Solutions and more information may already be available.

Flashing Brake Lights from ETK to Sunburst

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by jackh4x, Aug 31, 2018.

  1. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    I absolutely love the improvements made to the ETK line of vehicles in terms of safety systems. The post-crash braking is so cool to me. Even cooler are the flashing brake lights under heavy braking, as well as the occasional brake light activation made by the ESC under aggressive maneuvers.

    I posted a while back about adding the post-crash braking to the sunburst and it was as simple as adding a few lines of code to the ESC file. Would adding the active brake lights to the sunburst be a similar process? Is there more to it?

    Any help is appreciated - Thanks in advance!
     
    • Like Like x 1
  2. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Engineering
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,712
    Yep exactly the same story :)
     
  3. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    Would you mind providing a screenshot of the section of code I need, similar to the last time you responded?
     
  4. SebastianJDM

    SebastianJDM
    Expand Collapse

    Joined:
    Apr 9, 2017
    Messages:
    856
    i believe you just have to replace
    Code:
    "controller": [
                ["fileName"],
                ["esc"],
            ],
    
    with
    Code:
    "controller": [
                ["fileName"],
                ["postCrashBrake",{"brakeThreshold": 60}],
                ["esc"],
                ["adaptiveBrakeLights"]
            ],
    
    in "sunburst_esc".

    that will add the brake light flash, and also post-crash braking. you can disable either one by simply deleting it.
     
    • Informative Informative x 1
  5. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    I'll try this out and check back later to verify whether or not it worked for me, albeit the steps seem straightforward. Thanks!
    --- Post updated ---
    This method did not work for me. I'm not editing the original esc file, I'm editing a copy of it and it's located inside a mod folder. Other changes I make to the file yield expected results in-game. However, this change did not. Could there be an extra step?
     
  6. SebastianJDM

    SebastianJDM
    Expand Collapse

    Joined:
    Apr 9, 2017
    Messages:
    856
    yeah, my bad.
    after looking for a while, i can't figure it out. but, you can add the following lines to the different configurations of esc (regular, sport, drift) in your esc file:
    Code:
    "indicateESCUsageWithBrakelights": true,
    "activateHazardsAfterEmergencyBraking": true,
    
    this will cause the hazards to activate after hard braking.
     
  7. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    This method did not work for me. I'm not editing the original esc file, I'm editing a copy of it and it's located inside a mod folder. Other changes I make to the file yield expected results in-game. However, this change did not.
    The two lines of code provided above do not add the functionalities intended. This could be purely due to user error, by no means am I saying they are incorrect.

    I did some more troubleshooting as outline below:
    • I moved the file to a different mod that I have unpacked.
    • I did my best to verify that there were no other conflicting ESC files in my other mods.
    • I went as far as to edit the ESC file inside the /content/vehicles folder (I've since reverted the changes, my apologies if this violates any rules).
    • I commented out the aforementioned code above, and it now looks like this:
    Code:
              "controller": [
                         ["fileName"],
                          ["postCrashBrake",{"brakeThreshold": 60}],
                          ["esc"],
                         ["adaptiveBrakeLights"]
                      ],
              
    In doing so, the hazard lights under emergency braking functionality is fully working. Awesome!​

    indicateESCUsageWithBrakelight remains not functioning. Outlined below are some more steps I took to troubleshoot:
    • I looked through the ETK800's esc file and verified that there were no extra lines related to these functions I could have over looked.
    • I looked in the ETK800 brake light files (this might seem outlandish, but I have yet to start making my own mods for this community, and therefore don't know how a lot of this stuff works together) and didn't see anything related to the active brake lights.

    I usually don't dive this deep into stuff like this, but adding this functionality is super important to me, and I appreciate everyone that's contributed thus far.

    Anymore information on this would be greatly appreciated. Thank you.
     
  8. Diamondback

    Diamondback
    Expand Collapse
    Vehicle Systems Engineering
    BeamNG Team

    Joined:
    Apr 8, 2014
    Messages:
    1,712
    In addition to adding the controller, you also need to switch out the electrics source for the brakelights. Usually it's controlled by the brake input, obviously that doesn't work here, so instead of "brake" you need to use "brakelights".
     
    • Like Like x 1
  9. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    I'll look into this when I get home from class. I'll do my best to figure out where to change the electrics source.
     
  10. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    I really hate to be difficult, but I've tried my best to interpret what you mean by switching out the electrics source, but to be completely honest I really have no idea what I'm doing. Soon enough I'm going to brake some important file and run into some trouble. Would you mind explicitly laying out the steps? I genuinely appreciate your time. Thank you in advance.
     
  11. SebastianJDM

    SebastianJDM
    Expand Collapse

    Joined:
    Apr 9, 2017
    Messages:
    856
    add
    Code:
    "electricsName": "brakelights",
    or something like that
     
  12. jackh4x

    jackh4x
    Expand Collapse

    Joined:
    Aug 11, 2013
    Messages:
    249
    In my attempt to understand DiamondBack's post, I did just that. I deleted the jbeamData.electricsName portion of that line of code so that the variable was assigned the string "brakelights" and it did not work.

    Perhaps it's just not possible with this vehicle? It was intended for the ETK vehicles produced a little later than the sunburst. Is that why I'm having so much difficulty?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice