Don't Starve Together

Don't Starve Together

327 ratings
BetterNightVision
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
35.515 KB
15 Mar, 2019 @ 11:42pm
3 Mar @ 4:59pm
35 Change Notes ( view )

Subscribe to download
BetterNightVision

Description
Please do not use the night vision toggle on a server that is not yours, or at least ask the server admins, as this can be considered to be a cheat(free night vision) and is unfair towards people who don't use this mod.

The night vision DOES NOT protect you from Charlie because the visual light level and real light level is not synced between server and client
While you are the host, in a world with caves disabled or using the Don't Starve Alone mod, the client is also the server, you can be immune to Charlie and the darkness sanity drain

Main settings
  • Night vision toggle key
    many options available, default: x
  • Notify on toggle
    Enabled | Disabled
  • Allow using mouse in darkness
    Enabled | Disabled

Darkness alert
  • Darkness alert enabled
    Enabled | Disabled
  • Darkness alert threshold
    Leave safety(0.05) | Return to safety(0.075) | Sanity loss(0.1) | 0.2 | 0.4
  • Darkness alert frequency
    16ms to 1000ms, Default: 100ms

Fixes / game behavior edits
  • Night vision color cubes
    Default | Override | Patch | Delete
  • Ghost vision color cubes
    Default | Override | Patch | Delete
  • Night vision strength
    Disabled and 0% to 100%

Main settings
- Toggle Night Vision with the selected Hotkey (Default = X)
- Notify when changing between enabled and disabled
- Alert using circles around your character when night vision is enabled and you're in the dark
- Enable or disable being able to click objects in the dark
Game behavior edits
These settings add and rework behaviors of the game, this can reduce compatibility
- Override, Patch out or Delete color cubes: Override listens to events and resets when necessary, Patch out reworks an existing method to make it think some conditions aren't triggered and calls the default method to not set the vision color cubes, Delete removes the value from the variable which holds vision color cubes
- Change the strength of the night vision, this can allow you to have full brightness or a weaker night vision and still be able to tell where it's dark, it adds an event to the ambientlighting component to do a similar effect as its private nightvision event response

Known bugs
- Possible flicker on revive, cannot be fixed

Note
This mod now uses mostly the "nightvision" event
you can run this on the client console to trigger the same behavior
ThePlayer:PushEvent("nightvision", true)
ThePlayer:PushEvent("nightvision", false)

Credits / Thanks
I'd like to thank the community that helped me make this mod better -
You can view the comments to see what they recommended
The code is also available in my Don't Starve Together Mod GitHub repository.

Source code
Source Code [Github][github.com]
175 Comments
󰀀MrWX󰀀 15 Jun @ 2:55am 
Sorry. I've disabled all the mods, and now I can move. I have a lot of them, but I didn't think there was anything with the X key. now I just need to figure out what kind of mod it was. Thank you very much!
Rockou_  [author] 14 Jun @ 6:39pm 
This mod shouldn't touch anything movement related, do you have an other mod that uses the same key you have set for this mod?
󰀀MrWX󰀀 14 Jun @ 4:26pm 
why i can't move when it's enabled?
Rockou_  [author] 26 May @ 5:28pm 
It's possible, if it's not already default behavior (like to allow placing firepits in the dark) then "Allow using mouse in darkness" is the setting that allows it most likely
necter 26 May @ 2:12pm 
I think this allows you to place structures in the darkness is it supposed to be like that?
Rockou_  [author] 3 Mar @ 4:54pm 
Oops, I apologize, it was for debugging purposes, I'll delete the print line immediately
你好 26 Feb @ 9:29pm 
Thanks for the mod, buddy, already liked it
银九~ 23 Feb @ 2:23pm 
o(*////▽////*)q
Rockou_  [author] 22 Feb @ 2:19pm 
it should be fixed
Rockou_  [author] 22 Feb @ 1:49pm 
I've found the bug you were refering to, working on it right now