Project Zomboid

Project Zomboid

Enhanced Flashlight Glow
37 kommentarer
Gio  [ophavsmand] 18. okt. kl. 13:52 
@Ġedryht of Wōden
Fair point, I really only considered the implications of using the mod in singleplayer since b42 doesn't have multiplayer yet. I'd be willing to look into it once b42 adds multiplayer.
Ġedryht of Wōden 18. okt. kl. 4:40 
If this was a game setting rather then a user setting, wouldn't this make it more balanced for multiplayer use?
Guicsr_ 30. juni kl. 20:54 
I didn't notice, but I have to change it in the menu because it's set to default on standard.
Gio  [ophavsmand] 30. juni kl. 20:28 
@Guicsr_ I just tested it on 42.10 and it's working perfectly. If you can't notice the effect, it might be that the brightness setting is too low for your monitor/setup. Try increasing it in the in-game mod settings.

There are 3 settings for brightness included in the mod.
Guicsr_ 29. juni kl. 21:10 
Is the mod still working? It seems like nothing changed when I activated it, this was on b42.9
Amroth 16. mar. kl. 8:23 
That's what I initially assumed because the car would glow when turning on the headlights. Turns out, another mod was going through each vehicle light every in-game minute and setting their intensity to maximum, lol.

Sorry for the false alarm. And thanks for the mod, absolutely essential +1
Gio  [ophavsmand] 15. mar. kl. 17:40 
@Amroth I see. I was thinking maybe that turning on car headlights would give increase a player's torch strength or something. Thanks for testing
Amroth 15. mar. kl. 17:13 
I did some more testing, false alarm. Seems to work fine together. It was another mod causing issues.
Gio  [ophavsmand] 15. mar. kl. 17:09 
Looking into it @Amroth
Amroth 13. mar. kl. 13:03 
Is there a way to make this compatible with Nepenthe's High Beams mod?

Both are absolutely essential, but having this on breaks high beams.
Gio  [ophavsmand] 8. feb. kl. 0:11 
@Drestalos The b41 version should work fine I think? It's just lacking the settings like changing brightness level and toggling the lantern radius. I have personally had problems with the texture mod in b41 before though. Definitely remember some sort of flickering occurring with that mod.

To be completely honest though, I haven't tested the b41 version, but the logic is exactly the same for how the light is generated, so it should be identically to the version I have tested. I don't think anything has changed in terms of APIs for what I'm touching since b41 (minus the mod settings).
Drestalos 7. feb. kl. 15:59 
Yea, probably just something on my end, it does shine light outward, but it also flickers; could it be Every Texture Optimised or something? I'm running build 41 for what it's worth. I don't think it's your mod, just wanted to see if it was something easily fixed or required some other testing. I appreciate you getting back to me!
Gio  [ophavsmand] 7. feb. kl. 7:48 
@Drestalos Additionally, the method used for generating light is such that it would be impossible for it to only light your character model. The minimum lightsource that can be made would light up a bigger radius than just the tile your character is on, let alone just your character model.
Gio  [ophavsmand] 7. feb. kl. 7:43 
@Drestalos The mod should only be in effect when your character is actively using a lightsource. I.e. your character's torch strength > 0. Did you try running the mod by itself?
Drestalos 2. feb. kl. 18:16 
Hey big guy, dunno if it's some sort of mod conflict, or a setting I may have on the base game, but when I add your mod, it causes a faint constant lighting flicker on my character model
MyScreamers 28. jan. kl. 13:26 
How cain i expand the brightness radius from all the light sources in general?
Mr. Sinister 7. jan. kl. 7:05 
Need to have Brights for Headlights modded. Now that nighttime is so dark, you can't see anything while driving.
sanki mermer 6. jan. kl. 3:06 
car headlight mods would be awesome!
cause they're real problem you cant drive at night
Dima.V 5. jan. kl. 0:03 
How do you activate a bigger brightness?
Gio  [ophavsmand] 26. dec. 2024 kl. 15:42 
@Krow I'd consider it. Not sure on if I'd be able to dynamically apply it like with this mod vs having to hard code it. Seems like a natural evolution after doing this mod though.
Krow 25. dec. 2024 kl. 19:46 
This is great! Any chance you'd be interested in doing something similar for cars? Blows my mind that you can only see five feet infront of you while driving
Gio  [ophavsmand] 23. dec. 2024 kl. 15:22 
@black_rose

