Project Zomboid

Project Zomboid

Darkvision
52 Comments
Burryaga  [author] 8 Jan @ 6:43pm 
I haven't really come back to play B42 much yet and might not be back that soon, so I unfortunately can't give any realistic update estimations, but anyone who wants to try to port the mod is welcome to take a crack at it.
Mr. J Soda 8 Jan @ 4:46pm 
Looking forward to seeing this in B42, since it appears that the settings that would use Mod Options are now part of B42
Burryaga  [author] 8 Nov, 2024 @ 2:59pm 
Sick, that use case would have never occurred to me!
Npyu System 8 Nov, 2024 @ 2:35pm 
I use this mod together with the blind trait to fix the immersion breaking loss of "visibility" at night for blind characters (when it shouldn't affect how they percieve their surroundings at all). Thank you for this mod that allows me to do that !
Burryaga  [author] 20 Sep, 2024 @ 8:49am 
Please contact me on Discord and I'll help you build your world properly! :steamhappy:
Grotty 20 Sep, 2024 @ 8:45am 
Subscribed, reloaded, but can't find Darkvision anywhere in my mods :(. This is just the kind of mod i need to play this game, too, as I have visual difficulties :/. Any help?
Burryaga  [author] 23 Aug, 2024 @ 12:20pm 
Probably but that is beyond the scope of this mod. This is primarily a visual aid mod to help humans see on monitors that make PZ look black and unplayable at night. This is not meant to give players any special powers in the dark other than helping them see well.
Zofrah 23 Aug, 2024 @ 11:49am 
Is possible to reduce debuff for foraging, when search in dark?
Burryaga  [author] 22 Dec, 2023 @ 11:31am 
Recently helped upgrade True Music Jukebox with full support for multiplayer and improved menus. I'm thinking everyone who knows my mods will appreciate this one, so I decided it warrants a bit of comment spam. Hope y'all enjoy.
Roddo 25 Nov, 2023 @ 2:23pm 
I will try to create a patch that makes this trait dynamic, thanks
Burryaga  [author] 25 Nov, 2023 @ 2:01pm 
Also, as long as you change the mod ID, I am open to alternative versions of this mod. I am not possessive about my code. Feel free to use this mod as a basis for trying your hand at Dynamic Darkvision if that appeals to you!
Burryaga  [author] 25 Nov, 2023 @ 1:59pm 
Yes, but I am unlikely to do it any time soon because a lot of other modding priorities are winning in my existence. HOWEVER, all of my mods are intentionally as easy to extend as they could possibly be, so if anyone wants to release a dynamic patch for this mod, doing so would not be difficult for a decent trait modder.
Roddo 25 Nov, 2023 @ 11:53am 
Is there the possibility of making it dynamic?
Wani 15 Jul, 2023 @ 9:20pm 
aaah ok good to know?
Burryaga  [author] 13 Jul, 2023 @ 3:26am 
@Coyote No, it would be done the same way no matter who wants to do it. You would basically just have an EveryOneMinute event that counted each minute you caught a player outside, store minutes outside in player's mod data, and then if player's time passes a certain threshold during that event, you give them this trait. Any dynamic traits modder will know what to do.

PS: Sorry I accidentally deleted your question. For passersby, I was asked if it matters which dynamic traits mod handles this trait.
Burryaga  [author] 10 Jul, 2023 @ 12:35am 
No, but the Dynamic Traits folks are welcome to incorporate my mod's trait in their shenanigans if they like.
Wani 1 Jul, 2023 @ 9:17pm 
if you have a dynamic traits mod can you get this trait by staying in the dark?
Burryaga  [author] 15 May, 2023 @ 8:56am 
Must have Mod Options (another mod) to access brightness / toggle in-game.
Burryaga  [author] 15 May, 2023 @ 8:55am 
(See the sandbox options.)
Burryaga  [author] 15 May, 2023 @ 8:54am 
It already is if you enable it without the trait. You can also turn allow people who have the trait (and thus cannot outright disable it) to turn the brightness of the light to 0. I am not modding actively right now, but if you want to add any features beyond that and rerelease the mod, it won't hurt my feelings!
Mana 11 May, 2023 @ 3:51am 
Amazing mod, but would it be possible to make it togglable during gameplay? Night vision is great for roleplay purposes (i.e playing a vampire, elf, or some mutant-type) but sometimes it's nice to enjoy the ambience of shadows and a cozy fire lighting up the room.
Yule 15 Mar, 2023 @ 2:03pm 
I still use this mod and it's the best thing ever :sothappy:
Burryaga  [author] 7 Feb, 2023 @ 2:31am 
Yes, but you will want to enable it in the MODS menu of the main menu first (not to be confused with Mods in your HOST menu) so that you can see the sandbox options and enable Only Jumpers Survived so that you can use the ability without the trait.
Tatsuya 7 Feb, 2023 @ 2:17am 
Can you add and remove the mod midgame?
Burryaga  [author] 6 Feb, 2023 @ 12:14pm 
Fixed a bug that caused server to be mistaken about whether players took the Darkvision trait.

Thanks again to Yule for actively spending her time to help me solve this, as well as for reporting it in the first place!
Burryaga  [author] 6 Feb, 2023 @ 9:27am 
Checking my own stats does not seem to be causing any issues. I cannot easily check other players' stats at the moment because I do not have anyone to play with. I am not sure if this mod is the root of your issue or not, but please contact me on Discord if you want to help each other get to the bottom of this.
Burryaga  [author] 6 Feb, 2023 @ 8:56am 
Thanks for letting me know. I have had issues with More Traits in the past, but I cannot say what causes this. I can say that in order to remove a trait, you need to call getPlayer():getTraits():remove("Trait"), and I do not call that function anywhere in any of my mods. Once my traits are added, they stay added until you die (at least from my playtesting). However, I suppose it's possible that this admin tool somehow refreshes a player's trait list and does not see my trait. I have no idea what exactly it does, but I'll try to look into it. Is that a vanilla admin tool or a modded tool?
Yule 6 Feb, 2023 @ 2:07am 
For me the trait is vanishing from someone when an admin uses "Check Stats" to update their XP. But Im not sure if its this mod's issue or something else with my server (I use More Traits). Thought Id leave a comment about it :steamthumbsup:
Burryaga  [author] 28 Jan, 2023 @ 3:02am 
I will continue to experiment and tweak that feature to work a little better in the future! Thanks for making me aware of the issue.
Droll 27 Jan, 2023 @ 3:08pm 
Thanks this is almost perfect! There is a slight issue with lights in daytime. Any turned on lights behind me will (I think) still go above the threshold you mentioned making it it look like I have vision there. But honestly that is a minor problem as I can clearly see the other unlit areas behind are not a part of my vision cone.
Burryaga  [author] 26 Jan, 2023 @ 9:24am 
@Droll So I discovered that the issue is that the vision cone fundamentally disappears when the brightness around you crosses a certain threshold, and the light generated by Darkvision can quickly increase the lighting around you beyond that threshold while outdoors during the daytime.

I added a feature that may help you with this issue. Check for it in Mod Options and let me know if it helps!
Droll 25 Jan, 2023 @ 11:35am 
The option would at least allow me to configure and mess around with it, right now it's kind of easy for zombies to sneak up on the during the day because I literally don't know what my field of vision is.

Being dark indoors is less of a problem than the outside, cuz I can bump up the indoor light level to compensate, also buildings have lights (and I have a mobile generator).
Burryaga  [author] 24 Jan, 2023 @ 8:13pm 
(Unfortunately, a daytime maximum would also limit your visibility in dark indoor areas when it is technically daytime, which is why I originally left that out.)
Burryaga  [author] 24 Jan, 2023 @ 8:12pm 
Yes, it does, but I could consider adding an optional daytime maximum.
Droll 24 Jan, 2023 @ 7:21pm 
Does the brightness increase also apply during the day? I'm finding it very difficult to see where my line of sight is during the day. It's fine during the night.
Droll 19 Jan, 2023 @ 3:34pm 
Thanks for the comparison
Burryaga  [author] 19 Jan, 2023 @ 3:33pm 
I just added a screenshot comparing Darkvision at maximum brightness to Cat's Eyes when night is at its darkest. (Lighting on the edges of the Cat's Eyes photo is from artificial lighting produced by nearby objects.)
Droll 19 Jan, 2023 @ 1:55pm 
How does this compare to cat-eye? (or whatever the vanilla night-vision trait is called).
Burryaga  [author] 17 Jan, 2023 @ 12:24pm 
If anyone (e.g. @Mattsby) would like to contact me on Discord for help uploading an alternate version of Darkvision with modified point costs, I don't mind helping. It wouldn't be terribly difficult or time consuming for me; I really just don't want to clutter this workshop item or my workshop account with a bunch of nearly identical versions of the same mod with literally one variable changed (nor do I want to maintain so many copies if I push updates in the future). Hopefully you understand!
Burryaga  [author] 17 Jan, 2023 @ 11:10am 
After further research, some of the most experienced modders in the community do not seem to be aware of (or at least informing me of) any working solutions for loading server options prior to the definition and insertion of new traits. I can create serverside config options, but I cannot load them clientside before players create characters, so there would ultimately be no point. In lieu of a better solution, I am offering two solutions:

