illusionmods / illusionfixes Goto Github PK
View Code? Open in Web Editor NEWA collection of fixes for common issues found in games by Illusion
License: GNU General Public License v3.0
A collection of fixes for common issues found in games by Illusion
License: GNU General Public License v3.0
Hello,
I noticed that KK_Fix_CharacterListOptimizations had no measurable impact on load times in the official KoikatuVR.
KoikatuVR without dll: 34 (26) seconds
KoikatuVR with dll: 34 (26) seconds
Koikatu without dll: 9 (8) seconds
Koikatu with dll: 3 (3) seconds
(values are for 500 cards, first value is for first load, second value is when coming back from h scene)
Out of curiosity I checked the source. For VR prefix/postfix functions for ClassRoomCharaFileInitializeList are created and hooked, but there is only a postfix for ClassRoomCharaFileStart.
I created and hooked a prefix for ClassRoomCharaFileStart, where I set ExtendedSave.LoadEventsEnabled to false. (and set it back to true at the beginning of the postfix) VR load times are now down to 12 (9) seconds.
Is there a reason for not disabling ExtendedSave loadevents during ClassRoomCharaFileStart? (a.k.a. Do I break something with my fix?)
While troubleshooting the Colliders plugin it has become painfully evident that AI and HS2 suffer from the same over-60fps jitter that KK and KKS experience. The existing Fix_DynamicBones plugin does deal with this, however it can have the unintended side-effect of causing some bones to become "stuck" in the game world - particularly in tandem with the Ear Wiggle plugin included (and enabled by default) with the BetterRepacks, but sometimes just things like elbows. This results in some pretty unnatural distortion as expected; though HS2 gets away fairly cleanly as the models are continually being reloaded.
Rather understandably I suspect that this plugin simply hasn't been properly verified against AI or HS2, given it isn't listed as being appropriate for them. I'm simply requesting that someone more versed in this plugin, and the two mentioned titles give it a once-over to see if there's any obvious cause for such issues.
Hiding cursor sometimes makes me mistake like clicking something else.
Is it possible that adds an option similar to "Manage cursor in maker", which is in Maker Optimizations settings, to toggle hides or not cursor in studio?
Hi,
I don't know whether the Steam version of Honey Select 2 is supported, but I was finally narrow down some issues I was having to NullChecks.
The Steam assembly seems to have an overload method for Illusion.Game.Utils.Bundle.LoadSprite
, causing the patching to fail.
[Error : Unity Log] AmbiguousMatchException: Ambiguous match found.
Stack trace:
System.RuntimeType.GetMethodImpl (System.String name, System.Reflection.BindingFlags bindingAttr, System.Reflection.Binder binder, System.Reflection.CallingConventions callConv, System.Type[] types, System.Reflection.ParameterModifier[] modifiers) (at <7ba07f088431485bb722f3b3373e87ee>:0)
System.Type.GetMethod (System.String name, System.Reflection.BindingFlags bindingAttr) (at <7ba07f088431485bb722f3b3373e87ee>:0)
HarmonyLib.AccessTools.DeclaredMethod (System.Type type, System.String name, System.Type[] parameters, System.Type[] generics) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchTools.GetOriginalMethod (HarmonyLib.HarmonyMethod attr) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
Rethrow as HarmonyException: Ambiguous match for HarmonyMethod[(class=Illusion.Game.Utils+Bundle, methodname=LoadSprite, type=Normal, args=undefined)]
HarmonyLib.PatchClassProcessor.ReportException (System.Exception exception, System.Reflection.MethodBase original) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.PatchClassProcessor.Patch () (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.PatchAll (System.Type type) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
HarmonyLib.Harmony.CreateAndPatchAll (System.Type type, System.String harmonyInstanceId) (at <474744d65d8e460fa08cd5fd82b5d65f>:0)
IllusionFixes.NullChecks.Awake () (at <fc88d89c074943af8de50ae23464af22>:0)
UnityEngine.GameObject:AddComponent(Type)
BepInEx.Bootstrap.Chainloader:Start()
UnityEngine.AddressableAssets.Addressables:InstantiateAsync(Object, Transform, Boolean, Boolean)
GameSetup.Setup:InitializeBeforeSceneLoad()
I was able to get it working, but I don't know whether it's possible to patch the new overload without breaking JP compatibility.
[HarmonyFinalizer, HarmonyPatch(typeof(Illusion.Game.Utils.Bundle), nameof(Illusion.Game.Utils.Bundle.LoadSprite), typeof(string), typeof(string), typeof(UnityEngine.UI.Image), typeof(bool), typeof(string), typeof(string), typeof(string))]
private static Exception LoadSpriteNullRefEater(Exception __exception, string assetBundleName, string assetName)
{
if (__exception != null)
{
Logger.LogError($"Caught a crash when trying to load sprite {assetBundleName} > {assetName}! \n{__exception}");
}
return null;
}
[HarmonyFinalizer, HarmonyPatch(typeof(Illusion.Game.Utils.Bundle), nameof(Illusion.Game.Utils.Bundle.LoadSprite), typeof(string), typeof(string), typeof(string))]
private static Exception LoadSpriteNullRefEater2(Exception __exception, string assetBundleName, string assetName)
{
if (__exception != null)
{
Logger.LogError($"Caught a crash when trying to load sprite {assetBundleName} > {assetName}! \n{__exception}");
}
return null;
}
I wanted to update the BepInEx folder to fix some bugs for character accessory mods. (ex. Sucrose from Genshin Impact and others).
Upon replacing files with what was provided for updating BepInEx, Koikatsu has completely lost it's English translation.
What happened? How do I fix it?
[I made a backup of everything before attempting the update so I'm good on that front if I need to start from square one]
I have some some laggings in school mode when the game loading or rotate cam and character moving.
Characters with another character set as a child of the left hand will break FK when the parent character is replaced.
Steps to reproduce:
This causes the right arm FK to reset to the animation default and modifying any FK nodes on the right arm affects character 2 instead of character 1. Attached is a scene with this set up, replace the male character to see the bug in action.
Tested on Koikatsu with no plugins installed so it appears to be a vanilla game bug
Could you please solve the problem about light and shade severely reducing fps in AI girl?
I have noticed that some of the animation on the girls within a sex scene ceases under some circumstances, most notably the hair and breasts. Following some experimentation I've been able to narrow it down to the various dynamic bone update features provided by the main game optimizations. My theory is that these optimizations are remaining in effect during the scene but the character and camera positions used to determine what, if any throttling of the dynamic bone calculations is to be done is still based on their "world" positions. As such, as soon as the "action" moves too far away from the starting point or would otherwise be obscured (depending upon which optimizations are in use) the dynamic bones simply stop.
Given the nature of the optimizations and the scenes involved it would make more sense that they simply be disable during such scenes, rather than attempting to dynamically update the player and camera locations. This would allow for the retention of the optimization outside of the scenes to improve frame rates without any edge cases needing to be catered for.
Testing conducted with BepinEx v5.4.19 and Illusion Fixes v19.2.
1.8MakerOptimizations does not have (Disable camera target (white focus ring)) option, 1.7 does. .
Game: Koikatsu, AI Girl, Honey Select 2, possibly older Illusion games as well
Steps to reproduce:
Add a character to a scene, enabled FK mode, select a shoulder node.
Rotate the character, select the shoulder node. Note how the guide object is rotated along with the character, green arrow still aligned with the body.
Save the scene and reload. Select the shoulder node. Note how it is no longer aligned with the body, green arrow pointing straight up instead.
Reset rotation of the character. Guide object rotates along with the character, but because the rotation on scene load was incorrect it's still incorrect here, pointing backwards instead of straight upwards.
This is harmless in that it does not impact the pose of the character, however the inconsistent guide object behavior can be annoying.
Seems like the game has this is an issue with Garbage Collector, because it rising up like crazy from 700 to 1000 mb and then resets back with significant FPS drop. This repeats every 4-7 seconds. You can see it clearly entering character creation menu and using mod called FPS counter. The issue was detected on DX R2 repack of the game.
Also have to append something: looks like boy character screen gathers "garbage" slower, than girl's one (which leads to less frequent stutters). Might be something with mods count (because, ofc, boys has less mods). And it also slower in StudioNeoV2, for some reason.
I don't know if its even possible to fix with mods and dll's, but it would be great to have something like GarbageTruck\MainGameOptimizations in Koikatsu but for HS2.
It is possible to edit a character to have two different irises, but if the 'Edit to Eye' radio button is on 'Both Eyes' when the character is loaded color information is loaded but iris type doesn't load. If possible, detect if a character has different irises (or eye gradient, since those don't load correctly either) and automatically toggle the 'Edit to Eye' radio button to 'Left Eye' so that the character can load correctly.
HS2_Fix_SettingsVerifier.dll -> Config.Start is missing. Found Initialize instead.
If I use ABMX to change the length of legs, the characters will be strange because of IK.
And if I enable "Disable IK in maker" in Maker Optimizations, the character will behave normally.(Though the feet are under the floor, I think it's much more acceptable.)
But I didn't found a "Disable IK in main game" option. Could you add one please? I would appreciate it a lot!
Sorry, this is an issue that spans multiple plugins, but I have posted the issue here. I would appreciate it if you could let me know if there is a problem.
In Maker, if I use ABMX and set cf_j_waist01 or cf_j_waist02 to less than 1, there is a problem with twisting of the legs and shifting of the hand position.
I have confirmed that this problem does not occur when KK_Fix_MakerOptimizetions of version 1.8 or higher and version 13.1 or lower is installed.
The version of ABMX does not seem to affect this issue.
In Maingame, the problem seems to occur regardless of the version of KK_Fix_MainGameOptimizetions.
As an additional note, this problem does not occur in koikatsuSunshine when KK_Fix_MakerOptimizetions is installed on version 18.0.1.
If you need any additional information, please let me know.
Sorry for my poor English.
In environments where InvalidSceneFileProtection.dll is present, the presence of a very large number of scene files can cause a multiplicative slowdown in the startup of CharaStudio.
It takes several minutes in an environment with more than 3000 files, but it takes less than ten seconds when KK_InvalidSceneFileProtection.dll is disabled.
With and FK enabled and hands posed in a way other than the default and pose, accessories attached to fingers such as rings appear in the position they would be in with FK disabled.
I narrowed it down to StartCoroutine(AntiGarbageHooks.BaseProcessUpdateJobCo()); in the Start method, commenting this line out causes it to work properly once more.
Scene for testing:
Scenes with lots of characters and objects, especially large scenes exceeding 150mb, will have long load times, exceeding 20 minutes in some cases. Removing the plugin will get rid of the issue.
In Studio, characters may not load properly when they are replaced.
This problem occurs when the character's hairstyle is different before and after the replacement.
I lowered the version of [KK_Fix_StudioOptimizations] from 21.4.1 to 21.4 due to the following error and the problem did not occur.
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Object.get_name () <0x00075>
at IllusionFixes.FindLoopAssistant.RegisterPath (UnityEngine.Transform,UnityEngine.Transform,string) <0x00066>
at IllusionFixes.FindLoopAssistant.FindChild (UnityEngine.Transform,string) <0x00168>
at IllusionFixes.StudioOptimizations.FindLoopNoAcc (UnityEngine.Transform,string) <0x00035>
at (wrapper dynamic-method) Studio.AddObjectAssist.DMD<Studio.AddObjectAssist..InitHairBone> (Studio.OCIChar,System.Collections.Generic.Dictionary`2<int, Studio.Info/BoneInfo>) <0x00145>
at (wrapper dynamic-method) Studio.OCIChar.DMD<Studio.OCIChar..ChangeChara> (Studio.OCIChar,string) <0x005f0>
at (wrapper dynamic-method) Studio.OCICharFemale.DMD<Studio.OCICharFemale..ChangeChara> (Studio.OCICharFemale,string) <0x00037>
at IllusionFixes.StudioOptimizations.CharaList_ChangeCharaFemale (Studio.CharaFileSort) <0x00129>
at (wrapper dynamic-method) Studio.CharaList.DMD<Studio.CharaList..ChangeCharaFemale> (Studio.CharaList) <0x00027>
at KK_OptimizeStudioUI.OptimizeStudioUI/Patches.Postfix (int,Studio.CharaList,int) <0x000d8>
at (wrapper dynamic-method) Studio.CharaList.DMD<Studio.CharaList..OnSelectChara> (Studio.CharaList,int) <0x0025b>
at Studio.CharaList/<InitCharaList>c__AnonStorey0.<>m__0 () <0x00028>
at UnityEngine.Events.InvokableCall.Invoke (object[]) <0x00039>
at UnityEngine.Events.InvokableCallList.Invoke (object[]) <0x000c4>
at UnityEngine.Events.UnityEventBase.Invoke (object[]) <0x00043>
at UnityEngine.Events.UnityEvent.Invoke () <0x00023>
at UnityEngine.UI.Button.Press () <0x00060>
at UnityEngine.UI.Button.OnPointerClick (UnityEngine.EventSystems.PointerEventData) <0x00043>
at UnityEngine.EventSystems.ExecuteEvents.Execute (UnityEngine.EventSystems.IPointerClickHandler,UnityEngine.EventSystems.BaseEventData) <0x00047>
at UnityEngine.EventSystems.ExecuteEvents.Execute<UnityEngine.EventSystems.IPointerClickHandler> (UnityEngine.GameObject,UnityEngine.EventSystems.BaseEventData,UnityEngine.EventSystems.ExecuteEvents/EventFunction`1<UnityEngine.EventSystems.IPointerClickHandler>) <0x00331>
If we can identify any other situations where the problem occurs, we will let you know additionally.
(DeepL: JPN→ENG)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.