Page MenuHomeFeedback Tracker

1.10: Vignette's added to PPEffects are now always pulsating
Assigned, UrgentPublic

Description

If I add a custom vignette to PPEffects they are now always pulsating.
I would like that to be an option?
We use the vignette to restrict vision on NVGs and would like for our vignette to be static.

Details

Severity
Minor
Resolution
Open
Reproducibility
N/A
Operating System
Windows 7
Category
General

Event Timeline

Geez changed the task status from New to Assigned.Oct 27 2020, 11:43 AM
sileed added a subscriber: sileed.Nov 12 2020, 3:29 PM
Geez added a subscriber: Geez.Jan 4 2021, 1:28 PM

Hello woutercommandeur.
Have you tried SetMenuVignette from the PPEffects?
Regards,
Geez

Sadly this does not work, did the pulsating get added to the shader of the vignette? Here is my override from the dayzplayercamerabase (I did a full override without calling super etc for demonstration purposes.)

Thanks for any help you can offer. This worked fine in 1.9.

modded class DayZPlayerCameraBase extends DayZPlayerCamera
{
	override void SetNVPostprocess(int NVtype)
	{
		PlayerBase player;
		ItemBase h;

		player = PlayerBase.Cast(m_pPlayer);
		switch (NVtype)
		{
			case NVTypes.NONE:
				PPEffects.SetEVValuePP(0);
				PPEffects.SetColorizationNV(1.0, 1.0, 1.0);
				PPEffects.SetNVParams(1.0, 0.0, 2.35, 2.75); //default values
				PPEffects.SetMenuVignette(0.0);
			break;
			
			case NVTypes.NV_OPTICS_ON:
				player = PlayerBase.Cast(m_pPlayer);
				h = player.GetItemInHands();
				PPEffects.SetEVValuePP(7);
				PPEffects.SetColorizationNV(0.0, 1.0, 0.0);                
				PPEffects.SetNVParams(3.0, 5.0, 7.0, 1.0);
				if ( h.IsKindOf("NVGoggles"))
				{
					PPEffects.SetMenuVignette(1.25);                    
				}
			break;
			
			case NVTypes.NV_OPTICS_OFF:
				player = PlayerBase.Cast(m_pPlayer);
				h = player.GetItemInHands();
				PPEffects.SetEVValuePP(-10);
				PPEffects.SetColorizationNV(0.0, 0.0, 0.0);
				PPEffects.SetNVParams(1.0, 0.0, 2.35, 2.75); //default values                
				if ( h.IsKindOf("NVGoggles"))
				{
					PPEffects.SetMenuVignette(0.0);                    
				}
			break;
			
			case NVTypes.NV_GOGGLES:
				PPEffects.SetEVValuePP(7);
				PPEffects.SetColorizationNV(0.0, 1.0, 0.0);            
				PPEffects.SetMenuVignette(1.25);
				PPEffects.SetNVParams(2.0, 5.0, 7.0, 1.0);
			break;            
		}

		if (PlayerBaseClient.Cast(m_pPlayer))
		{
			PlayerBaseClient.Cast(m_pPlayer).SwitchPersonalLight(NVtype < 1); //TODO 
		}        
	}
}
This comment was removed by Geez.
Geez added a comment.Jan 19 2021, 10:00 AM

Hello wouter.commandeur.
We have prepared a fix for this, but unfortunately wont be available in upcoming 1.11 update. That being said, if you are already interested in changing it in your mod, look into ShockHandler class and override Update method with following:

override void Update(float deltaT)
{
	m_TimeSinceLastTick += deltaT;
	m_PulseTimer += deltaT;
	if (GetGame().IsClient())
	{
		//Deactivate tunnel vignette when player falls unconscious
		if (m_Player.IsUnconscious())
		{
			PPEffects.SetTunnelVignette(0);
			return;
		}
		if ( m_Player.m_CurrentShock != (m_PrevVignette * 100) )
		{
			m_LerpRes = LerpVignette(m_PrevVignette, NormalizeShockVal(m_Player.m_CurrentShock), m_TimeSinceLastTick);
			float val = MiscGameplayFunctions.Bobbing(PULSE_PERIOD, PULSE_AMPLITUDE, m_PulseTimer);
			PPEffects.SetTunnelVignette(1 - Easing.EaseInQuart(m_LerpRes) + val);
		}
		//Pulsing
		//m_LerpRes = MiscGameplayFunctions.Bobbing(PULSE_PERIOD, PULSE_AMPLITUDE, m_PulseTimer);
		//PPEffects.SetTunnelVignette(1 - Easing.EaseInQuart(LerpVignette(m_PrevVignette, NormalizeShockVal(m_Player.m_CurrentShock), m_TimeSinceLastTick)) + m_LerpRes);
	}
	if ( m_TimeSinceLastTick > VALUE_CHECK_INTERVAL )
	{
		//Play the shock hit event (multiply prevVignette by 100 to "Un-Normalize" value)
		if (GetGame().IsClient())
			ShockHitEffect(m_PrevVignette * 100);
		CheckValue(false);
		m_TimeSinceLastTick = 0;
	}
}

Regards,
Geez

Thank you Geez! That indeed works.

regards,

Wouter
<3 from DUG