mirror of
https://github.com/NotAKidoS/NAK_CVR_Mods.git
synced 2025-09-03 06:49:22 +00:00
Compare commits
12 commits
8ad74b5ef6
...
ece15e0dfc
Author | SHA1 | Date | |
---|---|---|---|
|
ece15e0dfc | ||
|
47b69dfbc7 | ||
|
63948ddf69 | ||
|
f6afea3c44 | ||
|
8343d6c5bb | ||
|
6e37bcbabb | ||
|
c4ab9cce47 | ||
|
88f3b1a41f | ||
|
9606b10c9d | ||
|
d5d4e3eddd | ||
|
377b365cdc | ||
|
21b791083b |
11 changed files with 82 additions and 74 deletions
|
@ -1,6 +1,5 @@
|
|||
using System.Reflection;
|
||||
using ABI_RC.Core.InteractionSystem;
|
||||
using ABI_RC.Core.Savior;
|
||||
using ABI_RC.Systems.InputManagement;
|
||||
using ABI_RC.Systems.Movement;
|
||||
using HarmonyLib;
|
||||
|
@ -11,16 +10,6 @@ namespace NAK.DoubleTapJumpToExitSeat;
|
|||
|
||||
public class DoubleTapJumpToExitSeatMod : MelonMod
|
||||
{
|
||||
#region Melon Preferences
|
||||
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(DoubleTapJumpToExitSeatMod));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryOnlyInVR =
|
||||
Category.CreateEntry("only_in_vr", false, display_name: "Only In VR", description: "Should this behaviour only be active in VR?");
|
||||
|
||||
#endregion Melon Preferences
|
||||
|
||||
#region Melon Events
|
||||
|
||||
public override void OnInitializeMelon()
|
||||
|
@ -54,8 +43,8 @@ public class DoubleTapJumpToExitSeatMod : MelonMod
|
|||
|
||||
#region Harmony Patches
|
||||
|
||||
private static float lastJumpTime = -1f;
|
||||
private static bool wasJumping;
|
||||
private static float _lastJumpTime = -1f;
|
||||
private static bool _wasJumping;
|
||||
|
||||
private static bool OnPreCVRSeatUpdate(CVRSeat __instance)
|
||||
{
|
||||
|
@ -63,18 +52,18 @@ public class DoubleTapJumpToExitSeatMod : MelonMod
|
|||
|
||||
// Crazy?
|
||||
bool jumped = CVRInputManager.Instance.jump;
|
||||
bool justJumped = jumped && !wasJumping;
|
||||
wasJumping = jumped;
|
||||
if (justJumped && (!EntryOnlyInVR.Value || MetaPort.Instance.isUsingVr))
|
||||
bool justJumped = jumped && !_wasJumping;
|
||||
_wasJumping = jumped;
|
||||
if (justJumped)
|
||||
{
|
||||
float t = Time.time;
|
||||
if (t - lastJumpTime <= BetterBetterCharacterController.DoubleJumpFlightTimeOut)
|
||||
if (t - _lastJumpTime <= BetterBetterCharacterController.DoubleJumpFlightTimeOut)
|
||||
{
|
||||
lastJumpTime = -1f;
|
||||
_lastJumpTime = -1f;
|
||||
__instance.ExitSeat();
|
||||
return false;
|
||||
}
|
||||
lastJumpTime = t;
|
||||
_lastJumpTime = t;
|
||||
}
|
||||
|
||||
// Double update this frame (this ensures Extrapolate / Every Frame Updated objects are seated correctly)
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# DoubleTapJumpToExitSeat
|
||||
|
||||
Literally the mod name.
|
||||
Replaces seat exit controls with a double-tap of the jump button, avoiding accidental exits from joystick drift or opening the menu.
|
||||
|
||||
---
|
||||
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
"loaderversion": "0.6.1",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Literally the mod name.",
|
||||
"description": "Replaces seat exit controls with a double-tap of the jump button, avoiding accidental exits from joystick drift or opening the menu.",
|
||||
"searchtags": [
|
||||
"double",
|
||||
"jump",
|
||||
|
@ -18,6 +18,6 @@
|
|||
],
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/DoubleTapJumpToExitSeat.dll",
|
||||
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/DoubleTapJumpToExitSeat/",
|
||||
"changelog": "- Initial Release",
|
||||
"embedcolor": "#00FFFF"
|
||||
"changelog": "- Initial release",
|
||||
"embedcolor": "#f61963"
|
||||
}
|
|
@ -3,23 +3,22 @@ using ABI_RC.Systems.IK;
|
|||
using MelonLoader;
|
||||
using RootMotion.FinalIK;
|
||||
using System.Reflection;
|
||||
using ABI_RC.Core;
|
||||
|
||||
namespace NAK.FuckToes;
|
||||
|
||||
public class FuckToesMod : MelonMod
|
||||
{
|
||||
private static MelonLogger.Instance Logger;
|
||||
|
||||
#region Melon Preferences
|
||||
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(FuckToesMod));
|
||||
MelonPreferences.CreateCategory(nameof(FuckToes));
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> EntryEnabledVR =
|
||||
Category.CreateEntry("Enabled in HalfBody", true, description: "Nuke VRIK toes when in Halfbody.");
|
||||
Category.CreateEntry("use_in_halfbody", true, display_name:"No Toes in Halfbody", description: "Nuke VRIK toes when in Halfbody.");
|
||||
|
||||
private static readonly MelonPreferences_Entry<bool> EntryEnabledFBT =
|
||||
Category.CreateEntry("Enabled in FBT", true, description: "Nuke VRIK toes when in FBT.");
|
||||
Category.CreateEntry("use_in_fbt", true, display_name:"No Toes in Fullbody", description: "Nuke VRIK toes when in FBT.");
|
||||
|
||||
#endregion Melon Preferences
|
||||
|
||||
|
@ -27,10 +26,10 @@ public class FuckToesMod : MelonMod
|
|||
|
||||
public override void OnInitializeMelon()
|
||||
{
|
||||
Logger = LoggerInstance;
|
||||
HarmonyInstance.Patch(
|
||||
typeof(VRIK).GetMethod(nameof(VRIK.AutoDetectReferences)),
|
||||
prefix: new HarmonyLib.HarmonyMethod(typeof(FuckToesMod).GetMethod(nameof(OnVRIKAutoDetectReferences_Prefix), BindingFlags.NonPublic | BindingFlags.Static))
|
||||
prefix: new HarmonyLib.HarmonyMethod(typeof(FuckToesMod).GetMethod(nameof(OnVRIKAutoDetectReferences_Prefix),
|
||||
BindingFlags.NonPublic | BindingFlags.Static))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -43,13 +42,12 @@ public class FuckToesMod : MelonMod
|
|||
try
|
||||
{
|
||||
// Must be PlayerLocal layer and in VR
|
||||
if (__instance.gameObject.layer != 8
|
||||
if (__instance.gameObject.layer != CVRLayers.PlayerLocal
|
||||
|| !MetaPort.Instance.isUsingVr)
|
||||
return;
|
||||
|
||||
switch (IKSystem.Instance.BodySystem.FullBodyActive)
|
||||
{
|
||||
|
||||
case false when !EntryEnabledVR.Value: // Not in FBT, and not enabled, perish
|
||||
case true when !EntryEnabledFBT.Value: // In FBT, and not enabled in fbt, perish
|
||||
return;
|
||||
|
@ -61,8 +59,8 @@ public class FuckToesMod : MelonMod
|
|||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Error($"Error during the patched method {nameof(OnVRIKAutoDetectReferences_Prefix)}");
|
||||
Logger.Error(e);
|
||||
MelonLogger.Error($"Error during the patched method {nameof(OnVRIKAutoDetectReferences_Prefix)}");
|
||||
MelonLogger.Error(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,6 @@ using System.Reflection;
|
|||
namespace NAK.FuckToes.Properties;
|
||||
internal static class AssemblyInfoParams
|
||||
{
|
||||
public const string Version = "1.0.3";
|
||||
public const string Version = "1.0.4";
|
||||
public const string Author = "NotAKidoS";
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
# FuckToes
|
||||
Prevents VRIK from autodetecting toes in HalfbodyIK.
|
||||
|
||||
Optionally can be applied in FBT, but toes in FBT are nice so you are a monster if so.
|
||||
Prevents VRIK from autodetecting toes in Halfbody or Fullbody.
|
||||
|
||||

|
||||
|
||||
|
@ -14,5 +13,4 @@ https://documentation.abinteractive.net/official/legal/tos/#7-modding-our-games
|
|||
|
||||
> 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.
|
||||
|
||||
> To the best of my knowledge, I have adhered to the Modding Guidelines established by Alpha Blend Interactive.
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"_id": 129,
|
||||
"name": "FuckToes",
|
||||
"modversion": "1.0.3",
|
||||
"gameversion": "2023r171",
|
||||
"modversion": "1.0.4",
|
||||
"gameversion": "2025r179",
|
||||
"loaderversion": "0.6.1",
|
||||
"modtype": "Mod",
|
||||
"author": "NotAKidoS",
|
||||
"description": "Prevents VRIK from using toe bones in HalfBody or 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.\n\nPlease see the README for relevant imagery detailing the problem.",
|
||||
"description": "Prevents VRIK from using toe bones in HalfBody or 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.\n\nPlease see the [README](https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/FuckToes/README.md) for relevant imagery detailing the problem.",
|
||||
"searchtags": [
|
||||
"toes",
|
||||
"vrik",
|
||||
|
@ -16,8 +16,8 @@
|
|||
"requirements": [
|
||||
"None"
|
||||
],
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r14/FuckToes.dll",
|
||||
"downloadlink": "https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/FuckToes.dll",
|
||||
"sourcelink": "https://github.com/NotAKidoS/NAK_CVR_Mods/tree/main/FuckToes/",
|
||||
"changelog": "- Fixes for 2023r171.",
|
||||
"changelog": "- Recompiled for 2025r179",
|
||||
"embedcolor": "#f61963"
|
||||
}
|
|
@ -56,6 +56,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RCCVirtualSteeringWheel", "
|
|||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "YouAreMyPropNowWeAreHavingSoftTacosLater", "YouAreMyPropNowWeAreHavingSoftTacosLater\YouAreMyPropNowWeAreHavingSoftTacosLater.csproj", "{8DA821CC-F911-4FCB-8C29-5EF3D76A5F76}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DoubleTapJumpToExitSeat", "DoubleTapJumpToExitSeat\DoubleTapJumpToExitSeat.csproj", "{36BF2B8B-F444-4886-AA4C-0EDF7540F1CE}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FuckToes", "FuckToes\FuckToes.csproj", "{751E4140-2F4D-4550-A4A9-65ABA9F7893A}"
|
||||
EndProject
|
||||
EndProject
|
||||
EndProject
|
||||
EndProject
|
||||
|
@ -295,6 +299,14 @@ Global
|
|||
{8DA821CC-F911-4FCB-8C29-5EF3D76A5F76}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{8DA821CC-F911-4FCB-8C29-5EF3D76A5F76}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{8DA821CC-F911-4FCB-8C29-5EF3D76A5F76}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{36BF2B8B-F444-4886-AA4C-0EDF7540F1CE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{36BF2B8B-F444-4886-AA4C-0EDF7540F1CE}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{36BF2B8B-F444-4886-AA4C-0EDF7540F1CE}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{36BF2B8B-F444-4886-AA4C-0EDF7540F1CE}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{751E4140-2F4D-4550-A4A9-65ABA9F7893A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{751E4140-2F4D-4550-A4A9-65ABA9F7893A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{751E4140-2F4D-4550-A4A9-65ABA9F7893A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{751E4140-2F4D-4550-A4A9-65ABA9F7893A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -9,8 +9,8 @@
|
|||
| [ASTExtension](ASTExtension/README.md) | Extension mod for [Avatar Scale Tool](https://github.com/NotAKidoS/AvatarScaleTool): | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/ASTExtension.dll) |
|
||||
| [AvatarQueueSystemTweaks](AvatarQueueSystemTweaks/README.md) | Small tweaks to the Avatar Queue System. | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/AvatarQueueSystemTweaks.dll) |
|
||||
| [CustomSpawnPoint](CustomSpawnPoint/README.md) | Replaces the unused Images button in the World Details page with a button to set a custom spawn point. | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/CustomSpawnPoint.dll) |
|
||||
| [DoubleTapJumpToExitSeat](DoubleTapJumpToExitSeat/README.md) | Literally the mod name. | No Download |
|
||||
| [FuckToes](FuckToes/README.md) | Prevents VRIK from autodetecting toes in HalfbodyIK. | No Download |
|
||||
| [DoubleTapJumpToExitSeat](DoubleTapJumpToExitSeat/README.md) | Replaces seat exit controls with a double-tap of the jump button, avoiding accidental exits from joystick drift or opening the menu. | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/DoubleTapJumpToExitSeat.dll) |
|
||||
| [FuckToes](FuckToes/README.md) | Prevents VRIK from autodetecting toes in Halfbody or Fullbody. | No Download |
|
||||
| [KeepVelocityOnExitFlight](KeepVelocityOnExitFlight/README.md) | Keeps the player's velocity when exiting flight mode. Makes it possible to fling yourself like in Garry's Mod. | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/KeepVelocityOnExitFlight.dll) |
|
||||
| [LazyPrune](LazyPrune/README.md) | Prevents loaded objects from immediately unloading on destruction. Should prevent needlessly unloading & reloading all avatars/props on world rejoin or GS reconnection. | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/LazyPrune.dll) |
|
||||
| [PropLoadingHexagon](PropLoadingHexagon/README.md) | https://github.com/NotAKidoS/NAK_CVR_Mods/assets/37721153/a892c765-71c1-47f3-a781-bdb9b60ba117 | [Download](https://github.com/NotAKidoS/NAK_CVR_Mods/releases/download/r46/PropLoadingHexagon.dll) |
|
||||
|
|
|
@ -12,18 +12,35 @@ public class RelativeSyncMarker : MonoBehaviour
|
|||
|
||||
public bool IsComponentActive
|
||||
=> _component.isActiveAndEnabled;
|
||||
|
||||
|
||||
public bool ApplyRelativePosition = true;
|
||||
public bool ApplyRelativeRotation = true;
|
||||
public bool OnlyApplyRelativeHeading;
|
||||
|
||||
|
||||
private MonoBehaviour _component;
|
||||
|
||||
|
||||
private void Start()
|
||||
{
|
||||
RegisterWithManager();
|
||||
ConfigureForPotentialMovementParent();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
RelativeSyncManager.RelativeSyncTransforms.Remove(pathHash);
|
||||
}
|
||||
|
||||
public void OnHavingSoftTacosNow()
|
||||
=> RegisterWithManager();
|
||||
|
||||
private void RegisterWithManager()
|
||||
{
|
||||
// Remove old hash in case this is a re-registration
|
||||
RelativeSyncManager.RelativeSyncTransforms.Remove(pathHash);
|
||||
|
||||
string path = GetGameObjectPath(transform);
|
||||
int hash = path.GetHashCode();
|
||||
|
||||
|
||||
// check if it already exists (this **should** only matter in worlds)
|
||||
if (RelativeSyncManager.RelativeSyncTransforms.ContainsKey(hash))
|
||||
{
|
||||
|
@ -34,18 +51,11 @@ public class RelativeSyncMarker : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
pathHash = hash;
|
||||
RelativeSyncManager.RelativeSyncTransforms.Add(hash, this);
|
||||
|
||||
ConfigureForPotentialMovementParent();
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
RelativeSyncManager.RelativeSyncTransforms.Remove(pathHash);
|
||||
}
|
||||
|
||||
private void ConfigureForPotentialMovementParent()
|
||||
{
|
||||
if (!gameObject.TryGetComponent(out CVRMovementParent movementParent))
|
||||
|
@ -54,20 +64,20 @@ public class RelativeSyncMarker : MonoBehaviour
|
|||
return;
|
||||
}
|
||||
_component = movementParent;
|
||||
|
||||
|
||||
// TODO: a refactor may be needed to handle the orientation mode being animated
|
||||
|
||||
|
||||
// respect orientation mode & gravity zone
|
||||
ApplyRelativeRotation = movementParent.orientationMode == CVRMovementParent.OrientationMode.RotateWithParent;
|
||||
OnlyApplyRelativeHeading = movementParent.GetComponent<GravityZone>() == null;
|
||||
}
|
||||
|
||||
|
||||
private static string GetGameObjectPath(Transform transform)
|
||||
{
|
||||
// props already have a unique instance identifier at root
|
||||
// worlds uhhhh, dont duplicate the same thing over and over thx
|
||||
// avatars on remote/local client have diff path, we need to account for it -_-
|
||||
|
||||
|
||||
string path = transform.name;
|
||||
while (transform.parent != null)
|
||||
{
|
||||
|
@ -79,22 +89,22 @@ public class RelativeSyncMarker : MonoBehaviour
|
|||
path = MetaPort.Instance.ownerId + "/" + path;
|
||||
break;
|
||||
} // remote player object root is already player guid
|
||||
|
||||
|
||||
path = transform.name + "/" + path;
|
||||
}
|
||||
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
private bool FindAvailableHash(ref int hash)
|
||||
|
||||
private static bool FindAvailableHash(ref int hash)
|
||||
{
|
||||
for (int i = 0; i < 16; i++)
|
||||
{
|
||||
hash += 1;
|
||||
if (!RelativeSyncManager.RelativeSyncTransforms.ContainsKey(hash)) return true;
|
||||
}
|
||||
|
||||
|
||||
// failed to find a hash in 16 tries, dont care
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -23,19 +23,19 @@ public class YouAreMyPropNowWeAreHavingSoftTacosLaterMod : MelonMod
|
|||
{
|
||||
#region Melon Preferences
|
||||
|
||||
public static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(YouAreMyPropNowWeAreHavingSoftTacosLaterMod));
|
||||
private static readonly MelonPreferences_Category Category =
|
||||
MelonPreferences.CreateCategory(nameof(YouAreMyPropNowWeAreHavingSoftTacosLater));
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryTrackPickups =
|
||||
private static readonly MelonPreferences_Entry<bool> EntryTrackPickups =
|
||||
Category.CreateEntry("track_pickups", true, display_name: "Track Pickups", description: "Should pickups be tracked?");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryTrackAttachments =
|
||||
private static readonly MelonPreferences_Entry<bool> EntryTrackAttachments =
|
||||
Category.CreateEntry("track_attachments", true, display_name: "Track Attachments", description: "Should attachments be tracked?");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryTrackSeats =
|
||||
private static readonly MelonPreferences_Entry<bool> EntryTrackSeats =
|
||||
Category.CreateEntry("track_seats", true, display_name: "Track Seats", description: "Should seats be tracked?");
|
||||
|
||||
public static readonly MelonPreferences_Entry<bool> EntryOnlySpawnedByMe =
|
||||
private static readonly MelonPreferences_Entry<bool> EntryOnlySpawnedByMe =
|
||||
Category.CreateEntry("only_spawned_by_me", true, display_name: "Only Spawned By Me", description: "Should only props spawned by me be tracked?");
|
||||
|
||||
#endregion Melon Preferences
|
||||
|
@ -231,6 +231,7 @@ public class YouAreMyPropNowWeAreHavingSoftTacosLaterMod : MelonMod
|
|||
// Apply new prop data to the spawnable
|
||||
newPropData.Spawnable = originalPropData.Spawnable;
|
||||
newPropData.Wrapper = originalPropData.Wrapper;
|
||||
newPropData.Wrapper.BroadcastMessage("OnHavingSoftTacosNow", SendMessageOptions.DontRequireReceiver); // support with RelativeSync
|
||||
newPropData.Wrapper.name = $"p+{newPropData.ObjectId}~{newPropData.InstanceId}";
|
||||
|
||||
// Copy sync values
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue