1. Trouble with the game?
    Try the troubleshooter!

    Dismiss Notice
  2. Issues with the game?
    Check the Known Issues list before reporting!

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

Fading lights coding problem

Discussion in 'Troubleshooting: Bugs, Questions and Support' started by IShokku, May 27, 2025.

  1. IShokku

    IShokku
    Expand Collapse

    Joined:
    Apr 23, 2022
    Messages:
    292
    Hello, i was trying to make new lights for etk700 and stumbled upon a problem.
    I can't really understand what am i doing wrong, but when the code was done, i've refreshed the car and it broke
    I used this video to get a better understanding:

    Piece of useless code: -----
    "glowMap":{
    //lights and glass
    "etk700_signal_L":{"simpleFunction":{"signal_L_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights"},
    "etk700_signal_R":{"simpleFunction":{"signal_R_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights"},
    "etk700_taillight_L":{"simpleFunction":{"taillight_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_taillight_R":{"simpleFunction":{"taillight_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_taillight":{"simpleFunction":{"taillight_filament":0.49,"brakelights":0.49}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_chmsl":{"simpleFunction":{"taillight_filament":100}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_headlight":{"simpleFunction":{"lowbeam":0.49,"highbeam":1}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_headlightglass":{"simpleFunction":{"highbeam_filament":1}, "off":"etk700_glass", "on":"etk700_glass_on"},
    "etk700_runninglight":{"simpleFunction":{"highbeam_filament":1}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_reverselight":{"simpleFunction":{"reverse_filament":1}, "off":"etk700_lights", "on":"etk700_lights"},
    "etk700_lowhighbeam":{"simpleFunction":{"lowhighbeam_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights_on"},
    "etk700_foglight":{"simpleFunction":{"fog_filament":1}, "off":"etk700_lights", "on":"etk700_lights"}, ------
    --------
    "components": {
    "electrics": {
    "customValues": [
    ["electricsName", "electricsFunction"],
    ("lowhighbeam_filament", "electrics.lowhighbeam * electrics electricalLoadCoef"],
    ["highbeam_filament", "electrics.highbeam * electrics.electricalLoadCoef"],
    ["signal_R_filament", "electrics.signal_R * electrics.electricalLoadCoef"],
    ["signal_L_filament", "electrics.signal_L * electrics.electricalLoadCoef"],
    ["reverse_filament" "electrics.reverse * electrics.electricalLoadCoef"]
    ["fog_filament","electrics.fog * electrics.electricalLoadCoef"],
    ["taillight_filament","(electrics.brakelights + electrics.lowhighbeam) * electrics.electricalLoadCoef"],
    ]
    "smoothers": [
    ["electricsName", "smootherType", "params"],
    ["lowhighbeam_filament", "temporalNonLinear", [12,14]],
    ["highbeam_filament", "temporalNonLinear", [10,13]],
    ["signal_R_filament", "temporalNonLinear", [17,18]],
    ["signal_L_filament", "temporalNonLinear", [17,18]],
    ["reverse_filament", "temporalNonLinear", [17,18]],
    ["fog_filament", "temporalNonLinear", [17,18]],
    ["taillight_filament", "temporalNonLinear", [10,15]],
    ]
    }
    }
    ------------
     
  2. elimiel2

    elimiel2
    Expand Collapse

    Joined:
    Feb 12, 2025
    Messages:
    896
    "glowMap": {
    "_comment": "lights and glass",
    "etk700_signal_L": {
    "simpleFunction": {
    "signal_L_filament": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights"
    },
    "etk700_signal_R": {
    "simpleFunction": {
    "signal_R_filament": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights"
    },
    "etk700_taillight_L": {
    "simpleFunction": {
    "taillight_filament": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_taillight_R": {
    "simpleFunction": {
    "taillight_filament": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_taillight": {
    "simpleFunction": {
    "taillight_filament": 0.49,
    "brakelights": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_chmsl": {
    "simpleFunction": {
    "taillight_filament": 1
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_headlight": {
    "simpleFunction": {
    "lowbeam": 0.49,
    "highbeam": 1
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_headlightglass": {
    "simpleFunction": {
    "highbeam_filament": 1
    },
    "off": "etk700_glass",
    "on": "etk700_glass_on"
    },
    "etk700_runninglight": {
    "simpleFunction": {
    "highbeam_filament": 1
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_reverselight": {
    "simpleFunction": {
    "reverse_filament": 1
    },
    "off": "etk700_lights",
    "on": "etk700_lights"
    },
    "etk700_lowhighbeam": {
    "simpleFunction": {
    "lowhighbeam_filament": 0.49
    },
    "off": "etk700_lights",
    "on": "etk700_lights_on"
    },
    "etk700_foglight": {
    "simpleFunction": {
    "fog_filament": 1
    },
    "off": "etk700_lights",
    "on": "etk700_lights"
    }
    }









    I hope this works
     
  3. whatawhat

    whatawhat
    Expand Collapse

    Joined:
    May 25, 2018
    Messages:
    404
    You've forgotten the '"materialEmissiveScaling":{"on_max":1}' line. It should be added like this: "etk700_signal_L":{"simpleFunction":{"signal_L_filament":0.49}, "off":"etk700_lights", "on":"etk700_lights",materialEmissiveScaling":{"on_max":1}},
     
  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