From 169df4ed33b880d2051f1d3b479e348d20783d41 Mon Sep 17 00:00:00 2001 From: NotAKidoS <37721153+NotAKidOnSteam@users.noreply.github.com> Date: Tue, 23 Apr 2024 16:06:50 -0500 Subject: [PATCH] [ShadowCloneFallback] Initial Release --- ShadowCloneFallback/Main.cs | 27 +++++++++++++++++ .../Properties/AssemblyInfo.cs | 30 +++++++++++++++++++ ShadowCloneFallback/README.md | 17 +++++++++++ .../ShadowCloneFallback.csproj | 2 ++ ShadowCloneFallback/format.json | 23 ++++++++++++++ StopClosingMyMenuOnWorldLoad/format.json | 8 ++--- 6 files changed, 103 insertions(+), 4 deletions(-) create mode 100644 ShadowCloneFallback/Main.cs create mode 100644 ShadowCloneFallback/Properties/AssemblyInfo.cs create mode 100644 ShadowCloneFallback/README.md create mode 100644 ShadowCloneFallback/ShadowCloneFallback.csproj create mode 100644 ShadowCloneFallback/format.json diff --git a/ShadowCloneFallback/Main.cs b/ShadowCloneFallback/Main.cs new file mode 100644 index 0000000..bf9b4c9 --- /dev/null +++ b/ShadowCloneFallback/Main.cs @@ -0,0 +1,27 @@ +using ABI_RC.Core.Player.ShadowClone; +using MelonLoader; + +namespace NAK.ShadowCloneFallback; + +public class ShadowCloneFallback : MelonMod +{ + private const string SettingsCategory = nameof(ShadowCloneFallback); + + private static readonly MelonPreferences_Category Category = + MelonPreferences.CreateCategory(SettingsCategory); + + private static readonly MelonPreferences_Entry EntryEnabled = + Category.CreateEntry("Enabled", true, description: "Toggle ShadowCloneFallback entirely."); + + public override void OnInitializeMelon() + { + ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value; + EntryEnabled.OnEntryValueChanged.Subscribe(OnEnabledChanged); + } + + private void OnEnabledChanged(bool _, bool __) + { + ShadowCloneUtils.s_UseShaderClones = EntryEnabled.Value; + LoggerInstance.Msg($"ShadowCloneUtils.s_UseShaderClones is now {(EntryEnabled.Value ? "enabled" : "disabled")}."); + } +} \ No newline at end of file diff --git a/ShadowCloneFallback/Properties/AssemblyInfo.cs b/ShadowCloneFallback/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..db6c274 --- /dev/null +++ b/ShadowCloneFallback/Properties/AssemblyInfo.cs @@ -0,0 +1,30 @@ +using NAK.ShadowCloneFallback.Properties; +using MelonLoader; +using System.Reflection; + +[assembly: AssemblyVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)] +[assembly: AssemblyTitle(nameof(NAK.ShadowCloneFallback))] +[assembly: AssemblyCompany(AssemblyInfoParams.Author)] +[assembly: AssemblyProduct(nameof(NAK.ShadowCloneFallback))] + +[assembly: MelonInfo( + typeof(NAK.ShadowCloneFallback.ShadowCloneFallback), + nameof(NAK.ShadowCloneFallback), + AssemblyInfoParams.Version, + AssemblyInfoParams.Author, + downloadLink: "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ShadowCloneFallback" +)] + +[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")] +[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)] +[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)] +[assembly: HarmonyDontPatchAll] + +namespace NAK.ShadowCloneFallback.Properties; +internal static class AssemblyInfoParams +{ + public const string Version = "1.0.0"; + public const string Author = "NotAKidoS"; +} \ No newline at end of file diff --git a/ShadowCloneFallback/README.md b/ShadowCloneFallback/README.md new file mode 100644 index 0000000..9338434 --- /dev/null +++ b/ShadowCloneFallback/README.md @@ -0,0 +1,17 @@ +# ShadowCloneFallback + +Simple mod that exposes a toggle for the Fallback Shadow Clone implementation. +By default, using this mod will enable the less-performant shadow clones. Only use this mod if you for whatever reason have issues with the compute shader clones. + +Originally made the mod for debugging a potential crash a friend was experiencing, which turned out to be unrelated to the shader clones. + +--- + +Here is the block of text where I tell you this mod is not affiliated with or endorsed by ABI. +https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games + +> This mod is an independent creation not affiliated with, supported by, or approved by Alpha Blend Interactive. + +> Use of this mod is done so at the user's own risk and the creator cannot be held responsible for any issues arising from its use. + +> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive. diff --git a/ShadowCloneFallback/ShadowCloneFallback.csproj b/ShadowCloneFallback/ShadowCloneFallback.csproj new file mode 100644 index 0000000..66a50a8 --- /dev/null +++ b/ShadowCloneFallback/ShadowCloneFallback.csproj @@ -0,0 +1,2 @@ + + diff --git a/ShadowCloneFallback/format.json b/ShadowCloneFallback/format.json new file mode 100644 index 0000000..a1d787d --- /dev/null +++ b/ShadowCloneFallback/format.json @@ -0,0 +1,23 @@ +{ + "_id": -1, + "name": "ShadowCloneFallback", + "modversion": "1.0.0", + "gameversion": "2024r175", + "loaderversion": "0.6.1", + "modtype": "Mod", + "author": "NotAKidoS", + "description": "Simple mod that exposes a toggle for the Fallback Shadow Clone implementation.\nBy default, using this mod will enable the less-performant shadow clones. Only use this mod if you for whatever reason have issues with the compute shader clones.", + "searchtags": [ + "shadow", + "clone", + "compute", + "shader" + ], + "requirements": [ + "None" + ], + "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r26/ShadowCloneFallback.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/ShadowCloneFallback/", + "changelog": "- Initial Release", + "embedcolor": "#7d7e81" +} \ No newline at end of file diff --git a/StopClosingMyMenuOnWorldLoad/format.json b/StopClosingMyMenuOnWorldLoad/format.json index 55c1892..bbe45cb 100644 --- a/StopClosingMyMenuOnWorldLoad/format.json +++ b/StopClosingMyMenuOnWorldLoad/format.json @@ -1,12 +1,12 @@ { "_id": -1, - "name": "Stop Closing My Menus On World Load", + "name": "Stop Closing My Menu On World Load", "modversion": "1.0.0", "gameversion": "2024r175", "loaderversion": "0.6.1", "modtype": "Mod", "author": "NotAKidoS", - "description": "Simple patch that prevents your menus from being closed when a world is loaded.", + "description": "Simple patch that prevents your menu from being closed when a world is loaded.\nNicked the patch Kafeijao made for my old MenuScalePatch mod.", "searchtags": [ "menu", "close", @@ -16,8 +16,8 @@ "requirements": [ "None" ], - "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r25/StopClosingMyMenusOnWorldLoad.dll", - "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/StopClosingMyMenusOnWorldLoad/", + "downloadlink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/releases/download/r26/StopClosingMyMenuOnWorldLoad.dll", + "sourcelink": "https://github.com/NotAKidOnSteam/NAK_CVR_Mods/tree/main/StopClosingMyMenuOnWorldLoad/", "changelog": "- Initial Release", "embedcolor": "#b589ec" } \ No newline at end of file