From cdaa56f87d016f934121fca9f534bc41ea1128d5 Mon Sep 17 00:00:00 2001 From: derplayer Date: Mon, 14 Dec 2020 21:14:27 +0100 Subject: [PATCH] * Initial Commit --- .gitattributes | 63 +++++ .gitignore | 261 ++++++++++++++++++ ConfigOverhaulCyberpunk.sln | 25 ++ Source/App.config | 6 + Source/Assets/FeatureList.csv | 103 ++++++++ Source/ConfigOverhaulCyberpunk.csproj | 108 ++++++++ Source/FodyWeavers.xml | 3 + Source/MainForm.Designer.cs | 140 ++++++++++ Source/MainForm.cs | 334 ++++++++++++++++++++++++ Source/MainForm.resx | 123 +++++++++ Source/Program.cs | 22 ++ Source/Properties/AssemblyInfo.cs | 36 +++ Source/Properties/Resources.Designer.cs | 85 ++++++ Source/Properties/Resources.resx | 124 +++++++++ Source/Properties/Settings.Designer.cs | 26 ++ Source/Properties/Settings.settings | 7 + Source/packages.config | 6 + 17 files changed, 1472 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 ConfigOverhaulCyberpunk.sln create mode 100644 Source/App.config create mode 100644 Source/Assets/FeatureList.csv create mode 100644 Source/ConfigOverhaulCyberpunk.csproj create mode 100644 Source/FodyWeavers.xml create mode 100644 Source/MainForm.Designer.cs create mode 100644 Source/MainForm.cs create mode 100644 Source/MainForm.resx create mode 100644 Source/Program.cs create mode 100644 Source/Properties/AssemblyInfo.cs create mode 100644 Source/Properties/Resources.Designer.cs create mode 100644 Source/Properties/Resources.resx create mode 100644 Source/Properties/Settings.Designer.cs create mode 100644 Source/Properties/Settings.settings create mode 100644 Source/packages.config diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..1ff0c42 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,63 @@ +############################################################################### +# Set default behavior to automatically normalize line endings. +############################################################################### +* text=auto + +############################################################################### +# Set default behavior for command prompt diff. +# +# This is need for earlier builds of msysgit that does not have it on by +# default for csharp files. +# Note: This is only used by command line +############################################################################### +#*.cs diff=csharp + +############################################################################### +# Set the merge driver for project and solution files +# +# Merging from the command prompt will add diff markers to the files if there +# are conflicts (Merging from VS is not affected by the settings below, in VS +# the diff markers are never inserted). Diff markers may cause the following +# file extensions to fail to load in VS. An alternative would be to treat +# these files as binary and thus will always conflict and require user +# intervention with every merge. To do so, just uncomment the entries below +############################################################################### +#*.sln merge=binary +#*.csproj merge=binary +#*.vbproj merge=binary +#*.vcxproj merge=binary +#*.vcproj merge=binary +#*.dbproj merge=binary +#*.fsproj merge=binary +#*.lsproj merge=binary +#*.wixproj merge=binary +#*.modelproj merge=binary +#*.sqlproj merge=binary +#*.wwaproj merge=binary + +############################################################################### +# behavior for image files +# +# image files are treated as binary by default. +############################################################################### +#*.jpg binary +#*.png binary +#*.gif binary + +############################################################################### +# diff behavior for common document formats +# +# Convert binary document formats to text before diffing them. This feature +# is only available from the command line. Turn it on by uncommenting the +# entries below. +############################################################################### +#*.doc diff=astextplain +#*.DOC diff=astextplain +#*.docx diff=astextplain +#*.DOCX diff=astextplain +#*.dot diff=astextplain +#*.DOT diff=astextplain +#*.pdf diff=astextplain +#*.PDF diff=astextplain +#*.rtf diff=astextplain +#*.RTF diff=astextplain diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3c4efe2 --- /dev/null +++ b/.gitignore @@ -0,0 +1,261 @@ +## Ignore Visual Studio temporary files, build results, and +## files generated by popular Visual Studio add-ons. + +# User-specific files +*.suo +*.user +*.userosscache +*.sln.docstates + +# User-specific files (MonoDevelop/Xamarin Studio) +*.userprefs + +# Build results +[Dd]ebug/ +[Dd]ebugPublic/ +[Rr]elease/ +[Rr]eleases/ +x64/ +x86/ +bld/ +[Bb]in/ +[Oo]bj/ +[Ll]og/ + +# Visual Studio 2015 cache/options directory +.vs/ +# Uncomment if you have tasks that create the project's static files in wwwroot +#wwwroot/ + +# MSTest test Results +[Tt]est[Rr]esult*/ +[Bb]uild[Ll]og.* + +# NUNIT +*.VisualState.xml +TestResult.xml + +# Build Results of an ATL Project +[Dd]ebugPS/ +[Rr]eleasePS/ +dlldata.c + +# DNX +project.lock.json +project.fragment.lock.json +artifacts/ + +*_i.c +*_p.c +*_i.h +*.ilk +*.meta +*.obj +*.pch +*.pdb +*.pgc +*.pgd +*.rsp +*.sbr +*.tlb +*.tli +*.tlh +*.tmp +*.tmp_proj +*.log +*.vspscc +*.vssscc +.builds +*.pidb +*.svclog +*.scc + +# Chutzpah Test files +_Chutzpah* + +# Visual C++ cache files +ipch/ +*.aps +*.ncb +*.opendb +*.opensdf +*.sdf +*.cachefile +*.VC.db +*.VC.VC.opendb + +# Visual Studio profiler +*.psess +*.vsp +*.vspx +*.sap + +# TFS 2012 Local Workspace +$tf/ + +# Guidance Automation Toolkit +*.gpState + +# ReSharper is a .NET coding add-in +_ReSharper*/ +*.[Rr]e[Ss]harper +*.DotSettings.user + +# JustCode is a .NET coding add-in +.JustCode + +# TeamCity is a build add-in +_TeamCity* + +# DotCover is a Code Coverage Tool +*.dotCover + +# NCrunch +_NCrunch_* +.*crunch*.local.xml +nCrunchTemp_* + +# MightyMoose +*.mm.* +AutoTest.Net/ + +# Web workbench (sass) +.sass-cache/ + +# Installshield output folder +[Ee]xpress/ + +# DocProject is a documentation generator add-in +DocProject/buildhelp/ +DocProject/Help/*.HxT +DocProject/Help/*.HxC +DocProject/Help/*.hhc +DocProject/Help/*.hhk +DocProject/Help/*.hhp +DocProject/Help/Html2 +DocProject/Help/html + +# Click-Once directory +publish/ + +# Publish Web Output +*.[Pp]ublish.xml +*.azurePubxml +# TODO: Comment the next line if you want to checkin your web deploy settings +# but database connection strings (with potential passwords) will be unencrypted +#*.pubxml +*.publishproj + +# Microsoft Azure Web App publish settings. Comment the next line if you want to +# checkin your Azure Web App publish settings, but sensitive information contained +# in these scripts will be unencrypted +PublishScripts/ + +# NuGet Packages +*.nupkg +# The packages folder can be ignored because of Package Restore +**/packages/* +# except build/, which is used as an MSBuild target. +!**/packages/build/ +# Uncomment if necessary however generally it will be regenerated when needed +#!**/packages/repositories.config +# NuGet v3's project.json files produces more ignoreable files +*.nuget.props +*.nuget.targets + +# Microsoft Azure Build Output +csx/ +*.build.csdef + +# Microsoft Azure Emulator +ecf/ +rcf/ + +# Windows Store app package directories and files +AppPackages/ +BundleArtifacts/ +Package.StoreAssociation.xml +_pkginfo.txt + +# Visual Studio cache files +# files ending in .cache can be ignored +*.[Cc]ache +# but keep track of directories ending in .cache +!*.[Cc]ache/ + +# Others +ClientBin/ +~$* +*~ +*.dbmdl +*.dbproj.schemaview +*.jfm +*.pfx +*.publishsettings +node_modules/ +orleans.codegen.cs + +# Since there are multiple workflows, uncomment next line to ignore bower_components +# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) +#bower_components/ + +# RIA/Silverlight projects +Generated_Code/ + +# Backup & report files from converting an old project file +# to a newer Visual Studio version. Backup files are not needed, +# because we have git ;-) +_UpgradeReport_Files/ +Backup*/ +UpgradeLog*.XML +UpgradeLog*.htm + +# SQL Server files +*.mdf +*.ldf + +# Business Intelligence projects +*.rdl.data +*.bim.layout +*.bim_*.settings + +# Microsoft Fakes +FakesAssemblies/ + +# GhostDoc plugin setting file +*.GhostDoc.xml + +# Node.js Tools for Visual Studio +.ntvs_analysis.dat + +# Visual Studio 6 build log +*.plg + +# Visual Studio 6 workspace options file +*.opt + +# Visual Studio LightSwitch build output +**/*.HTMLClient/GeneratedArtifacts +**/*.DesktopClient/GeneratedArtifacts +**/*.DesktopClient/ModelManifest.xml +**/*.Server/GeneratedArtifacts +**/*.Server/ModelManifest.xml +_Pvt_Extensions + +# Paket dependency manager +.paket/paket.exe +paket-files/ + +# FAKE - F# Make +.fake/ + +# JetBrains Rider +.idea/ +*.sln.iml + +# CodeRush +.cr/ + +# Python Tools for Visual Studio (PTVS) +__pycache__/ +*.pyc \ No newline at end of file diff --git a/ConfigOverhaulCyberpunk.sln b/ConfigOverhaulCyberpunk.sln new file mode 100644 index 0000000..e2e33b0 --- /dev/null +++ b/ConfigOverhaulCyberpunk.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 15 +VisualStudioVersion = 15.0.28307.136 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ConfigOverhaulCyberpunk", "Source\ConfigOverhaulCyberpunk.csproj", "{4EF9AC35-753B-4307-BCBB-5EDF7D746B55}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4EF9AC35-753B-4307-BCBB-5EDF7D746B55}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4EF9AC35-753B-4307-BCBB-5EDF7D746B55}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4EF9AC35-753B-4307-BCBB-5EDF7D746B55}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4EF9AC35-753B-4307-BCBB-5EDF7D746B55}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {72A3DEF2-8F8E-4741-81B8-1FFCA78BFAD2} + EndGlobalSection +EndGlobal diff --git a/Source/App.config b/Source/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/Source/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Source/Assets/FeatureList.csv b/Source/Assets/FeatureList.csv new file mode 100644 index 0000000..621c839 --- /dev/null +++ b/Source/Assets/FeatureList.csv @@ -0,0 +1,103 @@ +Animation;EnableRefreshLocoWrappersOnUnlock; +Animation;UseAnimSetupCaching; +Animation;UseFishsyncDebug; +Animation;UseLunaticMode; +ChoiceSettings;mandatoryLookAt; +ChoiceSettings;stickyLookAt; +ChoiceSettings;variant2; +Crowd;ZCutoffEnabled; +Customization;EnableFacialSetupCustomization; +Debug;GameFallbacksEnabled; +Debug;LODUpdateUseRenderCamera; +DebugConsole;EngineLogEnabled; +Developer/FeatureToggles;Antialiasing;Disable also Screen Space Reflections, or you use this toggle. +Developer/FeatureToggles;Bloom;Makes (Neon)Lights bloom. Disables also Lens flare effect. Eats 3-5 fps +Developer/FeatureToggles;CharacterLightBlockers; +Developer/FeatureToggles;CharacterRimEnhancement; +Developer/FeatureToggles;CharacterSubsurfaceScattering; +Developer/FeatureToggles;ChromaticAberration; +Developer/FeatureToggles;ConstrastAdaptiveSharpening;AMD FidelityFX Contrast Adaptive Sharpening (CAS) +Developer/FeatureToggles;ContactShadows; +Developer/FeatureToggles;DepthOfField; +Developer/FeatureToggles;DistantFog; +Developer/FeatureToggles;DistantGI;Distant Global Illumination (Eats 2-5 fps) +Developer/FeatureToggles;DistantShadows;Don't disable. (breaks lightmaps) +Developer/FeatureToggles;DistantVolFog; +Developer/FeatureToggles;DynamicDecals; +Developer/FeatureToggles;FilmGrain; +Developer/FeatureToggles;GlobalIllumination;Ugly shadows and light without it. +Developer/FeatureToggles;Hair; +Developer/FeatureToggles;ImageBasedFlares;ON/OFF Lens flare effect for lights +Developer/FeatureToggles;LocalShadows; +Developer/FeatureToggles;MotionBlur; +Developer/FeatureToggles;RainMap; +Developer/FeatureToggles;RuntimeTangentUpdate; +Developer/FeatureToggles;ScreenSpaceHeatHaze; +Developer/FeatureToggles;ScreenSpacePlanarReflection; +Developer/FeatureToggles;ScreenSpaceRain; +Developer/FeatureToggles;ScreenSpaceReflection; +Developer/FeatureToggles;ScreenSpaceUnderwater; +Developer/FeatureToggles;SSAO; +Developer/FeatureToggles;VolumetricClouds; +Developer/FeatureToggles;VolumetricFog; +Developer/FeatureToggles;Weather; +DLSS;EnableMirrorScaling; +DRS;Enable; +Editor/Characters/Hair/HACKS;AAAA_HACK_hairModifiedLocalLightIntensity; +Editor/Characters/Hair;UseGlobalContactShadowsOnHair; +Editor/Characters/Hair;UseLocalContactShadowsOnHair; +EntityVisualController;DebugUseFOVMultiplier; +Input/Gestures;FlickForSwipe; +Lipsync;SyncToAudio; +Lipsync;UseAudioAdjustment; +Multiplayer;ClientMovementCorrection; +Muppet;UseRealTimeForSubsteps; +Occlusion;MultiFrustumUseGlobalOcclusion; +RayTracing/Diffuse;UseScreenSpaceData; +RayTracing;Enable; +RayTracing;EnableAmbientOcclusion; +RayTracing;EnableDiffuseIllumination; +RayTracing;EnableDirectionalShadow; +RayTracing;EnableDirectionalShadowCulling; +RayTracing;EnableImportanceSampling; +RayTracing;EnableLocalLights; +RayTracing;EnableNRD; +RayTracing;EnableReflection; +RayTracing;EnableSkinning; +RayTracing;EnableSpatialFiltering; +RayTracing;EnableTransparentReflection; +RayTracing;HideFPPAvatar; +RayTracing/NRD;DiffuseAntiLag; +RayTracing/NRD;EnableAmbientOcclusion; +RayTracing/NRD;EnableLocalCoordinates; +RayTracing/NRD;EnableScalingCompensation; +RayTracing/Reflection;UseScreenSpaceData; +RayTracing;SkyRadianceExposureScaling; +RayTracing;UploadInstanceData; +Rendering/AsyncCompute;BuildDepthChain;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;DynamicTexture;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;Enable;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;FlattenNormals;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;LutGeneration;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;RaytraceASBuild;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/AsyncCompute;SSAO;Disable for free FPS. (Should help GeForce GPUs pre-RTX 20xx, and also on older pre-Vega AMD Radeon) +Rendering/FrostedGlass;GlassUseMipChain;Eats 2-4 FPS +Rendering;RainMapProxySorting; +Rendering/Shadows;CascadeFitToWorstCase; +Rendering/Shadows;CascadeUseBackfacesAsCullingPlanes; +Rendering;UseExperimentalVolFog; +Rendering;UseSkinningLOD; +SnapToTerrainIk;Enabled; +SnapToTerrainIk;FootLockEnabled; +Streaming/Culling/AutoHideDistanceNear;Enabled; +Streaming/Culling/SecondaryRefPoint;Enabled; +Streaming/Culling;VisibilityQuery; +Vehicle;AirControlBikePitchHelper; +Vehicle;AirControlCarRollHelper; +Vehicle;EnableAirResistane; +Vehicle;EnableFreeRotationResistantTorque; +Vehicle;EnableLowVelStoppingResistance; +Vehicle;EnableSmoothWheelContacts; +vehicle;PhysXClampHugeImpacts; +vehicle;PhysXClampHugeSpeeds; +Vehicle;UseDifferential; diff --git a/Source/ConfigOverhaulCyberpunk.csproj b/Source/ConfigOverhaulCyberpunk.csproj new file mode 100644 index 0000000..4d1661b --- /dev/null +++ b/Source/ConfigOverhaulCyberpunk.csproj @@ -0,0 +1,108 @@ + + + + + Debug + AnyCPU + {4EF9AC35-753B-4307-BCBB-5EDF7D746B55} + WinExe + ConfigOverhaulCyberpunk + ConfigOverhaulCyberpunk + v4.5.2 + 512 + true + true + + + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + ..\packages\Costura.Fody.1.6.2\lib\dotnet\Costura.dll + False + + + ..\packages\ini-parser.2.5.2\lib\net20\INIFileParser.dll + + + + + + + + + + + + + + + + + Form + + + MainForm.cs + + + + + MainForm.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + True + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + \ No newline at end of file diff --git a/Source/FodyWeavers.xml b/Source/FodyWeavers.xml new file mode 100644 index 0000000..9043189 --- /dev/null +++ b/Source/FodyWeavers.xml @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/Source/MainForm.Designer.cs b/Source/MainForm.Designer.cs new file mode 100644 index 0000000..fb5038d --- /dev/null +++ b/Source/MainForm.Designer.cs @@ -0,0 +1,140 @@ +namespace ConfigOverhaulCyberpunk +{ + partial class MainForm + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.dataGridViewMain = new System.Windows.Forms.DataGridView(); + this.menuStrip1 = new System.Windows.Forms.MenuStrip(); + this.veryLowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.lowToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.optimizedToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.disableAsyncComputeNVIDIAToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.resetToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMain)).BeginInit(); + this.menuStrip1.SuspendLayout(); + this.SuspendLayout(); + // + // dataGridViewMain + // + this.dataGridViewMain.AllowUserToAddRows = false; + this.dataGridViewMain.AllowUserToDeleteRows = false; + this.dataGridViewMain.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) + | System.Windows.Forms.AnchorStyles.Left) + | System.Windows.Forms.AnchorStyles.Right))); + this.dataGridViewMain.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.dataGridViewMain.BackgroundColor = System.Drawing.SystemColors.Window; + this.dataGridViewMain.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.dataGridViewMain.Location = new System.Drawing.Point(12, 27); + this.dataGridViewMain.Name = "dataGridViewMain"; + this.dataGridViewMain.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect; + this.dataGridViewMain.Size = new System.Drawing.Size(1354, 652); + this.dataGridViewMain.TabIndex = 0; + this.dataGridViewMain.DataMemberChanged += new System.EventHandler(this.checkedListBox1_SelectedIndexChanged); + this.dataGridViewMain.CellContentClick += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValueChanged); + this.dataGridViewMain.CellValueChanged += new System.Windows.Forms.DataGridViewCellEventHandler(this.dataGridView_CellValueChanged); + // + // menuStrip1 + // + this.menuStrip1.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.veryLowToolStripMenuItem, + this.lowToolStripMenuItem, + this.optimizedToolStripMenuItem, + this.disableAsyncComputeNVIDIAToolStripMenuItem, + this.resetToolStripMenuItem}); + this.menuStrip1.Location = new System.Drawing.Point(0, 0); + this.menuStrip1.Name = "menuStrip1"; + this.menuStrip1.Size = new System.Drawing.Size(1378, 24); + this.menuStrip1.TabIndex = 1; + this.menuStrip1.Text = "menuStrip1"; + // + // veryLowToolStripMenuItem + // + this.veryLowToolStripMenuItem.Name = "veryLowToolStripMenuItem"; + this.veryLowToolStripMenuItem.Size = new System.Drawing.Size(66, 20); + this.veryLowToolStripMenuItem.Text = "Very Low"; + this.veryLowToolStripMenuItem.Click += new System.EventHandler(this.VeryLowToolStripMenuItem_Click); + // + // lowToolStripMenuItem + // + this.lowToolStripMenuItem.Name = "lowToolStripMenuItem"; + this.lowToolStripMenuItem.Size = new System.Drawing.Size(41, 20); + this.lowToolStripMenuItem.Text = "Low"; + this.lowToolStripMenuItem.Click += new System.EventHandler(this.lowToolStripMenuItem_Click); + // + // optimizedToolStripMenuItem + // + this.optimizedToolStripMenuItem.Name = "optimizedToolStripMenuItem"; + this.optimizedToolStripMenuItem.Size = new System.Drawing.Size(74, 20); + this.optimizedToolStripMenuItem.Text = "Optimized"; + this.optimizedToolStripMenuItem.Click += new System.EventHandler(this.optimizedToolStripMenuItem_Click); + // + // disableAsyncComputeNVIDIAToolStripMenuItem + // + this.disableAsyncComputeNVIDIAToolStripMenuItem.Name = "disableAsyncComputeNVIDIAToolStripMenuItem"; + this.disableAsyncComputeNVIDIAToolStripMenuItem.Size = new System.Drawing.Size(171, 20); + this.disableAsyncComputeNVIDIAToolStripMenuItem.Text = "Disable Async Compute only"; + this.disableAsyncComputeNVIDIAToolStripMenuItem.Click += new System.EventHandler(this.disableAsyncComputeNVIDIAToolStripMenuItem_Click); + // + // resetToolStripMenuItem + // + this.resetToolStripMenuItem.Name = "resetToolStripMenuItem"; + this.resetToolStripMenuItem.Size = new System.Drawing.Size(47, 20); + this.resetToolStripMenuItem.Text = "Reset"; + this.resetToolStripMenuItem.Click += new System.EventHandler(this.resetToolStripMenuItem_Click); + // + // MainForm + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1378, 691); + this.Controls.Add(this.dataGridViewMain); + this.Controls.Add(this.menuStrip1); + this.MainMenuStrip = this.menuStrip1; + this.Name = "MainForm"; + this.ShowIcon = false; + this.Text = "Config Overhaul for Cyberpunk 2077 v1.0"; + this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.Form1_FormClosed); + ((System.ComponentModel.ISupportInitialize)(this.dataGridViewMain)).EndInit(); + this.menuStrip1.ResumeLayout(false); + this.menuStrip1.PerformLayout(); + this.ResumeLayout(false); + this.PerformLayout(); + + } + + #endregion + private System.Windows.Forms.MenuStrip menuStrip1; + private System.Windows.Forms.ToolStripMenuItem veryLowToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem lowToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem optimizedToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem disableAsyncComputeNVIDIAToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem resetToolStripMenuItem; + public System.Windows.Forms.DataGridView dataGridViewMain; + } +} + diff --git a/Source/MainForm.cs b/Source/MainForm.cs new file mode 100644 index 0000000..a366b2b --- /dev/null +++ b/Source/MainForm.cs @@ -0,0 +1,334 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Diagnostics; +using System.Drawing; +using System.Dynamic; +using System.IO; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows.Forms; +using System.Xml.Linq; +using System.Runtime.InteropServices; + +using IniParser; +using IniParser.Model; + +namespace ConfigOverhaulCyberpunk +{ + public partial class MainForm : Form + { + BindingList featureList; + string path = @".\engine\config\platform\pc\user.ini"; + FileIniDataParser parser = new FileIniDataParser(); + IniData redConfig; + + public MainForm() + { + InitializeComponent(); + bool pathOk = VerifyPath(); + + if(pathOk == false) + { + OpenFileDialog choofdlog = new OpenFileDialog(); + choofdlog.Filter = "REDprelauncher (REDprelauncher.exe)|REDprelauncher.exe"; + choofdlog.FilterIndex = 1; + choofdlog.Multiselect = false; + + if (choofdlog.ShowDialog() == DialogResult.OK) + { + string sFileName = Path.GetDirectoryName(choofdlog.FileName); + path = sFileName + @"\engine\config\platform\pc\user.ini"; + } + } + + this.Load += new EventHandler(Form1_Load); + } + + public bool VerifyPath() + { + bool checkEngineDir = Directory.Exists(@".\engine"); + if (checkEngineDir) return true; + + bool checkDefaultSteamDir = Directory.Exists(@"C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\"); + if (checkDefaultSteamDir) + { + path = @"C:\Program Files (x86)\Steam\steamapps\common\Cyberpunk 2077\engine\config\platform\pc\user.ini"; + return true; + } + + return false; + } + + void Form1_Load(object sender, EventArgs e) + { + //Verify path integrity + this.Load += new EventHandler(Form1_Load); + + InitializeFeatureList(); + dataGridViewMain.DataSource = featureList; + dataGridViewMain.Columns["Enabled"].Width = 50; + dataGridViewMain.Columns["GroupName"].ReadOnly = true; + dataGridViewMain.Columns["GroupName"].Width = 200; + dataGridViewMain.Columns["FunctionName"].ReadOnly = true; + dataGridViewMain.Columns["FunctionName"].Width = 200; + dataGridViewMain.Columns["Description"].ReadOnly = false; + + dataGridViewMain.ClearSelection(); + } + + private void dataGridView_CellValueChanged(object sender, DataGridViewCellEventArgs e) + { + //foreach (DataGridViewRow row in dataGridViewMain.SelectedRows) + //{ + // REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[row.Index]; + + // if (current.Enabled == true) + // current.Enabled = false; + // else + // current.Enabled = true; + //} + + dataGridViewMain.Refresh(); + dataGridViewMain.ClearSelection(); + } + + private void InitializeFeatureList() + { + if (File.Exists(path)) + { + //Load already generated INI + redConfig = parser.ReadFile(path); + } + else + { + //Create base file with all features enabled + redConfig = new IniData(); + var featureDefinitions = LoadREDFeatures(); + + foreach (var featureDef in featureDefinitions) + { + var kd = new KeyData(featureDef.FunctionName); + kd.Value = "true"; + if (featureDef.Description != "") kd.Comments.Add(featureDef.Description); + + if (featureDef.GroupName.Contains("Developer")) + { + redConfig.Sections.AddSection(featureDef.GroupName); + redConfig[featureDef.GroupName].AddKey(kd); + } + + if (featureDef.GroupName.Contains("Rendering")) + { + redConfig.Sections.AddSection(featureDef.GroupName); + redConfig[featureDef.GroupName].AddKey(kd); + } + + if (featureDef.GroupName.Contains("RayTracing")) + { + redConfig.Sections.AddSection(featureDef.GroupName); + redConfig[featureDef.GroupName].AddKey(kd); + } + } + + File.WriteAllText(path, redConfig.ToString()); + } + + featureList = new BindingList(); + + //Initialize DataGrid + foreach (var section in redConfig.Sections) + { + foreach (var featureSet in section.Keys) + { + var featureTmp = new REDEngineFeature(); + featureTmp.Enabled = Convert.ToBoolean(featureSet.Value); + featureTmp.GroupName = section.SectionName; + featureTmp.FunctionName = featureSet.KeyName; + if (featureSet.Comments.Count >= 1) + featureTmp.Description = featureSet.Comments[0]; + featureList.Add(featureTmp); + } + } + } + + public List LoadREDFeatures() + { + List list = new List(); + List lines = Properties.Resources.FeatureList.Split( + new[] { "\r\n", "\r", "\n" }, + StringSplitOptions.None + ).ToList(); + + foreach (var line in lines) + { + try + { + string[] fields = line.Split(';'); + if (fields.Count() >= 3) + { + var feature = new REDEngineFeature + { + Enabled = true, + GroupName = fields[0], + FunctionName = fields[1], + Description = fields[2] + }; + + list.Add(feature); + } + } + catch (Exception e) + { + Debug.WriteLine("Something is wrong with a feature definition: " + e.ToString()); + } + } + + return list; + } + + private void checkedListBox1_SelectedIndexChanged(object sender, EventArgs e) + { + + } + + private void Form1_FormClosed(object sender, FormClosedEventArgs e) + { + IniData redConfigNew = new IniData(); + int disableCount = 0; + //datagrid to ini + foreach (DataGridViewRow row in dataGridViewMain.Rows) + { + REDEngineFeature featureDef = ((BindingList)dataGridViewMain.DataSource)[row.Index]; + + var kd = new KeyData(featureDef.FunctionName); + kd.Value = featureDef.Enabled.ToString(); + + if (featureDef.Enabled == false) disableCount++; + + if (featureDef.Description != "") kd.Comments.Add(featureDef.Description); + + if (featureDef.GroupName.Contains("Developer")) + { + redConfigNew.Sections.AddSection(featureDef.GroupName); + redConfigNew[featureDef.GroupName].AddKey(kd); + } + + if (featureDef.GroupName.Contains("Rendering")) + { + redConfigNew.Sections.AddSection(featureDef.GroupName); + redConfigNew[featureDef.GroupName].AddKey(kd); + } + + if (featureDef.GroupName.Contains("RayTracing")) + { + redConfig.Sections.AddSection(featureDef.GroupName); + redConfig[featureDef.GroupName].AddKey(kd); + } + } + + //when everything is enabled, just clear the user.ini + if(disableCount >= 1) + File.WriteAllText(path, redConfigNew.ToString()); + else + File.Delete(path); + } + + public class REDEngineFeature + { + public bool Enabled { get; set; } + public string GroupName { get; set; } + public string FunctionName { get; set; } + public string Description { get; set; } + } + + private void VeryLowToolStripMenuItem_Click(object sender, EventArgs e) + { + int i = 0; + foreach (var row in dataGridViewMain.Rows) + { + REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[i]; + + current.Enabled = false; + if (current.FunctionName.Contains("DistantShadows")) current.Enabled = true; + if (current.FunctionName.Contains("GlobalIllumination")) current.Enabled = true; + i++; + } + dataGridViewMain.Refresh(); + } + + private void lowToolStripMenuItem_Click(object sender, EventArgs e) + { + int i = 0; + foreach (var row in dataGridViewMain.Rows) + { + REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[i]; + current.Enabled = false; + if (current.FunctionName.Contains("DistantShadows")) current.Enabled = true; + if (current.FunctionName.Contains("GlobalIllumination")) current.Enabled = true; + if (current.FunctionName.Contains("Hair")) current.Enabled = true; + if (current.FunctionName.Contains("RainMap")) current.Enabled = true; + if (current.FunctionName.Contains("Weather")) current.Enabled = true; + if (current.FunctionName.Contains("DynamicDecals")) current.Enabled = true; + if (current.FunctionName.Contains("UseSkinningLOD")) current.Enabled = true; + + //more demanding options + if (current.FunctionName.Contains("SSAO") && current.GroupName.Contains("Feature")) current.Enabled = true; + if (current.FunctionName.Contains("Antialiasing")) current.Enabled = true; + + i++; + } + dataGridViewMain.Refresh(); + } + + private void optimizedToolStripMenuItem_Click(object sender, EventArgs e) + { + int i = 0; + foreach (var row in dataGridViewMain.Rows) + { + REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[i]; + current.Enabled = true; + + if (current.FunctionName.Contains("Character")) current.Enabled = false; + if (current.FunctionName.Contains("DistantFog")) current.Enabled = false; + if (current.FunctionName.Contains("DistantGI")) current.Enabled = false; + if (current.FunctionName.Contains("DistantVolFog")) current.Enabled = false; + if (current.FunctionName.Contains("MotionBlur")) current.Enabled = false; + if (current.FunctionName.Contains("Runtime")) current.Enabled = false; + if (current.FunctionName.Contains("ScreenSpace")) current.Enabled = false; + if (current.FunctionName.Contains("VolumetricClouds")) current.Enabled = false; + if (current.FunctionName.Contains("VolumetricFog")) current.Enabled = false; + if (current.FunctionName.Contains("UseExperimentalVolFog")) current.Enabled = false; + i++; + } + disableAsyncComputeNVIDIAToolStripMenuItem_Click(null, null); + dataGridViewMain.Refresh(); + } + + private void disableAsyncComputeNVIDIAToolStripMenuItem_Click(object sender, EventArgs e) + { + int i = 0; + foreach (var row in dataGridViewMain.Rows) + { + REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[i]; + if(current.GroupName.Contains("Async")) current.Enabled = false; + i++; + } + dataGridViewMain.Refresh(); + } + + private void resetToolStripMenuItem_Click(object sender, EventArgs e) + { + int i = 0; + foreach (var row in dataGridViewMain.Rows) + { + REDEngineFeature current = ((BindingList)dataGridViewMain.DataSource)[i]; + current.Enabled = true; + i++; + } + dataGridViewMain.Refresh(); + } + } +} diff --git a/Source/MainForm.resx b/Source/MainForm.resx new file mode 100644 index 0000000..d5494e3 --- /dev/null +++ b/Source/MainForm.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Source/Program.cs b/Source/Program.cs new file mode 100644 index 0000000..5211984 --- /dev/null +++ b/Source/Program.cs @@ -0,0 +1,22 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; +using System.Windows.Forms; + +namespace ConfigOverhaulCyberpunk +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new MainForm()); + } + } +} diff --git a/Source/Properties/AssemblyInfo.cs b/Source/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1a3eca7 --- /dev/null +++ b/Source/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ConfigOverhaulCyberpunk")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ConfigOverhaulCyberpunk")] +[assembly: AssemblyCopyright("Copyright © derplayer 2020")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("4ef9ac35-753b-4307-bcbb-5edf7d746b56")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Source/Properties/Resources.Designer.cs b/Source/Properties/Resources.Designer.cs new file mode 100644 index 0000000..55128f6 --- /dev/null +++ b/Source/Properties/Resources.Designer.cs @@ -0,0 +1,85 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ConfigOverhaulCyberpunk.Properties { + using System; + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "15.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ConfigOverhaulCyberpunk.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Looks up a localized string similar to Animation;EnableRefreshLocoWrappersOnUnlock; + ///Animation;UseAnimSetupCaching; + ///Animation;UseFishsyncDebug; + ///Animation;UseLunaticMode; + ///ChoiceSettings;mandatoryLookAt; + ///ChoiceSettings;stickyLookAt; + ///ChoiceSettings;variant2; + ///Crowd;ZCutoffEnabled; + ///Customization;EnableFacialSetupCustomization; + ///Debug;GameFallbacksEnabled; + ///Debug;LODUpdateUseRenderCamera; + ///DebugConsole;EngineLogEnabled; + ///Developer/FeatureToggles;Antialiasing;Disable also Screen Space Reflections, or you use this toggle. + ///Developer/FeatureToggle [rest of string was truncated]";. + /// + internal static string FeatureList { + get { + return ResourceManager.GetString("FeatureList", resourceCulture); + } + } + } +} diff --git a/Source/Properties/Resources.resx b/Source/Properties/Resources.resx new file mode 100644 index 0000000..4b99beb --- /dev/null +++ b/Source/Properties/Resources.resx @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + + ..\Assets\FeatureList.csv;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + + \ No newline at end of file diff --git a/Source/Properties/Settings.Designer.cs b/Source/Properties/Settings.Designer.cs new file mode 100644 index 0000000..9be505f --- /dev/null +++ b/Source/Properties/Settings.Designer.cs @@ -0,0 +1,26 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ConfigOverhaulCyberpunk.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.9.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + } +} diff --git a/Source/Properties/Settings.settings b/Source/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/Source/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/Source/packages.config b/Source/packages.config new file mode 100644 index 0000000..e3ec4d9 --- /dev/null +++ b/Source/packages.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file