├── LICENSE
├── AmandsGraphics.sln
└── AmandsGraphics
├── AmandsGraphics.csproj
├── ConfigurationManagerAttributes.cs
├── Program.cs
└── AmandsGraphicsClass.cs
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Amands2Mello
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/AmandsGraphics.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio Version 17
4 | VisualStudioVersion = 17.3.32811.315
5 | MinimumVisualStudioVersion = 10.0.40219.1
6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AmandsGraphics", "AmandsGraphics\AmandsGraphics.csproj", "{E1F4631C-7767-4EB8-B34F-EBB8F4E85709}"
7 | EndProject
8 | Global
9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
10 | Debug|Any CPU = Debug|Any CPU
11 | Release|Any CPU = Release|Any CPU
12 | EndGlobalSection
13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
14 | {E1F4631C-7767-4EB8-B34F-EBB8F4E85709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
15 | {E1F4631C-7767-4EB8-B34F-EBB8F4E85709}.Debug|Any CPU.Build.0 = Debug|Any CPU
16 | {E1F4631C-7767-4EB8-B34F-EBB8F4E85709}.Release|Any CPU.ActiveCfg = Release|Any CPU
17 | {E1F4631C-7767-4EB8-B34F-EBB8F4E85709}.Release|Any CPU.Build.0 = Release|Any CPU
18 | EndGlobalSection
19 | GlobalSection(SolutionProperties) = preSolution
20 | HideSolutionNode = FALSE
21 | EndGlobalSection
22 | GlobalSection(ExtensibilityGlobals) = postSolution
23 | SolutionGuid = {6A2A6D78-FB08-4DD0-805C-78C294042C09}
24 | EndGlobalSection
25 | EndGlobal
26 |
--------------------------------------------------------------------------------
/AmandsGraphics/AmandsGraphics.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | Debug
6 | AnyCPU
7 | {E1F4631C-7767-4EB8-B34F-EBB8F4E85709}
8 | Library
9 | Properties
10 | AmandsGraphics
11 | AmandsGraphics
12 | v4.7.2
13 | 512
14 | true
15 |
16 |
17 | true
18 | full
19 | false
20 | bin\Debug\
21 | DEBUG;TRACE
22 | prompt
23 | 4
24 |
25 |
26 | pdbonly
27 | true
28 | bin\Release\
29 | TRACE
30 | prompt
31 | 4
32 |
33 |
34 |
35 | ..\References\Aki.Common.dll
36 |
37 |
38 | ..\References\Aki.Reflection.dll
39 |
40 |
41 | ..\References\Assembly-CSharp.dll
42 |
43 |
44 | ..\References\Assembly-CSharp-firstpass.dll
45 |
46 |
47 | ..\References\BepInEx.dll
48 |
49 |
50 | ..\References\Comfort.dll
51 |
52 |
53 | ..\References\DOTween.dll
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 | ..\References\Unity.Postprocessing.Runtime.dll
65 |
66 |
67 | ..\References\UnityEngine.dll
68 |
69 |
70 | ..\References\UnityEngine.CoreModule.dll
71 |
72 |
73 | ..\References\UnityEngine.InputLegacyModule.dll
74 |
75 |
76 | ..\References\UnityEngine.PhysicsModule.dll
77 |
78 |
79 | ..\References\UnityEngine.UI.dll
80 |
81 |
82 | ..\References\UnityEngine.UnityWebRequestModule.dll
83 |
84 |
85 | ..\References\UnityEngine.UnityWebRequestTextureModule.dll
86 |
87 |
88 |
89 |
90 |
91 |
92 |
93 |
94 |
95 |
--------------------------------------------------------------------------------
/AmandsGraphics/ConfigurationManagerAttributes.cs:
--------------------------------------------------------------------------------
1 | ///
2 | /// Class that specifies how a setting should be displayed inside the ConfigurationManager settings window.
3 | ///
4 | /// Usage:
5 | /// This class template has to be copied inside the plugin's project and referenced by its code directly.
6 | /// make a new instance, assign any fields that you want to override, and pass it as a tag for your setting.
7 | ///
8 | /// If a field is null (default), it will be ignored and won't change how the setting is displayed.
9 | /// If a field is non-null (you assigned a value to it), it will override default behavior.
10 | ///
11 | ///
12 | ///
13 | /// Here's an example of overriding order of settings and marking one of the settings as advanced:
14 | ///
15 | /// // Override IsAdvanced and Order
16 | /// Config.AddSetting("X", "1", 1, new ConfigDescription("", null, new ConfigurationManagerAttributes { IsAdvanced = true, Order = 3 }));
17 | /// // Override only Order, IsAdvanced stays as the default value assigned by ConfigManager
18 | /// Config.AddSetting("X", "2", 2, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 1 }));
19 | /// Config.AddSetting("X", "3", 3, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 2 }));
20 | ///
21 | ///
22 | ///
23 | ///
24 | /// You can read more and see examples in the readme at https://github.com/BepInEx/BepInEx.ConfigurationManager
25 | /// You can optionally remove fields that you won't use from this class, it's the same as leaving them null.
26 | ///
27 | #pragma warning disable 0169, 0414, 0649
28 | internal sealed class ConfigurationManagerAttributes
29 | {
30 | ///
31 | /// Should the setting be shown as a percentage (only use with value range settings).
32 | ///
33 | public bool? ShowRangeAsPercent;
34 |
35 | ///
36 | /// Custom setting editor (OnGUI code that replaces the default editor provided by ConfigurationManager).
37 | /// See below for a deeper explanation. Using a custom drawer will cause many of the other fields to do nothing.
38 | ///
39 | public System.Action CustomDrawer;
40 |
41 | ///
42 | /// Show this setting in the settings screen at all? If false, don't show.
43 | ///
44 | public bool? Browsable;
45 |
46 | ///
47 | /// Category the setting is under. Null to be directly under the plugin.
48 | ///
49 | public string Category;
50 |
51 | ///
52 | /// If set, a "Default" button will be shown next to the setting to allow resetting to default.
53 | ///
54 | public object DefaultValue;
55 |
56 | ///
57 | /// Force the "Reset" button to not be displayed, even if a valid DefaultValue is available.
58 | ///
59 | public bool? HideDefaultButton;
60 |
61 | ///
62 | /// Force the setting name to not be displayed. Should only be used with a to get more space.
63 | /// Can be used together with to gain even more space.
64 | ///
65 | public bool? HideSettingName;
66 |
67 | ///
68 | /// Optional description shown when hovering over the setting.
69 | /// Not recommended, provide the description when creating the setting instead.
70 | ///
71 | public string Description;
72 |
73 | ///
74 | /// Name of the setting.
75 | ///
76 | public string DispName;
77 |
78 | ///
79 | /// Order of the setting on the settings list relative to other settings in a category.
80 | /// 0 by default, higher number is higher on the list.
81 | ///
82 | public int? Order;
83 |
84 | ///
85 | /// Only show the value, don't allow editing it.
86 | ///
87 | public bool? ReadOnly;
88 |
89 | ///
90 | /// If true, don't show the setting by default. User has to turn on showing advanced settings or search for it.
91 | ///
92 | public bool? IsAdvanced;
93 |
94 | ///
95 | /// Custom converter from setting type to string for the built-in editor textboxes.
96 | ///
97 | public System.Func ObjToStr;
98 |
99 | ///
100 | /// Custom converter from string to setting type for the built-in editor textboxes.
101 | ///
102 | public System.Func StrToObj;
103 | }
--------------------------------------------------------------------------------
/AmandsGraphics/Program.cs:
--------------------------------------------------------------------------------
1 |
2 | using SPT.Common.Utils;
3 | using SPT.Reflection.Patching;
4 | using BepInEx;
5 | using BepInEx.Configuration;
6 | using System;
7 | using System.IO;
8 | using System.Reflection;
9 | using System.Linq;
10 | using UnityEngine;
11 | using UnityEngine.Rendering.PostProcessing;
12 | using EFT.CameraControl;
13 | using EFT.InventoryLogic;
14 | using HarmonyLib;
15 | using EFT.UI;
16 | using System.Collections.Generic;
17 | using EFT;
18 | using System.Threading.Tasks;
19 |
20 | namespace AmandsGraphics
21 | {
22 | [BepInPlugin("com.Amanda.Graphics", "Graphics", "1.6.5")]
23 | public class AmandsGraphicsPlugin : BaseUnityPlugin
24 | {
25 | public static GameObject Hook;
26 | public static AmandsGraphicsClass AmandsGraphicsClassComponent;
27 | public static Type PainKillerEffectType;
28 | public static Type PainEffectType;
29 |
30 | public static ConfigEntry GraphicsToggle { get; set; }
31 | public static ConfigEntry DebugMode { get; set; }
32 |
33 | public static ConfigEntry MotionBlur { get; set; }
34 | public static ConfigEntry MotionBlurSampleCount { get; set; }
35 | public static ConfigEntry MotionBlurShutterAngle { get; set; }
36 |
37 | public static ConfigEntry HBAO { get; set; }
38 | public static ConfigEntry HBAOIntensity { get; set; }
39 | public static ConfigEntry HBAOSaturation { get; set; }
40 | public static ConfigEntry HBAOAlbedoMultiplier { get; set; }
41 | public static ConfigEntry LabsHBAOIntensity { get; set; }
42 | public static ConfigEntry LabsHBAOSaturation { get; set; }
43 | public static ConfigEntry LabsHBAOAlbedoMultiplier { get; set; }
44 |
45 | public static ConfigEntry SurroundDepthOfField { get; set; }
46 | public static ConfigEntry SurroundDOFOpticZoom { get; set; }
47 | public static ConfigEntry SurroundDOFAperture { get; set; }
48 | public static ConfigEntry SurroundDOFSpeed { get; set; }
49 | public static ConfigEntry SurroundDOFFocalLength { get; set; }
50 | public static ConfigEntry SurroundDOFFocalLengthOff { get; set; }
51 | public static ConfigEntry DOFKernelSize { get; set; }
52 |
53 | public static ConfigEntry UIDepthOfField { get; set; }
54 | public static ConfigEntry UIDOFAperture { get; set; }
55 | public static ConfigEntry UIDOFDistance { get; set; }
56 | public static ConfigEntry UIDOFSpeed { get; set; }
57 | public static ConfigEntry UIDOFFocalLength { get; set; }
58 |
59 | public static ConfigEntry WeaponDepthOfField { get; set; }
60 | public static ConfigEntry WeaponDOFSpeed { get; set; }
61 | public static ConfigEntry WeaponDOFWeaponMaxBlurSize { get; set; }
62 | public static ConfigEntry WeaponDOFIronSightMaxBlurSize { get; set; }
63 | public static ConfigEntry WeaponDOFSightMaxBlurSize { get; set; }
64 | public static ConfigEntry WeaponDOFNVGMaxBlurSize { get; set; }
65 | public static ConfigEntry WeaponDOFWeaponFocalLength { get; set; }
66 | public static ConfigEntry WeaponDOFIronSightFocalLength { get; set; }
67 | public static ConfigEntry WeaponDOFSightFocalLength { get; set; }
68 | public static ConfigEntry WeaponDOFNVGFocalLength { get; set; }
69 | public static ConfigEntry WeaponDOFAperture { get; set; }
70 | public static ConfigEntry WeaponDOFBlurSampleCount { get; set; }
71 |
72 | public static ConfigEntry OpticDepthOfField { get; set; }
73 | public static ConfigEntry OpticDOFOpticZoom { get; set; }
74 | public static ConfigEntry OpticDOFAperture1x { get; set; }
75 | public static ConfigEntry OpticDOFAperture2x { get; set; }
76 | public static ConfigEntry OpticDOFAperture4x { get; set; }
77 | public static ConfigEntry OpticDOFAperture6x { get; set; }
78 | public static ConfigEntry OpticDOFSpeed { get; set; }
79 | public static ConfigEntry OpticDOFFocalLengthMode { get; set; }
80 | public static ConfigEntry OpticDOFFocalLength { get; set; }
81 | public static ConfigEntry OpticDOFKernelSize { get; set; }
82 | public static ConfigEntry OpticDOFRaycastQuality { get; set; }
83 | public static ConfigEntry OpticDOFDistanceSpeed { get; set; }
84 | public static ConfigEntry OpticDOFRaycastDistance { get; set; }
85 | public static ConfigEntry OpticDOFTargetDistance { get; set; }
86 |
87 | public static ConfigEntry Flashlight { get; set; }
88 | public static ConfigEntry FlashlightRange { get; set; }
89 | public static ConfigEntry FlashlightExtinctionCoef { get; set; }
90 |
91 | public static ConfigEntry NVG { get; set; }
92 | public static ConfigEntry NVGTonemap { get; set; }
93 | public static ConfigEntry NVGAmbientContrast { get; set; }
94 | public static ConfigEntry InterchangeNVGAmbientContrast { get; set; }
95 | public static ConfigEntry NVGNoiseIntensity { get; set; }
96 | public static ConfigEntry InterchangeNVGNoiseIntensity { get; set; }
97 | public static ConfigEntry NVGOriginalColor { get; set; }
98 | public static ConfigEntry NVGOriginalSkyColor { get; set; }
99 | public static ConfigEntry InterchangeNVGOriginalSkyColor { get; set; }
100 | public static ConfigEntry NVGMoonLightIntensity { get; set; }
101 |
102 | public static ConfigEntry NightAmbientLight { get; set; }
103 | public static ConfigEntry NightAmbientContrast { get; set; }
104 | public static ConfigEntry InterchangeNightAmbientContrast { get; set; }
105 |
106 | public static ConfigEntry MysticalGlow { get; set; }
107 | public static ConfigEntry MysticalGlowIntensity { get; set; }
108 | public static ConfigEntry GroundZeroMysticalGlowIntensity { get; set; }
109 | public static ConfigEntry StreetsMysticalGlowIntensity { get; set; }
110 | public static ConfigEntry CustomsMysticalGlowIntensity { get; set; }
111 | public static ConfigEntry LighthouseMysticalGlowIntensity { get; set; }
112 | public static ConfigEntry InterchangeMysticalGlowIntensity { get; set; }
113 | public static ConfigEntry WoodsMysticalGlowIntensity { get; set; }
114 | public static ConfigEntry ReserveMysticalGlowIntensity { get; set; }
115 | public static ConfigEntry ShorelineMysticalGlowIntensity { get; set; }
116 |
117 | public static ConfigEntry HealthEffectHit { get; set; }
118 | public static ConfigEntry HitCAIntensity { get; set; }
119 | public static ConfigEntry HitCASpeed { get; set; }
120 | public static ConfigEntry HitCAPower { get; set; }
121 |
122 | public static ConfigEntry HealthEffectPainkiller { get; set; }
123 | public static ConfigEntry PainkillerSaturation { get; set; }
124 | //public static ConfigEntry PainkillerCAIntensity { get; set; }
125 | public static ConfigEntry HealthEffectPain { get; set; }
126 | public static ConfigEntry SunMeshBrightness { get; set; }
127 | public static ConfigEntry SkyBrightness { get; set; }
128 |
129 | public static ConfigEntry Brightness { get; set; }
130 | public static ConfigEntry Tonemap { get; set; }
131 | public static ConfigEntry UseBSGLUT { get; set; }
132 | public static ConfigEntry BloomIntensity { get; set; }
133 | public static ConfigEntry UseBSGCC_Vintage { get; set; }
134 | public static ConfigEntry UseBSGCC_Sharpen { get; set; }
135 | public static ConfigEntry UseBSGGlobalFog { get; set; }
136 | public static ConfigEntry UseBSGColorCorrectionCurves { get; set; }
137 | public static ConfigEntry LightsUseLinearIntensity { get; set; }
138 | public static ConfigEntry SunColor { get; set; }
139 | public static ConfigEntry SkyColor { get; set; }
140 | public static ConfigEntry PresetName { get; set; }
141 | public static ConfigEntry SavePreset { get; set; }
142 | public static ConfigEntry LoadPreset { get; set; }
143 |
144 | public static ConfigEntry GroundZeroFogLevel { get; set; }
145 | public static ConfigEntry StreetsFogLevel { get; set; }
146 | public static ConfigEntry CustomsFogLevel { get; set; }
147 | public static ConfigEntry LighthouseFogLevel { get; set; }
148 | public static ConfigEntry InterchangeFogLevel { get; set; }
149 | public static ConfigEntry WoodsFogLevel { get; set; }
150 | public static ConfigEntry ReserveFogLevel { get; set; }
151 | public static ConfigEntry ShorelineFogLevel { get; set; }
152 |
153 | public static ConfigEntry GroundZeroTonemap { get; set; }
154 | public static ConfigEntry StreetsTonemap { get; set; }
155 | public static ConfigEntry LabsTonemap { get; set; }
156 | public static ConfigEntry CustomsTonemap { get; set; }
157 | public static ConfigEntry FactoryTonemap { get; set; }
158 | public static ConfigEntry FactoryNightTonemap { get; set; }
159 | public static ConfigEntry LighthouseTonemap { get; set; }
160 | public static ConfigEntry InterchangeTonemap { get; set; }
161 | public static ConfigEntry WoodsTonemap { get; set; }
162 | public static ConfigEntry ReserveTonemap { get; set; }
163 | public static ConfigEntry ShorelineTonemap { get; set; }
164 | public static ConfigEntry HideoutTonemap { get; set; }
165 |
166 | public static ConfigEntry GroundZeroACES { get; set; }
167 | public static ConfigEntry GroundZeroACESS { get; set; }
168 | public static ConfigEntry StreetsACES { get; set; }
169 | public static ConfigEntry StreetsACESS { get; set; }
170 | public static ConfigEntry LabsACES { get; set; }
171 | public static ConfigEntry LabsACESS { get; set; }
172 | public static ConfigEntry CustomsACES { get; set; }
173 | public static ConfigEntry CustomsACESS { get; set; }
174 | public static ConfigEntry FactoryACES { get; set; }
175 | public static ConfigEntry FactoryACESS { get; set; }
176 | public static ConfigEntry FactoryNightACES { get; set; }
177 | public static ConfigEntry FactoryNightACESS { get; set; }
178 | public static ConfigEntry LighthouseACES { get; set; }
179 | public static ConfigEntry LighthouseACESS { get; set; }
180 | public static ConfigEntry InterchangeACES { get; set; }
181 | public static ConfigEntry InterchangeACESS { get; set; }
182 | public static ConfigEntry WoodsACES { get; set; }
183 | public static ConfigEntry WoodsACESS { get; set; }
184 | public static ConfigEntry ReserveACES { get; set; }
185 | public static ConfigEntry ReserveACESS { get; set; }
186 | public static ConfigEntry ShorelineACES { get; set; }
187 | public static ConfigEntry ShorelineACESS { get; set; }
188 | public static ConfigEntry HideoutACES { get; set; }
189 | public static ConfigEntry HideoutACESS { get; set; }
190 |
191 | public static ConfigEntry GroundZeroFilmic { get; set; }
192 | public static ConfigEntry GroundZeroFilmicS { get; set; }
193 | public static ConfigEntry StreetsFilmic { get; set; }
194 | public static ConfigEntry StreetsFilmicS { get; set; }
195 | public static ConfigEntry LabsFilmic { get; set; }
196 | public static ConfigEntry LabsFilmicS { get; set; }
197 | public static ConfigEntry CustomsFilmic { get; set; }
198 | public static ConfigEntry CustomsFilmicS { get; set; }
199 | public static ConfigEntry FactoryFilmic { get; set; }
200 | public static ConfigEntry FactoryFilmicS { get; set; }
201 | public static ConfigEntry FactoryNightFilmic { get; set; }
202 | public static ConfigEntry FactoryNightFilmicS { get; set; }
203 | public static ConfigEntry LighthouseFilmic { get; set; }
204 | public static ConfigEntry LighthouseFilmicS { get; set; }
205 | public static ConfigEntry InterchangeFilmic { get; set; }
206 | public static ConfigEntry InterchangeFilmicS { get; set; }
207 | public static ConfigEntry WoodsFilmic { get; set; }
208 | public static ConfigEntry WoodsFilmicS { get; set; }
209 | public static ConfigEntry ReserveFilmic { get; set; }
210 | public static ConfigEntry ReserveFilmicS { get; set; }
211 | public static ConfigEntry ShorelineFilmic { get; set; }
212 | public static ConfigEntry ShorelineFilmicS { get; set; }
213 | public static ConfigEntry HideoutFilmic { get; set; }
214 | public static ConfigEntry HideoutFilmicS { get; set; }
215 |
216 | public static ConfigEntry HideoutSkyColor { get; set; }
217 |
218 | public static ConfigEntry LightColorIndex0 { get; set; }
219 | public static ConfigEntry LightColorIndex1 { get; set; }
220 | public static ConfigEntry LightColorIndex2 { get; set; }
221 | public static ConfigEntry LightColorIndex3 { get; set; }
222 | public static ConfigEntry LightColorIndex4 { get; set; }
223 | public static ConfigEntry LightColorIndex5 { get; set; }
224 |
225 | public static ConfigEntry Version { get; set; }
226 | private static bool RequestDefaultValues = false;
227 |
228 | private void Awake()
229 | {
230 | Debug.LogError("Graphics Awake()");
231 | Hook = new GameObject("Graphics");
232 | AmandsGraphicsClassComponent = Hook.AddComponent();
233 | DontDestroyOnLoad(Hook);
234 | }
235 | private void Start()
236 | {
237 | Version = Config.Bind("Versioning", "Version", "0.0.0", new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 1, ReadOnly = true, IsAdvanced = true }));
238 |
239 | if (Version.Value == "0.0.0")
240 | {
241 | // Using New Config File
242 | Version.Value = Info.Metadata.Version.ToString();
243 | RequestDefaultValues = true;
244 | }
245 | else if (Version.Value != Info.Metadata.Version.ToString())
246 | {
247 | // Using Old Config File
248 | Version.Value = Info.Metadata.Version.ToString();
249 | RequestDefaultValues = true;
250 | }
251 | else
252 | {
253 | // Valid Config File
254 | }
255 |
256 | string AmandsCinematic = "AmandsGraphics Cinematic";
257 | string AmandsExperimental = "AmandsGraphics Experimental";
258 | string AmandsFeatures = "AmandsGraphics Features";
259 |
260 | GraphicsToggle = Config.Bind(AmandsFeatures, "GraphicsToggle", new KeyboardShortcut(KeyCode.Insert), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 610 }));
261 | DebugMode = Config.Bind(AmandsFeatures, "DebugMode", EDebugMode.HBAO, new ConfigDescription("Shift + Insert will toggle only the selected DebugMode feature", null, new ConfigurationManagerAttributes { Order = 600 }));
262 |
263 | MotionBlur = Config.Bind(AmandsCinematic, "MotionBlur", EEnabledFeature.Off, new ConfigDescription("Motion Blur needs anti-aliasing set to TAA to work as intended", null, new ConfigurationManagerAttributes { Order = 670 }));
264 | MotionBlurSampleCount = Config.Bind(AmandsCinematic, "MotionBlur SampleCount", 10, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 660, IsAdvanced = true }));
265 | MotionBlurShutterAngle = Config.Bind(AmandsCinematic, "MotionBlur ShutterAngle", 270f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 650, IsAdvanced = true }));
266 |
267 | HBAO = Config.Bind(AmandsCinematic, "HBAO", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 640 }));
268 | HBAOIntensity = Config.Bind(AmandsCinematic, "HBAO Intensity", 1.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 630, IsAdvanced = true }));
269 | HBAOSaturation = Config.Bind(AmandsCinematic, "HBAO Saturation", 1.5f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 620, IsAdvanced = true }));
270 | HBAOAlbedoMultiplier = Config.Bind(AmandsCinematic, "HBAO Albedo Multiplier", 2f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 610, IsAdvanced = true }));
271 |
272 | SurroundDepthOfField = Config.Bind(AmandsCinematic, "SurroundDepthOfField", EDepthOfField.Off, new ConfigDescription("High-Quality Color needs to be Enabled on Graphics Settings", null, new ConfigurationManagerAttributes { Order = 600 }));
273 | SurroundDOFOpticZoom = Config.Bind(AmandsCinematic, "SurroundDOF OpticZoom", 2f, new ConfigDescription("DepthOfField will be enabled if the zoom is greater than or equal to this value", new AcceptableValueRange(1f, 25f), new ConfigurationManagerAttributes { Order = 590, IsAdvanced = true }));
274 | SurroundDOFAperture = Config.Bind(AmandsCinematic, "SurroundDOF Aperture", 5.6f, new ConfigDescription("The smaller the value is, the shallower the depth of field is", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 580, IsAdvanced = true }));
275 | SurroundDOFSpeed = Config.Bind(AmandsCinematic, "SurroundDOF Speed", 16f, new ConfigDescription("Animation speed", new AcceptableValueRange(0.1f, 32f), new ConfigurationManagerAttributes { Order = 570, IsAdvanced = true }));
276 | SurroundDOFFocalLength = Config.Bind(AmandsCinematic, "SurroundDOF FocalLength", 25f, new ConfigDescription("The larger the value is, the shallower the depth of field is", new AcceptableValueRange(0f, 100f), new ConfigurationManagerAttributes { Order = 560, IsAdvanced = true }));
277 | SurroundDOFFocalLengthOff = Config.Bind(AmandsCinematic, "SurroundDOF FocalLength Off", 4f, new ConfigDescription("The larger the value is, the shallower the depth of field is. Used by animation to determinate what's considered off", new AcceptableValueRange(0f, 100f), new ConfigurationManagerAttributes { Order = 550, IsAdvanced = true }));
278 | DOFKernelSize = Config.Bind(AmandsCinematic, "DOF KernelSize", KernelSize.Medium, new ConfigDescription("This setting determines the maximum radius of bokeh", null, new ConfigurationManagerAttributes { Order = 540, IsAdvanced = true }));
279 |
280 | UIDepthOfField = Config.Bind(AmandsCinematic, "UIDepthOfField", EUIDepthOfField.Off, new ConfigDescription("High-Quality Color needs to be Enabled on Graphics Settings\"", null, new ConfigurationManagerAttributes { Order = 390 }));
281 | UIDOFDistance = Config.Bind(AmandsCinematic, "UIDOF Distance", 0.2f, new ConfigDescription("Focus point distance", new AcceptableValueRange(0.01f, 1f), new ConfigurationManagerAttributes { Order = 380, IsAdvanced = true }));
282 | UIDOFAperture = Config.Bind(AmandsCinematic, "UIDOF Aperture", 5.6f, new ConfigDescription("The smaller the value is, the shallower the depth of field is", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 370, IsAdvanced = true }));
283 | UIDOFSpeed = Config.Bind(AmandsCinematic, "UIDOF Speed", 4f, new ConfigDescription("Animation speed", new AcceptableValueRange(0.1f, 32f), new ConfigurationManagerAttributes { Order = 360, IsAdvanced = true }));
284 | UIDOFFocalLength = Config.Bind(AmandsCinematic, "UIDOF FocalLength", 25f, new ConfigDescription("The larger the value is, the shallower the depth of field is", new AcceptableValueRange(0f, 100f), new ConfigurationManagerAttributes { Order = 350, IsAdvanced = true }));
285 |
286 | WeaponDepthOfField = Config.Bind(AmandsCinematic, "WeaponDepthOfField", EWeaponDepthOfField.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 340 }));
287 | WeaponDOFSpeed = Config.Bind(AmandsCinematic, "WeaponDOF Speed", 6.0f, new ConfigDescription("Animation speed", new AcceptableValueRange(0.1f, 32f), new ConfigurationManagerAttributes { Order = 330, IsAdvanced = true }));
288 | WeaponDOFWeaponMaxBlurSize = Config.Bind(AmandsCinematic, "WeaponDOF Weapon Blur", 2f, new ConfigDescription("Max Blur Size", new AcceptableValueRange(0.01f, 10f), new ConfigurationManagerAttributes { Order = 320, IsAdvanced = true }));
289 | WeaponDOFIronSightMaxBlurSize = Config.Bind(AmandsCinematic, "WeaponDOF IronSight Blur", 3f, new ConfigDescription("Max Blur Size when aiming with iron sights", new AcceptableValueRange(0.01f, 10f), new ConfigurationManagerAttributes { Order = 310, IsAdvanced = true }));
290 | WeaponDOFSightMaxBlurSize = Config.Bind(AmandsCinematic, "WeaponDOF Sight Blur", 4f, new ConfigDescription("Max Blur Size when aiming with sights", new AcceptableValueRange(0.01f, 10f), new ConfigurationManagerAttributes { Order = 300, IsAdvanced = true }));
291 | WeaponDOFNVGMaxBlurSize = Config.Bind(AmandsCinematic, "WeaponDOF NVG Blur", 4f, new ConfigDescription("Max Blur Size when aiming with sights", new AcceptableValueRange(0.01f, 10f), new ConfigurationManagerAttributes { Order = 298, IsAdvanced = true }));
292 | WeaponDOFWeaponFocalLength = Config.Bind(AmandsCinematic, "WeaponDOF Weapon FocalLength", 25f, new ConfigDescription("", new AcceptableValueRange(0.01f, 100f), new ConfigurationManagerAttributes { Order = 290, IsAdvanced = true }));
293 | WeaponDOFIronSightFocalLength = Config.Bind(AmandsCinematic, "WeaponDOF IronSight FocalLength", 30f, new ConfigDescription("", new AcceptableValueRange(0.01f, 100f), new ConfigurationManagerAttributes { Order = 280, IsAdvanced = true }));
294 | WeaponDOFSightFocalLength = Config.Bind(AmandsCinematic, "WeaponDOF Sight FocalLength", 90f, new ConfigDescription("", new AcceptableValueRange(0.01f, 100f), new ConfigurationManagerAttributes { Order = 270, IsAdvanced = true }));
295 | WeaponDOFNVGFocalLength = Config.Bind(AmandsCinematic, "WeaponDOF NVG FocalLength", 100f, new ConfigDescription("", new AcceptableValueRange(0.01f, 100f), new ConfigurationManagerAttributes { Order = 268, IsAdvanced = true }));
296 | WeaponDOFAperture = Config.Bind(AmandsCinematic, "WeaponDOF Aperture", 0.25f, new ConfigDescription("", new AcceptableValueRange(0.01f, 2f), new ConfigurationManagerAttributes { Order = 260, IsAdvanced = true }));
297 | WeaponDOFBlurSampleCount = Config.Bind(AmandsCinematic, "WeaponDOF BlurSampleCount", UnityStandardAssets.ImageEffects.DepthOfField.BlurSampleCount.High, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 250, IsAdvanced = true }));
298 |
299 | OpticDepthOfField = Config.Bind(AmandsCinematic, "OpticDepthOfField", EDepthOfField.Off, new ConfigDescription("High-Quality Color needs to be Enabled on Graphics Settings\"", null, new ConfigurationManagerAttributes { Order = 240 }));
300 | OpticDOFOpticZoom = Config.Bind(AmandsCinematic, "OpticDOF OpticZoom", 2f, new ConfigDescription("OpticDepthOfField will be enabled if the zoom is greater than or equal to this value", new AcceptableValueRange(1f, 25f), new ConfigurationManagerAttributes { Order = 230, IsAdvanced = true }));
301 | OpticDOFAperture1x = Config.Bind(AmandsCinematic, "OpticDOF Aperture 1x", 64f, new ConfigDescription("The smaller the value is, the shallower the depth of field is at 1x zoom", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 220, IsAdvanced = true }));
302 | OpticDOFAperture2x = Config.Bind(AmandsCinematic, "OpticDOF Aperture 2x", 32f, new ConfigDescription("The smaller the value is, the shallower the depth of field is at 2x zoom", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 210, IsAdvanced = true }));
303 | OpticDOFAperture4x = Config.Bind(AmandsCinematic, "OpticDOF Aperture 4x", 8f, new ConfigDescription("The smaller the value is, the shallower the depth of field is at 4x zoom", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 200, IsAdvanced = true }));
304 | OpticDOFAperture6x = Config.Bind(AmandsCinematic, "OpticDOF Aperture 6x", 5.6f, new ConfigDescription("The smaller the value is, the shallower the depth of field is at 6x zoom and above", new AcceptableValueRange(0.01f, 128f), new ConfigurationManagerAttributes { Order = 190, IsAdvanced = true }));
305 | OpticDOFSpeed = Config.Bind(AmandsCinematic, "OpticDOF Speed", 4f, new ConfigDescription("Animation speed", new AcceptableValueRange(0.1f, 32f), new ConfigurationManagerAttributes { Order = 180, IsAdvanced = true }));
306 | OpticDOFFocalLengthMode = Config.Bind(AmandsCinematic, "OpticDOF FocalLength Mode", EOpticDOFFocalLengthMode.Math, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 170, IsAdvanced = true }));
307 | OpticDOFFocalLength = Config.Bind(AmandsCinematic, "OpticDOF FocalLength", 100f, new ConfigDescription("", new AcceptableValueRange(1f, 500f), new ConfigurationManagerAttributes { Order = 160, IsAdvanced = true }));
308 | OpticDOFKernelSize = Config.Bind(AmandsCinematic, "OpticDOF KernelSize", KernelSize.Medium, new ConfigDescription("This setting determines the maximum radius of bokeh", null, new ConfigurationManagerAttributes { Order = 150, IsAdvanced = true }));
309 | OpticDOFRaycastQuality = Config.Bind(AmandsCinematic, "OpticDOF Raycast Quality", ERaycastQuality.High, new ConfigDescription("Low: Simple LowPoly Raycast\n High: HighPoly Raycast and Target Detection\n Foliage: 2 Raycasts Targets have priority behind foliage", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
310 | OpticDOFDistanceSpeed = Config.Bind(AmandsCinematic, "OpticDOF Distance Speed", 15f, new ConfigDescription("Distance animation speed", new AcceptableValueRange(0.1f, 25f), new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
311 | OpticDOFRaycastDistance = Config.Bind(AmandsCinematic, "OpticDOF Raycast Distance", 1000f, new ConfigDescription("The max distance the ray should check for collisions", new AcceptableValueRange(10f, 10000f), new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
312 | OpticDOFTargetDistance = Config.Bind(AmandsCinematic, "OpticDOF Target Distance", 50.0f, new ConfigDescription("Aiming distance window on spotted target in cm", new AcceptableValueRange(0.0f, 200f), new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
313 |
314 | Flashlight = Config.Bind(AmandsExperimental, "Flashlight", EEnabledFeature.On, new ConfigDescription("EXPERIMENTAL", null, new ConfigurationManagerAttributes { Order = 170 }));
315 | FlashlightRange = Config.Bind(AmandsExperimental, "Flashlight Range", 2f, new ConfigDescription("Flashlights range multiplier", new AcceptableValueRange(0.5f, 4f), new ConfigurationManagerAttributes { Order = 160 }));
316 | FlashlightExtinctionCoef = Config.Bind(AmandsExperimental, "Flashlight ExtinctionCoef", 0.2f, new ConfigDescription("Volumetric extinction coefficient", new AcceptableValueRange(0.001f, 1f), new ConfigurationManagerAttributes { Order = 150 }));
317 |
318 | NVG = Config.Bind(AmandsExperimental, "NVG", EEnabledFeature.On, new ConfigDescription("EXPERIMENTAL", null, new ConfigurationManagerAttributes { Order = 150 }));
319 | NVGTonemap = Config.Bind(AmandsExperimental, "NVG Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 142, IsAdvanced = true }));
320 | NVGAmbientContrast = Config.Bind(AmandsExperimental, "NVG AmbientContrast", 1f, new ConfigDescription("", new AcceptableValueRange(1f, 1.5f), new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
321 | NVGNoiseIntensity = Config.Bind(AmandsExperimental, "NVG Noise Intensity", 0.8f, new ConfigDescription("", new AcceptableValueRange(0f, 2f), new ConfigurationManagerAttributes { Order = 130 }));
322 | NVGOriginalColor = Config.Bind(AmandsExperimental, "NVG Original Color", false, new ConfigDescription("Enables back all default color filters", null, new ConfigurationManagerAttributes { Order = 120 }));
323 | NVGOriginalSkyColor = Config.Bind(AmandsExperimental, "NVG Original Sky Color", 0.1f, new ConfigDescription("Enables back the default sky color for NVG", new AcceptableValueRange(0.001f, 1f), new ConfigurationManagerAttributes { Order = 110 }));
324 | NVGMoonLightIntensity = Config.Bind(AmandsExperimental, "NVG Moon LightIntensity", 1f, new ConfigDescription("", new AcceptableValueRange(0.5f, 2f), new ConfigurationManagerAttributes { Order = 90 }));
325 |
326 | NightAmbientLight = Config.Bind(AmandsExperimental, "Night AmbientLight", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 80 }));
327 | NightAmbientContrast = Config.Bind(AmandsExperimental, "Night AmbientAmbientContrast", 1.1f, new ConfigDescription("", new AcceptableValueRange(1.1f, 1.15f), new ConfigurationManagerAttributes { Order = 70, IsAdvanced = true }));
328 | MysticalGlow = Config.Bind(AmandsExperimental, "MysticalGlow", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 60 }));
329 | MysticalGlowIntensity = Config.Bind(AmandsExperimental, "MysticalGlow Intensity", 0.05f, new ConfigDescription("", new AcceptableValueRange(0.0f, 0.1f), new ConfigurationManagerAttributes { Order = 50, IsAdvanced = true }));
330 |
331 | HealthEffectHit = Config.Bind(AmandsExperimental, "HealthEffect Hit", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 40 }));
332 | HitCAIntensity = Config.Bind(AmandsExperimental, "ChromaticAberration", 0.5f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 30 }));
333 | HitCASpeed = Config.Bind(AmandsExperimental, "ChromaticAberration Speed", 1.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 20, IsAdvanced = true }));
334 | HitCAPower = Config.Bind(AmandsExperimental, "ChromaticAberration Power", 100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 10, IsAdvanced = true }));
335 |
336 | HealthEffectPainkiller = Config.Bind(AmandsExperimental, "HealthEffect Painkiller", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 8 }));
337 | PainkillerSaturation = Config.Bind(AmandsExperimental, "Painkiller Saturation", 0.5f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 6 }));
338 | //PainkillerCAIntensity = Config.Bind(AmandsExperimental, "Painkiller ChromaticAberration", 0.5f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 4 }));
339 | HealthEffectPain = Config.Bind(AmandsExperimental, "HealthEffect Pain", EEnabledFeature.Off, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 4 }));
340 | SunMeshBrightness = Config.Bind(AmandsExperimental, "SunMeshBrightness", 2.0f, new ConfigDescription("", new AcceptableValueRange(0.25f, 3.0f), new ConfigurationManagerAttributes { Order = 2 }));
341 | SkyBrightness = Config.Bind(AmandsExperimental, "SkyBrightness", 1.0f, new ConfigDescription("", new AcceptableValueRange(0.1f, 2.0f), new ConfigurationManagerAttributes { Order = 1 }));
342 |
343 | Brightness = Config.Bind(AmandsFeatures, "Brightness", 0.5f, new ConfigDescription("EXPERIMENTAL", new AcceptableValueRange(0f, 1f), new ConfigurationManagerAttributes { Order = 340 }));
344 | Tonemap = Config.Bind(AmandsFeatures, "Tonemap", EGlobalTonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 330 }));
345 | UseBSGLUT = Config.Bind(AmandsFeatures, "Use BSG LUT", false, new ConfigDescription("Enabling this will revert the mod changes", null, new ConfigurationManagerAttributes { Order = 320, IsAdvanced = true }));
346 | BloomIntensity = Config.Bind(AmandsFeatures, "Bloom Intensity", 0.5f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 310 }));
347 | UseBSGCC_Vintage = Config.Bind(AmandsFeatures, "Use BSG CC_Vintage", false, new ConfigDescription("Enabling this will revert the mod changes", null, new ConfigurationManagerAttributes { Order = 300, IsAdvanced = true }));
348 | UseBSGCC_Sharpen = Config.Bind(AmandsFeatures, "Use BSG CC_Sharpen", false, new ConfigDescription("Enabling this will revert the mod changes", null, new ConfigurationManagerAttributes { Order = 290, IsAdvanced = true }));
349 | UseBSGGlobalFog = Config.Bind(AmandsFeatures, "Use BSG GlobalFog", false, new ConfigDescription("Enabling this will revert the mod changes", null, new ConfigurationManagerAttributes { Order = 260, IsAdvanced = true }));
350 | UseBSGColorCorrectionCurves = Config.Bind(AmandsFeatures, "Use BSG ColorCorrection", false, new ConfigDescription("Enabling this will revert the mod changes", null, new ConfigurationManagerAttributes { Order = 250, IsAdvanced = true }));
351 | LightsUseLinearIntensity = Config.Bind(AmandsFeatures, "LightsUseLinearIntensity", false, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 240 }));
352 | SunColor = Config.Bind(AmandsFeatures, "SunColor", true, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 230 }));
353 | SkyColor = Config.Bind(AmandsFeatures, "SkyColor", true, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 220 }));
354 |
355 | GroundZeroFogLevel = Config.Bind("GroundZero", "Fog Level", -250.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 210 }));
356 | GroundZeroTonemap = Config.Bind("GroundZero", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 209 }));
357 | GroundZeroACES = Config.Bind("GroundZero", "ACES", new Vector3(25, 0.2f, 25), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 208, IsAdvanced = true }));
358 | GroundZeroACESS = Config.Bind("GroundZero", "ACESS", new Vector3(0, 1.1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 200, IsAdvanced = true }));
359 | GroundZeroFilmic = Config.Bind("GroundZero", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 190, IsAdvanced = true }));
360 | GroundZeroFilmicS = Config.Bind("GroundZero", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 180, IsAdvanced = true }));
361 | GroundZeroMysticalGlowIntensity = Config.Bind("GroundZero", "MysticalGlow Intensity", 0.75f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 170, IsAdvanced = true }));
362 |
363 | StreetsFogLevel = Config.Bind("Streets", "Fog Level", -250.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
364 | StreetsTonemap = Config.Bind("Streets", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
365 | StreetsACES = Config.Bind("Streets", "ACES", new Vector3(25, 0.2f, 25), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
366 | StreetsACESS = Config.Bind("Streets", "ACESS", new Vector3(0, 1.1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
367 | StreetsFilmic = Config.Bind("Streets", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
368 | StreetsFilmicS = Config.Bind("Streets", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
369 | StreetsMysticalGlowIntensity = Config.Bind("Streets", "MysticalGlow Intensity", 0.75f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
370 |
371 | LabsTonemap = Config.Bind("Labs", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
372 | LabsACES = Config.Bind("Labs", "ACES", new Vector3(20, 0.4f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
373 | LabsACESS = Config.Bind("Labs", "ACESS", new Vector3(0, 1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
374 | LabsFilmic = Config.Bind("Labs", "Filmic", new Vector3(8f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
375 | LabsFilmicS = Config.Bind("Labs", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
376 | LabsHBAOIntensity = Config.Bind("Labs", "HBAO Intensity", 0.5f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
377 | LabsHBAOSaturation = Config.Bind("Labs", "HBAO Saturation", 1.5f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 90, IsAdvanced = true }));
378 | LabsHBAOAlbedoMultiplier = Config.Bind("Labs", "HBAO Albedo Multiplier", 2f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 80, IsAdvanced = true }));
379 |
380 | CustomsFogLevel = Config.Bind("Customs", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
381 | CustomsTonemap = Config.Bind("Customs", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
382 | CustomsACES = Config.Bind("Customs", "ACES", new Vector3(20, 0.2f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
383 | CustomsACESS = Config.Bind("Customs", "ACESS", new Vector3(0, 1, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
384 | CustomsFilmic = Config.Bind("Customs", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
385 | CustomsFilmicS = Config.Bind("Customs", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
386 | CustomsMysticalGlowIntensity = Config.Bind("Customs", "MysticalGlow Intensity", 1.0f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
387 |
388 | FactoryTonemap = Config.Bind("Factory", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 170 }));
389 | FactoryACES = Config.Bind("Factory", "ACES", new Vector3(25f, 0.6f, 25f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160, IsAdvanced = true }));
390 | FactoryACESS = Config.Bind("Factory", "ACESS", new Vector3(0, 1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150, IsAdvanced = true }));
391 | FactoryFilmic = Config.Bind("Factory", "Filmic", new Vector3(5f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
392 | FactoryFilmicS = Config.Bind("Factory", "FilmicS", new Vector3(0, 0.3f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
393 |
394 | FactoryNightTonemap = Config.Bind("FactoryNight", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 170 }));
395 | FactoryNightACES = Config.Bind("FactoryNight", "ACES", new Vector3(25f, 0.6f, 25f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160, IsAdvanced = true }));
396 | FactoryNightACESS = Config.Bind("FactoryNight", "ACESS", new Vector3(0, 1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150, IsAdvanced = true }));
397 | FactoryNightFilmic = Config.Bind("FactoryNight", "Filmic", new Vector3(5f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
398 | FactoryNightFilmicS = Config.Bind("FactoryNight", "FilmicS", new Vector3(0, 0.26f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
399 |
400 | LighthouseFogLevel = Config.Bind("Lighthouse", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
401 | LighthouseTonemap = Config.Bind("Lighthouse", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
402 | LighthouseACES = Config.Bind("Lighthouse", "ACES", new Vector3(20, 0.2f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
403 | LighthouseACESS = Config.Bind("Lighthouse", "ACESS", new Vector3(0, 1, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
404 | LighthouseFilmic = Config.Bind("Lighthouse", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
405 | LighthouseFilmicS = Config.Bind("Lighthouse", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
406 | LighthouseMysticalGlowIntensity = Config.Bind("Lighthouse", "MysticalGlow Intensity", 0.75f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
407 |
408 | InterchangeNightAmbientContrast = Config.Bind("Interchange", "Night AmbientAmbientContrast", 1.14f, new ConfigDescription("", new AcceptableValueRange(1.1f, 1.15f), new ConfigurationManagerAttributes { Order = 170 }));
409 | InterchangeFogLevel = Config.Bind("Interchange", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
410 | InterchangeNVGNoiseIntensity = Config.Bind("Interchange", "NVG Noise Intensity", 0.25f, new ConfigDescription("", new AcceptableValueRange(0f, 1f), new ConfigurationManagerAttributes { Order = 158 }));
411 | InterchangeNVGAmbientContrast = Config.Bind("Interchange", "NVG AmbientContrast", 1.1f, new ConfigDescription("", new AcceptableValueRange(1f, 1.5f), new ConfigurationManagerAttributes { Order = 156 }));
412 | InterchangeNVGOriginalSkyColor = Config.Bind("Interchange", "NVG Original Sky Color", 0.7f, new ConfigDescription("Enables back the default sky color for NVG", new AcceptableValueRange(0.001f, 1f), new ConfigurationManagerAttributes { Order = 154, IsAdvanced = true }));
413 | InterchangeTonemap = Config.Bind("Interchange", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
414 | InterchangeACES = Config.Bind("Interchange", "ACES", new Vector3(20, 0.2f, 18), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
415 | InterchangeACESS = Config.Bind("Interchange", "ACESS", new Vector3(0, 1f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
416 | InterchangeFilmic = Config.Bind("Interchange", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
417 | InterchangeFilmicS = Config.Bind("Interchange", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
418 | InterchangeMysticalGlowIntensity = Config.Bind("Interchange", "MysticalGlow Intensity", 0.45f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
419 |
420 | WoodsFogLevel = Config.Bind("Woods", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
421 | WoodsTonemap = Config.Bind("Woods", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
422 | WoodsACES = Config.Bind("Woods", "ACES", new Vector3(20, 0.2f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
423 | WoodsACESS = Config.Bind("Woods", "ACESS", new Vector3(0, 1, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
424 | WoodsFilmic = Config.Bind("Woods", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
425 | WoodsFilmicS = Config.Bind("Woods", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
426 | WoodsMysticalGlowIntensity = Config.Bind("Woods", "MysticalGlow Intensity", 1.25f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
427 |
428 | ReserveFogLevel = Config.Bind("Reserve", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
429 | ReserveTonemap = Config.Bind("Reserve", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
430 | ReserveACES = Config.Bind("Reserve", "ACES", new Vector3(20, 0.2f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
431 | ReserveACESS = Config.Bind("Reserve", "ACESS", new Vector3(0, 0.85f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
432 | ReserveFilmic = Config.Bind("Reserve", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
433 | ReserveFilmicS = Config.Bind("Reserve", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
434 | ReserveMysticalGlowIntensity = Config.Bind("Reserve", "MysticalGlow Intensity", 0.75f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
435 |
436 | ShorelineFogLevel = Config.Bind("Shoreline", "Fog Level", -100.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
437 | ShorelineTonemap = Config.Bind("Shoreline", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150 }));
438 | ShorelineACES = Config.Bind("Shoreline", "ACES", new Vector3(20, 0.2f, 20), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
439 | ShorelineACESS = Config.Bind("Shoreline", "ACESS", new Vector3(0, 1, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
440 | ShorelineFilmic = Config.Bind("Shoreline", "Filmic", new Vector3(10f, 2f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
441 | ShorelineFilmicS = Config.Bind("Shoreline", "FilmicS", new Vector3(0, 0.4f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
442 | ShorelineMysticalGlowIntensity = Config.Bind("Shoreline", "MysticalGlow Intensity", 0.5f, new ConfigDescription("", new AcceptableValueRange(0.0f, 2.0f), new ConfigurationManagerAttributes { Order = 100, IsAdvanced = true }));
443 |
444 | HideoutTonemap = Config.Bind("Hideout", "Tonemap", ETonemap.ACES, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160 }));
445 | HideoutACES = Config.Bind("Hideout", "ACES", new Vector3(8, -0.1f, 8), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150, IsAdvanced = true }));
446 | HideoutACESS = Config.Bind("Hideout", "ACESS", new Vector3(0, 0.85f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
447 | HideoutFilmic = Config.Bind("Hideout", "Filmic", new Vector3(4f, 2.1f, 1.75f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
448 | HideoutFilmicS = Config.Bind("Hideout", "FilmicS", new Vector3(0, 0.65f, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
449 | HideoutSkyColor = Config.Bind("Hideout", "SkyColor", new Vector4(0.6f, 0.6f, 0.6f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
450 |
451 | LightColorIndex0 = Config.Bind("AmandsGraphics LightColor", "Index0", new Vector4(232.0f, 240.0f, 255.0f) / 255.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 160, IsAdvanced = true }));
452 | LightColorIndex1 = Config.Bind("AmandsGraphics LightColor", "Index1", new Vector4(0, 0, 0), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 150, IsAdvanced = true }));
453 | //LightColorIndex2 = Config.Bind("AmandsGraphics LightColor", "Index2", new Vector4(255.0f, 186.0f, 168.0f) / 255.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
454 | LightColorIndex2 = Config.Bind("AmandsGraphics LightColor", "Index2", new Vector4(1.0f, 0.457f, 0.322f, 1.0f), new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 140, IsAdvanced = true }));
455 | LightColorIndex3 = Config.Bind("AmandsGraphics LightColor", "Index3", new Vector4(219.0f, 191.0f, 160.0f) / 255.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 130, IsAdvanced = true }));
456 | LightColorIndex4 = Config.Bind("AmandsGraphics LightColor", "Index4", new Vector4(255.0f, 238.0f, 196.0f) / 255.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 120, IsAdvanced = true }));
457 | LightColorIndex5 = Config.Bind("AmandsGraphics LightColor", "Index5", new Vector4(150.0f, 143.0f, 122.0f) / 255.0f, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 110, IsAdvanced = true }));
458 |
459 | if (RequestDefaultValues) DefaultValues();
460 |
461 | new AmandsPlayerPatch().Enable();
462 | new AmandsGraphicsNVGPatch().Enable();
463 | new AmandsGraphicsApplyNVGPatch().Enable();
464 | new AmandsGraphicsHBAOPatch().Enable();
465 | new AmandsGraphicsPrismEffectsPatch().Enable();
466 | new AmandsGraphicsOpticPatch().Enable();
467 | new AmandsGraphicsOpticSightPatch().Enable();
468 | new AmandsGraphicsCameraClassPatch().Enable();
469 | new AmandsGraphicsmethod_25Patch().Enable();
470 | new AmandsGraphicsTacticalComboVisualControllerPatch().Enable();
471 | new AmandsGraphicsFastBlurPatch().Enable();
472 | new AmandsGraphicsMethod_7Patch().Enable();
473 | new AmandsGraphicsFastBlurHitPatch().Enable();
474 | new AmandsBattleUIScreenPatch().Enable();
475 | new AmandsEffectsControllerPatch().Enable();
476 | }
477 | private void DefaultValues()
478 | {
479 | LabsACES.Value = (Vector3)LabsACES.DefaultValue;
480 | LabsACESS.Value = (Vector3)LabsACESS.DefaultValue;
481 | LabsFilmicS.Value = (Vector3)LabsFilmicS.DefaultValue;
482 | FactoryACES.Value = (Vector3)FactoryACES.DefaultValue;
483 | FactoryACESS.Value = (Vector3)FactoryACESS.DefaultValue;
484 | FactoryFilmic.Value = (Vector3)FactoryFilmic.DefaultValue;
485 | FactoryNightACES.Value = (Vector3)FactoryNightACES.DefaultValue;
486 | FactoryNightACESS.Value = (Vector3)FactoryNightACESS.DefaultValue;
487 | FactoryNightFilmic.Value = (Vector3)FactoryNightFilmic.DefaultValue;
488 | FactoryNightFilmicS.Value = (Vector3)FactoryNightFilmicS.DefaultValue;
489 | }
490 | }
491 | public class AmandsPlayerPatch : ModulePatch
492 | {
493 | protected override MethodBase GetTargetMethod()
494 | {
495 | return typeof(Player).GetMethod("Init", BindingFlags.Instance | BindingFlags.Public);
496 | }
497 | [PatchPostfix]
498 | private static void PatchPostFix(ref Player __instance)
499 | {
500 | if (__instance != null && __instance.IsYourPlayer)
501 | {
502 | AmandsGraphicsClass.Player = __instance;
503 | }
504 | }
505 | }
506 | public class AmandsGraphicsNVGPatch : ModulePatch
507 | {
508 | protected override MethodBase GetTargetMethod()
509 | {
510 | return typeof(BSG.CameraEffects.NightVision).GetMethods(BindingFlags.Instance | BindingFlags.Public).First(x => x.GetParameters().Count() == 1 && x.GetParameters()[0].Name == "on" && x.Name != "StartSwitch");
511 | }
512 | [PatchPostfix]
513 | private static void PatchPostFix(ref BSG.CameraEffects.NightVision __instance, bool on)
514 | {
515 | if (AmandsGraphicsPlugin.AmandsGraphicsClassComponent.GraphicsMode && AmandsGraphicsClass.Player != null && AmandsGraphicsClass.NVG != on && AmandsGraphicsClass.FPSCameraNightVision != null)
516 | {
517 | AmandsGraphicsClass.NVG = on;
518 | AmandsGraphicsPlugin.AmandsGraphicsClassComponent.UpdateAmandsGraphics();
519 | }
520 | AmandsGraphicsClass.NVG = on;
521 | }
522 | }
523 | public class AmandsGraphicsApplyNVGPatch : ModulePatch
524 | {
525 | protected override MethodBase GetTargetMethod()
526 | {
527 | return typeof(BSG.CameraEffects.NightVision).GetMethod("StartSwitch", BindingFlags.Instance | BindingFlags.Public);
528 | }
529 | [PatchPostfix]
530 | private static void PatchPostFix(ref BSG.CameraEffects.NightVision __instance)
531 | {
532 | if (AmandsGraphicsPlugin.AmandsGraphicsClassComponent.GraphicsMode && AmandsGraphicsClass.Player != null)
533 | {
534 | AmandsGraphicsClass.defaultNightVisionNoiseIntensity = __instance.NoiseIntensity;
535 | switch (AmandsGraphicsClass.scene)
536 | {
537 | case "Shopping_Mall_Terrain":
538 | __instance.NoiseIntensity = AmandsGraphicsClass.defaultNightVisionNoiseIntensity * AmandsGraphicsPlugin.InterchangeNVGNoiseIntensity.Value;
539 | break;
540 | default:
541 | __instance.NoiseIntensity = AmandsGraphicsClass.defaultNightVisionNoiseIntensity * AmandsGraphicsPlugin.NVGNoiseIntensity.Value;
542 | break;
543 | }
544 | __instance.ApplySettings();
545 | }
546 | }
547 | }
548 | public class AmandsGraphicsHBAOPatch : ModulePatch
549 | {
550 | protected override MethodBase GetTargetMethod()
551 | {
552 | return typeof(HBAO_Core).GetMethod("ApplyPreset", BindingFlags.Instance | BindingFlags.Public);
553 | }
554 | [PatchPostfix]
555 | private static void PatchPostFix(ref HBAO_Core __instance, HBAO_Core.Preset preset)
556 | {
557 | AmandsGraphicsClass.defaultFPSCameraHBAOAOSettings = __instance.aoSettings;
558 | AmandsGraphicsClass.defaultFPSCameraHBAOColorBleedingSettings = __instance.colorBleedingSettings;
559 | AmandsGraphicsClass.FPSCameraHBAOAOSettings = __instance.aoSettings;
560 | AmandsGraphicsClass.FPSCameraHBAOColorBleedingSettings = __instance.colorBleedingSettings;
561 | }
562 | }
563 | public class AmandsGraphicsPrismEffectsPatch : ModulePatch
564 | {
565 | protected override MethodBase GetTargetMethod()
566 | {
567 | return typeof(PrismEffects).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.Public);
568 | }
569 | [PatchPostfix]
570 | private static void PatchPostFix(ref PrismEffects __instance)
571 | {
572 | if (__instance.gameObject.name == "FPS Camera")
573 | {
574 | AmandsGraphicsPlugin.AmandsGraphicsClassComponent.GraphicsMode = false;
575 | OnEnableASync(__instance);
576 | }
577 | }
578 | private async static void OnEnableASync(PrismEffects instance)
579 | {
580 | await Task.Delay(100);
581 | AmandsGraphicsPlugin.AmandsGraphicsClassComponent.ActivateAmandsGraphics(instance.gameObject, instance);
582 | }
583 | }
584 | public class AmandsGraphicsOpticPatch : ModulePatch
585 | {
586 | protected override MethodBase GetTargetMethod()
587 | {
588 | return typeof(OpticComponentUpdater).GetMethod("Awake", BindingFlags.Instance | BindingFlags.Public);
589 | }
590 | [PatchPostfix]
591 | private static void PatchPostFix(ref OpticComponentUpdater __instance)
592 | {
593 | if (__instance.gameObject.name == "BaseOpticCamera(Clone)")
594 | {
595 | AmandsGraphicsPlugin.AmandsGraphicsClassComponent.ActivateAmandsOpticDepthOfField(__instance.gameObject);
596 | AmandsGraphicsClass.OpticCameraCamera = __instance.GetComponent();
597 | AmandsGraphicsClass.OpticCameraThermalVision = __instance.GetComponent();
598 | }
599 | }
600 | }
601 | public class AmandsGraphicsOpticSightPatch : ModulePatch
602 | {
603 | protected override MethodBase GetTargetMethod()
604 | {
605 | return typeof(OpticSight).GetMethod("OnEnable", BindingFlags.Instance | BindingFlags.Public);
606 | }
607 | [PatchPostfix]
608 | private static void PatchPostFix(ref OpticSight __instance)
609 | {
610 | //AmandsGraphicsClass.opticSight = __instance;
611 | foreach (Transform transform in __instance.gameObject.transform.GetChildren())
612 | {
613 | if (transform.name.Contains("backLens")) AmandsGraphicsClass.backLens = transform;
614 | }
615 | SightModVisualControllers sightModVisualControllers = __instance.gameObject.GetComponentInParent();
616 | if (sightModVisualControllers != null)
617 | {
618 | AmandsGraphicsClass.sightComponent = sightModVisualControllers.SightMod;
619 | }
620 | }
621 | }
622 | public class AmandsGraphicsCameraClassPatch : ModulePatch
623 | {
624 | protected override MethodBase GetTargetMethod()
625 | {
626 | return typeof(CameraClass).GetMethod("Blur", BindingFlags.Instance | BindingFlags.Public);
627 | }
628 | [PatchPrefix]
629 | private static bool PatchPrefix(ref CameraClass __instance, bool isActive, float time)
630 | {
631 | AmandsGraphicsClass.CameraClassBlur = isActive;
632 | if (!isActive && __instance.IsActive)
633 | {
634 | return true;
635 | }
636 | return AmandsGraphicsPlugin.UIDepthOfField.Value == EUIDepthOfField.Off;
637 | }
638 | }
639 | public class AmandsGraphicsmethod_25Patch : ModulePatch
640 | {
641 | protected override MethodBase GetTargetMethod()
642 | {
643 | return typeof(EFT.Animations.ProceduralWeaponAnimation).GetMethods(BindingFlags.Instance | BindingFlags.Public).First(x => x.GetParameters().Count() == 1 && x.GetParameters()[0].Name == "currentScopeIndex");
644 | }
645 | [PatchPostfix]
646 | private static void PatchPostFix(ref EFT.Animations.ProceduralWeaponAnimation __instance)
647 | {
648 | if (AmandsGraphicsClass.Player != null && AmandsGraphicsClass.Player.ProceduralWeaponAnimation == __instance)
649 | {
650 | object CurrentScope = Traverse.Create(AmandsGraphicsClass.Player.ProceduralWeaponAnimation).Property("CurrentScope").GetValue();
651 | if (CurrentScope != null)
652 | {
653 | ScopePrefabCache scopePrefabCache = Traverse.Create(CurrentScope).Field("ScopePrefabCache").GetValue();
654 | if (scopePrefabCache != null)
655 | {
656 | SightComponent Mod = Traverse.Create(CurrentScope).Field("Mod").GetValue();
657 | if (Mod != null && Mod.SelectedScopeIndex == 0)
658 | {
659 | AmandsGraphicsClass.aimingMode = EAimingMode.Sight;
660 | }
661 | else
662 | {
663 | AmandsGraphicsClass.aimingMode = EAimingMode.IronSight;
664 | }
665 | }
666 | else
667 | {
668 | AmandsGraphicsClass.aimingMode = EAimingMode.IronSight;
669 | }
670 | }
671 | }
672 | }
673 | }
674 | public class AmandsGraphicsTacticalComboVisualControllerPatch : ModulePatch
675 | {
676 | protected override MethodBase GetTargetMethod()
677 | {
678 | return typeof(TacticalComboVisualController).GetMethod("UpdateBeams", BindingFlags.Instance | BindingFlags.Public);
679 | }
680 | [PatchPostfix]
681 | private static void PatchPostFix(ref TacticalComboVisualController __instance)
682 | {
683 | if (AmandsGraphicsPlugin.Flashlight.Value == EEnabledFeature.On && AmandsGraphicsClass.Player != null && Vector3.Distance(__instance.transform.position, AmandsGraphicsClass.Player.Position) < 5f && AmandsGraphicsClass.Player.HandsController != null && __instance.transform.IsChildOf(AmandsGraphicsClass.Player.HandsController.WeaponRoot))
684 | {
685 | foreach (Light light in Traverse.Create(__instance).Field("light_0").GetValue())
686 | {
687 | if (!AmandsGraphicsClass.registeredLights.ContainsKey(light))
688 | {
689 | AmandsGraphicsClass.registeredLights.Add(light,light.range);
690 | }
691 | if (AmandsGraphicsPlugin.AmandsGraphicsClassComponent.GraphicsMode) light.range = AmandsGraphicsClass.registeredLights[light] * AmandsGraphicsPlugin.FlashlightRange.Value;
692 | VolumetricLight volumetricLight = light.GetComponent();
693 | if (volumetricLight != null)
694 | {
695 | if (!AmandsGraphicsClass.registeredVolumetricLights.ContainsKey(volumetricLight))
696 | {
697 | AmandsGraphicsClass.registeredVolumetricLights.Add(volumetricLight, volumetricLight.ExtinctionCoef);
698 | }
699 | if (AmandsGraphicsPlugin.AmandsGraphicsClassComponent.GraphicsMode)
700 | {
701 | volumetricLight.ExtinctionCoef = AmandsGraphicsPlugin.FlashlightExtinctionCoef.Value;
702 | if (volumetricLight.VolumetricMaterial != null)
703 | {
704 | volumetricLight.VolumetricMaterial.SetVector("_VolumetricLight", new Vector4(volumetricLight.ScatteringCoef, volumetricLight.ExtinctionCoef, AmandsGraphicsPlugin.FlashlightRange.Value, 1f - volumetricLight.SkyboxExtinctionCoef));
705 | }
706 | }
707 | }
708 | }
709 | }
710 | }
711 | }
712 | public class AmandsGraphicsFastBlurPatch : ModulePatch
713 | {
714 | protected override MethodBase GetTargetMethod()
715 | {
716 | return typeof(FastBlur).GetMethod("Start", BindingFlags.Instance | BindingFlags.Public);
717 | }
718 | [PatchPostfix]
719 | private static void PatchPostFix(ref FastBlur __instance)
720 | {
721 | if (__instance.gameObject.name == "FPS Camera")
722 | {
723 | AmandsGraphicsClass.fastBlur = __instance;
724 | PostProcessLayer FPSCameraPostProcessLayer = __instance.gameObject.GetComponent();
725 | if (FPSCameraPostProcessLayer != null)
726 | {
727 | AmandsGraphicsClass.FPSCameraChromaticAberration = Traverse.Create(FPSCameraPostProcessLayer).Field("m_Bundles").GetValue>()[typeof(UnityEngine.Rendering.PostProcessing.ChromaticAberration)].settings as UnityEngine.Rendering.PostProcessing.ChromaticAberration;
728 | AmandsGraphicsClass.FPSCameraChromaticAberration.enabled.value = false;
729 | }
730 | }
731 | }
732 | }
733 | public class AmandsGraphicsMethod_7Patch : ModulePatch
734 | {
735 | protected override MethodBase GetTargetMethod()
736 | {
737 | return typeof(EffectsController).GetMethod("method_7", BindingFlags.Instance | BindingFlags.Public);
738 | }
739 | [PatchPostfix]
740 | private static void PatchPostFix(ref EffectsController __instance)
741 | {
742 | if (AmandsGraphicsClass.fastBlur != null && AmandsGraphicsPlugin.HealthEffectHit.Value == EEnabledFeature.On)
743 | {
744 | AmandsGraphicsClass.fastBlur.enabled = false;
745 | }
746 | }
747 | }
748 | public class AmandsGraphicsFastBlurHitPatch : ModulePatch
749 | {
750 | protected override MethodBase GetTargetMethod()
751 | {
752 | return typeof(FastBlur).GetMethod("Hit", BindingFlags.Instance | BindingFlags.Public);
753 | }
754 | [PatchPostfix]
755 | private static void PatchPostFix(ref FastBlur __instance, float power)
756 | {
757 | if (AmandsGraphicsPlugin.HealthEffectHit.Value == EEnabledFeature.On)
758 | {
759 | AmandsGraphicsPlugin.AmandsGraphicsClassComponent.AmandsGraphicsHitEffect(power);
760 | }
761 | }
762 | }
763 | public class AmandsBattleUIScreenPatch : ModulePatch
764 | {
765 | protected override MethodBase GetTargetMethod()
766 | {
767 | return typeof(EFT.UI.EftBattleUIScreen).GetMethods(BindingFlags.Instance | BindingFlags.Public).First(x => x.Name == "Show" && x.GetParameters()[0].Name == "owner");
768 | }
769 | [PatchPostfix]
770 | private static void PatchPostFix(ref EFT.UI.EftBattleUIScreen __instance)
771 | {
772 | if (AmandsGraphicsClass.ActiveUIScreen == __instance.gameObject) return;
773 | AmandsGraphicsClass.ActiveUIScreen = __instance.gameObject;
774 | AmandsGraphicsClass.DestroyGameObjects();
775 | AmandsGraphicsClass.CreateGameObjects(__instance.transform);
776 | }
777 | }
778 | public class AmandsEffectsControllerPatch : ModulePatch
779 | {
780 | protected override MethodBase GetTargetMethod()
781 | {
782 | return typeof(EffectsController).GetMethod("Awake", BindingFlags.Instance | BindingFlags.Public);
783 | }
784 | [PatchPostfix]
785 | private static void PatchPostFix(ref EffectsController __instance)
786 | {
787 | if (AmandsGraphicsPlugin.PainKillerEffectType == null || AmandsGraphicsPlugin.PainEffectType == null)
788 | {
789 | object EffectsList = Traverse.Create(__instance).Field("list_0").GetValue();
790 | object[] EffectsListItems = Traverse.Create(EffectsList).Field("_items").GetValue();
791 | if (EffectsListItems != null)
792 | {
793 | foreach (object Effect in EffectsListItems)
794 | {
795 | if (AmandsGraphicsPlugin.PainKillerEffectType == null && Traverse.Create(Effect).Field("float_4").FieldExists())
796 | {
797 | CC_Sharpen cc_Sharpen_0 = Traverse.Create(Effect).Field("cc_Sharpen_0").GetValue();
798 | if (cc_Sharpen_0 != null)
799 | {
800 | AmandsGraphicsPlugin.PainKillerEffectType = Effect.GetType();
801 | new AmandsPainkillerAddEffectPatch().Enable();
802 | new AmandsPainkillerDeleteEffectPatch().Enable();
803 | continue;
804 | }
805 | }
806 | if (AmandsGraphicsPlugin.PainEffectType == null && Traverse.Create(Effect).Field("cc_RadialBlur_0").FieldExists())
807 | {
808 | AmandsGraphicsPlugin.PainEffectType = Effect.GetType();
809 | new AmandsPainTogglePatch().Enable();
810 | continue;
811 | }
812 | }
813 | }
814 | }
815 | }
816 | }
817 | public class AmandsPainkillerAddEffectPatch : ModulePatch
818 | {
819 | protected override MethodBase GetTargetMethod()
820 | {
821 | return AmandsGraphicsPlugin.PainKillerEffectType.GetMethod("AddEffect", BindingFlags.Instance | BindingFlags.Public);
822 | }
823 | [PatchPostfix]
824 | private static void PatchPostFix(ref object __instance)
825 | {
826 | if (AmandsGraphicsPlugin.HealthEffectPainkiller.Value == EEnabledFeature.On)
827 | {
828 | List ActiveEffects = Traverse.Create(__instance).Field("ActiveEffects").GetValue>();
829 | if (ActiveEffects != null)
830 | {
831 | /*bool bool_1 = Traverse.Create(__instance).Field("bool_1").GetValue();
832 | float float_2 = Traverse.Create(__instance).Field("float_2").GetValue();*/
833 |
834 | float maxEffectValue;
835 | if (ActiveEffects.Count <= 0)
836 | {
837 | maxEffectValue = 0f;
838 | }
839 | else
840 | {
841 | maxEffectValue = Mathf.Min(1.0f * AmandsGraphicsPlugin.PainkillerSaturation.Value, 1f);
842 | }
843 | Traverse.Create(__instance).Field("MaxEffectValue").SetValue(maxEffectValue);
844 | /*if (bool_1)
845 | {
846 | Traverse.Create(__instance).Field("float_3").SetValue((ActiveEffects.Count > 0) ? 0.015f * AmandsGraphicsPlugin.PainkillerCAIntensity.Value : float_2);
847 | }*/
848 | }
849 | }
850 | }
851 | }
852 | public class AmandsPainkillerDeleteEffectPatch : ModulePatch
853 | {
854 | protected override MethodBase GetTargetMethod()
855 | {
856 | return AmandsGraphicsPlugin.PainKillerEffectType.GetMethod("DeleteEffect", BindingFlags.Instance | BindingFlags.Public);
857 | }
858 | [PatchPostfix]
859 | private static void PatchPostFix(ref object __instance)
860 | {
861 | if (AmandsGraphicsPlugin.HealthEffectPainkiller.Value == EEnabledFeature.On)
862 | {
863 | List ActiveEffects = Traverse.Create(__instance).Field("ActiveEffects").GetValue>();
864 | if (ActiveEffects != null)
865 | {
866 | /*bool bool_1 = Traverse.Create(__instance).Field("bool_1").GetValue