Nightvision - Add White Phosphor NVGs (#9321)

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
This commit is contained in:
Mike-MF 2023-08-16 13:15:53 +01:00 committed by GitHub
parent 43cded706c
commit 9bcd990dd0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 99 additions and 3 deletions

View File

@ -44,6 +44,7 @@ aeroson
Aggr094 <bastards4glory@gmail.com> Aggr094 <bastards4glory@gmail.com>
alef <alefor@gmail.com> alef <alefor@gmail.com>
Aleksey EpMAK Yermakov <epmak777@gmail.com> Aleksey EpMAK Yermakov <epmak777@gmail.com>
AleM
Alganthe <alganthe@live.fr> Alganthe <alganthe@live.fr>
Andrea "AtixNeon" Verano <veranoandrea88@gmail.com> Andrea "AtixNeon" Verano <veranoandrea88@gmail.com>
Anthariel <Contact@storm-simulation.com> Anthariel <Contact@storm-simulation.com>
@ -113,6 +114,7 @@ Hawkins
Head <brobergsebastian@gmail.com> Head <brobergsebastian@gmail.com>
Hybrid V Hybrid V
JasperRab <jasper@jasperrab.eu> JasperRab <jasper@jasperrab.eu>
JDT
john681611 <john681611@hotmail.com> john681611 <john681611@hotmail.com>
JoramD JoramD
Karneck <dschultz26@hotmail.com> Karneck <dschultz26@hotmail.com>
@ -131,6 +133,7 @@ MarcBook
meat <p.humberdroz@gmail.com> meat <p.humberdroz@gmail.com>
Michail Nikolaev Michail Nikolaev
MikeMatrix <m.braun92@gmail.com> MikeMatrix <m.braun92@gmail.com>
MikeMF
mjc4wilton <mjc4wilton@gmail.com> mjc4wilton <mjc4wilton@gmail.com>
Mysteryjuju Mysteryjuju
nic547 <nic547@outlook.com> nic547 <nic547@outlook.com>
@ -174,7 +177,6 @@ Toaster <jonathan.pereira@gmail.com>
Tonic Tonic
Tourorist <tourorist@gmail.com> Tourorist <tourorist@gmail.com>
Tuupertunut Tuupertunut
TyroneMF <TyroneMF@hotmail.com>
Valentin Torikian <valentin.torikian@gmail.com> Valentin Torikian <valentin.torikian@gmail.com>
voiper voiper
VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com> VyMajoris(W-Cephei)<vycanismajoriscsa@gmail.com>

View File

@ -5,6 +5,12 @@ class CfgWeapons {
modelOptics = ""; modelOptics = "";
GVAR(border) = QPATHTOF(data\nvg_mask_binos_4096.paa); GVAR(border) = QPATHTOF(data\nvg_mask_binos_4096.paa);
GVAR(bluRadius) = 0.15; GVAR(bluRadius) = 0.15;
NVG_GREEN_PRESET;
};
class ACE_NVGoggles_WP: NVGoggles {
displayName = CSTRING(NVG_Gen3_brown_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
}; };
class O_NVGoggles_hex_F: NVGoggles { // APEX NVG with multiple lenses (spider eyes) class O_NVGoggles_hex_F: NVGoggles { // APEX NVG with multiple lenses (spider eyes)
modelOptics = ""; modelOptics = "";
@ -21,10 +27,20 @@ class CfgWeapons {
modelOptics = ""; modelOptics = "";
displayName = CSTRING(NVG_Gen3_black); displayName = CSTRING(NVG_Gen3_black);
}; };
class ACE_NVGoggles_OPFOR_WP: NVGoggles_OPFOR {
displayName = CSTRING(NVG_Gen3_black_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class NVGoggles_INDEP: NVGoggles { class NVGoggles_INDEP: NVGoggles {
modelOptics = ""; modelOptics = "";
displayName = CSTRING(NVG_Gen3_green); displayName = CSTRING(NVG_Gen3_green);
}; };
class ACE_NVGoggles_INDEP_WP: NVGoggles_INDEP {
displayName = CSTRING(NVG_Gen3_green_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Gen1: NVGoggles_OPFOR { class ACE_NVG_Gen1: NVGoggles_OPFOR {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
displayName = CSTRING(NVG_Gen1_black); displayName = CSTRING(NVG_Gen1_black);
@ -60,31 +76,61 @@ class CfgWeapons {
displayName = CSTRING(NVG_Gen4_black); displayName = CSTRING(NVG_Gen4_black);
GVAR(generation) = 4; GVAR(generation) = 4;
}; };
class ACE_NVG_Gen4_Black_WP: ACE_NVG_Gen4_Black {
displayName = CSTRING(NVG_Gen4_black_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Gen4: NVGoggles { class ACE_NVG_Gen4: NVGoggles {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
displayName = CSTRING(NVG_Gen4_brown); displayName = CSTRING(NVG_Gen4_brown);
GVAR(generation) = 4; GVAR(generation) = 4;
}; };
class ACE_NVG_Gen4_WP: ACE_NVG_Gen4 {
displayName = CSTRING(NVG_Gen4_brown_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Gen4_Green: NVGoggles_INDEP { class ACE_NVG_Gen4_Green: NVGoggles_INDEP {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
displayName = CSTRING(NVG_Gen4_green); displayName = CSTRING(NVG_Gen4_green);
GVAR(generation) = 4; GVAR(generation) = 4;
}; };
class ACE_NVG_Gen4_Green_WP: ACE_NVG_Gen4_Green {
displayName = CSTRING(NVG_Gen4_green_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Wide_Black: NVGoggles_OPFOR { class ACE_NVG_Wide_Black: NVGoggles_OPFOR {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); modelOptics = QPATHTOF(models\ACE_nvg_wide_optics);
displayName = CSTRING(NVG_Wide_black); displayName = CSTRING(NVG_Wide_black);
}; };
class ACE_NVG_Wide_Black_WP: ACE_NVG_Wide_Black {
displayName = CSTRING(NVG_Wide_black_wP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Wide: NVGoggles { class ACE_NVG_Wide: NVGoggles {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); modelOptics = QPATHTOF(models\ACE_nvg_wide_optics);
displayName = CSTRING(NVG_Wide_brown); displayName = CSTRING(NVG_Wide_brown);
}; };
class ACE_NVG_Wide_WP: ACE_NVG_Wide {
displayName = CSTRING(NVG_Wide_brown_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
class ACE_NVG_Wide_Green: NVGoggles_INDEP { class ACE_NVG_Wide_Green: NVGoggles_INDEP {
author = ECSTRING(common,ACETeam); author = ECSTRING(common,ACETeam);
modelOptics = QPATHTOF(models\ACE_nvg_wide_optics); modelOptics = QPATHTOF(models\ACE_nvg_wide_optics);
displayName = CSTRING(NVG_Wide_green); displayName = CSTRING(NVG_Wide_green);
}; };
class ACE_NVG_Wide_Green_WP: ACE_NVG_Wide_Green {
displayName = CSTRING(NVG_Wide_green_WP);
descriptionShort = CSTRING(NVG_WP_desc);
NVG_WHITE_PRESET;
};
// Examples of different goggle effect types (scope=1) // Examples of different goggle effect types (scope=1)

View File

@ -13,8 +13,11 @@ class CfgPatches {
"ACE_NVG_Gen2", "ACE_NVG_Gen2",
/*"ACE_NVG_Gen3",*/ /*"ACE_NVG_Gen3",*/
"ACE_NVG_Gen4_Black", "ACE_NVG_Gen4_Black",
"ACE_NVG_Gen4_Black_WP",
"ACE_NVG_Gen4", "ACE_NVG_Gen4",
"ACE_NVG_Gen4_WP",
"ACE_NVG_Gen4_Green", "ACE_NVG_Gen4_Green",
"ACE_NVG_Gen4_Green_WP",
"ACE_NVG_Wide_Black", "ACE_NVG_Wide_Black",
"ACE_NVG_Wide", "ACE_NVG_Wide",
"ACE_NVG_Wide_Green" "ACE_NVG_Wide_Green"

View File

@ -140,7 +140,7 @@ if (CBA_missionTime < GVAR(nextEffectsUpdate)) then {
// ColorCorrections - Changes brightness, contrast and "green" color of nvg // ColorCorrections - Changes brightness, contrast and "green" color of nvg
// Params: [brightness(0..2), contrast(0..inf), offset(-x..+x), blendArray, colorizeArray, weightArray] // Params: [brightness(0..2), contrast(0..inf), offset(-x..+x), blendArray, colorizeArray, weightArray]
GVAR(ppeffectColorCorrect) = ppEffectCreate ["ColorCorrections", 2003]; GVAR(ppeffectColorCorrect) = ppEffectCreate ["ColorCorrections", 2003];
GVAR(ppeffectColorCorrect) ppEffectAdjust [_brightFinal, _contrastFinal, 0, [0.0, 0.0, 0.0, 0.0], [1.3, 1.2, 0.0, 0.9], [6, 1, 1, 0.0]]; GVAR(ppeffectColorCorrect) ppEffectAdjust [_brightFinal, _contrastFinal, GVAR(nvgOffset), GVAR(nvgBlend), GVAR(nvgColorize), GVAR(nvgWeight)];
GVAR(ppeffectColorCorrect) ppEffectCommit 0; GVAR(ppeffectColorCorrect) ppEffectCommit 0;
GVAR(ppeffectColorCorrect) ppEffectForceInNVG true; GVAR(ppeffectColorCorrect) ppEffectForceInNVG true;
GVAR(ppeffectColorCorrect) ppEffectEnable true; GVAR(ppeffectColorCorrect) ppEffectEnable true;

View File

@ -26,6 +26,8 @@ private _hideHex = true;
private _nvgGen = 3; private _nvgGen = 3;
private _blurRadius = -1; private _blurRadius = -1;
// Adds Array of Params / Original ACE3's (ST's) by default. (NVG_GREEN_PRESET)
private _preset = getArray (configFile >> "CfgWeapons" >> "NVGoggles" >> "colorPreset");
if (alive ACE_player) then { if (alive ACE_player) then {
if (((vehicle ACE_player) == ACE_player) || { if (((vehicle ACE_player) == ACE_player) || {
// Test if we are using player's nvg or if sourced from vehicle: // Test if we are using player's nvg or if sourced from vehicle:
@ -61,6 +63,7 @@ if (alive ACE_player) then {
TRACE_1("souce: binocular",binocular ACE_player); // Source is from player's binocular (Rangefinder/Vector21bNite) TRACE_1("souce: binocular",binocular ACE_player); // Source is from player's binocular (Rangefinder/Vector21bNite)
private _config = configFile >> "CfgWeapons" >> (binocular ACE_player); private _config = configFile >> "CfgWeapons" >> (binocular ACE_player);
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));}; if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
if (isArray (_config >> "colorPreset")) then {_preset = getArray (_config >> "colorPreset");};
}; };
TRACE_1("source: hmd",GVAR(playerHMD)); // Source is player's HMD (or possibly a NVG scope, but no good way to detect that) TRACE_1("source: hmd",GVAR(playerHMD)); // Source is player's HMD (or possibly a NVG scope, but no good way to detect that)
@ -75,7 +78,7 @@ if (alive ACE_player) then {
if (isNumber (_config >> QGVAR(bluRadius))) then {_blurRadius = getNumber (_config >> QGVAR(bluRadius));}; if (isNumber (_config >> QGVAR(bluRadius))) then {_blurRadius = getNumber (_config >> QGVAR(bluRadius));};
}; };
if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));}; if (isNumber (_config >> QGVAR(generation))) then {_nvgGen = getNumber (_config >> QGVAR(generation));};
if (isArray (_config >> "colorPreset")) then {_preset = getArray (_config >> "colorPreset");};
} else { } else {
TRACE_1("source: vehicle - defaults",typeOf vehicle ACE_player); TRACE_1("source: vehicle - defaults",typeOf vehicle ACE_player);
}; };
@ -86,9 +89,18 @@ systemChat format ["NVG Refresh - Border: %1", _borderImage];
systemChat format ["EyeCups: %1, HideHex %2, NVGen: %3, BluRadius: %4", _eyeCups, _hideHex, _nvgGen, _blurRadius]; systemChat format ["EyeCups: %1, HideHex %2, NVGen: %3, BluRadius: %4", _eyeCups, _hideHex, _nvgGen, _blurRadius];
#endif #endif
// Selection cancelled, params added
_preset params ["_offset", "_blend", "_colorize", "_weight"];
GVAR(nvgBlurRadius) = _blurRadius; GVAR(nvgBlurRadius) = _blurRadius;
GVAR(nvgGeneration) = _nvgGen; GVAR(nvgGeneration) = _nvgGen;
// Additional Global variables for Params transfer & supporting
GVAR(nvgOffset) = _offset;
GVAR(nvgBlend) = _blend;
GVAR(nvgColorize) = _colorize;
GVAR(nvgWeight) = _weight;
// Setup border and hex image based on NVG config: // Setup border and hex image based on NVG config:
private _scale = (call EFUNC(common,getZoom)) * 1.12513; private _scale = (call EFUNC(common,getZoom)) * 1.12513;

View File

@ -19,6 +19,9 @@
// Effect Settings / Magic values to tweak: // Effect Settings / Magic values to tweak:
#define NVG_GREEN_PRESET colorPreset[] = {0, {0.0, 0.0, 0.0, 0.0}, {1.3, 1.2, 0.0, 0.9}, {6, 1, 1, 0.0}}
#define NVG_WHITE_PRESET colorPreset[] = {0.0, {0.0, 0.0, 0.0, 0.0}, {1.1, 0.8, 1.9, 0.9}, {1, 1, 6, 0.0}}
// Decreases fog when in air vehicles // Decreases fog when in air vehicles
#define ST_NVG_AIR_FOG_MULTIPLIER 0.5 #define ST_NVG_AIR_FOG_MULTIPLIER 0.5

View File

@ -117,6 +117,12 @@
<Chinese>夜視鏡 (三代, 棕色)</Chinese> <Chinese>夜視鏡 (三代, 棕色)</Chinese>
<Turkish>GG Gözlüğü (3. Jen Kahverengi)</Turkish> <Turkish>GG Gözlüğü (3. Jen Kahverengi)</Turkish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen3_brown_WP">
<English>NV Goggles (Gen3, Brown, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_WP_desc">
<English>Night Vision Goggles, White Phosphor</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Gen3_green"> <Key ID="STR_ACE_NightVision_NVG_Gen3_green">
<English>NV Goggles (Gen3, Green)</English> <English>NV Goggles (Gen3, Green)</English>
<Czech>Noktovizor (Gen3, zelený)</Czech> <Czech>Noktovizor (Gen3, zelený)</Czech>
@ -134,6 +140,9 @@
<Chinese>夜視鏡 (三代, 綠色)</Chinese> <Chinese>夜視鏡 (三代, 綠色)</Chinese>
<Turkish>GG Gözlüğü (3. Jen Yeşil)</Turkish> <Turkish>GG Gözlüğü (3. Jen Yeşil)</Turkish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen3_green_WP">
<English>NV Goggles (Gen3, Green, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Gen3_black"> <Key ID="STR_ACE_NightVision_NVG_Gen3_black">
<English>NV Goggles (Gen3, Black)</English> <English>NV Goggles (Gen3, Black)</English>
<Czech>Noktovizor (Gen3, černý)</Czech> <Czech>Noktovizor (Gen3, černý)</Czech>
@ -151,6 +160,9 @@
<Chinese>夜視鏡 (三代, 黑色)</Chinese> <Chinese>夜視鏡 (三代, 黑色)</Chinese>
<Turkish>GG Gözlüğü (3. Jen Siyah)</Turkish> <Turkish>GG Gözlüğü (3. Jen Siyah)</Turkish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen3_black_WP">
<English>NV Goggles (Gen3, Black, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_brown"> <Key ID="STR_ACE_NightVision_NVG_Gen4_brown">
<English>NV Goggles (Gen4, Brown)</English> <English>NV Goggles (Gen4, Brown)</English>
<French>JVN (Gen4, marron)</French> <French>JVN (Gen4, marron)</French>
@ -162,6 +174,9 @@
<Korean>야투경 (4세대, 갈색)</Korean> <Korean>야투경 (4세대, 갈색)</Korean>
<Spanish>Gafas de visión nocturna (Gen4, Marrón)</Spanish> <Spanish>Gafas de visión nocturna (Gen4, Marrón)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_brown_WP">
<English>NV Goggles (Gen4, Brown, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_black"> <Key ID="STR_ACE_NightVision_NVG_Gen4_black">
<English>NV Goggles (Gen4, Black)</English> <English>NV Goggles (Gen4, Black)</English>
<French>JVN (Gen4, noires)</French> <French>JVN (Gen4, noires)</French>
@ -173,6 +188,9 @@
<Korean>야투경 (4세대, 검정색)</Korean> <Korean>야투경 (4세대, 검정색)</Korean>
<Spanish>Gafas de visión nocturna (Gen4, Negro)</Spanish> <Spanish>Gafas de visión nocturna (Gen4, Negro)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_black_WP">
<English>NV Goggles (Gen4, Black, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_green"> <Key ID="STR_ACE_NightVision_NVG_Gen4_green">
<English>NV Goggles (Gen4, Green)</English> <English>NV Goggles (Gen4, Green)</English>
<French>JVN (Gen4, vertes)</French> <French>JVN (Gen4, vertes)</French>
@ -184,6 +202,9 @@
<Korean>야투경 (4세대, 녹색)</Korean> <Korean>야투경 (4세대, 녹색)</Korean>
<Spanish>Gafas de visión nocturna (Gen4, Verde)</Spanish> <Spanish>Gafas de visión nocturna (Gen4, Verde)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Gen4_green_WP">
<English>NV Goggles (Gen4, Green, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_brown"> <Key ID="STR_ACE_NightVision_NVG_Wide_brown">
<English>NV Goggles (Wide, Brown)</English> <English>NV Goggles (Wide, Brown)</English>
<French>JVN (Large, marron)</French> <French>JVN (Large, marron)</French>
@ -195,6 +216,9 @@
<Korean>야투경 (넓음, 갈색)</Korean> <Korean>야투경 (넓음, 갈색)</Korean>
<Spanish>Gafas de visión nocturna (Panorámicas, Marrón)</Spanish> <Spanish>Gafas de visión nocturna (Panorámicas, Marrón)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_brown_WP">
<English>NV Goggles (Wide, Brown, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_black"> <Key ID="STR_ACE_NightVision_NVG_Wide_black">
<English>NV Goggles (Wide, Black)</English> <English>NV Goggles (Wide, Black)</English>
<French>JVN (Large, noires)</French> <French>JVN (Large, noires)</French>
@ -206,6 +230,9 @@
<Korean>야투경 (넓음, 검정색)</Korean> <Korean>야투경 (넓음, 검정색)</Korean>
<Spanish>Gafas de visión nocturna (Panorámicas, Negro)</Spanish> <Spanish>Gafas de visión nocturna (Panorámicas, Negro)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_black_WP">
<English>NV Goggles (Wide, Black, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_green"> <Key ID="STR_ACE_NightVision_NVG_Wide_green">
<English>NV Goggles (Wide, Green)</English> <English>NV Goggles (Wide, Green)</English>
<French>JVN (Large, vertes)</French> <French>JVN (Large, vertes)</French>
@ -217,6 +244,9 @@
<Korean>야투경 (넓음, 녹색)</Korean> <Korean>야투경 (넓음, 녹색)</Korean>
<Spanish>Gafas de visión nocturna (Panorámicas, Verde)</Spanish> <Spanish>Gafas de visión nocturna (Panorámicas, Verde)</Spanish>
</Key> </Key>
<Key ID="STR_ACE_NightVision_NVG_Wide_green_WP">
<English>NV Goggles (Wide, Green, WP)</English>
</Key>
<Key ID="STR_ACE_NightVision_NVGBrightness"> <Key ID="STR_ACE_NightVision_NVGBrightness">
<English>Brightness: %1</English> <English>Brightness: %1</English>
<German>Helligkeit: %1</German> <German>Helligkeit: %1</German>