Project Zomboid

Project Zomboid

Nepenthe's High Beams 2.0 (OBSOLETE)
88 Comments
Sp1cy 12 Jun @ 9:25pm 
You're a fucking beast dude, thanks for making this mod.
mango 10 Jun @ 7:02pm 
o7
Weaver 10 Jun @ 12:37pm 
Looks like this is in the base game now Nepenthe, just wanted to thank you for your hard work on this mod. It was 10/10 to use, thank you! All the best in your modding future mate
TheyCallMeVincenzo 10 Jun @ 9:32am 
I believe this is now in the base game now.
crispybiscuits8 10 Jun @ 6:12am 
Reminds me of those bright ass headlights from state of decay 2, this is amazing thank you
AUTOKRATOR 9 Jun @ 10:08am 
Nepenthe laying down the suppressive fire. Nice work.
Nepenthe  [author] 7 Jun @ 8:38pm 
@Doom Girl the discussion was about adding a feature to this mod with a config option to enable/disable it, not making a new mod.

Check the options in the mod and you'll see I'm not trying to make anyone use my personal headlight preferences, the options can go to ridiculous levels. 360° daylight-level illumination with a range so high it extends out of the loaded world? I hate it, but I won't stop other people doing it.
Doom Girl 7 Jun @ 8:02pm 
@Nepenthe Sure, that's all very true, no argument but if you're going to upload mods you should at least give the same level of agency to players as the base game gives, if not more. Doing it this way is how we end up with 100 different mods that all functionally do the same thing just with different variables based on the preferences of those who made it.
Nepenthe  [author] 7 Jun @ 5:51pm 
@Doom Girl not everyone wants the exact same experience, that's why there are so many sandbox options and the game is moddable.

This mod isn't being forced on you, and having options (either in vanilla sandbox settings or mod settings) doesn't mean you need to set them to a value you don't like.
Doom Girl 7 Jun @ 2:02pm 
"No. If I do add that feature I'll include an option to disable it, because realism can be good but it can also just take the fun away from games when your car battery runs flat on you."

WOMP WOMP. Why play a highly immersive games rooted in realistic mechanics if this is your attitude. You getting cocky and running your battery flat because you weren't paying attention IS the fun of a game like this. Essentially this is just a cheat mod if it doesn't have any counter balancing.
Falcon 7 Jun @ 11:20am 
Thanks y'all for answering my question. Much appreciated!
C.C. 7 Jun @ 10:24am 
I understand, thank you very much for your hard work:steamthumbsup:
Nepenthe  [author] 6 Jun @ 7:22pm 
@C.C. I have a fix for lots of the errors that get generated (excluding burnt out wrecks is, in retrospect, obvious) but I'm delaying uploading it because it will need everyone to reinstall the java file. I want to do that along with a game patch so people are more expecting of it rather than getting prompted with a pop-up suddenly, and if I can get some minor new features to work I'll push those too.
irrelevantredundancy 6 Jun @ 7:20pm 
@ Falcon -- Nah, they are compatible. Both mods are putting different files into the Zombie folder. If you go to each mod, and open their Zombie folders and look around, you'll see that the files being copied into the game's folder from each mod are different from each other. Mod's that require copy/pasting into the game's folder are called "java mods" there are more of them out there. Capacity Limit Bypass , Better Car Physics

