[h1]Updated for 42.9.0![/h1]

>  Made vehicle headlights extend much farther.  

The latest update made headlights a lot better... but they could be even brighter!  This mod has been updated using the new functionality in B42.9.0 for the best headlights ever, without any manual java file installation.

Anyone using the main mod will have it automatically updated to version 3 if they are using Zomboid 42.9 or later (same modID, new code & name).  The 2.0 WIP version has been removed, and the Java mod is now depreciated.

[b]Bonus update:[/b] you can now toggle high beams using the radial menu (this can be disabled in mod options)

---


High Beams!  Because driving at night needs more than 8 feet of visibility.  

This mod adds high-beams you can toggle on/off that give your headlights extra distance and (optionally) light up the immediate area around the car.

Thank you to 十叁 for their mod [url=https://steamcommunity.com/sharedfiles/filedetails/?id=3425507560&searchtext=headlights]BrighterHeadlights[/url] which showed me the final missing piece to get this mod from idea to reality.

Thank you to Indie Stone for updating the headlight code to make more available via lua.


[b]How do I use this mod?[/b]

First, you need to be playing [b]B42[/b] and you need a vehicle with functional headlights.  Then get in your car and toggle high-beam mode with the hotkey (set to '.' by default.) The headlight indicator will be blue when headlights are on and in high-beam mode. 

[b]What do the options do?[/b]

In Options -> Mods -> High Beams you can change a few settings:

[list]
[*]Keybind: The key to toggle high beams
[*]Always On: high beams are always on automatically
[*]Length multiplier: default length is 36 tiles, this lets you increase that distance
[*]Intensity Multiplier: allows you to blind other drivers with your aftermarket xenon bulbs
[*]Radial Menu: Adds a high beam toggle to the vehicle radial menu.
[*]Debug Mode: Prints extra info to console.
[/list]

After changing settings turn high beams off and on again for them to take effect.

[b]How does this mod differ from Brighter Headlights?[/b]

Most of the headlight parameters we can access (range, intensity, etc) are ignored by the lighting engine and replaced with values based on the headlight condition.  Brighter Headlights changes one of the few editable parameters to increase light scatter outside the main light cone, which lights up the car and the area around it but doesn't give any additional distance.  This mod moves the headlights so one is centered just in front of your bumper and the other is floating 9 meters ahead of you, giving additional length. The "excessive" glow pattern option adds the light scattering used in Brighter Headlights to light up the car and immediate surroundings in all directions. Then there's some extra code to allow high beams to be toggled and track which headlight is in better condition so they can swap positions as needed.


[b]Does this mod work in B41?[/b]

This mod is B42 only.  It relies on new functionaly added in B42.9.0 and can't be backported to B41.


[b]Can this mod be safely added mid-save?[/b]

Yes.


[b]Can this mod be safely removed mid-save?[/b]

Yes.


[b]Does this work with modded vehicles?[/b]

It works with every modded vehicle I've tested.


[b]Does using high beams while the engine is off consume more battery power than normal lights?[/b]

No, because when I tried the game crashed so for now power usage is unchanged.


[b]Can I make the lighting smoother as I drive?[/b]

In Options -> Display & Performance -> Lighting Updates  set the number of lighting updates to a value higher than 15 per second.  (this technically has nothing to do with this mod, but is worth knowing since you're probably paying more attention to the lighting while looking at the effects of this mod)



