Vibrator support for 6 action and platformer games

Here are some mods for various games providing vibrator device integration.

Solas City Heroes 0.9 (BepInEx IL2CPP x64, does not require the server application)
A customizable beat’em up with a superhero and bondage theme, integration works well. There are various configuration options in the BepInEx\config\BlimpMod.cfg file
Max The Elf v4 (BepInEx Mono x64)
It is a game where you walk to the right and dodge/defend against various enemies. The characters in this game are futa and/or androgynous males with female voice acting.
Mystic Knight Maya 0.4 (BepInEx Mono x64)
It’s an extensive action platformer with a large variety of ero content.
Masochistic Male Bullying Classroom 3D (english) (BepInEx Mono x86)
The actual game is a simple minigame played with the arrow keys while animations play depending on performance. Output is not synchronized to the animations, as they involve a large number of characters doing different things.
Echidna Wars DX V1.11 (english) (does not require BepInEx or a plugin)
It is a high-quality action platformer with the ero content being almost exclusively vore.
Drain Mansion 1.8.0 (BepInEx Mono x64)
Not very suitable. It’s a puzzle/stealth platformer where you often run around for 10 minutes with nothing happening and then a scene plays for 5 seconds and it’s game over. Also integration doesn’t work in the gallery.

Instructions
Extract the appropriate BepInEx build into the game’s root folder, same location as the exe.
Copy mod plugin into the BepInEx\plugins folder.
Launch the server application before launching the game.
You can configure device time offset in the BepInEx\config\ file for each mod.

Download
Download BepInEx here: BepInBuilds - BepInEx Bleeding Edge
Download the program with all mod plugins here: 5.13 MB file on MEGA

Further notes
Currently there are not too many customization options, although you can modify intensity and duration in general. There is no support for linear stroker-type devices. There would be several problems with trying to provide support for them because everything is based on events, which are easy to represent with a vibrator-type device, but not with a position-based device, especially when an animation is not itself also a linear motion. So it is unlikely currently that I will implement support for these devices.

14 Likes

Any chance of getting stroking support for max the elf?? I came across that game the other day and put out a request for it :pray:

I followed the instruction but I cant make it work :frowning:

Which game did you try? (Assuming you’re using Windows 64bit?)

I’d test your toy with another program or player to make sure it works correctly.
Also download and install 7zip to give you some more ‘unzipping’ options: https://www.7-zip.org/

Then pick one game to try.
For example: Mystic Knight Maya 0.4
Download a fresh copy of the game.
Download the version of BepInEx Mono x64 - for Windows 64 bit it’s this one: https://builds.bepinex.dev/projects/bepinex_be/668/BepInEx-Unity.Mono-win-x64-6.0.0-be.668%2B46e297f.zip

Then put the BepInEx-Unity.Mono-win-x64-6.0.0.zip file into the Maya game folder.
(should be called alpha 0.4).
Right click on the BepInEx-Unity.Mono-win-x64-6.0.0.zip file and select ‘Extract HERE’.
The content of the .zip file should expand into the alpha 0.4 folder with the Maya game .exe file.
Next, download the program with all mod plugins here: [5.13 MB file on MEGA] (5.13 MB file on MEGA)

Take that .zip file and move it to the alpha 0.4 file.
Right click on it and select ‘Extract HERE’.
Those files should now all be in the alpha 0.4 folder.
Open the folder called ‘plugins’.
Inside you should see all the games it supports.
Right click on the MysticKnightMayaToySupport.dll file and select ‘COPY’
Go to the alpha 0.4 folder, open it, find the BepInEx folder, open it, find the plugins folder, open it and right click PASTE.

You should now see a copy of the MysticKnightMayaToySupport.dll file there.
Go back to the MysticKnightMaya.exe and launch the game once, then quit it.
Turn on your vibration toy of choice.

Go the alpha 0.4 folder and launch the GameToyServerUI.exe and launch it.
It should find your vibration toy. If not, try launching Intiface Central first, sync to your vibration toy, then launch the GameToyServerUI.exe. It should find your vibration toy. If not, either your vibration toy is not supported, or you made an error in the set up. Try again.

If the toy is found, launch the MysticKnightMaya.exe and play the game normally.

Good Luck!

2 Likes

A few people have asked about modding Unity games, here is some information of what I know and how I do things, and I post it here as a public reference
Some commonly used tools

  • for decompliation, dotPeek, or alternatively ILSpy or dnSpyEx
  • for development, typically Visual Studio
  • as a modding framework, BepInEx, or MelonLoader
  • to inspect games at runtime, UnityExplorer
  • for debugging a game you could use dnSpyEx but this is almost never needed
  • it will be helpful to know C# and have maybe some rudimentary understanding of Unity although you could learn as you go