Tip: make backup copies of the original files before you replace them with the modded versions. I have a folder elsewhere on my computer called Java Mods and I keep a clean copy of the original Zombie folder. Then for each mod I'll make copies of *just* sub folders/files that are being replaced. They come in handy if I want to disable the mod without Verifying the Integrity of the Game Files.
Nepenthe  [author] 6 Jun @ 7:19pm 
@Falcon only if they replace the same java file. KnoxEvent Expanded probably doesn't make any changes to VehiclePart.class. I know for certain Better Car Physics doesn't touch that file and works with this mod.
Falcon 6 Jun @ 3:36pm 
So both this mod and the KnoxEvent Expanded NPC mod require going into the workshop folder, copy a zombie folder, and paste the zombie folder into the Project Zomboid folder. Would that mean these two mods are incompatible?
C.C. 3 Jun @ 2:26pm 
:steamthumbsup:This is a very good mod, it works, but from time to time the following error pops up, please author do you know how to fix it, it's not a big deal, it's just hard to look at it
`Callframe at: setAllTheThings
function: UpdateLights -- file: NepHB_highbeams.lua line # 200 | MOD: Nepenthe's High Beams 2.0 Java Edition
function: setHeadlightsOnSpawn -- file: NepHB_highbeams.lua line #
.....
Caused by: java.lang.NullPointerException: Cannot assign field "highBeamsActive" because the return value of "zombie.vehicles.BaseVehicle.getPartById(String)" is null
at zombie.vehicles.VehiclePart.setAllHighBeamsOff(VehiclePart.java:149)
Crashdown 26 May @ 3:02pm 
Thank you for making this mod!
Is there a chance you can add some options to the "360" feature? I like how the beams work, but it makes the vehicle itself hard to see in the complete darkness - so wondering if we can have options on the 360 glow to have a smaller (less OP) light on the car so I can see it while driving too?
Nepenthe  [author] 25 May @ 11:46pm 
Describe "doesn't work" in more detail.

What messages regarding the mod are in your console.txt?
𝓹ʌ𝓽o𝓰𝓮𝓷☣ 25 May @ 9:44pm 
Yes, I did everything, I manually installed the mod and then activated it and it doesn't work.
Nepenthe  [author] 25 May @ 9:34pm 
@𝓹ʌ𝓽o𝓰𝓮𝓷 Works fine for me - make sure the mod is enabled and you've replaced the Vehicle.class file again (it will have been overwritten by the upgrade to 42.8.1)
𝓹ʌ𝓽o𝓰𝓮𝓷☣ 25 May @ 8:28pm 
Is it just me, or isn't this mod working in 42.8.1?
Gorgonite 21 May @ 3:27am 
Does it need updating at the moment?
Nepenthe  [author] 5 May @ 10:20pm 
@chamit "Zombie" is a directory, the file inside this mode replaces in VehiclePart.class . Unless Knox Event Expanded replaces that same file they will not conflict,
Chamait 5 May @ 1:10pm 
does this work with knox event expanded? Im asking this because in both installations you need to replace the zombie file
Nepenthe  [author] 23 Apr @ 8:54am 
@sage use an intensity between 1 and 2 and you'll get a more gradual fade for the lights.

There's also 360° mode, but that gets really silly really quickly.

Unfortunately it's hard to do anything in between, since the lights have to face directly forward and there's are limits on his much the shape can be adjusted. I find that 3x distance/1.5x intensity is wide enough for night driving.
Stage 23 Apr @ 8:20am 
Hi Nepenthe!
I love your mods, especially those highbeams!
An idea for an extension/submod: wide beams/fog lights.
I like the new lighting system but every lightbeam is so narrow.
For cars widebeams (or maybe a gradual light fading on the highbeam edge?) would be great.

Cheers!
土星环 23 Apr @ 6:56am 
@Nepenthe thank you for your reply,i final solve it, im 100% follow the description,first of all i thoght it was conflict with another car physic mod, but after unsubscribe and re-subscribe this mod, the error is gone
Nepenthe  [author] 23 Apr @ 6:02am 
@ 土星环 did you manually copy the VechiclePart.class file? Instructions are in the mod d description. Those are the sort of errors I would expect if the java file was not in place (and I'm working to make that failure more elegant)

Also, AI for Zomboid mods is really terrible, and I advise against it.
土星环 23 Apr @ 5:39am 
dont know programing , could you tell me how to fix this , trying use AI to solve this,but i it dosnt work :-(


`attempted index: create of non-table: null
function: initOptions -- file: NepHB_highbeams.lua line # 96 | MOD: Nepenthe's High Beams 2.0 Java Edition
function: NepHB_highbeams.lua -- file: NepHB_highbeams.lua line # 120 | MOD: Nepenthe's High Beams 2.0 Java Edition
java.lang.RuntimeException: attempted index: create of non-table: null
LouDrives 19 Apr @ 2:17pm 
omg you're an absolute saint thank you i almost ripped out my own hair trying to find all the dependencies and even started making my own zombie.jar
Nepenthe  [author] 18 Apr @ 7:51pm 
@loudrives there's a rather horrible but functional powershell build script included in the java folder.