I created the mod pretty quickly, but the problem is the precision in the grid squares make it look extremely bad. Think like, when your character is moving the light radius moving isn't smooth, because it's only updated when moving to a new grid square (since I need to spawn the light on the square).

You can see what I mean if you do something like "right click > walk to". That's the grid the lights are being spawned on, but the player can move quite a distance in one square without it moving, so it causes the jittery light moving that I'm mentioning.

This effect isn't noticeable on this mod because there's already so much light from the other source that it gets really smoothed out.


I can throw you the code if you want to do it yourself, but I don't feel like bothering releasing something that I would never use / think looks bad.
black_rose 23. dec. 2024 kl. 14:08 
thats how it always is with these things lol.

also, outside the scope of this mod, but i have an idea for a mod where in the dark theres still a small, grey, lit area around the player to represent your ability to sense/feel your surroundings. idk how simple or similar what you've done here is though
Gio  [ophavsmand] 23. dec. 2024 kl. 10:27 
@black_rose

Thanks lol. I love how I made the estimate of 10mins, then I realized my lantern detection code wasn't working, so had to find a fix.

Hope you enjoy the new version!
black_rose 23. dec. 2024 kl. 10:23 
A1 job my guy!
Gio  [ophavsmand] 23. dec. 2024 kl. 8:59 
@Markovicz

Thanks for catching that lol. I'll fix it

@MarshallSantini

Nice job finding the conflict, like I said, I think this new patch will hopefully fix everything, going to upload in the next 10mins or so.
Markovicz 23. dec. 2024 kl. 8:34 
Workshop title: Enchanced ... .. In-game title: Enhanced ... . Just saying :cherrypie:
MarshallSantini 23. dec. 2024 kl. 8:30 
Thank you so much for looking into this so immensely! I did some more testing yesterday and found that Katta's clothes comes with a flashlight that I didnt realize. When I turn on that flash light, the error does not appear. So I assume the conflict is with Katta's clothing mod which is overriding your mod. I can still post the mod list and full error if youd like.
I also checked the hand crank flashlight. For me it will turn on, then immediately off. The charge will still go down as if its staying on.
Gio  [ophavsmand] 23. dec. 2024 kl. 6:54 
@MarshallSantini

I found a way to not rely on checking items directly. Hopefully this should fix most if not all errors, working on a patch right now, should be done soon.
Gio  [ophavsmand] 22. dec. 2024 kl. 20:19 
@MarshallSantini

I tried for a while and couldn't reproduce this error.

The line it's referring to is just making some function calls for a branch decision. The function calls depend on the secondaryItem object, or in other words, what the player is holding in their left hand. I'm pretty new to lua, so not sure if my syntax was slightly off on checking if such an object existed. I tried to make a correction, however like I said I wasn't even able to reproduce it in any configuration of main-hand, off-hand, modded lights, vanilla lights, etc..

If you could please consider posting steps to reproduce along with a screenshot or plain-text of your mod list I would greatly appreciate it.

Sorry if too much technical jargon btw, just letting you know I looked into it. Thanks for reporting.
Gio  [ophavsmand] 22. dec. 2024 kl. 18:20 
@MarshallSantini

I'll take a look tonight, can you post your modlist? I'll make a bug report thread to put your mods.
MarshallSantini 22. dec. 2024 kl. 17:56 
I must have a conflict of some sort, is there any known incompatibilities? The only flashlight related mod I believe I have is the crank flash light. But I am getting an immense amount of errors as soon as I turn on a flash light. I tired using multiple flashlights, but the error stayed.

function: flashlightChecker -- file: light_controller.lua line # 63 | MOD: Enhanced Flashlight Glow

LOG : General , 1734918722041> Object tried to call nil in flashlightChecker
ERROR: General , 1734918722041> ExceptionLogger.logException> Exception thrown java.lang.RuntimeException: Object tried to call nil in flashlightChecker at KahluaUtil.fail line:82.
ERROR: General , 1734918722041> DebugLogStream.printException> Stack trace:
java.lang.RuntimeException: Object tried to call nil in flashlightChecker
black_rose 22. dec. 2024 kl. 17:03 
you are "the bomb" ;)
Mongrel Man 22. dec. 2024 kl. 14:50 
@Walter Blanco thanks man
Gio  [ophavsmand] 22. dec. 2024 kl. 14:37 
@Mongrel Man

Done.
Mongrel Man 22. dec. 2024 kl. 14:30 
Can you add a before and after photo?
CozyCouch 22. dec. 2024 kl. 14:12 
thank you! this is a livesaver after the power shutdown!