Page MenuHomeFeedback Tracker

Allow NVG toggle functionality for regular headgear
Closed, ResolvedPublic

Description

When using NVGs, they swap between two models depending on if the NVG is on or off. Would it be possible to give the same functionality to headgear objects?

I'm thinking about pilot helmets for this: When using NVGs, they will clip into the visor, which looks bad. Adding the same (or similar) model-swap functionality of the NVGs to headger could solve this issue (visor down if no NVG active, visor up if NVG active).

PS: The vanilla helicopter helmet already comes in two variants - "visor down" and "visor up". The "visor up" model exists in the files, but is never used anywhere.

/Edit: Would be nice to maybe have this feature independent of any actual NVG item. So that if you press N to toggle NVG, the helmet models will swap even if no actual NVG is currently worn.

Details

Severity
None
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
Feature Request
Additional Information

Here is an example of how it looks like for the NVGs:

class NVGoggles;
class TiGoggles_RF: NVGoggles
{
   DLC_META_PUBLIC;
   displayName    = $STR_LXRF_TiGoggles;
   value          = 5;
   modelOptics    = "\lxRF\weapons_rf\Binocular\optics_tnvg_rf";
   model          = "\lxRF\weapons_rf\Binocular\tnvg_proxy_RF";
   picture        = "\lxRF\weapons_rf\Binocular\data\ui\icon_tnvg_black_rf_ca.paa";
   descriptionUse = $STR_A3_cfgWeapons_Default_NVGoggles1;
   visionMode[]   = {Normal,NVG,Ti};
   thermalMode[]  = {TiRBHot, TiSWHot};
   
   hiddenSelections[] = {camo,camo1};
   hiddenSelectionsTextures[] = {"a3\characters_f\common\data\nvg_co.paa", "lxrf\weapons_rf\binocular\data\tnvg_black_rf_co.paa"};
   
   class ItemInfo
   {
      type                 = 616;
      uniformModel         = "lxRF\weapons_rf\Binocular\tnvg_proxy_RF.p3d";
      modelOff             = "lxRF\weapons_rf\Binocular\tnvg_proxy_off_RF.p3d";
      mass                 = 20;
      hiddenSelections[]   = {camo,camo1};
   };
};

You can see that class ItemInfo has data for the ON (uniformModel) and OFF (modelOff) variant.

Event Timeline

Lexx2k created this task.Nov 24 2022, 11:14 PM
Lexx2k updated the task description. (Show Details)Nov 24 2022, 11:39 PM
Lexx2k edited Additional Information. (Show Details)Apr 10 2024, 5:17 PM
dedmen set Ref Ticket to AIII-56404.May 3 2024, 3:46 PM
dedmen added a subscriber: dedmen.May 3 2024, 4:00 PM

Config name for this is modelHMDOff
Behaves same and switches at same points as the HMD item.

But there might be cases where HMD item is invisible, the model will still switch as if HMD item was present.

Would be nice to maybe have this feature independent of any actual NVG item

This code is independent of the item. But it still depends on you being able to enable/disable NVG, which I think is not possible when you don't have a NVG. That is very quite different from this, and I won't do that.

dedmen changed the task status from New to Feedback.EditedMay 3 2024, 4:28 PM

Thanks for the hint that we have the visor up model, that makes testing easy

class CfgWeapons
{
	class ItemCore;
	class H_HelmetB : ItemCore
	{
		class ItemInfo;		
	};
	class H_PilotHelmetHeli_B : H_HelmetB
	{
		class ItemInfo: ItemInfo
		{
			modelHMDOff = "A3\Characters_F\Common\headgear_helmet_heli_visor_up";
			uniformModel = "A3\Characters_F\Common\headgear_helmet_heli";
		};
	};
};

Well that's the wrong way around :D but it works. Next dev-branch.

Please help Lou to get that documented somewhere on wiki.

Works, can't see any issues with it so far.

dedmen changed the visibility from "Custom Policy" to "Public (No Login Required)".Jul 31 2024, 1:45 PM
dedmen added a project: Arma 3.
mkalireza added a subscriber: mkalireza.EditedOct 12 2024, 1:42 PM

Hi,
I tried, and the result was successful. :)
By inverting modelHMDOff and uniformModel, of course.
The following code is correct:

class CfgWeapons
{
	class ItemCore;
	class H_HelmetB : ItemCore
	{
		class ItemInfo;		
	};
	class H_PilotHelmetHeli_B : H_HelmetB
	{
		class ItemInfo: ItemInfo
		{
			modelHMDOff = "A3\Characters_F\Common\headgear_helmet_heli";
			uniformModel = "A3\Characters_F\Common\headgear_helmet_heli_visor_up";
		};
	};
};


Thank you, guys.

It only works in update 2.18.

Game Update 2.18 Changelog (SPOTREP-00115)

Added: Engine support for headgear models switching based on NVG being on or off (modelHMDOff in class ItemInfo - not used in vanilla data).

dedmen closed this task as Resolved.Nov 4 2024, 2:44 PM
dedmen claimed this task.