├── ILC ├── LoaderIntegrityCheck.cs ├── _bird_.dll └── _cat_.dll ├── IPCSupport.cs ├── LICENSE.md ├── Main.cs ├── MultiplayerDynamicBonesMod.csproj ├── MultiplayerDynamicBonesMod.sln ├── Properties ├── AssemblyInfo.cs ├── IPCSupport.cs ├── RiskFunct.cs ├── Utils.cs └── Xref.cs ├── README.md └── updateCheck /ILC/LoaderIntegrityCheck.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Reflection; 4 | using Harmony; 5 | using MelonLoader; 6 | using System.Diagnostics; 7 | using System.Runtime.InteropServices; 8 | using System.Threading; 9 | 10 | //https://github.com/knah/VRCMods/tree/master/Common 11 | 12 | namespace DBMod 13 | { 14 | [PatchShield] 15 | internal static class LoadCheck 16 | { 17 | public static void SFC() 18 | { 19 | NDB.HookLIC = true; 20 | try 21 | { 22 | using var stream = Assembly.GetExecutingAssembly() 23 | .GetManifestResourceStream("MultiplayerDynamicBonesMod.ILC._bird_.dll"); 24 | using var memStream = new MemoryStream((int)stream.Length); 25 | stream.CopyTo(memStream); 26 | 27 | Assembly.Load(memStream.ToArray()); 28 | 29 | PrintWarnMsg(); 30 | 31 | while (Console.In.Peek() != '\n') Console.In.Read(); 32 | } 33 | catch (BadImageFormatException) 34 | { 35 | } 36 | 37 | try 38 | { 39 | using var stream = Assembly.GetExecutingAssembly() 40 | .GetManifestResourceStream("MultiplayerDynamicBonesMod.ILC._cat_.dll"); 41 | using var memStream = new MemoryStream((int)stream.Length); 42 | stream.CopyTo(memStream); 43 | 44 | Assembly.Load(memStream.ToArray()); 45 | } 46 | catch (BadImageFormatException ex) 47 | { 48 | MelonLogger.Error(ex.ToString()); 49 | 50 | PrintWarnMsg(); 51 | 52 | while (Console.In.Peek() != '\n') Console.In.Read(); 53 | } 54 | 55 | try 56 | { 57 | var harmony = new HarmonyLib.Harmony(Guid.NewGuid().ToString()); 58 | harmony.Patch(AccessTools.Method(typeof(LoadCheck), nameof(PatchTest)), 59 | new HarmonyMethod(typeof(LoadCheck), nameof(ReturnFalse))); 60 | 61 | PatchTest(); 62 | 63 | PrintWarnMsg(); 64 | 65 | while (Console.In.Peek() != '\n') Console.In.Read(); 66 | } 67 | catch (BadImageFormatException) 68 | { 69 | } 70 | } 71 | 72 | private static bool ReturnFalse() => false; 73 | 74 | public static void PatchTest() 75 | { 76 | throw new BadImageFormatException(); 77 | } 78 | 79 | private static void PrintWarnMsg() 80 | { 81 | MelonLogger.Error("==================================================================="); 82 | MelonLogger.Error("You're using MelonLoader with important security features missing."); 83 | MelonLogger.Error("This exposes you to additional risks from certain malicious actors,"); 84 | MelonLogger.Error("including account theft, account bans, and other unwanted consequences"); 85 | MelonLogger.Error("If this is not what you want, download the official installer from"); 86 | MelonLogger.Error("https://github.com/LavaGang/MelonLoader/releases"); 87 | MelonLogger.Error("then close this console, and reinstall MelonLoader using it."); 88 | MelonLogger.Error("If you want to accept those risks, press Enter to continue"); 89 | MelonLogger.Error("==================================================================="); 90 | //Modified below this point 91 | new Thread(new ThreadStart(PopupMsg)).Start(); 92 | } 93 | 94 | [DllImport("User32.dll", CharSet = CharSet.Unicode)] 95 | static extern int MessageBox(IntPtr nWnd, string text, string title, uint type); 96 | private static void PopupMsg() 97 | { 98 | try 99 | { 100 | if (MessageBox(IntPtr.Zero, "You're using MelonLoader with important security features missing. Do you want to download the official installer?", "Multiplayer Dynamic Bones Mod", 0x04 | 0x40 | 0x1000) == 6) 101 | { 102 | Process.Start("https://github.com/LavaGang/MelonLoader/releases"); 103 | MessageBox(IntPtr.Zero, "Please close the game, and reinstall MelonLoader using the link on the page that just loaded.", "Multiplayer Dynamic Bones Mod", 0x40 | 0x1000); 104 | } 105 | } 106 | catch (Exception ex) { MelonLogger.Error(ex.ToString()); return; } 107 | } 108 | } 109 | } -------------------------------------------------------------------------------- /ILC/_bird_.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/9E4ECDDE/MultiplayerDynamicBonesMod/74b0e7881bd5988cdd04ae62de71ee658892a014/ILC/_bird_.dll -------------------------------------------------------------------------------- /ILC/_cat_.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/9E4ECDDE/MultiplayerDynamicBonesMod/74b0e7881bd5988cdd04ae62de71ee658892a014/ILC/_cat_.dll -------------------------------------------------------------------------------- /IPCSupport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.IO.Pipes; 7 | using System.Runtime.InteropServices; 8 | using System.IO; 9 | using System.Runtime.InteropServices.ComTypes; 10 | 11 | namespace ExternalDynamicBoneEditor 12 | { 13 | namespace IPCSupport 14 | { 15 | public enum Message 16 | { 17 | SetBoneDamping, 18 | SetBoneElasticity, 19 | SetBoneStiffness, 20 | SetBoneInert, 21 | SetBoneRadius, 22 | SetBoneEndLength, 23 | SetBoneEndOffset, 24 | SetBoneGravity, 25 | SetBoneForce, 26 | SetBoneData 27 | } 28 | 29 | [StructLayout(LayoutKind.Sequential)] 30 | public struct float3 31 | { 32 | public float x, y, z; 33 | 34 | public float3(float x, float y, float z) 35 | { 36 | this.x = x; 37 | this.y = y; 38 | this.z = z; 39 | } 40 | } 41 | 42 | public struct AvatarBones 43 | { 44 | public string name; 45 | public int boneCount; 46 | public SerializedBoneData[] bones; 47 | 48 | public byte[] ToByteArray() 49 | { 50 | using (MemoryStream ms = new MemoryStream()) 51 | { 52 | using (BinaryWriter binaryWriter = new BinaryWriter(ms)) 53 | { 54 | binaryWriter.Write(name); 55 | binaryWriter.Write(boneCount); 56 | List bonesBytes = new List(bones.Select((b) => b.ToByteArray())); 57 | foreach (byte[] boneByteData in bonesBytes) 58 | { 59 | binaryWriter.Write(boneByteData.Length); 60 | binaryWriter.Write(boneByteData); 61 | } 62 | return ms.ToArray(); 63 | } 64 | } 65 | } 66 | 67 | public static AvatarBones FromByteArray(byte[] array) 68 | { 69 | using (MemoryStream memoryStream = new MemoryStream(array)) 70 | { 71 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8)) 72 | { 73 | AvatarBones boneList = new AvatarBones(); 74 | boneList.name = binaryReader.ReadString(); 75 | boneList.boneCount = binaryReader.ReadInt32(); 76 | boneList.bones = new SerializedBoneData[boneList.boneCount]; 77 | for (int i = 0; i < boneList.boneCount; i++) 78 | { 79 | boneList.bones[i] = SerializedBoneData.FromByteArray(binaryReader.ReadBytes(binaryReader.ReadInt32())); 80 | } 81 | return boneList; 82 | } 83 | } 84 | } 85 | } 86 | 87 | [StructLayout(LayoutKind.Sequential)] 88 | public struct SerializedBoneData 89 | { 90 | public string name; 91 | public float damping; 92 | public float elasticity; 93 | public float stiffness; 94 | public float inert; 95 | public float radius; 96 | public float endLength; 97 | public float3 endOffset; 98 | public float3 gravity; 99 | public float3 force; 100 | 101 | public static SerializedBoneData FromByteArray(byte[] array) 102 | { 103 | using (MemoryStream memoryStream = new MemoryStream(array)) 104 | { 105 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8)) 106 | { 107 | SerializedBoneData boneData = new SerializedBoneData(); 108 | boneData.name = binaryReader.ReadString(); 109 | boneData.damping = binaryReader.ReadSingle(); 110 | boneData.elasticity = binaryReader.ReadSingle(); 111 | boneData.stiffness = binaryReader.ReadSingle(); 112 | boneData.inert = binaryReader.ReadSingle(); 113 | boneData.radius = binaryReader.ReadSingle(); 114 | boneData.endLength = binaryReader.ReadSingle(); 115 | boneData.endOffset = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 116 | boneData.gravity = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 117 | boneData.force = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 118 | return boneData; 119 | 120 | } 121 | } 122 | } 123 | 124 | public unsafe byte[] ToByteArray() 125 | { 126 | using (MemoryStream ms = new MemoryStream()) 127 | { 128 | using (BinaryWriter binaryWriter = new BinaryWriter(ms)) 129 | { 130 | binaryWriter.Write(name); 131 | binaryWriter.Write(damping); 132 | binaryWriter.Write(elasticity); 133 | binaryWriter.Write(stiffness); 134 | binaryWriter.Write(inert); 135 | binaryWriter.Write(radius); 136 | binaryWriter.Write(endLength); 137 | binaryWriter.Write(endOffset.x); 138 | binaryWriter.Write(endOffset.y); 139 | binaryWriter.Write(endOffset.z); 140 | binaryWriter.Write(gravity.x); 141 | binaryWriter.Write(gravity.y); 142 | binaryWriter.Write(gravity.z); 143 | binaryWriter.Write(force.x); 144 | binaryWriter.Write(force.y); 145 | binaryWriter.Write(force.z); 146 | return ms.ToArray(); 147 | } 148 | } 149 | } 150 | } 151 | 152 | public class IPCHandler 153 | { 154 | private PipeStream pipe; 155 | private BinaryWriter pipeWriter; 156 | private BinaryReader pipeReader; 157 | 158 | public bool IsConnected 159 | { 160 | get 161 | { 162 | return pipe != null && pipe.IsConnected; 163 | } 164 | } 165 | 166 | public bool IsServer 167 | { 168 | get 169 | { 170 | return pipe != null && pipe is NamedPipeServerStream; 171 | } 172 | } 173 | 174 | public IPCHandler(PipeStream pipeResource) 175 | { 176 | pipe = pipeResource; 177 | pipeReader = new BinaryReader(pipe, Encoding.UTF8); 178 | pipeWriter = new BinaryWriter(pipe, Encoding.UTF8); 179 | } 180 | 181 | public Message Receive(out byte[] data) 182 | { 183 | if (!IsConnected) throw new InvalidOperationException("Tried to receive a message but the pipe is disconnected."); 184 | Message message = (Message)pipeReader.ReadInt32(); 185 | data = pipeReader.ReadBytes(pipeReader.ReadInt32()); 186 | return message; 187 | } 188 | 189 | public void Send(Message messageType, string boneName, object data) 190 | { 191 | if (!IsConnected) throw new InvalidOperationException("Tried to send a message but the pipe is disconnected."); 192 | switch (messageType) 193 | { 194 | case Message.SetBoneData: 195 | { 196 | if (!IsServer) throw new InvalidOperationException("GetBoneData can only be called from the server."); 197 | pipeWriter.Write((int)Message.SetBoneData); 198 | pipeWriter.Write((byte[])data); 199 | break; 200 | } 201 | case Message.SetBoneDamping: 202 | { 203 | if (IsServer) throw new InvalidOperationException("SetBoneDamping can only be called from the client."); 204 | pipeWriter.Write((int)Message.SetBoneDamping); 205 | pipeWriter.Write(boneName); 206 | pipeWriter.Write((float)data); 207 | break; 208 | } 209 | case Message.SetBoneElasticity: 210 | { 211 | if (IsServer) throw new InvalidOperationException("SetBoneElasticity can only be called from the client."); 212 | pipeWriter.Write((int)Message.SetBoneElasticity); 213 | pipeWriter.Write(boneName); 214 | pipeWriter.Write((float)data); 215 | break; 216 | } 217 | case Message.SetBoneStiffness: 218 | { 219 | if (IsServer) throw new InvalidOperationException("SetBoneStiffness can only be called from the client."); 220 | pipeWriter.Write((int)Message.SetBoneStiffness); 221 | pipeWriter.Write(boneName); 222 | pipeWriter.Write((float)data); 223 | break; 224 | } 225 | case Message.SetBoneInert: 226 | { 227 | if (IsServer) throw new InvalidOperationException("SetBoneInert can only be called from the client."); 228 | pipeWriter.Write((int)Message.SetBoneInert); 229 | pipeWriter.Write(boneName); 230 | pipeWriter.Write((float)data); 231 | break; 232 | } 233 | case Message.SetBoneRadius: 234 | { 235 | if (IsServer) throw new InvalidOperationException("SetBoneRadius can only be called from the client."); 236 | pipeWriter.Write((int)Message.SetBoneRadius); 237 | pipeWriter.Write(boneName); 238 | pipeWriter.Write((float)data); 239 | break; 240 | } 241 | case Message.SetBoneEndLength: 242 | { 243 | if (IsServer) throw new InvalidOperationException("SetBoneEndLength can only be called from the client."); 244 | pipeWriter.Write((int)Message.SetBoneEndLength); 245 | pipeWriter.Write(boneName); 246 | pipeWriter.Write((float)data); 247 | break; 248 | } 249 | case Message.SetBoneEndOffset: 250 | { 251 | if (IsServer) throw new InvalidOperationException("SetBoneEndOffset can only be called from the client."); 252 | pipeWriter.Write((int)Message.SetBoneInert); 253 | pipeWriter.Write(boneName); 254 | pipeWriter.Write(((float3)data).x); 255 | pipeWriter.Write(((float3)data).y); 256 | pipeWriter.Write(((float3)data).z); 257 | break; 258 | } 259 | case Message.SetBoneGravity: 260 | { 261 | if (IsServer) throw new InvalidOperationException("SetBoneGravity can only be called from the client."); 262 | pipeWriter.Write((int)Message.SetBoneGravity); 263 | pipeWriter.Write(boneName); 264 | pipeWriter.Write(((float3)data).x); 265 | pipeWriter.Write(((float3)data).y); 266 | pipeWriter.Write(((float3)data).z); 267 | break; 268 | } 269 | case Message.SetBoneForce: 270 | { 271 | if (IsServer) throw new InvalidOperationException("SetBoneForce can only be called from the client."); 272 | pipeWriter.Write((int)Message.SetBoneInert); 273 | pipeWriter.Write(boneName); 274 | pipeWriter.Write(((float3)data).x); 275 | pipeWriter.Write(((float3)data).y); 276 | pipeWriter.Write(((float3)data).z); 277 | break; 278 | } 279 | } 280 | 281 | } 282 | } 283 | } 284 | } 285 | -------------------------------------------------------------------------------- /LICENSE.md: -------------------------------------------------------------------------------- 1 | 2 | GNU GENERAL PUBLIC LICENSE 3 | Version 3, 29 June 2007 4 | 5 | Copyright (C) 2007 Free Software Foundation, Inc. 6 | Everyone is permitted to copy and distribute verbatim copies 7 | of this license document, but changing it is not allowed. 8 | 9 | Preamble 10 | 11 | The GNU General Public License is a free, copyleft license for 12 | software and other kinds of works. 13 | 14 | The licenses for most software and other practical works are designed 15 | to take away your freedom to share and change the works. By contrast, 16 | the GNU General Public License is intended to guarantee your freedom to 17 | share and change all versions of a program--to make sure it remains free 18 | software for all its users. We, the Free Software Foundation, use the 19 | GNU General Public License for most of our software; it applies also to 20 | any other work released this way by its authors. You can apply it to 21 | your programs, too. 22 | 23 | When we speak of free software, we are referring to freedom, not 24 | price. Our General Public Licenses are designed to make sure that you 25 | have the freedom to distribute copies of free software (and charge for 26 | them if you wish), that you receive source code or can get it if you 27 | want it, that you can change the software or use pieces of it in new 28 | free programs, and that you know you can do these things. 29 | 30 | To protect your rights, we need to prevent others from denying you 31 | these rights or asking you to surrender the rights. Therefore, you have 32 | certain responsibilities if you distribute copies of the software, or if 33 | you modify it: responsibilities to respect the freedom of others. 34 | 35 | For example, if you distribute copies of such a program, whether 36 | gratis or for a fee, you must pass on to the recipients the same 37 | freedoms that you received. You must make sure that they, too, receive 38 | or can get the source code. And you must show them these terms so they 39 | know their rights. 40 | 41 | Developers that use the GNU GPL protect your rights with two steps: 42 | (1) assert copyright on the software, and (2) offer you this License 43 | giving you legal permission to copy, distribute and/or modify it. 44 | 45 | For the developers' and authors' protection, the GPL clearly explains 46 | that there is no warranty for this free software. For both users' and 47 | authors' sake, the GPL requires that modified versions be marked as 48 | changed, so that their problems will not be attributed erroneously to 49 | authors of previous versions. 50 | 51 | Some devices are designed to deny users access to install or run 52 | modified versions of the software inside them, although the manufacturer 53 | can do so. This is fundamentally incompatible with the aim of 54 | protecting users' freedom to change the software. The systematic 55 | pattern of such abuse occurs in the area of products for individuals to 56 | use, which is precisely where it is most unacceptable. Therefore, we 57 | have designed this version of the GPL to prohibit the practice for those 58 | products. If such problems arise substantially in other domains, we 59 | stand ready to extend this provision to those domains in future versions 60 | of the GPL, as needed to protect the freedom of users. 61 | 62 | Finally, every program is threatened constantly by software patents. 63 | States should not allow patents to restrict development and use of 64 | software on general-purpose computers, but in those that do, we wish to 65 | avoid the special danger that patents applied to a free program could 66 | make it effectively proprietary. To prevent this, the GPL assures that 67 | patents cannot be used to render the program non-free. 68 | 69 | The precise terms and conditions for copying, distribution and 70 | modification follow. 71 | 72 | TERMS AND CONDITIONS 73 | 74 | 0. Definitions. 75 | 76 | "This License" refers to version 3 of the GNU General Public License. 77 | 78 | "Copyright" also means copyright-like laws that apply to other kinds of 79 | works, such as semiconductor masks. 80 | 81 | "The Program" refers to any copyrightable work licensed under this 82 | License. Each licensee is addressed as "you". "Licensees" and 83 | "recipients" may be individuals or organizations. 84 | 85 | To "modify" a work means to copy from or adapt all or part of the work 86 | in a fashion requiring copyright permission, other than the making of an 87 | exact copy. The resulting work is called a "modified version" of the 88 | earlier work or a work "based on" the earlier work. 89 | 90 | A "covered work" means either the unmodified Program or a work based 91 | on the Program. 92 | 93 | To "propagate" a work means to do anything with it that, without 94 | permission, would make you directly or secondarily liable for 95 | infringement under applicable copyright law, except executing it on a 96 | computer or modifying a private copy. Propagation includes copying, 97 | distribution (with or without modification), making available to the 98 | public, and in some countries other activities as well. 99 | 100 | To "convey" a work means any kind of propagation that enables other 101 | parties to make or receive copies. Mere interaction with a user through 102 | a computer network, with no transfer of a copy, is not conveying. 103 | 104 | An interactive user interface displays "Appropriate Legal Notices" 105 | to the extent that it includes a convenient and prominently visible 106 | feature that (1) displays an appropriate copyright notice, and (2) 107 | tells the user that there is no warranty for the work (except to the 108 | extent that warranties are provided), that licensees may convey the 109 | work under this License, and how to view a copy of this License. If 110 | the interface presents a list of user commands or options, such as a 111 | menu, a prominent item in the list meets this criterion. 112 | 113 | 1. Source Code. 114 | 115 | The "source code" for a work means the preferred form of the work 116 | for making modifications to it. "Object code" means any non-source 117 | form of a work. 118 | 119 | A "Standard Interface" means an interface that either is an official 120 | standard defined by a recognized standards body, or, in the case of 121 | interfaces specified for a particular programming language, one that 122 | is widely used among developers working in that language. 123 | 124 | The "System Libraries" of an executable work include anything, other 125 | than the work as a whole, that (a) is included in the normal form of 126 | packaging a Major Component, but which is not part of that Major 127 | Component, and (b) serves only to enable use of the work with that 128 | Major Component, or to implement a Standard Interface for which an 129 | implementation is available to the public in source code form. A 130 | "Major Component", in this context, means a major essential component 131 | (kernel, window system, and so on) of the specific operating system 132 | (if any) on which the executable work runs, or a compiler used to 133 | produce the work, or an object code interpreter used to run it. 134 | 135 | The "Corresponding Source" for a work in object code form means all 136 | the source code needed to generate, install, and (for an executable 137 | work) run the object code and to modify the work, including scripts to 138 | control those activities. However, it does not include the work's 139 | System Libraries, or general-purpose tools or generally available free 140 | programs which are used unmodified in performing those activities but 141 | which are not part of the work. For example, Corresponding Source 142 | includes interface definition files associated with source files for 143 | the work, and the source code for shared libraries and dynamically 144 | linked subprograms that the work is specifically designed to require, 145 | such as by intimate data communication or control flow between those 146 | subprograms and other parts of the work. 147 | 148 | The Corresponding Source need not include anything that users 149 | can regenerate automatically from other parts of the Corresponding 150 | Source. 151 | 152 | The Corresponding Source for a work in source code form is that 153 | same work. 154 | 155 | 2. Basic Permissions. 156 | 157 | All rights granted under this License are granted for the term of 158 | copyright on the Program, and are irrevocable provided the stated 159 | conditions are met. This License explicitly affirms your unlimited 160 | permission to run the unmodified Program. The output from running a 161 | covered work is covered by this License only if the output, given its 162 | content, constitutes a covered work. This License acknowledges your 163 | rights of fair use or other equivalent, as provided by copyright law. 164 | 165 | You may make, run and propagate covered works that you do not 166 | convey, without conditions so long as your license otherwise remains 167 | in force. You may convey covered works to others for the sole purpose 168 | of having them make modifications exclusively for you, or provide you 169 | with facilities for running those works, provided that you comply with 170 | the terms of this License in conveying all material for which you do 171 | not control copyright. Those thus making or running the covered works 172 | for you must do so exclusively on your behalf, under your direction 173 | and control, on terms that prohibit them from making any copies of 174 | your copyrighted material outside their relationship with you. 175 | 176 | Conveying under any other circumstances is permitted solely under 177 | the conditions stated below. Sublicensing is not allowed; section 10 178 | makes it unnecessary. 179 | 180 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law. 181 | 182 | No covered work shall be deemed part of an effective technological 183 | measure under any applicable law fulfilling obligations under article 184 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or 185 | similar laws prohibiting or restricting circumvention of such 186 | measures. 187 | 188 | When you convey a covered work, you waive any legal power to forbid 189 | circumvention of technological measures to the extent such circumvention 190 | is effected by exercising rights under this License with respect to 191 | the covered work, and you disclaim any intention to limit operation or 192 | modification of the work as a means of enforcing, against the work's 193 | users, your or third parties' legal rights to forbid circumvention of 194 | technological measures. 195 | 196 | 4. Conveying Verbatim Copies. 197 | 198 | You may convey verbatim copies of the Program's source code as you 199 | receive it, in any medium, provided that you conspicuously and 200 | appropriately publish on each copy an appropriate copyright notice; 201 | keep intact all notices stating that this License and any 202 | non-permissive terms added in accord with section 7 apply to the code; 203 | keep intact all notices of the absence of any warranty; and give all 204 | recipients a copy of this License along with the Program. 205 | 206 | You may charge any price or no price for each copy that you convey, 207 | and you may offer support or warranty protection for a fee. 208 | 209 | 5. Conveying Modified Source Versions. 210 | 211 | You may convey a work based on the Program, or the modifications to 212 | produce it from the Program, in the form of source code under the 213 | terms of section 4, provided that you also meet all of these conditions: 214 | 215 | a) The work must carry prominent notices stating that you modified 216 | it, and giving a relevant date. 217 | 218 | b) The work must carry prominent notices stating that it is 219 | released under this License and any conditions added under section 220 | 7. This requirement modifies the requirement in section 4 to 221 | "keep intact all notices". 222 | 223 | c) You must license the entire work, as a whole, under this 224 | License to anyone who comes into possession of a copy. This 225 | License will therefore apply, along with any applicable section 7 226 | additional terms, to the whole of the work, and all its parts, 227 | regardless of how they are packaged. This License gives no 228 | permission to license the work in any other way, but it does not 229 | invalidate such permission if you have separately received it. 230 | 231 | d) If the work has interactive user interfaces, each must display 232 | Appropriate Legal Notices; however, if the Program has interactive 233 | interfaces that do not display Appropriate Legal Notices, your 234 | work need not make them do so. 235 | 236 | A compilation of a covered work with other separate and independent 237 | works, which are not by their nature extensions of the covered work, 238 | and which are not combined with it such as to form a larger program, 239 | in or on a volume of a storage or distribution medium, is called an 240 | "aggregate" if the compilation and its resulting copyright are not 241 | used to limit the access or legal rights of the compilation's users 242 | beyond what the individual works permit. Inclusion of a covered work 243 | in an aggregate does not cause this License to apply to the other 244 | parts of the aggregate. 245 | 246 | 6. Conveying Non-Source Forms. 247 | 248 | You may convey a covered work in object code form under the terms 249 | of sections 4 and 5, provided that you also convey the 250 | machine-readable Corresponding Source under the terms of this License, 251 | in one of these ways: 252 | 253 | a) Convey the object code in, or embodied in, a physical product 254 | (including a physical distribution medium), accompanied by the 255 | Corresponding Source fixed on a durable physical medium 256 | customarily used for software interchange. 257 | 258 | b) Convey the object code in, or embodied in, a physical product 259 | (including a physical distribution medium), accompanied by a 260 | written offer, valid for at least three years and valid for as 261 | long as you offer spare parts or customer support for that product 262 | model, to give anyone who possesses the object code either (1) a 263 | copy of the Corresponding Source for all the software in the 264 | product that is covered by this License, on a durable physical 265 | medium customarily used for software interchange, for a price no 266 | more than your reasonable cost of physically performing this 267 | conveying of source, or (2) access to copy the 268 | Corresponding Source from a network server at no charge. 269 | 270 | c) Convey individual copies of the object code with a copy of the 271 | written offer to provide the Corresponding Source. This 272 | alternative is allowed only occasionally and noncommercially, and 273 | only if you received the object code with such an offer, in accord 274 | with subsection 6b. 275 | 276 | d) Convey the object code by offering access from a designated 277 | place (gratis or for a charge), and offer equivalent access to the 278 | Corresponding Source in the same way through the same place at no 279 | further charge. You need not require recipients to copy the 280 | Corresponding Source along with the object code. If the place to 281 | copy the object code is a network server, the Corresponding Source 282 | may be on a different server (operated by you or a third party) 283 | that supports equivalent copying facilities, provided you maintain 284 | clear directions next to the object code saying where to find the 285 | Corresponding Source. Regardless of what server hosts the 286 | Corresponding Source, you remain obligated to ensure that it is 287 | available for as long as needed to satisfy these requirements. 288 | 289 | e) Convey the object code using peer-to-peer transmission, provided 290 | you inform other peers where the object code and Corresponding 291 | Source of the work are being offered to the general public at no 292 | charge under subsection 6d. 293 | 294 | A separable portion of the object code, whose source code is excluded 295 | from the Corresponding Source as a System Library, need not be 296 | included in conveying the object code work. 297 | 298 | A "User Product" is either (1) a "consumer product", which means any 299 | tangible personal property which is normally used for personal, family, 300 | or household purposes, or (2) anything designed or sold for incorporation 301 | into a dwelling. In determining whether a product is a consumer product, 302 | doubtful cases shall be resolved in favor of coverage. For a particular 303 | product received by a particular user, "normally used" refers to a 304 | typical or common use of that class of product, regardless of the status 305 | of the particular user or of the way in which the particular user 306 | actually uses, or expects or is expected to use, the product. A product 307 | is a consumer product regardless of whether the product has substantial 308 | commercial, industrial or non-consumer uses, unless such uses represent 309 | the only significant mode of use of the product. 310 | 311 | "Installation Information" for a User Product means any methods, 312 | procedures, authorization keys, or other information required to install 313 | and execute modified versions of a covered work in that User Product from 314 | a modified version of its Corresponding Source. The information must 315 | suffice to ensure that the continued functioning of the modified object 316 | code is in no case prevented or interfered with solely because 317 | modification has been made. 318 | 319 | If you convey an object code work under this section in, or with, or 320 | specifically for use in, a User Product, and the conveying occurs as 321 | part of a transaction in which the right of possession and use of the 322 | User Product is transferred to the recipient in perpetuity or for a 323 | fixed term (regardless of how the transaction is characterized), the 324 | Corresponding Source conveyed under this section must be accompanied 325 | by the Installation Information. But this requirement does not apply 326 | if neither you nor any third party retains the ability to install 327 | modified object code on the User Product (for example, the work has 328 | been installed in ROM). 329 | 330 | The requirement to provide Installation Information does not include a 331 | requirement to continue to provide support service, warranty, or updates 332 | for a work that has been modified or installed by the recipient, or for 333 | the User Product in which it has been modified or installed. Access to a 334 | network may be denied when the modification itself materially and 335 | adversely affects the operation of the network or violates the rules and 336 | protocols for communication across the network. 337 | 338 | Corresponding Source conveyed, and Installation Information provided, 339 | in accord with this section must be in a format that is publicly 340 | documented (and with an implementation available to the public in 341 | source code form), and must require no special password or key for 342 | unpacking, reading or copying. 343 | 344 | 7. Additional Terms. 345 | 346 | "Additional permissions" are terms that supplement the terms of this 347 | License by making exceptions from one or more of its conditions. 348 | Additional permissions that are applicable to the entire Program shall 349 | be treated as though they were included in this License, to the extent 350 | that they are valid under applicable law. If additional permissions 351 | apply only to part of the Program, that part may be used separately 352 | under those permissions, but the entire Program remains governed by 353 | this License without regard to the additional permissions. 354 | 355 | When you convey a copy of a covered work, you may at your option 356 | remove any additional permissions from that copy, or from any part of 357 | it. (Additional permissions may be written to require their own 358 | removal in certain cases when you modify the work.) You may place 359 | additional permissions on material, added by you to a covered work, 360 | for which you have or can give appropriate copyright permission. 361 | 362 | Notwithstanding any other provision of this License, for material you 363 | add to a covered work, you may (if authorized by the copyright holders of 364 | that material) supplement the terms of this License with terms: 365 | 366 | a) Disclaiming warranty or limiting liability differently from the 367 | terms of sections 15 and 16 of this License; or 368 | 369 | b) Requiring preservation of specified reasonable legal notices or 370 | author attributions in that material or in the Appropriate Legal 371 | Notices displayed by works containing it; or 372 | 373 | c) Prohibiting misrepresentation of the origin of that material, or 374 | requiring that modified versions of such material be marked in 375 | reasonable ways as different from the original version; or 376 | 377 | d) Limiting the use for publicity purposes of names of licensors or 378 | authors of the material; or 379 | 380 | e) Declining to grant rights under trademark law for use of some 381 | trade names, trademarks, or service marks; or 382 | 383 | f) Requiring indemnification of licensors and authors of that 384 | material by anyone who conveys the material (or modified versions of 385 | it) with contractual assumptions of liability to the recipient, for 386 | any liability that these contractual assumptions directly impose on 387 | those licensors and authors. 388 | 389 | All other non-permissive additional terms are considered "further 390 | restrictions" within the meaning of section 10. If the Program as you 391 | received it, or any part of it, contains a notice stating that it is 392 | governed by this License along with a term that is a further 393 | restriction, you may remove that term. If a license document contains 394 | a further restriction but permits relicensing or conveying under this 395 | License, you may add to a covered work material governed by the terms 396 | of that license document, provided that the further restriction does 397 | not survive such relicensing or conveying. 398 | 399 | If you add terms to a covered work in accord with this section, you 400 | must place, in the relevant source files, a statement of the 401 | additional terms that apply to those files, or a notice indicating 402 | where to find the applicable terms. 403 | 404 | Additional terms, permissive or non-permissive, may be stated in the 405 | form of a separately written license, or stated as exceptions; 406 | the above requirements apply either way. 407 | 408 | 8. Termination. 409 | 410 | You may not propagate or modify a covered work except as expressly 411 | provided under this License. Any attempt otherwise to propagate or 412 | modify it is void, and will automatically terminate your rights under 413 | this License (including any patent licenses granted under the third 414 | paragraph of section 11). 415 | 416 | However, if you cease all violation of this License, then your 417 | license from a particular copyright holder is reinstated (a) 418 | provisionally, unless and until the copyright holder explicitly and 419 | finally terminates your license, and (b) permanently, if the copyright 420 | holder fails to notify you of the violation by some reasonable means 421 | prior to 60 days after the cessation. 422 | 423 | Moreover, your license from a particular copyright holder is 424 | reinstated permanently if the copyright holder notifies you of the 425 | violation by some reasonable means, this is the first time you have 426 | received notice of violation of this License (for any work) from that 427 | copyright holder, and you cure the violation prior to 30 days after 428 | your receipt of the notice. 429 | 430 | Termination of your rights under this section does not terminate the 431 | licenses of parties who have received copies or rights from you under 432 | this License. If your rights have been terminated and not permanently 433 | reinstated, you do not qualify to receive new licenses for the same 434 | material under section 10. 435 | 436 | 9. Acceptance Not Required for Having Copies. 437 | 438 | You are not required to accept this License in order to receive or 439 | run a copy of the Program. Ancillary propagation of a covered work 440 | occurring solely as a consequence of using peer-to-peer transmission 441 | to receive a copy likewise does not require acceptance. However, 442 | nothing other than this License grants you permission to propagate or 443 | modify any covered work. These actions infringe copyright if you do 444 | not accept this License. Therefore, by modifying or propagating a 445 | covered work, you indicate your acceptance of this License to do so. 446 | 447 | 10. Automatic Licensing of Downstream Recipients. 448 | 449 | Each time you convey a covered work, the recipient automatically 450 | receives a license from the original licensors, to run, modify and 451 | propagate that work, subject to this License. You are not responsible 452 | for enforcing compliance by third parties with this License. 453 | 454 | An "entity transaction" is a transaction transferring control of an 455 | organization, or substantially all assets of one, or subdividing an 456 | organization, or merging organizations. If propagation of a covered 457 | work results from an entity transaction, each party to that 458 | transaction who receives a copy of the work also receives whatever 459 | licenses to the work the party's predecessor in interest had or could 460 | give under the previous paragraph, plus a right to possession of the 461 | Corresponding Source of the work from the predecessor in interest, if 462 | the predecessor has it or can get it with reasonable efforts. 463 | 464 | You may not impose any further restrictions on the exercise of the 465 | rights granted or affirmed under this License. For example, you may 466 | not impose a license fee, royalty, or other charge for exercise of 467 | rights granted under this License, and you may not initiate litigation 468 | (including a cross-claim or counterclaim in a lawsuit) alleging that 469 | any patent claim is infringed by making, using, selling, offering for 470 | sale, or importing the Program or any portion of it. 471 | 472 | 11. Patents. 473 | 474 | A "contributor" is a copyright holder who authorizes use under this 475 | License of the Program or a work on which the Program is based. The 476 | work thus licensed is called the contributor's "contributor version". 477 | 478 | A contributor's "essential patent claims" are all patent claims 479 | owned or controlled by the contributor, whether already acquired or 480 | hereafter acquired, that would be infringed by some manner, permitted 481 | by this License, of making, using, or selling its contributor version, 482 | but do not include claims that would be infringed only as a 483 | consequence of further modification of the contributor version. For 484 | purposes of this definition, "control" includes the right to grant 485 | patent sublicenses in a manner consistent with the requirements of 486 | this License. 487 | 488 | Each contributor grants you a non-exclusive, worldwide, royalty-free 489 | patent license under the contributor's essential patent claims, to 490 | make, use, sell, offer for sale, import and otherwise run, modify and 491 | propagate the contents of its contributor version. 492 | 493 | In the following three paragraphs, a "patent license" is any express 494 | agreement or commitment, however denominated, not to enforce a patent 495 | (such as an express permission to practice a patent or covenant not to 496 | sue for patent infringement). To "grant" such a patent license to a 497 | party means to make such an agreement or commitment not to enforce a 498 | patent against the party. 499 | 500 | If you convey a covered work, knowingly relying on a patent license, 501 | and the Corresponding Source of the work is not available for anyone 502 | to copy, free of charge and under the terms of this License, through a 503 | publicly available network server or other readily accessible means, 504 | then you must either (1) cause the Corresponding Source to be so 505 | available, or (2) arrange to deprive yourself of the benefit of the 506 | patent license for this particular work, or (3) arrange, in a manner 507 | consistent with the requirements of this License, to extend the patent 508 | license to downstream recipients. "Knowingly relying" means you have 509 | actual knowledge that, but for the patent license, your conveying the 510 | covered work in a country, or your recipient's use of the covered work 511 | in a country, would infringe one or more identifiable patents in that 512 | country that you have reason to believe are valid. 513 | 514 | If, pursuant to or in connection with a single transaction or 515 | arrangement, you convey, or propagate by procuring conveyance of, a 516 | covered work, and grant a patent license to some of the parties 517 | receiving the covered work authorizing them to use, propagate, modify 518 | or convey a specific copy of the covered work, then the patent license 519 | you grant is automatically extended to all recipients of the covered 520 | work and works based on it. 521 | 522 | A patent license is "discriminatory" if it does not include within 523 | the scope of its coverage, prohibits the exercise of, or is 524 | conditioned on the non-exercise of one or more of the rights that are 525 | specifically granted under this License. You may not convey a covered 526 | work if you are a party to an arrangement with a third party that is 527 | in the business of distributing software, under which you make payment 528 | to the third party based on the extent of your activity of conveying 529 | the work, and under which the third party grants, to any of the 530 | parties who would receive the covered work from you, a discriminatory 531 | patent license (a) in connection with copies of the covered work 532 | conveyed by you (or copies made from those copies), or (b) primarily 533 | for and in connection with specific products or compilations that 534 | contain the covered work, unless you entered into that arrangement, 535 | or that patent license was granted, prior to 28 March 2007. 536 | 537 | Nothing in this License shall be construed as excluding or limiting 538 | any implied license or other defenses to infringement that may 539 | otherwise be available to you under applicable patent law. 540 | 541 | 12. No Surrender of Others' Freedom. 542 | 543 | If conditions are imposed on you (whether by court order, agreement or 544 | otherwise) that contradict the conditions of this License, they do not 545 | excuse you from the conditions of this License. If you cannot convey a 546 | covered work so as to satisfy simultaneously your obligations under this 547 | License and any other pertinent obligations, then as a consequence you may 548 | not convey it at all. For example, if you agree to terms that obligate you 549 | to collect a royalty for further conveying from those to whom you convey 550 | the Program, the only way you could satisfy both those terms and this 551 | License would be to refrain entirely from conveying the Program. 552 | 553 | 13. Use with the GNU Affero General Public License. 554 | 555 | Notwithstanding any other provision of this License, you have 556 | permission to link or combine any covered work with a work licensed 557 | under version 3 of the GNU Affero General Public License into a single 558 | combined work, and to convey the resulting work. The terms of this 559 | License will continue to apply to the part which is the covered work, 560 | but the special requirements of the GNU Affero General Public License, 561 | section 13, concerning interaction through a network will apply to the 562 | combination as such. 563 | 564 | 14. Revised Versions of this License. 565 | 566 | The Free Software Foundation may publish revised and/or new versions of 567 | the GNU General Public License from time to time. Such new versions will 568 | be similar in spirit to the present version, but may differ in detail to 569 | address new problems or concerns. 570 | 571 | Each version is given a distinguishing version number. If the 572 | Program specifies that a certain numbered version of the GNU General 573 | Public License "or any later version" applies to it, you have the 574 | option of following the terms and conditions either of that numbered 575 | version or of any later version published by the Free Software 576 | Foundation. If the Program does not specify a version number of the 577 | GNU General Public License, you may choose any version ever published 578 | by the Free Software Foundation. 579 | 580 | If the Program specifies that a proxy can decide which future 581 | versions of the GNU General Public License can be used, that proxy's 582 | public statement of acceptance of a version permanently authorizes you 583 | to choose that version for the Program. 584 | 585 | Later license versions may give you additional or different 586 | permissions. However, no additional obligations are imposed on any 587 | author or copyright holder as a result of your choosing to follow a 588 | later version. 589 | 590 | 15. Disclaimer of Warranty. 591 | 592 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 593 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT 594 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY 595 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, 596 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 597 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM 598 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF 599 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 600 | 601 | 16. Limitation of Liability. 602 | 603 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING 604 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS 605 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY 606 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE 607 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF 608 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD 609 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), 610 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 611 | SUCH DAMAGES. 612 | 613 | 17. Interpretation of Sections 15 and 16. 614 | 615 | If the disclaimer of warranty and limitation of liability provided 616 | above cannot be given local legal effect according to their terms, 617 | reviewing courts shall apply local law that most closely approximates 618 | an absolute waiver of all civil liability in connection with the 619 | Program, unless a warranty or assumption of liability accompanies a 620 | copy of the Program in return for a fee. 621 | 622 | END OF TERMS AND CONDITIONS 623 | 624 | How to Apply These Terms to Your New Programs 625 | 626 | If you develop a new program, and you want it to be of the greatest 627 | possible use to the public, the best way to achieve this is to make it 628 | free software which everyone can redistribute and change under these terms. 629 | 630 | To do so, attach the following notices to the program. It is safest 631 | to attach them to the start of each source file to most effectively 632 | state the exclusion of warranty; and each file should have at least 633 | the "copyright" line and a pointer to where the full notice is found. 634 | 635 | 636 | Copyright (C) 637 | 638 | This program is free software: you can redistribute it and/or modify 639 | it under the terms of the GNU General Public License as published by 640 | the Free Software Foundation, either version 3 of the License, or 641 | (at your option) any later version. 642 | 643 | This program is distributed in the hope that it will be useful, 644 | but WITHOUT ANY WARRANTY; without even the implied warranty of 645 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 646 | GNU General Public License for more details. 647 | 648 | You should have received a copy of the GNU General Public License 649 | along with this program. If not, see . 650 | 651 | Also add information on how to contact you by electronic and paper mail. 652 | 653 | If the program does terminal interaction, make it output a short 654 | notice like this when it starts in an interactive mode: 655 | 656 | {project} Copyright (C) {year} {fullname} 657 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. 658 | This is free software, and you are welcome to redistribute it 659 | under certain conditions; type `show c' for details. 660 | 661 | The hypothetical commands `show w' and `show c' should show the appropriate 662 | parts of the General Public License. Of course, your program's commands 663 | might be different; for a GUI interface, you would use an "about box". 664 | 665 | You should also get your employer (if you work as a programmer) or school, 666 | if any, to sign a "copyright disclaimer" for the program, if necessary. 667 | For more information on this, and how to apply and follow the GNU GPL, see 668 | . 669 | 670 | The GNU General Public License does not permit incorporating your program 671 | into proprietary programs. If your program is a subroutine library, you 672 | may consider it more useful to permit linking proprietary applications with 673 | the library. If this is what you want to do, use the GNU Lesser General 674 | Public License instead of this License. But first, please read 675 | . 676 | -------------------------------------------------------------------------------- /MultiplayerDynamicBonesMod.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | Debug 6 | AnyCPU 7 | {93D460D9-05F1-4FBA-90C2-F92FF8D81A3F} 8 | Library 9 | Properties 10 | MultiplayerDynamicBonesMod 11 | MultiplayerDynamicBonesMod 12 | v4.7.2 13 | 512 14 | true 15 | 8.0 16 | 17 | 18 | true 19 | full 20 | false 21 | bin\Debug\ 22 | TRACE 23 | prompt 24 | 4 25 | true 26 | 27 | 28 | pdbonly 29 | true 30 | bin\Release\ 31 | TRACE 32 | prompt 33 | 4 34 | 35 | 36 | 37 | 38 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Assembly-CSharp.dll 39 | 40 | 41 | False 42 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2Cppmscorlib.dll 43 | 44 | 45 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\MelonLoader.dll 46 | 47 | 48 | 49 | 50 | False 51 | D:\SteamLibrary\steamapps\common\VRChat\Mods\UIExpansionKit.dll 52 | 53 | 54 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerBaseLib.dll 55 | 56 | 57 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnhollowerRuntimeLib.dll 58 | 59 | 60 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.dll 61 | 62 | 63 | False 64 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.AnimationModule.dll 65 | 66 | 67 | False 68 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.CoreModule.dll 69 | 70 | 71 | False 72 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.IMGUIModule.dll 73 | 74 | 75 | False 76 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\UnityEngine.UI.dll 77 | 78 | 79 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\VRCCore-Standalone.dll 80 | 81 | 82 | False 83 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\VRCSDKBase.dll 84 | 85 | 86 | D:\SteamLibrary\steamapps\common\VRChat\MelonLoader\Managed\Il2CppSystem.Core.dll 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | Copy /Y "$(TargetPath)" "D:\BuiltMods\$(AssemblyName).dll" 98 | 99 | -------------------------------------------------------------------------------- /MultiplayerDynamicBonesMod.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.30406.217 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MultiplayerDynamicBonesMod", "MultiplayerDynamicBonesMod.csproj", "{93D460D9-05F1-4FBA-90C2-F92FF8D81A3F}" 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 | {93D460D9-05F1-4FBA-90C2-F92FF8D81A3F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {93D460D9-05F1-4FBA-90C2-F92FF8D81A3F}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {93D460D9-05F1-4FBA-90C2-F92FF8D81A3F}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {93D460D9-05F1-4FBA-90C2-F92FF8D81A3F}.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 = {A901A9A7-D6F0-45CF-A5C1-6B3C71C46D61} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | using System.Resources; 4 | using MelonLoader; 5 | // La información general de un ensamblado se controla mediante el siguiente 6 | // conjunto de atributos. Cambie estos valores de atributo para modificar la información 7 | // asociada con un ensamblado. 8 | [assembly: AssemblyTitle("NDBMod")] 9 | [assembly: AssemblyDescription("Makes dynamic bones multiplayer!")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("Multiplayer Dynamic Bones")] 13 | [assembly: AssemblyCopyright("Copyleft \uD83C 2020")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Si establece ComVisible en false, los tipos de este ensamblado no estarán visibles 18 | // para los componentes COM. Si es necesario obtener acceso a un tipo en este ensamblado desde 19 | // COM, establezca el atributo ComVisible en true en este tipo. 20 | [assembly: ComVisible(false)] 21 | 22 | // El siguiente GUID sirve como id. de typelib si este proyecto se expone a COM. 23 | [assembly: Guid("5dcf9cd1-fb47-45f0-a106-a0c098dfbeab")] 24 | 25 | // La información de versión de un ensamblado consta de los cuatro valores siguientes: 26 | // 27 | // Versión principal 28 | // Versión secundaria 29 | // Número de compilación 30 | // Revisión 31 | // 32 | // Puede especificar todos los valores o usar los valores predeterminados de número de compilación y de revisión 33 | // utilizando el carácter "*", como se muestra a continuación: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: NeutralResourcesLanguage("en")] 36 | [assembly: MelonInfo(typeof(DBMod.NDB), "MultiplayerDynamicBonesMod", DBMod.NDB.VERSION_STR, "DltDat/charlesdeep, 9E4ECDDE", "https://github.com/9E4ECDDE/MultiplayerDynamicBonesMod/releases")] 37 | [assembly: MelonGame("VRChat", "VRChat")] -------------------------------------------------------------------------------- /Properties/IPCSupport.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | using System.IO.Pipes; 7 | using System.Runtime.InteropServices; 8 | using System.IO; 9 | using System.Runtime.InteropServices.ComTypes; 10 | 11 | namespace ExternalDynamicBoneEditor 12 | { 13 | namespace IPCSupport 14 | { 15 | public enum Message 16 | { 17 | SetBoneDamping, 18 | SetBoneElasticity, 19 | SetBoneStiffness, 20 | SetBoneInert, 21 | SetBoneRadius, 22 | SetBoneEndLength, 23 | SetBoneEndOffset, 24 | SetBoneGravity, 25 | SetBoneForce, 26 | SetBoneData 27 | } 28 | 29 | [StructLayout(LayoutKind.Sequential)] 30 | public struct float3 31 | { 32 | public float x, y, z; 33 | 34 | public float3(float x, float y, float z) 35 | { 36 | this.x = x; 37 | this.y = y; 38 | this.z = z; 39 | } 40 | } 41 | 42 | public struct AvatarBones 43 | { 44 | public string name; 45 | public int boneCount; 46 | public SerializedBoneData[] bones; 47 | 48 | public byte[] ToByteArray() 49 | { 50 | using (MemoryStream ms = new MemoryStream()) 51 | { 52 | using (BinaryWriter binaryWriter = new BinaryWriter(ms)) 53 | { 54 | binaryWriter.Write(name); 55 | binaryWriter.Write(boneCount); 56 | List bonesBytes = new List(bones.Select((b) => b.ToByteArray())); 57 | foreach (byte[] boneByteData in bonesBytes) 58 | { 59 | binaryWriter.Write(boneByteData.Length); 60 | binaryWriter.Write(boneByteData); 61 | } 62 | return ms.ToArray(); 63 | } 64 | } 65 | } 66 | 67 | public static AvatarBones FromByteArray(byte[] array) 68 | { 69 | using (MemoryStream memoryStream = new MemoryStream(array)) 70 | { 71 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8)) 72 | { 73 | AvatarBones boneList = new AvatarBones(); 74 | boneList.name = binaryReader.ReadString(); 75 | boneList.boneCount = binaryReader.ReadInt32(); 76 | boneList.bones = new SerializedBoneData[boneList.boneCount]; 77 | for (int i = 0; i < boneList.boneCount; i++) 78 | { 79 | boneList.bones[i] = SerializedBoneData.FromByteArray(binaryReader.ReadBytes(binaryReader.ReadInt32())); 80 | } 81 | return boneList; 82 | } 83 | } 84 | } 85 | } 86 | 87 | [StructLayout(LayoutKind.Sequential)] 88 | public struct SerializedBoneData 89 | { 90 | public string name; 91 | public float damping; 92 | public float elasticity; 93 | public float stiffness; 94 | public float inert; 95 | public float radius; 96 | public float endLength; 97 | public float3 endOffset; 98 | public float3 gravity; 99 | public float3 force; 100 | 101 | public static SerializedBoneData FromByteArray(byte[] array) 102 | { 103 | using (MemoryStream memoryStream = new MemoryStream(array)) 104 | { 105 | using (BinaryReader binaryReader = new BinaryReader(memoryStream, Encoding.UTF8)) 106 | { 107 | SerializedBoneData boneData = new SerializedBoneData(); 108 | boneData.name = binaryReader.ReadString(); 109 | boneData.damping = binaryReader.ReadSingle(); 110 | boneData.elasticity = binaryReader.ReadSingle(); 111 | boneData.stiffness = binaryReader.ReadSingle(); 112 | boneData.inert = binaryReader.ReadSingle(); 113 | boneData.radius = binaryReader.ReadSingle(); 114 | boneData.endLength = binaryReader.ReadSingle(); 115 | boneData.endOffset = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 116 | boneData.gravity = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 117 | boneData.force = new float3(binaryReader.ReadSingle(), binaryReader.ReadSingle(), binaryReader.ReadSingle()); 118 | return boneData; 119 | 120 | } 121 | } 122 | } 123 | 124 | public unsafe byte[] ToByteArray() 125 | { 126 | using (MemoryStream ms = new MemoryStream()) 127 | { 128 | using (BinaryWriter binaryWriter = new BinaryWriter(ms)) 129 | { 130 | binaryWriter.Write(name); 131 | binaryWriter.Write(damping); 132 | binaryWriter.Write(elasticity); 133 | binaryWriter.Write(stiffness); 134 | binaryWriter.Write(inert); 135 | binaryWriter.Write(radius); 136 | binaryWriter.Write(endLength); 137 | binaryWriter.Write(endOffset.x); 138 | binaryWriter.Write(endOffset.y); 139 | binaryWriter.Write(endOffset.z); 140 | binaryWriter.Write(gravity.x); 141 | binaryWriter.Write(gravity.y); 142 | binaryWriter.Write(gravity.z); 143 | binaryWriter.Write(force.x); 144 | binaryWriter.Write(force.y); 145 | binaryWriter.Write(force.z); 146 | return ms.ToArray(); 147 | } 148 | } 149 | } 150 | } 151 | 152 | public class IPCHandler 153 | { 154 | private PipeStream pipe; 155 | private readonly BinaryWriter pipeWriter; 156 | private readonly BinaryReader pipeReader; 157 | 158 | public bool IsConnected 159 | { 160 | get 161 | { 162 | return pipe != null && pipe.IsConnected; 163 | } 164 | } 165 | 166 | public bool IsServer 167 | { 168 | get 169 | { 170 | return pipe != null && pipe is NamedPipeServerStream; 171 | } 172 | } 173 | 174 | public IPCHandler(PipeStream pipeResource) 175 | { 176 | pipe = pipeResource; 177 | pipeReader = new BinaryReader(pipe, Encoding.UTF8); 178 | pipeWriter = new BinaryWriter(pipe, Encoding.UTF8); 179 | } 180 | 181 | public Message Receive(out byte[] data) 182 | { 183 | if (!IsConnected) throw new InvalidOperationException("Tried to receive a message but the pipe is disconnected."); 184 | Message message = (Message)pipeReader.ReadInt32(); 185 | data = pipeReader.ReadBytes(pipeReader.ReadInt32()); 186 | return message; 187 | } 188 | 189 | public void Send(Message messageType, string boneName, object data) 190 | { 191 | if (!IsConnected) throw new InvalidOperationException("Tried to send a message but the pipe is disconnected."); 192 | switch (messageType) 193 | { 194 | case Message.SetBoneData: 195 | { 196 | if (!IsServer) throw new InvalidOperationException("GetBoneData can only be called from the server."); 197 | pipeWriter.Write((int)Message.SetBoneData); 198 | pipeWriter.Write((byte[])data); 199 | break; 200 | } 201 | case Message.SetBoneDamping: 202 | { 203 | if (IsServer) throw new InvalidOperationException("SetBoneDamping can only be called from the client."); 204 | pipeWriter.Write((int)Message.SetBoneDamping); 205 | pipeWriter.Write(boneName); 206 | pipeWriter.Write((float)data); 207 | break; 208 | } 209 | case Message.SetBoneElasticity: 210 | { 211 | if (IsServer) throw new InvalidOperationException("SetBoneElasticity can only be called from the client."); 212 | pipeWriter.Write((int)Message.SetBoneElasticity); 213 | pipeWriter.Write(boneName); 214 | pipeWriter.Write((float)data); 215 | break; 216 | } 217 | case Message.SetBoneStiffness: 218 | { 219 | if (IsServer) throw new InvalidOperationException("SetBoneStiffness can only be called from the client."); 220 | pipeWriter.Write((int)Message.SetBoneStiffness); 221 | pipeWriter.Write(boneName); 222 | pipeWriter.Write((float)data); 223 | break; 224 | } 225 | case Message.SetBoneInert: 226 | { 227 | if (IsServer) throw new InvalidOperationException("SetBoneInert can only be called from the client."); 228 | pipeWriter.Write((int)Message.SetBoneInert); 229 | pipeWriter.Write(boneName); 230 | pipeWriter.Write((float)data); 231 | break; 232 | } 233 | case Message.SetBoneRadius: 234 | { 235 | if (IsServer) throw new InvalidOperationException("SetBoneRadius can only be called from the client."); 236 | pipeWriter.Write((int)Message.SetBoneRadius); 237 | pipeWriter.Write(boneName); 238 | pipeWriter.Write((float)data); 239 | break; 240 | } 241 | case Message.SetBoneEndLength: 242 | { 243 | if (IsServer) throw new InvalidOperationException("SetBoneEndLength can only be called from the client."); 244 | pipeWriter.Write((int)Message.SetBoneEndLength); 245 | pipeWriter.Write(boneName); 246 | pipeWriter.Write((float)data); 247 | break; 248 | } 249 | case Message.SetBoneEndOffset: 250 | { 251 | if (IsServer) throw new InvalidOperationException("SetBoneEndOffset can only be called from the client."); 252 | pipeWriter.Write((int)Message.SetBoneEndOffset); 253 | pipeWriter.Write(boneName); 254 | pipeWriter.Write(((float3)data).x); 255 | pipeWriter.Write(((float3)data).y); 256 | pipeWriter.Write(((float3)data).z); 257 | break; 258 | } 259 | case Message.SetBoneGravity: 260 | { 261 | if (IsServer) throw new InvalidOperationException("SetBoneGravity can only be called from the client."); 262 | pipeWriter.Write((int)Message.SetBoneGravity); 263 | pipeWriter.Write(boneName); 264 | pipeWriter.Write(((float3)data).x); 265 | pipeWriter.Write(((float3)data).y); 266 | pipeWriter.Write(((float3)data).z); 267 | break; 268 | } 269 | case Message.SetBoneForce: 270 | { 271 | if (IsServer) throw new InvalidOperationException("SetBoneForce can only be called from the client."); 272 | pipeWriter.Write((int)Message.SetBoneForce); 273 | pipeWriter.Write(boneName); 274 | pipeWriter.Write(((float3)data).x); 275 | pipeWriter.Write(((float3)data).y); 276 | pipeWriter.Write(((float3)data).z); 277 | break; 278 | } 279 | } 280 | pipe.WaitForPipeDrain(); 281 | } 282 | } 283 | } 284 | } 285 | -------------------------------------------------------------------------------- /Properties/RiskFunct.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MelonLoader; 3 | using UnityEngine; 4 | using UnityEngine.Networking; 5 | using VRC.Core; 6 | using SIDictionary = System.Collections.Generic.Dictionary; 7 | 8 | namespace DBMod 9 | { 10 | class RiskFunct 11 | {//I borrowed from https://github.com/Adnezz/VoiceFalloffOverride/blob/f1e6d300b0997e139e0bb616f32f8a9f7752f350/Utilities.cs#L42 12 | //Borrowed parts from https://github.com/loukylor/VRC-Mods/blob/main/VRChatUtilityKit/Utilities/VRCUtils.cs 13 | //And also https://github.com/Psychloor/PlayerRotater/blob/master/PlayerRotater/Utilities.cs 14 | 15 | private static bool alreadyCheckingWorld; 16 | private static SIDictionary checkedWorlds = new SIDictionary(); 17 | //0: Unblocked 18 | //1: Club World 19 | //2: Game World 20 | //3: Emm Website Blacklisted, Mod Disabled 21 | //4: Emm GameObject Blacklisted, Mod Disabled 22 | //10: Not checked yet. 23 | public static string WorldType() 24 | { 25 | switch (NDB.WorldType) 26 | { 27 | case 0: return "World Allowed"; 28 | case 1: return "Club World"; 29 | case 2: return "Game World"; 30 | case 3: return "EmmVRC DB Blacklisted"; 31 | case 4: return "GameObject Blacklisted"; 32 | case 10: return "Not checked yet - Error?"; 33 | default: MelonLoader.MelonLogger.Error($"Something Broke - WorldType Switch - {NDB.WorldType}"); return "Error"; 34 | } 35 | } 36 | 37 | internal static System.Collections.IEnumerator CheckWorld() 38 | { 39 | if (alreadyCheckingWorld) 40 | { 41 | MelonLogger.Error("Attempted to check for world multiple times"); 42 | yield break; 43 | } 44 | 45 | // Wait for RoomManager to exist before continuing. 46 | ApiWorld currentWorld = null; 47 | while (currentWorld == null) 48 | { 49 | currentWorld = RoomManager.field_Internal_Static_ApiWorld_0; 50 | yield return new WaitForSecondsRealtime(1); 51 | } 52 | var worldId = currentWorld.id; 53 | //MelonLogger.Msg($"Checking World with Id {worldId}"); 54 | 55 | // Check cache for world, so we keep the number of API calls lower. 56 | //if (checkedWorlds.ContainsKey(worldId)) 57 | if (checkedWorlds.TryGetValue(worldId, out int outres)) 58 | { 59 | //checkedWorlds.TryGetValue(worldId, out int outres); 60 | NDB.WorldType = outres; 61 | //checkedWorlds[worldId]; 62 | //MelonLogger.Msg($"Using cached check {Main.WorldType} for world '{worldId}'"); 63 | yield break; 64 | } 65 | 66 | // Check for Game Objects first, as it's the lowest cost check. 67 | if (GameObject.Find("eVRCRiskFuncEnable") != null || GameObject.Find("UniversalRiskyFuncEnable") != null || GameObject.Find("ModCompatRiskyFuncEnable ") != null) 68 | { 69 | NDB.WorldType = 0; 70 | checkedWorlds.Add(worldId, 0); 71 | yield break; 72 | } 73 | else if (GameObject.Find("eVRCRiskFuncDisable") != null || GameObject.Find("UniversalRiskyFuncDisable") != null || GameObject.Find("ModCompatRiskyFuncDisable ") != null) 74 | { 75 | NDB.WorldType = 4; 76 | checkedWorlds.Add(worldId, 4); 77 | yield break; 78 | } 79 | 80 | alreadyCheckingWorld = true; 81 | // Check if black/whitelisted from EmmVRC - thanks Emilia and the rest of EmmVRC Staff 82 | var uwr = UnityWebRequest.Get($"https://dl.emmvrc.com/riskyfuncs.php?worldid={worldId}"); 83 | uwr.SendWebRequest(); 84 | while (!uwr.isDone) 85 | yield return new WaitForEndOfFrame(); 86 | 87 | var result = uwr.downloadHandler.text?.Trim().ToLower(); 88 | uwr.Dispose(); 89 | if (!string.IsNullOrWhiteSpace(result)) 90 | { 91 | switch (result) 92 | { 93 | case "allowed": 94 | NDB.WorldType = 0; 95 | checkedWorlds.Add(worldId, 0); 96 | alreadyCheckingWorld = false; 97 | //MelonLogger.Msg($"EmmVRC allows world '{worldId}'"); 98 | yield break; 99 | 100 | case "denied": 101 | NDB.WorldType = 3; 102 | checkedWorlds.Add(worldId, 3); 103 | alreadyCheckingWorld = false; 104 | //MelonLogger.Msg($"EmmVRC denies world '{worldId}'"); 105 | yield break; 106 | } 107 | } 108 | 109 | // No result from server or they're currently down 110 | // Check tags then. should also be in cache as it just got downloaded 111 | API.Fetch( 112 | worldId, 113 | new Action( 114 | container => 115 | { 116 | ApiWorld apiWorld; 117 | if ((apiWorld = container.Model.TryCast()) != null) 118 | { 119 | short tagResult = 0; 120 | foreach (var worldTag in apiWorld.tags) 121 | { 122 | if (worldTag.IndexOf("game", StringComparison.OrdinalIgnoreCase) != -1 && worldTag.IndexOf("games", StringComparison.OrdinalIgnoreCase) == -1) 123 | { 124 | tagResult = 2; 125 | //MelonLogger.Msg($"Found game tag in world world '{worldId}'"); 126 | break; 127 | } 128 | else if (worldTag.IndexOf("club", StringComparison.OrdinalIgnoreCase) != -1) 129 | tagResult = 1; 130 | } 131 | NDB.WorldType = tagResult; 132 | checkedWorlds.Add(worldId, tagResult); 133 | alreadyCheckingWorld = false; 134 | //MelonLogger.Msg($"Tag search result: '{tagResult}' for '{worldId}'"); 135 | } 136 | else 137 | { 138 | MelonLogger.Error("Failed to cast ApiModel to ApiWorld"); 139 | } 140 | }), 141 | disableCache: false); 142 | 143 | } 144 | 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /Properties/Utils.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using MelonLoader; 3 | using UnityEngine; 4 | 5 | using VRC; 6 | using VRC.UI.Elements.Menus; 7 | using VRC.Core; 8 | using VRC.DataModel.Core; 9 | 10 | namespace DBMod 11 | { 12 | public static class Utils 13 | { 14 | 15 | public static Player GetSelectedUser() 16 | { 17 | var iuser = GameObject.Find("/UserInterface/Canvas_QuickMenu(Clone)/Container/Window/QMParent/Menu_SelectedUser_Local").GetComponentInChildren().field_Private_IUser_0; 18 | var userID = iuser.prop_String_0; 19 | foreach (Player player in PlayerManager.prop_PlayerManager_0.prop_ArrayOf_Player_0) 20 | { 21 | if (!player) continue; 22 | if (player.prop_APIUser_0.id.Equals(userID)) return player; 23 | } 24 | return null; 25 | } 26 | 27 | public static T GetOrAddComponent(this GameObject gameObject) where T : Component 28 | { 29 | T component = gameObject.GetComponent(); 30 | if (component == null) 31 | { 32 | return gameObject.AddComponent(); 33 | } 34 | return component; 35 | } 36 | 37 | public static string GetPath(this Transform current) 38 | { //http://answers.unity.com/answers/261847/view.html 39 | if (current.parent == null) 40 | return "/" + current.name; 41 | return current.parent.GetPath() + "/" + current.name; 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /Properties/Xref.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Linq; 3 | using System.Reflection; 4 | using UnhollowerRuntimeLib.XrefScans; 5 | 6 | namespace DBMod 7 | { 8 | class Xref 9 | { 10 | // This method is practically stolen from https://github.com/BenjaminZehowlt/DynamicBonesSafety/blob/master/DynamicBonesSafetyMod.cs 11 | //And then stolen from https://github.com/loukylor/VRC-Mods/blob/992409de5153dda3ca672eaa6043e19b91eebd01/UserInfoExtensions/Utilities/Xref.cs 12 | public static bool CheckMethod(MethodBase methodBase, string match) 13 | { 14 | try 15 | { 16 | return XrefScanner.XrefScan(methodBase) 17 | .Where(instance => instance.Type == XrefType.Global && instance.ReadAsObject().ToString() == match).Any(); 18 | } 19 | catch { } 20 | return false; 21 | } 22 | public static bool CheckUsed(MethodBase methodBase, string methodName) 23 | { 24 | try 25 | { 26 | return XrefScanner.UsedBy(methodBase) 27 | .Where(instance => instance.TryResolve() != null && instance.TryResolve().Name.Contains(methodName)).Any(); 28 | } 29 | catch { } 30 | return false; 31 | } 32 | public static bool CheckUsing(MethodInfo method, string match, Type type) 33 | { 34 | foreach (XrefInstance instance in XrefScanner.XrefScan(method)) 35 | if (instance.Type == XrefType.Method) 36 | try 37 | { 38 | if (instance.TryResolve().DeclaringType == type && instance.TryResolve().Name.Contains(match)) 39 | return true; 40 | } 41 | catch 42 | { 43 | 44 | } 45 | return false; 46 | } 47 | 48 | public static bool CheckUsedBy(MethodInfo method, string methodName, Type type = null) 49 | { 50 | foreach (XrefInstance instance in XrefScanner.UsedBy(method)) 51 | { 52 | if (instance.Type == XrefType.Method) 53 | { 54 | try 55 | { 56 | if ((type == null || instance.TryResolve().DeclaringType == type) && instance.TryResolve().Name.Contains(methodName)) 57 | return true; 58 | } 59 | catch 60 | { 61 | 62 | } 63 | } 64 | } 65 | return false; 66 | } 67 | } 68 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## MultiplayerDynamicBonesMod 2 | 3 | Makes dynamic bones multiplayer, allowing other players to interact with yours and vice versa, in addition to optimizing dynamic bones and more. 4 | 5 | How to install? Follow the Automatic Installation instructions at https://melonwiki.xyz/#/README?id=installation-on-il2cpp-games 6 | Then drop the mod dll in the Mods folder. 7 | **This mod requires [UIExpansionKit](https://github.com/knah/VRCMods)** 8 | 9 | 10 | Hotkeys | Description 11 | ---- | ----- 12 | F1 | Enable/disable the mod. You can also use the button in the quick menu if you're in VR or don't want to use the keyboard. 13 | F4 | Dump a list of active players working with the mod, useful for debugging. 14 | F5 | Open an ingame editor of Dynamic Bones settings if enabled in Mod Settings (Local only) 15 | F8 | List what colliders are attached to your bones. 16 | F9 | List colliders attached to other player's bones. 17 | F11 | Prints list of all Avatars in current list 18 | 19 | Once the mod has been run at least once, it creates a settings file in the vrchat folder under UserData, in a .cfg file. See the bottom of this document for a list of all settings. 20 | 21 | 22 | 23 | ## **Screenshots!** 24 | ### **Toggle/Settings Menu** 25 | From the 'MDB Settings' Button on the Quick Menu - A fast way to get to the most commonly adjusted settings 26 | _(The Quick Menu button can be disabled entirely by the 'Quick Menu Button' preference in Mod Settings)_ 27 | ![image](https://user-images.githubusercontent.com/68404726/112706831-e5578200-8e74-11eb-952a-38a6a74f329b.png) 28 | 29 | ### **MDB Avatar Config** 30 | This Menu focuses on Customizing Dynamic Bone interaction with other avatars on a per avatar basis 31 | _This is on the Quick Menu when you select another Player or on the side of the big Avatar menu for your own avatar_ 32 | 33 | * Include/Exclude a Specific Avatar - _This replaces the 'Enable/Disable MDB' buttons that used to be on the Per User Quick Menu_ 34 | * Excluded avatars will not be multiplayered. 35 | * Included avatars will bypass per avatar/player filters such as: 36 | * 'Only I can interact with other bones', 'Only friends and I can interact w/ eachother', 'Desktopers's colliders and bones won't be multiplayer'd' 37 | 38 | * Include/Exclude Bones/Colliders lets you selectively enable or disable certain Dynamic Bones or Colliders from being multiplayered per avatar. 39 | * Excluded Bones/Colliders will not be multiplayered. 40 | * Included Bones/Colliders will bypass per bone/collider filters such as: 41 | * 'Only enable colliders in hands', 'Only the breast bones will be multiplayer'd' 42 | * These checks can be disabled/enabled Globally with the 'Exclude Specific Objects' and 'Include Specific Objects' preferences. _Screenshot of this menu is below._ This is most useful for disabling an overly large collider on a model. 43 | * Adjusting an avatar's Dynamic Bone radius has several options. _Screenshot of this menu is below._ 44 | * Multiply existing Bone Radius's by a Multiplier. 45 | * Simply takes the existing bone radius and multiplies it by the multiplier you set. (Min x0.1) If bone is 0, it gets set to the fallback value in mod settings (Default 0.05) 46 | * Replace Bone Radius's 47 | * Replace all Dynamic Bone radius's with calculated values based on the bone length. 48 | * (The max value of either (bone.transform => bone.child(0).transform) or (m_Totalbonelength / Child Depth) then divided by the divisor set in Mod Settings and finally divided by the bone scale) 49 | * Exclude from 'Adjusting All Zero Radius Bones' 50 | * This only takes effect if you have the option 'Replace DB radius: Adjust All Zero Radius Bones' enabled in Mod Settings. This option will exclude the selected avatar from being adjusted by that global setting. 51 | * Auto add hand colliders to this avatar 52 | * This toggles between 'Enabled/Disabled/NA' where Disabled also disables the global option for adding hand colliders for the selected avatar. 53 | 54 | ![image](https://user-images.githubusercontent.com/68404726/112708152-6109fc80-8e7e-11eb-966f-7ed7ee4993e0.png) 55 | 56 | 57 | ### **Sub Menus** 58 | ![image](https://user-images.githubusercontent.com/68404726/112707256-01105780-8e78-11eb-9d89-dfc98d84392b.png) 59 | ### MoarBones 60 | Because the world always needs more Dynamic Bones! 61 | This can be toggled in **Mod Settings** 62 | ![image](https://user-images.githubusercontent.com/81715017/113239666-d0159580-9270-11eb-8010-0eddad1adeaa.png) 63 | "I hear you like bones~" Toggles this feature on/off 64 | "Performance Limit" Limits this to the first 10 avatars loaded since last toggle/world change 65 | "Don't effect local avatar" Stops moarbones from effecting you. Your own movements are networked through IK, so this is enabled by default. 66 | 67 | Or from **MDB Settings** on the Quick Menu 68 | ![image](https://user-images.githubusercontent.com/81715017/113239574-9cd30680-9270-11eb-907f-9617b0535dfb.png) 69 | 70 | 71 | ## __Changelog:__ 72 | * Build 1043.3 73 | * Changed default to only Multiplayer hand coliders 74 | * Fixed Exclude/Include Specific not working 75 | * Build 1043.2 76 | * Updated logging for ML0.5.x 77 | * Changed GetSelectedUser to use 'field_Private_List_1_Player_0' as previous method was causing issues 78 | * Build 1043.2 79 | * Fix for VRC 1151, now using a more consistent method for getting player name 80 | * Build 1043 81 | * Fixes for VRC 1149 82 | * Changed around hooks and variables, resized menus to fit new UIX constraints 83 | * For settings changes that only affect one user, the mod now only unloads and reloads their bones, instead of everyone's 84 | * Optimized checks in loops, should be somewhat faster now when adding players 85 | * Fixed a bug in AutoAddHandColliders where it would fail if the fingers weren't the first children of the hands 86 | * Added an option to 'Visualize' avatar's DBs and DBCs, this is in the MDB menu when you select someone 87 | * Added an option for resetting 'DisableAllBones' to false on world change 88 | * Removed 'DisallowInsideColliders' from the MDB Quick Settings menu, that setting should always be enabled 89 | * Build 1042.2 90 | * Fixes for VRC 1132 91 | * Updated methods for OnAvatarInstantiated, Reloading avatars after toggling Hand Colliders, Reloading all avatars after toggling Moar Bones. 92 | * Changed the behavior of DistantDisable - This is now "Use **custom** value for disabling bones if beyond a distance" 93 | * This previous caused issues if the user disabled the option while bones were disabled for being a certain distance away. However it turns out this feature works differently than expected. 94 | * The default behavior is m_distanceToDisable = 10 m_distantDisable = True, but m_ReferenceObject = null. The DB docs say with a null refObj it will use the main camera instead. In my testing with MDB uninstalled this is correct, VRC natively disables distant (10m) away bones. We are switching to where m_DistantDisable is always true and we just change the value. This way when DistantDisable is true, we can use the user's value, be it smaller or larger, and when false, the native 10m. 95 | 96 | * Build 1042 97 | * Fixes for VRC 1113 98 | * Updated method for OnAvatarInstantiated 99 | * Removed some unneeded debugging 100 | * Misc null checks added for Hand&Breast filters and AddColliderToBone 101 | * Added a separate logging file option 102 | * Build 1041.4 103 | * Fixes an error happens when using the Mod "Dynamic Bones Safety" and an NRE in ApplyBoneSettings that would happen when reloading all avatars. 104 | * Build 1041.3 105 | * VRC 1108 Compatibility - Fixed outdated method for reloading avatars and shouldn't break every other update now 106 | * Build 1041.2 107 | * VRC 1106 Compatibility 108 | * Fixed OnAvatarInstantiated Hook - Thanks loukylor for pointing at the right method 109 | * Build 1041.1 110 | * Melonloader 0.4.0 Compatibility 111 | * Adjusted the formatting in some debug messages 112 | * Maybe fixed rare NRE caused by ApplyBoneSettings 113 | * Build 1041 114 | * Added a 'Silent Mode' Log Level, this removes the join/leave/swap avatar messages from your log 115 | * Redid Hooks for RubyClient Compatibility - Thanks DubyaDude 116 | * Added the Loader Integrity Check 117 | * In game editor now waits a second between updates 118 | * Build 1040.1-7 119 | * Minor bug fixes for various VRC versions 120 | * Added more description to MoarBones & MoarBones button is moar visible (Added to MDB Settings in Quick Menu) 121 | * Fix 'Disable All Bones' not really working if Enable if Visible was enabled 122 | * Fixed issue where all db and dbc were being added to the included list. 123 | * Build 1040 124 | * Added an Include Specific option at the request of a mod user. 125 | * DynamicBones and Colliders now can toggle between Excluded/Included/NA. 126 | * Excluded is never multiplayered, Included will bypass 'Only enable colliders in hands', 'Only the breast bones will be multiplayer'd' 127 | * Include/Exclude a Specific Avatar - _This replaces the 'Enable/Disable MDB' buttons that used to be on the Per User Quick Menu_ 128 | * Excluded avatars will not be multiplayered. Included avatars will bypass per avatar/player filters such as: 'Only I can interact with other bones', 'Only friends and I can interact w/ eachother', 'Desktopers's colliders and bones won't be multiplayer'd' 129 | * Added a 'Disable All DynamicBones in Scene' option at the request of a ferret 130 | * Hopefully fixed the scale checks for colliders - Lossy is the answer 131 | * Moved 'Multiply/Replace/Zero Radius Exclude' to it's own submenu 132 | * Made Bone/Collider Specific menus go back to the previous one instead of close 133 | 134 | * Added a new MoarBones feature, more info coming soon~ 135 | 136 | * Switched from storing lists in ModPrefs and moved to standalone files, on first load of this version the mod will migrate everything to files in UserData/MDB 137 | * If there is ever an error loading a file, it will rename the old file and make a new one 138 | * Various bug fixes and NRE fixes (onlyHandCollider & AddAutoCollidersToPlayer if model was human rigged, but missing hands) 139 | 140 | * Build 1039 141 | * __Features/Changes:__ 142 | * Added toggles to enable an avatar's own Collider's to be added to their DynamicBones. Can be done just for you, and/or others. _Can be enabled in Mod Settings, or the Quick Menu MDB Settings_ 143 | * Added an option to auto add hand colliders for models that don't have them. Collider is based on hand size and there are options to enable per avatar, or for everyone. _Option for everyone is in Mod Settings, or the Quick Menu MDB Settings. Per avatar is in "MDB Avatar Config" on the Quick Menu when you select someone_. 144 | * Added an option to scale an Avatar's DB's based on a multiplier, or replace the scales with a calculated value based on bone length _"MDB Avatar Config" on the Quick Menu when you select someone_ 145 | * Replace uses the following logic (for now) 146 | * Replaces all Dynamic Bone radiuses with calculated values based on the bone length. (The max value of either (bone.transform => bone.child(0).transform) or (m_Totalbonelength / Child Depth) then divided by the divisor set in Mod Settings and finally divided by the bone scale.) 147 | * Multiply simply takes the existing bone radius and multiplies it by the multiplier you set. If bone is 0, it gets set to the fallback value in mod settings (Default 0.05) 148 | * There also an option on Mod Settings to disable the adjustment of bones with a radius of 0 149 | * Added the option in Mod Settings "Replace DB radius: Adjust All Zero Radius Bones" This will replace 0 radius bones on all avatars. Can be disabled per avatar with the MDB Avatar Config on Quick Menu. 150 | * Added an option to completely disable the QuickMenu button 151 | * Changed around Settings Quick Menu slightly, added a page 2 152 | * Moved around locations of items on Mod Settings so they are grouped by category 153 | * Added an autoupdate check back in 154 | * __Bugfix:__ 155 | * Added a null check in onlyHandColliders & breastsOnly if those db's or dbc's aren't really on a bone. 156 | * Breast bone check now uses DynamicBone.m_Root.transform to account for when the script is placed on something other than the bone it is on. 157 | * Collider size check now also includes local bone transform scale 158 | * Ingame editor should apply bone setting changes now 159 | * Still needs more testing and need to make it not apply changes every frame if you are dragging the slider 160 | 161 | * Build 1038 162 | * Added a Quick Settings Button to replace the existing Toggle (Can disable with preference and revert the button back to just a toggle) 163 | * Changed avatarsToExclude to use a combo of Avatar Name+AvatarID. Same for excludeSpecific db and dbc 164 | * This is a breaking change for existing lists but should remove the possibility for collisions in the ID 165 | * Reworked and cleaned up the filters/checks for db and dbc interaction. The following were not working and have been fixed: 166 | * Only friends and I can interact w/ eachother 167 | * Only enable colliders in hands 168 | * Desktopers's colliders and bones won't be multiplayer'd 169 | * Only the breast bones will be multiplayer'd - This found anything that was a child of the chest, included head/arms. 170 | * Fixed Print excluded colliders was repeating excluded db list. 171 | * Fixed Typo for AvatarMenu Exclude Bones button 172 | * Removed unused and commented out code 173 | * Build 1037 174 | * Minor changes for the most part. 175 | * Cleaned up logging and added a debug logging preference. 176 | * Removed/Commented out unused code. 177 | * Added sorting to Printing Excluded DynamicBones and DynamicBoneColliders. 178 | * Changed the final check in SkinnedmeshRender search for visibility. 179 | * Added a preference to disable adjusting dynamic bones properties along with the update rate. 180 | * Fixed a bug causing the collider exclude menu to not show current state of enabled/disabled. 181 | * Remade the EnableUserPanelButton-AvatarsExclude preference so it defaults to on for existing users. 182 | * Did this because the button was broke in the past. 183 | * Build 1036 184 | * Minor spelling and consistency changes: 185 | * Made some settings names shorter to better fit on the quick menu 186 | * Enable/Disable "Dynamic Bones mod" Toggle text is now same no matter the button state 187 | * Changed the Quick Menu Enable/Disable per avatar into two buttons since you were unable to tell the Toggle state of the previous button without clicking it and thus changing it 188 | * Implemented avatar blocking via the quick menu, this button did nothing previously 189 | * Enabling/Disabling the avatar on the quick menu now records the avatar name in AvatarsToWhichNotApply 190 | * QuickMenu.prop_QuickMenu_0.prop_APIUser_0.avatarId – was returning nothing 191 | * Replaced with - QuickMenu.prop_QuickMenu_0.field_Private_Player_0.prop_ApiAvatar_0.name 192 | * enableUserPanelButton was set to "OnlyDynamicBonesOnBreasts" and not "EnableUserPanelButton" 193 | * Enabling/Disabling a person's avatar now toggles the mod off and on if MDB is enabled 194 | * This is so the avatar unloads/loads immediately 195 | * in AddCollidersToAllPlayers, changed ApplyBoneSettings to use the variable name 'bone' instead of 'collider' since item3 is a DynamicBone 196 | * Fixed m_UpdateRate not applying. 197 | * Also now changing Elasticity, Stiffness, Damping, Inert based on a ratio from the inital setting of the bone. 198 | * Kinda works for helping compensate, but needs more work 199 | * EnableIfVisible was not working with some Avatars. AddDynamicBonesToVisibilityList was finding the first SkinnedMeshRenderer on the model, which wasn't necessarily the body. If this mesh render wasn't enabled, the avatar's dynamic bones were always disabled. 200 | * Mod now checks for an active "Body" mesh first and if it doesn't find one, it uses largest active Mesh, if that finds nothing, falls back to the first MeshRender. 201 | * Fixes bug with bone visibility enabling bones that were disabled by default, they are now removed from the visibility list. 202 | * Fixed the collider radius and height checks in AddColliderToBone. This now multiplies these values with the Armature scale 203 | * Fully implemented a feature to exclude specific dynamic bones or colliders from an avatar, this can be done in game with a custom menu "MDB Specific Exclude" using UIExpansionKit. Buttons appear for this on the Avatar big menu and other user quick menu. 204 | * There is an extra option in modprefs 'excludeSpecificBones' these bone names will be excluded on all avatars. 205 | * __UIExpansionKit is now required__ 206 | 207 | __Known bugs:__ 208 | * If Mod is disabled and you save mod settings, the button on the menu will switch to 'Press to disable DBM' despite the mod being disabled. Toggle the button on and off will resync it's state. 209 | 210 | __Todo:__ 211 | * Look over the ingame editor. 212 | * Still needs more testing and need to make it not apply changes every frame if you are dragging the slider - Now is every second 213 | * Make (require restart) options update live 214 | * In game visulzation of db and dbcs 215 | 216 | ## **Settings** 217 | Setting Name | Default Value | Display Text | Extra info 218 | ------------ | ------------- | ------------- | ------------- 219 | __What gets Mutliplayered__ | - | - | - 220 | EnabledByDefault | true | Enabled by default | If mod is enabled when game starts 221 | OptimizeOnly | false | Optimize bones, don't enable interaction **[QM]** | Options such as DistanceDisable, EnableJustIfVisible and, DynamicBoneUpdateRate will still apply to help optimize dynamic bones. **I recommend using this when you don't want to interact with others instead of disabling the mod completely** 222 | OnlyMe | false | Only I can interact with other bones **[QM]** 223 | OnlyFriends | false | Only friends and I can interact w/ eachothers bones **[QM]** 224 | DisallowDesktoppers | false | Desktopers's colliders and bones won't be multiplayer'd **[QM]** 225 | OnlyHandColliders | true | Only enable colliders in hands **[QM]** 226 | OnlyDynamicBonesOnBreasts | false | Only the breast bones will be multiplayer'd **[QM]** | 'Breast bones' is defined as anything attached to the chest and not a child of the Left/Right Shoulder or Neck. 227 | InteractSelf | false | Add your colliders to your own bones (May cause buggy interactions) **[QM]** 228 | OthersInteractSelf | false | Add other avatar's colliders to their own bones (May cause buggy interactions) **[QM]** 229 | AddAutoCollidersAll | false | Auto add hand colliders to avatars that don't have them (Requires reload of avatar) **[QM]** | If this setting is enabled, you can disable this behavior per avatar by selecting them and opening the 'MDB Avatar Config' on your QuickMenu. Toggle the hand collider option on that menu to 'Disabled' 230 | ExcludeSpecificBones | true | Exclude Specific Bones from being Multiplayered **[QM]** | If the bones/colliders set in the per avatar exclude menus wont be multiplayered 231 | IncludeSpecificBones | true | Include Specific Bones or Colliders to be Multiplayered[QM] | If the bones/colliders set in the per avatar include menus will bypass filters 232 | __Bone settings__ | - | - 233 | DistanceDisable | true | Custom value for disabling bones if beyond a distance **[QM]** 234 | DistanceToDisable | 4 | Distance limit | For above setting, in meters 235 | DisallowInsideColliders | true | Disallow inside colliders from being multiplayered **[QM]** 236 | DestroyInsideColliders | false | Destroy inside colliders (Requires reload of avatar) **[QM]** 237 | ColliderSizeLimit | 1f | Collider size limit 238 | DynamicBoneUpdateRate | 60 | Dynamic bone update rate 239 | DynamicBoneUpdateRateAdjSettings | true | Adjust bone properties in a ratio from update rate change 240 | EnableJustIfVisible | true | Enable dynamic bones only if they are in view | Uses the visibility of an avatar's skinned mesh render to check for view 241 | VisibilityUpdateRate | 1f | Visibility update rate (seconds) 242 | BoneRadiusDivisor | 4 | Replace DB radius: Divisor - New Radius is BoneLegnth / ThisValue 243 | EndBoneRadius | 0.05f | Replace DB radius: This is the fallback radius if the calculated value is 0 244 | AdjustRadiusExcludeZero | false | Replace DB radius: Excludes bone with a radius of 0 from being changed 245 | AdjustRadiusForAllZeroBones | false | Replace DB radius: Adjust All Zero Radius Bones - Replace the radius for all bones with a radius of 0 on all avatars 246 | DisableAllBones | false | Disable all Dynamic Bones in Scene **[QM]** 247 | __Mod settings__ | - | - 248 | KeybindsEnabled | true | Enable keyboard actuation(F1, F4 and F8) | See above for bindings 249 | UpdateMode | 2 | A value of 2 will notify the user when a new version of the mod is available, while 1 will not. 250 | EnableEditor | false | EnableEditor (F5) | GUI for live editing of bones, may need some work? 251 | QuickMenuButton | 1 | Quick Menu Button - 1:Settings Menu, 2:Just Toggle, 0:None (Restart Req) | Controls the state of the button that gets placed on your Quick Menu 252 | LogLevel | 0 | Console Logging Level: 0-Default, 1-Info, 2-Debug, 3-ExtraDebug(Very laggy), -1 Silent Mode | Logging info if you really want it 253 | MoarBones | false | MoarBones: I hear you like bones~ 254 | MoarBonesPref | true | MoarBones: Performance Limit 255 | MoarBonesNotLocal | true | MoarBones: Don't effect local avatar | Enabled by default as the local avatar movements are networked 256 | __Hidden Lists/Text files__ | - | - 257 | AvatarsToAddColliders.txt | null |_Doesn't show in settings_ | One line per avatar, this is populated through the in game menus. AvatarName+Hash 258 | AvatarsToAdjustDBRadius.txt | null |_Doesn't show in settings_ | One line per avatar, this is populated through the in game menus. "AvatarName+Hash, 0.1-∞\|0\|-2", 0.1-∞ = Multiply to scale bones radius's by, 0 = Replace with Calculated, -2 = 'Exclude from Adjusting All Zero Radius Bones' 259 | AvatarsToWhichNotApply.txt | null |_Doesn't show in settings_ | One line per avatar, this is populated through the in game menus. "AvatarName+Hash, True\|False" True = Exclude, False = Include 260 | BonesToAlwaysExclude.txt | null |_Doesn't show in settings_ | One line per Bone, user exact bone names **This must be manually populated in the config file** Example: (, are line breaks) Left Z_Wing_Bone_3, Left Z_Wing_Bone_2, Left Z_Wing_Bone_1, Right Z_Wing_Bone_3, Right Z_Wing_Bone_2, Right Z_Wing_Bone_1 261 | BonesToExclude.txt | null |_Doesn't show in settings_ | One line per Bone, this is populated through the in game menus. AvatarName+Hash:db:BoneName 262 | BonesToInclude.txt | null |_Doesn't show in settings_ | One line per Bone, this is populated through the in game menus. AvatarName+Hash:db:BoneName 263 | CollidersToExclude.txt | null |_Doesn't show in settings_ | One line per Collider, this is populated through the in game menus. AvatarName+Hash:dbc:ColliderName 264 | CollidersToInclude.txt | null |_Doesn't show in settings_ | One line per Collider, this is populated through the in game menus. AvatarName+Hash:dbc:ColliderName 265 | 266 | 267 | **[QM]** means the setting is on the QuickMenu Settings Menu 268 | -------------------------------------------------------------------------------- /updateCheck: -------------------------------------------------------------------------------- 1 | 1043.2 2 | --------------------------------------------------------------------------------