• Tracker

    Spaces
    Browse
    Statistics
  • /
  • /Stable Feedback
  • /DZG-2127
Back
2

Night vision turns off when any clothing item is removed, while NVG stays lowered (cause found, fix verified)

CharacterWeaponsBugVisualAnimationControlsInventoryPersistence
2

State

Open
Issue key
DZG-2127
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
unpleme
Created
Oct 27, 2026
Views
10
Platform
PC Steam
What happened?

When the player wears NVG on a headstrap or helmet, lowers them and turns them on, removing any other clothing item (boots, gloves, pants, jacket, etc.) turns the night vision effect off. This also happens when the item is simply dropped on the ground. The NVG stay lowered on the head and the animation still shows them lowered over the eyes, but the night vision filter is gone. To restore it, the player has to hold L to raise the NVG and hold L again to lower them, or put the removed clothing item back on.

VIDEO 1: https://drive.google.com/file/d/1ORpMUpd_bQgx9FQ_6OvQOfZcXJX1qA_F/view?usp=sharing
VIDEO 2:
https://drive.google.com/file/d/1P5hb4IxtzhSfTMFR0VYylIpfDJQ_Lx0Z/view?usp=sharing

Cause:
PlayerBase::EEItemDetached (scripts/4_world/entities/manbase/playerbase.c) calls clothing.UpdateNVGStatus(this, false, true) for every detached Clothing item, regardless of slot. Clothing_Base::UpdateNVGStatus (scripts/4_world/entities/core/inherited/inventoryitem.c) then finds the NVG in Headgear/Eyewear via the cached equipment query and, because force_disable is true, calls SetNVGLowered(false) and RemoveActiveNV for all NVG types, without checking whether the detached item is the headstrap/helmet that actually holds the NVG. Re-attaching any clothing calls UpdateNVGStatus(this, true), which re-adds the NV type, which is why putting the item back on restores the effect.

A similar issue was fixed in 1.03.151658 (“NVGoggles were turned off when any piece of clothing was attached”); this is the same problem on detach.

Workaround verified on a local server with a script mod: skip the forced disable when the detached item is no longer in Headgear/Eyewear and has no NVG attached. Removing the helmet/headstrap with NVG and detaching the NVG itself still work as in vanilla.

Note: this workaround treats the symptom, NOT THE ROOT CAUSE. It guesses after the fact whether the detached item was the NVG holder and relies on the item already being out of its slot when EEItemDetached runs. The proper fix belongs in the base code: PlayerBase::EEItemDetached should only request force_disable when slot_name is Headgear or Eyewear, or Clothing_Base::UpdateNVGStatus should check that the detached item is the one actually holding the NVG before disabling it.


modded class Clothing

{

override void UpdateNVGStatus(PlayerBase player, bool attaching = false, bool force_disable = false)

{

// Skip forced NVG disable if the detached item does not hold the NVG:

// it is no longer in Headgear/Eyewear and has no NVG attached (boots, gloves, jacket, etc.)

if (force_disable)

{

bool worn = player.FindAttachmentBySlotName("Headgear") == this || player.FindAttachmentBySlotName("Eyewear") == this;

if (!worn && !FindAttachmentBySlotName("NVG"))

return;

}

super.UpdateNVGStatus(player, attaching, force_disable);

}

}

Reproduction steps
  1. Put on an NVG headstrap or a helmet with NVG attached (with a battery).

  2. Lower the NVG and turn them on (hold L). Night vision is active.

  3. Remove any other clothing item (boots, gloves, pants or jacket), either to inventory or by dropping it on the ground.

  4. Observe: NVG are still lowered on the character, but night vision is off.

  5. Hold L twice (raise and lower) or put the removed item back on: night vision works again.

Exact build version (optional)
1.30.164200
Where did it happen?
Local / Offline
Is it modded?
No
Expected result

I want to stress that this needs to be fixed in the base code, not patched on the symptom side.
Every time only the symptom gets fixed, and the same kind of issue comes back in a later patch (a similar NVG bug on clothing attach was already fixed in 1.03.151658, and now it is back on detach).


PlayerBase::EEItemDetached and/or Clothing_Base::UpdateNVGStatus should only trigger the forced NVG disable for the item that actually holds the NVG, not for every detached clothing item. As a result, removing clothing items that do not hold the NVG should not affect night vision, and NVG should stay on as long as they are lowered and powered. A workaround on the symptom side, like the one above, is not a proper solution.

Reactions

Activity

    about 1 hour ago
  • unpleme
    created issueabout 1 hour ago
  • okonkwocommented(edited)
    6 minutes ago
    okonkwocommented(edited)
    6 minutes ago

    10/10 ticket well done. 100% right about the base code. I discovered this issue earlier myself (https://report.bistudio.com/issues/DZG-1941) but it looks like it got marked as a duplicate. Not sure where the original ticket is though.


    NVGs in general are bugged as far as their actions in this patch. I have another open ticket for a flashing / stuttering glitch that occurs for them in the inventory

You are not signed in. Please sign in to see more details and to reply.

State

Open
Issue key
DZG-2127
Access
Public
Space
DayZ
Project
Stable Feedback
Creator
unpleme
Created
Oct 27, 2026
Views
10