I used ProjectZomboiddecompiler to decompile the game and create a directory with dependencies.

For everyone else: This is NOT needed for normal installation, most users should just copy the precomputed VehiclePart.class
LouDrives 18 Apr @ 9:01am 
Sweet but im really strugling with compressing VehiculePart.java in .class as im not really familiar with Zomboid modding some help would be greatly appreciated especially with the dependencies as im trying to find Zomboid.jar or something along those lines but to no avail
Nepenthe  [author] 18 Apr @ 8:00am 
@lou I've already added checks along those lines, but I'm waiting until there is more updated before uploading to the steam workshop since I don't want to force people to update the java class too often.
LouDrives 18 Apr @ 7:53am 
public void toggleHighBeams() {
boolean bl;
VehiclePart headlightLeft = this.vehicle.getPartById("HeadlightLeft");
VehiclePart headlightRight = this.vehicle.getPartById("HeadlightRight");

// Only toggle high beams if the parts exist
if (headlightLeft != null && headlightRight != null) {
bl = !this.highBeamsActive;
headlightLeft.highBeamsActive = bl;
headlightRight.highBeamsActive = bl;
} else {
System.out.println("Warning: One or both headlight parts are missing.");
}

this.updateAllLights();
}
LouDrives 18 Apr @ 7:53am 
public void setAllHighBeamsOff() {
VehiclePart headlightLeft = this.vehicle.getPartById("HeadlightLeft");
VehiclePart headlightRight = this.vehicle.getPartById("HeadlightRight");

// Check if the parts exist before modifying them
if (headlightLeft != null) {
headlightLeft.highBeamsActive = false;
} else {
System.out.println("Warning: HeadlightLeft part is missing.");
}

if (headlightRight != null) {
headlightRight.highBeamsActive = false;
} else {
System.out.println("Warning: HeadlightRight part is missing.");
}

this.updateAllLights();
}
LouDrives 18 Apr @ 7:52am 
public void setAllHighBeamsOn() {
VehiclePart headlightLeft = this.vehicle.getPartById("HeadlightLeft");
VehiclePart headlightRight = this.vehicle.getPartById("HeadlightRight");

// Check if the parts exist before modifying them
if (headlightLeft != null) {
headlightLeft.highBeamsActive = true;
} else {
System.out.println("Warning: HeadlightLeft part is missing.");
}

if (headlightRight != null) {
headlightRight.highBeamsActive = true;
} else {
System.out.println("Warning: HeadlightRight part is missing.");
}

this.updateAllLights();
}
LouDrives 18 Apr @ 7:52am 
@Nepenthe great mod but i made a small fix in your Vehicule.class file where the mod will throwing NullExceptions if a vehicule does not have 2 headlights like Motorcycles i added checks to updateAllLights(), setAllHighBeamOn/Off() and toggleHighBeam() here is the updated code if you're interested:

public void updateAllLights() {
VehiclePart headlightLeft = this.vehicle.getPartById("HeadlightLeft");
VehiclePart headlightRight = this.vehicle.getPartById("HeadlightRight");

// Only update the lights if the parts exist
if (headlightLeft != null) {
headlightLeft.updateLight();
}
if (headlightRight != null) {
headlightRight.updateLight();
}
}
Nepenthe  [author] 18 Apr @ 5:20am 
@Wrath @TEMPEST java isn't the worst language I've dealt with, I just squint a bit and pretend it's C++.
Nepenthe  [author] 18 Apr @ 5:19am 
@tempest not easily, but I do have some idea how it might be possible. I have a suspicion it would add a lot more complexity to the code than what I am willing to maintain though.

