Changed formula for NPC's detection. It is now heavily based on light and distance. Added weight, outfit and crouch factors. Flashlights/headlamps/campfires are now giving visibility boost to enemy. Modified luminosity itself (a lot). For version: 1.5.1.
- There might be some weird spikes in NPC visibility (happens in vanilla too) on DX9 and higher. Usually happens in houses (Dead city, Limansk are the maps where I've met it). This is most likely caused due to broken static lights and from what I heard require recompilation of maps (which isn't something I or anyone I know can do).
- Just in case, NPCs can't see you behind a cover sometimes, because of broken camera placement (height of camera when crouching). Vanilla bug but for some reason people report it to me.
- If you use any weather addons (except Michiko's Weather Revamp), I can't guarantee my addon to work correctly. It was made for vanilla weather/colors. Reshades should be fine as long as they don't touch weather configs.
(RUS translation in readme inside)
Tried to make NPCs see you just how you see them (with lesser range ;p). New formula is mostly based on light, distance and to a lesser extent velocity, your total weight, type of outfit you're wearing and body state.
To be more specific on each variable, other changes and why they were important:
(Just a heads up, talking about DX9,10,11 because DX8 works differently)
- Luminosity, sun, shadows and flashlights: Reworked luminocity (wasn't working correctly in vanilla). NPC flashlight now gives them a solid boost to their vision on you, 25m is max, the closer you are the better they see. Your flashlight gives them vision boost aswell (only if you are in their range of vision, can't do it differently), even at long distance, but not too much compared to short distance.
- Weight and outfit: weight and outfit type are now the visibility factors. Doesn't really matter too much at distance greater than 50m. Light outfit and low weight is the best for it, but medium outfit and 45 kg is still optimal.
- Velocity and distance: Mostly unchanged, still a decent penalty.
- Crouch: simple 0.4 multiplier when you are crouching (0.2 for low crouch). Won't help much at closer distances during daytime, but essential for hiding at medium/long distances and obviously stealth (also reduce sound).
- Static lights: they don't affect luminosity on DX9 and higher, waiting for devs to fix it.
- Campfires: are back and affect luminosity once again.
- Luminosity Icon: disabled by default, if you want to have it - install and turn it on in MCM (Mod Configuration Menu). Icon only displays how much light there is on player, nothing else.
- Bringing back old distance variables (think I overnerfed it, shouldn't fix what wasn't broken, sorry).
- Nerfed guard snipers.
Tiny nerf to distance variables.
- Big boost to flashlights.
- Simplified math a little bit.
- Rework of muzzle flash mechanic (thanks to HarukaSai ).
- Flashlights now give vision boost to their owner only in a cone of light (can be slightly off).
- NPC can now see other NPCs with flashlights from afar.
- 1.8.2: Michiko's Weather Revamp 3.0 compatibility patch.
- 1.8: Couple of features and preparations for next Amowawy update: Muzzle flash is now giving small boost to NPC's visibility (silencers remove this penalty). Reworked and moved 'ghillie suit' script in visual memory manager.
- 1.7:Brighter moonlight, darker night shadows. Better free/danger state multipliers. Toggleable through MCM icon.
- 1.6.8:Death Animations compatibility patch, weight adjustment.
- 1.5: Campfires, DX8 support, luminosity icon.
- 1.4: Added Low crouch, fixed NPC's danger state.
Compatibility, installation and some warnings
Compatible with any mod that doesn't change two files: m_stalker.ltx (if you overwrite this one - NPCs will probably be blind) and visual_memory_manager.script (overwriting this file will crash your game), m_stalker.ltx can be easily merged. I only changed [vision sections] and also eye_range, eye_fov. I don't recommend changing formula variables in m_stalker.ltx.
Just so you know, addon has Mora's NPC without Amnesia mod in it, which I thought is necessary. If you (for some reason) want NPCs to have amnesia back - delete xr_danger.ltx and xr_combat_ignore.script.
Installation is simple drag and drop gamedata to Anomaly root folder or use mod manager.
If you are having blind NPCs then congratulations, you successfully skipped description.
Mod isn't that big, but I'd like to still thank people who helped ;]
ravenascendant and Feel_Fried mainly, for helping with everything; whereismy for explaining how some things work, DX8 support and testing; NiceDreamer for testing; Igigog didn't actually do anything; artifax RazorShultz Grokitach for help with code; mora145 for "no Amnesia mod"; meatchunk; LVutner; Blackgrowl and Trolleybus for icons.