This addon forces your companions to switch off their headlamps when asked to be in stealth mode.
The companions, when in stealth, turn off their headlamps when running/walking, but when they stop they turn it back on again! This was something that bugged me for a while, so I did something about it!
Here is a bad quality GIF, the in-game time is 03:50am. (I had to raise the brightness, so you can see)
I have also adjusted the time that companions turn on their headlamps.
Previously it was between 19:00pm through to 05:00am. I have changed this to 20:00pm through to 04:00am because I personally feel it is still too light at these times. This will affect all NPCs.
If you want to change this then:
- open sr_light.script in Notepad or any text editor
- find line 151:
if htime <= 4 or htime >= 20 then
- and then change the numbers to suit your needs.
A new game is NOT required to use this.
Compatibility
There is only one edited file in this addon: sr_light.script
I don't think that there will be any compatibility issues, unless of course any other addon you use changes this file. If you know what you are doing then it is easy to copy in my edit into another script, or just ask in the comments and I will try and help!
Happy stealthing!
thx, should fit with the stealth addon
I just checked, this will be compatible I believe.
I didn't even know about this bug lol. Despite of flashlights/headlamps not affecting stealth/visibility on r2+ renderers, this is gonna be very helpful for dx8 users...and people who use my stealth addon (self promotion alert).
Thanks ;p
I agree! Thanks again for the bloodsucker cloak, I almost died to one (again) if it wasn't for the slight 90% transparency clue that it was about to rip my face off.
Gonna grab your "Hunger, thirst, sleepiness bars" next, that also looks like a winner! :)
Cheers ;]
Awesome mod idea , thank you for this :) finally my companions can 'go dark' and maybe just maybe not get me killed this time ;)
We can only hope!
*looks at furthest companion*
"Come back here! Don't shoot at them yet! Where have you gone?!"
*looks at nearest companion*
"Can you... can you get out of the doorway? Any day now?"
Is it possible to make it so you can command them to turn off their lights in general. Them waving their beams around while you try to use night vision really sucks. But this is one of the other gripes I've always had about companions in the dark.
Seeing as the "don't loot corpses" doesn't actually work properly, I thought about changing it for what you're asking. It's a little higher on the coding level, but I'll have a try!
It doesn't? I notice they'll scoop up rifles laying on the ground, but never seen if they took anything off bodies' inventory.
me to
Is there a patch to fix this bug?
There's already a setting in the options for this. I believe it's in graphics, can't check right now. It's called companions use headlights or similar.
edit: Here you go, Settings->Visual->Advanced->Stalkers can use headlamps
That turns off everyone's headlamps. Just want the companions following you to turn theirs off.
I really like the idea but something weird happened to me, after installing this addon, I'm always in "combat mode", I mean, every chopper I found shoots me, and I need to enable the option "allow during combat" to fast travel, if I disable the addon, everything works fine...
I'm not certain why this would happen, the only code that is changed is:
| if htime <= 4 or htime >= 20 then
and:
| if (stalker:has_info("npcx_is_companion")) then
| if (stalker:has_info("npcx_beh_substate_stealth")) then
| if torch then
| if (torch:attachable_item_enabled()) then
| torch:enable_attachable_item(false)
| end
| local se_torch = alife_object(torch:id())
| if se_torch then
| alife_release(se_torch)
| end
| end
| end
| end
I've started a new game for myself today, and so far the choppers are patrolling over me but not hostile, and I have a companion and two guys for the Tourist Safari mission :/
Edit: Looking at this code after indentation is removed has made me realise how I could just wrap that all up with 'and' operators (facepalm).
Bruh, this is amazing, thank you. I play with the Stealth mod by bvcx and it would always annoy me when my companions would randomly decide to turn on their headlamps during stealth and blow our cover.
Glad you like it, it was a bit weird how they would do this. No longer! :)
Now if the NPC companions would have better options in the tactics wheel that would be useful.
Telling a companion to go in stealth makes them ignore all combat. No option to fight if Player is attacked. Kinda strange.
Companions in stealth mode still do attack enemies, if you also have them in "Fire At Will" mode too.
There is already an option when you talk to them: "Let's talk about tactics..." and in there you can ask them to attack if you get shot, but if this actually works I'm uncertain.
I would also like new options in the wheel, I might start learning about it as well!
Works great! A must-have!
That's great to hear, I'm glad this is useful, even if just a small change to the game :)
Thank you! This is one of the most useful mods that fixes something very important.
Hope this fix will be integrated in the main game.
Agreed! If any Anomaly devs are looking at this comment, please do put this in the next update!
I've also made it so that the screen doesn't go black when you place a sleeping bag on the floor, but haven't released as yet due to possible incompatibility with other mods.
There are lots of small things that need adjusting, slowly but surely :)
Oooh... now i don't have to shot Hip just to make her turn off that damm torch ...oh wait, she got herself killed in mid-night crossfire...
By any chance can we have "CPR your dead Hip" (just joking )
loving this mod, even just a simple light on/light off, makes the game much better! 11/10
Ha, cheers!
Yeah, this started by me using the "Companion Inventory Unlock" addon, where you can see their whole inventory, and I took their headlamp... but they just magically generated a new one each time I took it.
They're all a bit daft sometimes, for backpacks with legs :D
This comment is currently awaiting admin approval, join now to view.
TY!! I'm going download it and I still did not try it, but you already have my 10/10
A very necessary Addon
--- edit ----
YES, it works perfectly and without conflict with none of the bunch of addons that I have installed. Thank you.
Disclaimer before I post this: Scripting and Coding are things that I have no real experience in.
So I have been carefully testing changes to this script. My "knowledge" is based on very messy re-writes that I have somehow managed in the past so safe to say I am clueless. I have been trying to find a way to make this script affect companions when they are NOT in stealth mode too. I love NPCs having flashlights, I HATE companions having them.
I been working my butt off to make my companions function in a useful way and all I need to do is find out how to entirely disable their flashlight and then I will be done. It screws with my NVGs and my own torch.
I loved your mod. Now all we need is a mod that makes the companions open the way when you try to pass them, another that makes them stop walking in circles bumping into you and, finally, one that creates a minimum distance between them, because looking back and seeing your mates practically inside each other totally breaks my immersion.
This addon is mutually-exclusive with HG Companion addon (see Moddb.com ). Luckily, HG's addon also fixes companion flashlights (the approach seems to be slightly different, but overall effect is the same).
Oh dear modder! PLEASE! make this thing for sneaking enemies too! :3
does it work for 1.5.2? :(