For now my workaround is to enable 360° normal lights, and euse those for parking at night.
Wrath 17 Apr @ 5:50pm 
@TEMPEST Lua isn't exactly the worst language, either. At least it's more understandable than many. The point is, you need a Java base (the king of the worst).
TEMPEST 17 Apr @ 12:13pm 
Fantastic! Great work and well done learning the worst language in the world of programming, that's dedication.

Any chance you could add 'Reverse' white lights for all vehicles too please, now that you've pwn'd Java?
RoomGame 16 Apr @ 10:13pm 
Muy buena suscripción de Project Zomboid
ethel † 16 Apr @ 10:48am 
@Nepenthe, these are the mods related to vehicles that i use:

No Burnt Cars;
PZK VLC (Vanilla look-like car pack) (Exotic Cars and "Highway to hell" Addon);
Condition On Dash;
AutoMechanics;
Reduced sickness inside the vehicle;
No Trunk Space Loss (Vanilla only);
Project Seasons (vehicle rust mechanic);
FlipVehiclePlusTrailer;
Standardized Vehicle Upgrades 3 (Core and Vanilla Addon);
monstersauce simple mod (carhood; opens car hood faster and carexp that shows if you will recieve exp from parts uninstall/install (+off road ratings);
Effortless Towing;
Working Seatbelt;
Dynamic Tarp covers;
Hide in Car;
Time Decreases Vehicle Condition;
Neutral Gear Towing;
Improved Trafficjams;
New Car Dashboard;
Authentic Regional Police;
Vehicle Repair Overhaul;
Autotsar Motor Club;
Refrigerated Ice Cream Trucks;
Better Car Physics.

Yeah, i know, it's a boat load of car mods.
savadil 16 Apr @ 6:44am 
bruh
Nepenthe  [author] 16 Apr @ 1:56am 
Thanks for the update.
电脑玩家巴兰尼科夫 15 Apr @ 10:51pm 
@Nepenthe @VirtualLOV it works after i cleaned the directory and reinstall game,thx bro
Nepenthe  [author] 15 Apr @ 7:21pm 
@电脑玩家巴兰尼科夫 can you upload the full console.txt to a site like pastebin so I can have a look? The file path will be c:\users\<username>\Zomboid\console.txt
电脑玩家巴兰尼科夫 15 Apr @ 7:16pm 
@VirtualLOV
se.krka.kahlua.vm.KahluaThread.luaMainloop(KahluaThread.java:624)
se.krka.kahlua.vm.KahluaThread.call(KahluaThread.java:173)
se.krka.kahlua.vm.KahluaThread.pcall(KahluaThread.java:1963)
se.krka.kahlua.vm.KahluaThread.pcallvoid(KahluaThread.java:1790)
se.krka.kahlua.integration.LuaCaller.pcallvoid(LuaCaller.java:66)
se.krka.kahlua.integration.LuaCaller.protectedCallVoid(LuaCaller.java:139)
zombie.Lua.Event.trigger(Event.java:72)
zombie.Lua.LuaEventManager.triggerEvent(LuaEventManager.java:281)
zombie.gameStates.IngameState.enter(IngameState.java:865)
zombie.gameStates.GameStateMachine.update(GameStateMachine.java:145)
zombie.GameWindow.logic(GameWindow.java:388)
zombie.GameWindow.frameStep(GameWindow.java:928)
zombie.GameWindow.run_ez(GameWindow.java:821)
zombie.GameWindow.mainThread(GameWindow.java:619)
java.base/java.lang.Thread.run(Unknown Source)
电脑玩家巴兰尼科夫 15 Apr @ 7:15pm 
@VirtualLOV 感谢回复,我已经覆盖过文件了,但是在游戏中启用mod后还是没有效果,具体表现为
1.选项的模组部分没有出现该mod的内容
2.进游戏后发现模组名字变红,并带上了[ERROR]前缀
因为字数限制我先放一部分报错内容上来,剩下的在下一条评论里
[16-04-25 10:02:50.637] ERROR: General f:0, t:1744768970637> ExceptionLogger.logException> Exception thrown
java.lang.RuntimeException: attempted index: getInstance of non-table: null at KahluaThread.tableget(KahluaThread.java:1667).