1) Join in a vote for the default value THIS version of the mod will cost.

2) Feel free to reupload new versions of this mod with alternate trait point costs. Please treat this code as copyleft; be prepared to share with others anything that you borrow from me. I don't care if you link to my version of the mod. Have fun.
Burryaga  [author] 17 Jan, 2023 @ 7:25am 
@UdderlyEvelyn Thanks for the protips! I am aware in theory that I could probably have servers load the trait cost from a file, but I'm not yet sure how to write a serverside-only config file.

I sort of count submods as "whole new mods" in my head since they show up as extra mods in the Mods window... I don't love the idea of adding competing or conflicting submods to this workshop item because it makes installation slightly more complicated and confusing for normal users...
UdderlyEvelyn 16 Jan, 2023 @ 10:16pm 
You can make copies of the mod with different costs as submods if you want to, or you can make it load the cost from a patchable location so that others can patch it with their own private server mod.
Burryaga  [author] 16 Jan, 2023 @ 11:42am 
@Mattsby I am honestly unsure of how this can be done without making a whole new mod, unfortunately. I have tried pulling sandbox options at the time of character trait selection, and the game didn't seem to allow me to access SandboxVars in time to base the addition of a trait on my selected options. I will continue experimenting and update you if I find a solution. I have another mod where I hoped to make the trait entirely sandbox-optional; tried for quite a long time and couldn't figure out how to do it. Seemed impossible, but that could easily have been my ignorance playing tricks on me!
Mattsby 16 Jan, 2023 @ 6:29am 
Wicked mod! Would it be difficult to implement option or version that costs more? Something like 8 points would work well on my MP server. Great mod either way!
Burryaga  [author] 12 Jan, 2023 @ 4:08pm 
De nada! Hope the mod serves you well and keeps you alive.
Evil Dead 12 Jan, 2023 @ 6:01am 
@Burryaga
Thank you!
Burryaga  [author] 11 Jan, 2023 @ 9:14pm 
I am not sure, but probably, because it simply uses the game's built-in trait manager to add an extra trait to the game. I guess perhaps if THEY add a trait called "Darkvision" it would overwrite the cost of Darkvision, but as long as the trait called Darkvision exists on a player, they will have access to the ability. A conflict would surprise me.
Evil Dead 11 Jan, 2023 @ 6:07pm 
@Burryaga
I agree, good work! Is there compatibility between this and More Traits and LSKDJFLSK? ( I cant for the life of me remember the mod, but it changes what all traits do, adds more negative and positive effects for traits lol)
Burryaga  [author] 11 Jan, 2023 @ 6:05pm 
You can also enable it without a trait via Mod Options if you first enable that freedom in Sandbox Options!
Burryaga  [author] 11 Jan, 2023 @ 6:04pm 
4 points! It's a lot stronger than Cat's Eyes...