English / 日本語
A BepInEx plugin for Koikatu and Koikatsu Party that works around bugs in kPlug / kPlugVR (by Katarsys) and in related game code, mainly NullReferenceExceptions, an orgasm loop, a stuck invite menu and high memory use.
It does not change kPlug's files; it patches the running code with Harmony.
(The name comes from its first feature: inviting the same character card more than once.)
For the kPlug author: docs/KPLUG_ISSUES.md lists every issue with the exception stack, the cause, and a suggested fix inside kPlug, plus smaller exceptions that the patch does not touch. The patch and the document are MIT-licensed, so any part of them can be taken into kPlug.
- Games:
Koikatu/KoikatuVR(kPlugPatcher_InviteChrID.dll),Koikatsu Party/Koikatsu Party VR(kPlugPatcher_InviteChrID_KKP.dll) - kPlug versions: 3.5.6 (tested in game, normal and VR) and 3.6.3 including the 2026-10-19 update (patches applied in normal and VR; the newer API is detected by type, not by version number)
- Version: 1.31.0
| Problem | Workaround |
|---|---|
| Inviting the same card twice breaks leaving / name-based actions; a card with the main girl's name is not listed | Copy and rename the invited card in memory ("Name (1)"); show same-name cards |
| Invite does nothing for the rest of the H scene | Find the main girl's destroyed bones again before SpotManager.AdaptCaliber |
NRE every frame after a coordinate reload or a swap (ColDefsManager, BindersCtrl, BonesCtrl, BellyCtrl) |
Remove destroyed entries / find the bones again (since 1.11.2 also right after a previous repair, e.g. when the coordinate button is clicked quickly) |
Orgasm repeats while the gauge is empty (game ParentObjectCtrl, game MotionIK with null IK targets from kPlug) |
Skip destroyed items / null targets (game patches) |
| NRE every frame in ahegao for characters without a face material | Skip only the material call |
| Several GB of memory per H scene (invite menu loads every card fully) | Keep a light card in the list and load the full card when inviting |
| Frame rate drops with many invited girls (DynamicBone) | Stop invited girls' DynamicBones and cap updates to 1 per frame |
| After a swap, faces do not match the lines (face list not reloaded) | Reload the face list together with the voice list |
| HVoiceCaching 0.3: swap exceptions, 3P stuck at loading | Clear the dictionaries the way the game does (game patches) |
| VR: several invited girls cannot be kissed at once; a girl stays in kiss state | Optional multi-girl kiss; end stuck kisses |
| VR (kPlugVR 3.599+): the new invite menu loads every card fully at each character select (250 cards: about 20 s and +11 to 13 GB; out of memory the second time) | Keep light cards in the list and load the full card when inviting (VR) |
| Invite menu face images are kept at the full card size with a CPU copy, and stay after H (about 250 cards: 300 MB GPU + 300 MB CPU) | Shrink them to the button size, drop the CPU copy, destroy them when H ends (normal mode; VR menu: shrink) |
| VR: transparent clothes of characters behind the kPlugVR menu are drawn over it, and the invite menu flickers | Draw the characters' transparent parts first (VR) |
cf_j_kokan scale becomes 0 / negative / NaN during insertion (kPlug KokanBehavior), with a Unity warning every frame |
Skip the broken step and repair the value |
| Frame rate drops with many characters: DynamicBone collision checks recompute every collider for every particle (game) | Compute the colliders once per DynamicBone and reuse them; the results are the same (game patch) |
| Frame time with heavy cards: KKABMX scales a joint unevenly and Unity 5.6 rebuilds kPlug's body MeshColliders every frame (about 0.7 ms each) | Replace kPlug's marked body MeshColliders with capsules of the same size (default) or turn them off; KK normal, 6 girls: 58.8 to 34.8 ms |
kPlug BonesCtrl reads and writes Transforms for offsets that are exactly zero |
Skip only the zero offsets (normal and VR) |
| VR title screen: kPlugVR menus that overlap the title UI cannot be clicked | Give kPlugVR menus the original ray, prefer them when they are nearer, ignore the invisible drag panels, extend the beam (VR) |
| Normal kPlug searches the whole scene every frame (H scene check, menu under cursor) | Remember the objects when they are created and check them instead; verify with the original search every 300 frames (normal mode) |
| Character shadows cost GPU time in H with many girls | Turn off shadow casting of invited girls (default, VR and normal mode) or of everyone during H; restored when turned off or when H ends |
| kPlugVR coordinate menu reads every coordinate card fully each time it builds the list (124 cards: about 3 s and +1.2 to 1.6 GB) | Reuse the entries of unchanged cards and read only new or changed cards (VR) |
| kPlugVR character menu throws every frame and cannot be closed after a costume change rebuilds the bones while it is open | Re-take the bone from BonesCtrl (VR) |
| Frame time: every H animation change copies the motion controllers (about 22 MB each; +2.6 GB in two minutes with six invited girls dancing) | Reuse the first copy per kind while in H, also for the paths kPlug loads directly (KK normal mode) |
| Invited girls sink into the ground on added maps whose floor mesh has no collider | Add a collider to the floor meshes named in the config (default: one station map) |
Title screen: after "Join ranking" and back, kPlug.Core.Update throws every frame (normal mode) |
Let kPlug recreate its title config when it was destroyed with the scene |
| Ctrl+I (random invite) picks girls who are already present again and again | Exclude present girls by name, ignoring the " (n)" suffix this plugin adds (normal mode, free H) |
| With CheatTools "Unlock invalid H positions as well", the start pose can become a special one and the invite menu stays disabled for the whole H | Pick the start pose again from the poses that fit the H point (normal mode and VR) |
| kPlug pose menu and AI only offer poses that fit the H point | Optionally offer all poses (extra ones marked with *); the AI chooses uniformly (normal mode; VR menu of kPlugVR 3.599+ and VR AI; off-by-config) |
| No way to ask kPlug to line up the invited girls again at a chosen moment | Hotkey that requests kPlug's own repositioning once (normal mode, unassigned by default) |
VR: some head mods lose their eyes while DrawMenusOnTop is on; the main/second heroine cannot be invited again (kPlugVR 3.599+) |
Restore parts that stopped being transparent; show their cards in the invite list again |
| VR: the UI ray beam stops in front of characters, so UI behind them looks unreachable | Extend the beam to the UI hit point (default) or through everything (visual only) |
Each workaround can be turned off in the config. Diagnostics (logging only) are off by default.
Tested in game: 1.24.0 and 1.24.1 in KK normal mode, 1.25.0 in KK normal mode, 1.26.0 in KK and KKP normal mode (logs), 1.26.1 in KK normal mode, 1.26.2 in KK and KKP (plugin stays silent without kPlug), 1.28.0 to 1.29.1 in KK normal mode (pose menu, AI and start pose; the AI part only partly), 1.30.0 to 1.30.1 in KK VR (menu shown and selectable; the rest of the VR AI is still being checked), 1.30.2 to 1.31.0 in KK VR (head mod eyes, main heroine in the invite list, beam). KKP for the pose and hotkey features is not tested. 1.13.0 to 1.15.0 in KK VR, 1.16.0 in KK normal mode and VR, 1.16.1 and 1.17.0 in KK normal mode, 1.21.2 and 1.21.3 in KK VR, 1.22.0 in KK and KKP normal mode, 1.23.0 in KK normal mode, KK VR (kPlugVR 3.6.3) and KKP VR (kPlugVR 3.5.6), 1.23.1 in KK VR and KKP VR.
The capsules (1.18.0) and the zero-offset skip (1.19.0, 1.20.0) have been in use in KK and KKP normal mode and VR since then, but grabbing, clicking, liquid and VR hand reactions with capsules were not compared one by one. Not tested: 1.16.1 in VR, and the 1.17.1 change (VR menu draw order with the flicker diagnostics off).
Since 1.23.1 CharacterShadowsDesktop defaults to Invited. BepInEx keeps the value already in an existing config file, so change it by hand if you used 1.23.0.
- Install kPlug and BepInEx 5.
- Copy the DLL for your game from the Releases ZIP to
BepInEx\plugins\kPlugPatcher_InviteChrID\(only the one for your game; the other one would skip itself anyway).
Settings are in BepInEx\config\kkttspj.kk.kplugpatcher.cfg (Koikatsu Party: kkttspj.kkp.kplugpatcher.cfg). See README_ja.md §7 for the full list.
The settings file of 1.10.x (com.your.kk.kplugpatcher.cfg / com.your.kkp.kplugpatcher.cfg) is copied to the new name on the first start of 1.11.0.
Place this folder directly under the game folder and run build_and_deploy_invite.ps1 (needs the .NET SDK). It builds both Release_KK and Release_KKP.
The project references ..\..\BepInEx\core\ and ..\..\Koikatu_Data\Managed\ (..\..\Koikatsu Party_Data\Managed\ for KKP). It does not reference kPlug; kPlug types are found by reflection.
The DLLs are copied to ..\Deploy\kPlugPatcher_InviteChrID\.
MIT (LICENSE). No warranty. kPlug is a separate work by its author and is not included here. Game files, BepInEx and other plugins are not included either.