mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-02 06:19:22 +00:00
init
This commit is contained in:
parent
2bfe904adb
commit
fcc83aa570
6 changed files with 188 additions and 0 deletions
25
FuckToes/FuckToes.cs
Normal file
25
FuckToes/FuckToes.cs
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
using ABI_RC.Core.Savior;
|
||||||
|
using HarmonyLib;
|
||||||
|
using RootMotion.FinalIK;
|
||||||
|
|
||||||
|
|
||||||
|
namespace NAK.Melons.FuckToes.HarmonyPatches;
|
||||||
|
|
||||||
|
//yes im patching VRIK directly, cvr does not force calibration or mess with references, and leaves it to vrik to handle
|
||||||
|
class VRIKPatches
|
||||||
|
{
|
||||||
|
[HarmonyPostfix]
|
||||||
|
[HarmonyPatch(typeof(VRIK), "AutoDetectReferences")]
|
||||||
|
private static void Postfix_VRIK_AutoDetectReferences(ref VRIK __instance)
|
||||||
|
{
|
||||||
|
//only run for PlayerLocal VRIK
|
||||||
|
if (__instance.gameObject.layer != 8) return;
|
||||||
|
|
||||||
|
if (FuckToesMod.m_entryEnabledVR.Value && MetaPort.Instance.isUsingVr)
|
||||||
|
{
|
||||||
|
if (!FuckToesMod.m_entryEnabledFBT.Value && MetaPort.Instance.isUsingFullbody) return;
|
||||||
|
__instance.references.leftToes = null;
|
||||||
|
__instance.references.rightToes = null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
52
FuckToes/FuckToes.csproj
Normal file
52
FuckToes/FuckToes.csproj
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<Project Sdk="Microsoft.NET.Sdk">
|
||||||
|
|
||||||
|
<PropertyGroup>
|
||||||
|
<TargetFramework>net472</TargetFramework>
|
||||||
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
|
<LangVersion>latest</LangVersion>
|
||||||
|
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
|
||||||
|
</PropertyGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Reference Include="0Harmony">
|
||||||
|
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\0Harmony.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Assembly-CSharp">
|
||||||
|
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Assembly-CSharp-firstpass">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Assembly-CSharp-firstpass.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="BTKUILib">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\BTKUILib.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="Cohtml.Runtime">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\Cohtml.Runtime.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="MelonLoader">
|
||||||
|
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\MelonLoader\MelonLoader.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.AnimationModule">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AnimationModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.AssetBundleModule">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.AssetBundleModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.CoreModule">
|
||||||
|
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.CoreModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.InputLegacyModule">
|
||||||
|
<HintPath>C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.InputLegacyModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
<Reference Include="UnityEngine.PhysicsModule">
|
||||||
|
<HintPath>..\..\..\..\..\..\..\Program Files (x86)\Steam\steamapps\common\ChilloutVR\ChilloutVR_Data\Managed\UnityEngine.PhysicsModule.dll</HintPath>
|
||||||
|
</Reference>
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
|
<Target Name="Deploy" AfterTargets="Build">
|
||||||
|
<Copy SourceFiles="$(TargetPath)" DestinationFolder="C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" />
|
||||||
|
<Message Text="Copied $(TargetPath) to C:\Program Files (x86)\Steam\steamapps\common\ChilloutVR\Mods\" Importance="high" />
|
||||||
|
</Target>
|
||||||
|
|
||||||
|
</Project>
|
25
FuckToes/FuckToes.sln
Normal file
25
FuckToes/FuckToes.sln
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
|
||||||
|
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
|
# Visual Studio Version 17
|
||||||
|
VisualStudioVersion = 17.2.32630.192
|
||||||
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
|
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FuckToes", "FuckToes.csproj", "{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}"
|
||||||
|
EndProject
|
||||||
|
Global
|
||||||
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||||
|
Debug|Any CPU = Debug|Any CPU
|
||||||
|
Release|Any CPU = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||||
|
{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||||
|
{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||||
|
{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||||
|
{7A4864FE-17AD-4D6D-B2CD-4111C05754D8}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(SolutionProperties) = preSolution
|
||||||
|
HideSolutionNode = FALSE
|
||||||
|
EndGlobalSection
|
||||||
|
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||||
|
SolutionGuid = {C0D6DAF4-5963-47A0-8D33-5E0E22061DAF}
|
||||||
|
EndGlobalSection
|
||||||
|
EndGlobal
|
32
FuckToes/Main.cs
Normal file
32
FuckToes/Main.cs
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
using MelonLoader;
|
||||||
|
|
||||||
|
namespace NAK.Melons.FuckToes;
|
||||||
|
|
||||||
|
public class FuckToesMod : MelonMod
|
||||||
|
{
|
||||||
|
internal const string SettingsCategory = "Fuck Toes";
|
||||||
|
internal static MelonPreferences_Category m_categoryFuckToes;
|
||||||
|
internal static MelonPreferences_Entry<bool> m_entryEnabledVR, m_entryEnabledFBT;
|
||||||
|
public override void OnInitializeMelon()
|
||||||
|
{
|
||||||
|
m_categoryFuckToes = MelonPreferences.CreateCategory(SettingsCategory);
|
||||||
|
m_entryEnabledVR = m_categoryFuckToes.CreateEntry<bool>("Enabled", true, description: "Nuke VRIK toes when in Halfbody.");
|
||||||
|
m_entryEnabledFBT = m_categoryFuckToes.CreateEntry<bool>("Enabled in FBT", false, description: "Nuke VRIK toes when in FBT.");
|
||||||
|
|
||||||
|
//Apply patches (i stole)
|
||||||
|
ApplyPatches(typeof(HarmonyPatches.VRIKPatches));
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyPatches(Type type)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
HarmonyInstance.PatchAll(type);
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
LoggerInstance.Msg($"Failed while patching {type.Name}!");
|
||||||
|
LoggerInstance.Error(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
31
FuckToes/Properties/AssemblyInfo.cs
Normal file
31
FuckToes/Properties/AssemblyInfo.cs
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
using FuckToes.Properties;
|
||||||
|
using MelonLoader;
|
||||||
|
using System.Reflection;
|
||||||
|
|
||||||
|
|
||||||
|
[assembly: AssemblyVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyFileVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyInformationalVersion(AssemblyInfoParams.Version)]
|
||||||
|
[assembly: AssemblyTitle(nameof(NAK.Melons.FuckToes))]
|
||||||
|
[assembly: AssemblyCompany(AssemblyInfoParams.Author)]
|
||||||
|
[assembly: AssemblyProduct(nameof(NAK.Melons.FuckToes))]
|
||||||
|
|
||||||
|
[assembly: MelonInfo(
|
||||||
|
typeof(NAK.Melons.FuckToes.FuckToesMod),
|
||||||
|
nameof(NAK.Melons.FuckToes),
|
||||||
|
AssemblyInfoParams.Version,
|
||||||
|
AssemblyInfoParams.Author,
|
||||||
|
downloadLink: "https://github.com/NotAKidOnSteam/FuckToes"
|
||||||
|
)]
|
||||||
|
|
||||||
|
[assembly: MelonGame("Alpha Blend Interactive", "ChilloutVR")]
|
||||||
|
[assembly: MelonPlatform(MelonPlatformAttribute.CompatiblePlatforms.WINDOWS_X64)]
|
||||||
|
[assembly: MelonPlatformDomain(MelonPlatformDomainAttribute.CompatibleDomains.MONO)]
|
||||||
|
[assembly: MelonOptionalDependencies("BTKUILib")]
|
||||||
|
|
||||||
|
namespace FuckToes.Properties;
|
||||||
|
internal static class AssemblyInfoParams
|
||||||
|
{
|
||||||
|
public const string Version = "1.0.0";
|
||||||
|
public const string Author = "NotAKidoS";
|
||||||
|
}
|
23
FuckToes/format.json
Normal file
23
FuckToes/format.json
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
{
|
||||||
|
"_id": -1,
|
||||||
|
"name": "FuckToes",
|
||||||
|
"modversion": "1.0.0",
|
||||||
|
"gameversion": "2022r170",
|
||||||
|
"loaderversion": "0.5.7",
|
||||||
|
"modtype": "Mod",
|
||||||
|
"author": "NotAKidoS",
|
||||||
|
"description": "Prevents VRIK from using toe bones in VR & optionaly FBT.\n\nVRIK calculates weird center of mass when toes are mapped, so it is sometimes desired to unmap toes to prevent an avatars feet from resting far back.",
|
||||||
|
"searchtags": [
|
||||||
|
"toes",
|
||||||
|
"vrik",
|
||||||
|
"ik",
|
||||||
|
"feet"
|
||||||
|
],
|
||||||
|
"requirements": [
|
||||||
|
"None"
|
||||||
|
],
|
||||||
|
"downloadlink": "https://github.com/NotAKidOnSteam/HalfbodyIKFixes/releases/download/v1.0.0/FuckToes.dll",
|
||||||
|
"sourcelink": "https://github.com/NotAKidOnSteam/FuckToes/",
|
||||||
|
"changelog": "- Initial Release",
|
||||||
|
"embedcolor": "9b59b6"
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue