Beef's NVG addon, but with a number of changes (new animations, sounds, bug fixes, etc.)
Based on Beef's NVG addon v1.1.1 Moddb.com
This is a result of me futher expanding my another addon, where I just added outer vignette effect: Moddb.com
Feature list:
- Slightly increased NVG tube radius, changed inner vignette effect (now it's wider), remained outer vignette. It changed the look of NVGs of all generations, you can see the result in the video
- Reworked code for animation. Most importantly, there was a bug which resulted in incorrect behavior, NVG starting when hand in turn-on animation was only going up, unlike original animation for flashlight. I fixed it
- Added turn off animation, works just like flashlight turn off animation
- Special animations if battery is too low - NVG will turn off, showing only black screen, and then turn-off animation will play
- New realistic sounds
- Changed controls - now, you don't need long press N for turning on/off, but just like vanilla anomaly, regular press. For brightness adjustment, added new controls to settings (NVG brightness up, NVG brightness down). Default to "-" and "+" respectively. Translations for RU and EN
- Since there are specific controls to adjust your NVG, increased brightness levels count from 3 to 5
- Changed default NVG colors, now they are closer to vanilla. New default MCM settings: now NVGs are usable with any sights and out-NVG space is clear vision
- Changed scintillation effect (random white pixels). Now they are not white but just brighter than main image, and only seen in dark, less distracting
- Rebalanced NVGs default settings. They all are cleaner now, CRT effect is only for 3rd gen (digital ones). Decreased noise for all generations. A lot of distracting effects were making early NVG gameplay less enjoyable, but no more
Next plans: make 3rd gen NVG actually digital and make it not a black-white image, but an original image with high intensity and low saturation
The installation should be the same as for original addon
Updates
2/17/2024: update 5
- Fixed bug with green reflex sight marks being black
- Moved brightness controls to MCM. This should fix existing keybind compatibility issues
- Removed one of patches which wasn't actually working due to changed code
I also planned to include autofocus feature here, but it turned out existing blur sampling variations are too limited, while making blur entirely in pixel shader costs ~10% fps (which is too much for this feature imo). I will try to optimize it later
2/13/2024: update 4
- Added saving of NVG state (now saves remain NVG on/off and current gain status)
- Fixed stuttering NVG adjust sounds
- Changed default MCM settings (NVG mask is clear vision for all NVGs)
- Now if NVG discharges, there will be animation of player taking off switched off NVG
1/28/2024: update 3
After some tests of previous update I decided to make some logical changes:
- Scintillation effect (white pixels) is now sensitive to current gain effect (higher gain = noise is brighter)
- Contrast reduce effect is configured to not to change for lower/higher gains. Now by increasing gain you have brighter image but same contrast. This change made 1gen performance good only in clear nights when you have moonlight, so that you don't have to use higher gains. At dark cloudy nights 1gen is barely usable.
- Slightly changed 2nd gen saturation color to be closer to green, updated screenshot in the description
All these effects are configurable in night_vision.h file, I left comments which describe all of them
1/27/2024: update 2
- Changed colors for all NVGs, used real 1PN93 / 1PN22 / digital NV photos for reference
- Changed activation function and blur apply order for bloom effect. Now bright spots have a nice glow effect, which is most noticeable at distance
- Lowered contrast for all NVGs, which makes them harder to use, but makes image much more close to real NV photos (and makes it closer to vanilla non-shader NVs lol). This effect is configurable by lowest_contrast parameter, which is different for all generations.
- Added bloom_multiplier parameter, which reduces bloom effect for higher generations, which is quite realistic
- Added photos to description
1/24/2024: update 1
Added all patches for no SSR / ES users which are presented in original Beefs addon
is this a replacement for Beefs NVG or addon/standalone and is it compatible with atmospherics.
The addon is standalone and doesn't require original Beefs addon. It's compatible with Atmospherics
will you make patch for "Enhanced Shaders and Color Grading"?
No patch needed, this addon is backwards compatible with original Beefs addon
So you are saying I can install this over Beefs NVGs?
You install it instead of original Beefs NVG
Do it need SSS beef's patch?
Honestly I forgot there are no-SSS / no-ES users :)
I've included all patches that were in Beefs addon, I didn't change these files, so proceed with same installation procedure as with Beefs one
Can u plls make some of your changes to be optional? Vanila colors and cleaner default nvg. I like Beef original stuff more
Balance changes are stored in shared/r3/night_vision.h file, there are comments with default Beefs values, it's easy to adjust them at you wish
Hello, dear author!
Thank you for your mod!
Everything works, tested on S.T.A.L.K.E.R. REALITY version 1.9.1.
Installed in the assembly BEEF'S NVG disabled, tested on the 3rd generation NVG:
Postimg.cc
And there are a few questions:
1. You wrote "Since there are specific controls to adjust your NVG, increased brightness levels count from 3 to 5" - I have the adjustment from 1 to 5
2. The space outside the NVG is colored. Is this how it should be?
Postimg.cc
3. When looking through binoculars, the NVG is always on, regardless of whether BEEF'S NVG is on or off:
Postimg.cc
4. When you aim and turn the NVG on and then off, you get this picture:
Postimg.cc
> I have the adjustment from 1 to 5
That's exactly how it was meant to be, 5 different brightness levels
> The space outside the NVG is colored. Is this how it should be?
Also, yes (it's default Beefs NVG behavior by the way, I didn't changei t)
> When looking through binoculars, the NVG is always on, regardless of whether BEEF'S NVG is on or off
Hm, that's interesting. Maybe your bincoculars feature integrated NVG?
> When you aim and turn the NVG on and then off, you get this picture:
O_o strange thing, I will take a closer look
No, I didn't upgrade the binoculars to a built-in NVG.
Thank you for your reply!
cool mod, looks good and nice sounds. Got this error though when trying to change brightness
LUA error: c:/anomaly\gamedata\scripts\item_device.script:236: attempt to call field 'brightness_up' (a nil value)
I use a lot of other mods, so this is probably on my end
Hm, looks like your z_beefs_nvgs.script is overwritten by some another mod. Check it
I am getting this error using this mod:
Moddb.com
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : F:\ANOMALY BUILDS\xray-1.5.2 - UPDATE 2023-12-23\xray-monolith\src\xrServerEntities\script_engine.cpp
[error]Line : 262
[error]Description : fatal error
[error]Arguments :
1 : [Lua] ...anomaly 1.5.2/bin/..\gamedata\scripts\item_device.script(259) : func_or_userdata
LUA error: ...anomaly 1.5.2/bin/..\gamedata\scripts\item_device.script:259: attempt to call field 'brightness_adjust' (a nil value)
I suppose NV Binoc addon overrides item_device.script.
You could try install the Beefs NVG Improved addon after NV Binoc, but honestly I think it won't work without remaking NV Binoc addon
I think it need a patch, NV binoc add some lines to the item_device.script.
nvg + scope usage problem? (can not be used in real life but in game we can. yeah here is the option to disable when AIMING but this bans nvg even not scope aiming)
Yeah, I thought about this
Technically, you can aim through scopes in real life with NVG, altought its being so uncofortable it doesn't make sense. Aiming down the ironsights with pistol would be relatively ok but aiming with rifle sights would be even more uncomfortable
In real life the solution to this is using IR lasers, but in Anomaly only few BaS weapons have ones, and still there is problem of zooming / fov while aiming
I decided that possibility to aim with NVG is more consistent with existing Anomaly gameplay, and is also, technically, possible in real life, so its the default behavior until there are IR sights for weapons
Thanks for answer. Understood your point of view. But snipe people at night with NVG is too imbalanced, is too easy and it's totally ruin the mechanic of scopes with night vision.
hello! it looks cool and I want to use it.
I'm using SSS+ES+NVG Beef from Fabio Conte and his late autumn mod(ASR). will your mod work with it correctly? (if so, in what order should I install all this?)
I couldn't know. You can try and tell us, is it compatible. You should install this addon instead of default Beefs NVG
I tried it. everything is working fine - thanks for this wonderful addon!
Does anyone know why all light sources like the NPC's headlamps Light look like Pure White, when I turn on the Night Vision?
I think that caused by your custom flashlight which is equally bright throughout the entire area. You can consider this a drawback of 1gen nvg and a reason to obtain next gen ;)
Im going to try that change the flashlight mod right now! Thank you!
Update: That was it, Thank you again!
Also turning all the way up the setting: threshold for light source washout
and Lowering everything else.
Is it compatible with DX8 or DX9
It is not
There are 2 problems that I noticed that you might be able to fix: 1. blurred reticles of Kopra scope etc. 2. overcolored surroundings when using shader scope
On my setup Kobra sight is not blurred. Though, some other reflex sight reticles are. That's because they are too bright and affected by bloom effect, I don't have a solution for now.
About overcolored surroundings, try check Shader Scope Compatibility option in MCM settings
Update about blurred reticles (after todays update): tested with my addon "realistic reddots", 1st gen NVG is barely usable with reddots, 2st gen is just enough to be ok, 3rd gen is perfect with them. You can consider this a fix ;)
Thank you! You have implemented some long missing features and at first glance there are some good improvements. Great work!
Heyo for some odd reason when using this mod I cant adjust the NVGS brightness with + and
- therefore rendering it useless to me as of right now. Is there any way I could go back to the original keybind with N? Regardless of that I see how badass this is. Kudos. Let me know if I could revert to the original keybinds and if I can how could I go about doing that?
I will possibly include version with N keybind.
You could try to check your keyboard settings in main menu and set up "Brigthness up / down" keybinds manually
yes please, the mod is great but i can't use it due to the key change, is there any way to make it myself?
Sorry for my stupid quastion. I am playing on dx9, so this mod isn't compatible, but I want to use turn on/off nvg hand animation. Can you help me with this, please?
Hm, actually it shouldn't be a problem to implement just hand animations for nvg, but I would better implement what Beef intended to do and make the shader compatible with DX8/9. I will take a look into it someday.
Thanks for your respond. I think implementing this animations needs some scripting skills, which I don't have) Implementing shaders to dx8/9 sounds even more difficult
Since the adaptation files for Es and SSS are vanilla Beef, the same bug with tone mapping remains? That the sky brightness stops changing as the r2_tonemap effect increases or decreases.
In fact, core render files which are presented in patch files (and which I presume contain the bug you described) are not mandatory, since ES / SSS overwrite them, as I see on in own MO2 preset
I will check it (and try to fix tho)
That's interesting! I've tried every possible option. ES+beef,Es+SSS+Beef,Just Beef. With and without SSS adaptation. Only Beef or nothing works correctly :)
But your rewrite version is interesting! What is your order of shader mods in MO2 ?
Beef > ES > SSS > Atmospherics (optional)
You can try this order
Is old bug when using 2D Shader Scopes and swapping to alt aim while aiming is fixable? It happens even with compatibility option for 2DSO enabled.
Please describe the bug more detailed, I can't reproduce it with my alt aim / shader scopes
Here's video.
Youtu.be
It happens every time with this conditions:
in MCM settings are:
1. allow use NVG in aim - on
2. use 2D Shared Scope Compatibility - on
in game:
a. turn NVG on, ADS with weapon, while ADS swap to alt aim - you still have scope nvg instead of your normal one.
b. turn on nvg, swap weapon to alt aim without ADS, ADS - you still have scope NVG instead of normal one.
I did fix b. by adding zoom type check inside 2DSO shader compatibility section of the script, but I just don't now how to mitigate issue with swapping aim state while ADSing.
It happens only with weapons scoped with supported by 2DSO scopes, iron sights and collimators not affected. For the note - while I made video, no changes inside script were made, just clean install of the mod.
And to not make another comment, could you please consider to expose variable for latch speed from script to MCM menu setting in form of slider? Since default speed setting 20 is a bit to much for my taste.
Also, using key_bindings.kCUSTOM22 inside item.device interfere with WPOs inspect/unjam bind. Please consider to change it to key_bindings.kCUSTOM25, since it's free almost all the time (I have nearly 500 mods, not one is using it).
Ok now I'm getting it. I've noted the issue
Fix should not be complicated, the problem is I don't quite like default Beefs approach to 2DSO to limit render area, but changing that will result in changing combine*.ps files, and addon will be no more compatible with ES/SSS by default... I will consider this
Thank you kindly, good sir!
I managed to achieve fix, by adding condition inside actor_on_weapon_zoom_in for zoom type and adding checks inside on_key_release
Here's code:
Pastebin.com
It needs some polishing in terms of event handling, but I hope it helps to made update sooner, since your mod is great!
Also, please consider adding return to ADS mode after turn NVGs on, if we were in ADS mode before. It's just frustrating pressing two keys in a row when we really can have much more convenient controls.
Hey dude I've got a problem, in the menu the reload key remains "R" but once I load my save or when I change level in-game it goes back to F10 and I have to assign it to R again
O_o I heard about this bug in the context of magazines addon, try switching this off