Basic steps to mod any Unity game

  • Figure out if the game is Mono or IL2CPP (Mono has “Managed” folder, IL2CPP has “il2cpp_data” folder)
  • Install the modding framework to the game (for newer version of Il2CPP with BepInEx you may need a bleeding edge build of BepInEx, not a github build)
  • Add UnityExplorer as a plugin and you can use this to inspect the game at runtime. UnityExplorer does not currently work with bleeding edge builds, the 6.0 version works with BepInEx 6.0.0-pre1 from github, but some games don’t work with that. However MelonLoader could work in those cases.
  • For Mono games, you can inspect the Assembly-CSharp.dll with a decompiler,
  • For IL2CPP, the modding framework will extract and rebuild Assembly-CSharp.dll and put it into some folder. IL2CPP decompilation has no useful executable code, everything is forwarded to native code. However, you can still hook/call functions and read/write values in the objects.
  • In Visual Studio create a C# .NET class library for the appropriate .NET version. The modding framework will often show this information in console, or you could look at mscorlib.dll/netstandard.dll in game folder, a decompiler will show their versions. For IL2CPP, it’s .NET 6 usually, for Mono it’s netstandard2 if present, or framework 3.5 or 4.6 (ancient technology)
  • Right click the references on your project and add assembly references. Here you would add most of the BepInEx/Harmony/MelonLoader dll’s, and the game and Unity dll’s which will make all of those classes accessible in your code. But you don’t necessarily have to add all the Unity dll’s, just the ones you would need such as UnityEngine.dll, animation, etc., depending on the case
  • For toy integration you would use Buttplug. Buttplug standalone dll for .NET is kind of deprecated and also it doesn’t work with Mono anyway I believe, only IL2CPP games. So I think the simplest way now is to send device commands directly to Intiface over websocket, alternatively you could have your own application and send data to it over websocket, UDP etc., and maybe have a config UI or process it and then send it to Initiface or Buttplug dll. If you don’t have a custom application, then users could mostly configure the mod in a config file
  • Example code for sending commands directly to Intiface without using a library
    LoveMachine/src/LoveMachine.Core/Buttplug at mastur · Sauceke/LoveMachine · GitHub
  • To play a funscript, you would parse it as a json and then just send the commands. The command you send is where you want the device to go over what time period. Here you could also apply customization. And there is no built-in linear-to-vibrator thing in Buttplug, so to support vibrator from funscript, you have to implement that
  • To play a funscript for an ingame animation, you could usually look at the Animator component. Here you can get the currently playing clip and its name.
var state = animator.GetCurrentAnimatorStateInfo(0);
var clipArray = animator.GetCurrentAnimatorClipInfo(0);
if (clipArray == null || clipArray.Length == 0)
{
   data.Log("no clips in current animator state");
   return 0f;
}
var clip = clipArray[0].clip;
var totalPlaybackSpeed = animator.speed * state.speed;
var clipEvents = clip.events.
var currentTime = (state.normalizedTime * clip.length + offset) % clip.length;

Mostly read out the current time on the animation and use that to advance the funscript so they will be in sync and not drift

  • To detect such things, you could either just check it every frame in Update, or you could find some function in the game that changes animations, and hook into that. Usually you can use some Player or enemy object that has an Animator on it, it’s pretty straightforward
  • To hook into functions, refer to some example code and the Harmony and BepInEx/MelonLoader documentations. Harmony is the patching framework that actually applies your patches. Generally you will use something like [HarmonyPatch], [HarmonyPrefix] and [HarmonyPostfix] tags and specify what function you want to hook to. There you can also read and write private class members.
    Patching
    and you can apply your patches with CreateAndPatchAll. For example you could react to the player spawning in by hooking into “Start” function of the player class.
  • In BepInEx 5 your mod is a MonoBehaviour in the game, but in BepInEx 6 it’s not, so to do something every frame you could just hook to an existing Update function or create some object in the game with an Update script
  • There are some intricacies with IL2CPP in particular. For example some functions may crash the game is you patch them, and if you use threads such as async functions you have to register them. Another thing you may encounter in Mono or IL2CPP is that references to the same Unity Object are no longer equal across frames even though they should be, this is because you are not getting direct references but something marshalled by the patcher I guess, you can instead use .GetInstanceID() to get a unique permanent number for the object and compare that
  • Some games use a visual scripting framework, so they have no real code to look at and just a bunch of mystery objects. This could be a bit annoying, but could be OK if you just look for Animator
  • You can also decompile the entire Assembly-CSharp.dll into a Visual Studio project and then build your mod into that, so you would have a single-file replacement mod. But this is not ideal because if the game gets an update the mod will not work with it, and also a user could not have multiple mods at the same time
4 Likes

Thank you for the explaination, a question I have from a quick once over is in relation to basic steps to mod unity, how do you know what dll’s to add as in does it suggest dll’s it thinks you might want or just give you a list and your expected to know what you want?
If the latter how can we figure it out as to which dll’s give what so all the classes are accessible?

Thank you.

Usually you should be good just adding Assembly-CSharp.dll, UnityEngine.dll, UnityEngine.CoreModule.dll, AnimationModule, then maybe Input and UI dll’s if you need them at all, like if you wanted to add a hotkey for users or a small UI overlay. The dll names should give a good idea of what to expect inside generally. And in terms of BepInEx/MonoCecil/Harmony, just anything that has that in the name pretty much. You can also load an entire folder into dotPeek and look for a particular function that you may be missing

1 Like

Hm I’ve tried to install BepInEx but I think as the translation uses ReiPatcher (which if I remember right alters the .exe file) it makes it so BepInEx doesn’t work as the config folder is never made.

So is there some way to get it to work with ReiPatcher or is it best to ditch it (via fresh reinstall) and just move forward and include a translation via BepInEx as I know that there is an autotranslator compatable with it…just don’t know if it is with the game?

Edit: I also presume that if a game has “MonoBleedingEdge” then I should use Mono but use the bleeding edge version of BepInEx?

ReiPatcher is also available as a BepInEx plugin so that could work and in general I would recommend the bleeding edge builds since they have the new API. But in this case ReiPatcher might not be available for that version. If the Unity binaries are modified already, then BepInEx can’t work since it can’t find an entry point. But if there’s a modding framework installed as part of a translation, then you can make a mod on top of that

Any idea as to how I can do so since normal methods don’t work? (presuming I can’t find a version of the game without ReiPatcher preinstalled)

For Echidna Wars, how does it function since there’s no plugin nor bepIn required? Where would I find the mod for this, if it’s here?

You just have to launch the server application, it reads from process memory

i’d like to know the answer too if you found a solution