Code Monkey home page Code Monkey logo

illusionfixes's People

Contributors

bbepis avatar deathweasel1337 avatar gebo1 avatar keelhauled avatar kkykkykky avatar kokaiinum avatar makao1240 avatar manlymarco avatar mantas-2155x avatar mosirnik avatar njaecha avatar orangespork avatar takahiro0327 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

illusionfixes's Issues

KK_Fix_CharacterListOptimizations not useful in VR but fixable?

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?)

CharacterListOptimizations.txt

Fix_DynamicBones compatibility with AI/HS2

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.

HS2 Steam NullChecks incompatibility

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;
}

Tried updating BepInEx for Koikatsu mod purposes, lost English Translation

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]

Lagging in school mode

I have some some laggings in school mode when the game loading or rotate cam and character moving.

Bug with FK and characters parented to left hand

Characters with another character set as a child of the left hand will break FK when the parent character is replaced.

Steps to reproduce:

  • Enable FK for character 1
  • Set character 2 as child of character 1's left hand
  • Replace character 1

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.

2020_0306_1120_02_512

Tested on Koikatsu with no plugins installed so it appears to be a vanilla game bug

Adding feature

Could you please solve the problem about light and shade severely reducing fps in AI girl?

[KKS] Main Game Optimizations causing "stiff" characters mid-scene

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.

HS2(AI?) Global Fog incorrect checkbox.

imageeeee

The Fog section checkbox - Disable background Fog is not working. But I found the correct checkbox - it's called distanceFog.

imageeeee2

So when distanceFog set to false - then there is no background fog, I think thats how it should works. If someone could fix it will be very appreciate.

Incorrect FK node orientation on scene load

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.
Koikatu-2020-07-28-17-42-38-UI

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.
Koikatu-2020-07-28-17-42-48-UI

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.
Koikatu-2020-07-28-17-43-04-UI

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.
Koikatu-2020-07-28-17-43-16-UI

This is harmless in that it does not impact the pose of the character, however the inconsistent guide object behavior can be annoying.

Reducing stutter and FPS drop in HoneySelect 2 (port GarbageTruck to HS2)

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.

Fix characters with different irises loading improperly

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.

[KK]Can IK be disabled in the main game?

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!

[KK]For problems with twisted legs and misaligned hands

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.
image

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.

[KK] InvalidSceneFileProtection creates long boot times on many Scenes.

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.

[KKS] GarbageTruck causes improper accesory placement in screenshots

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.
Koikatu-2022-02-19-15-39-11-Render

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:
2022_0219_1458_54_806

[StudioOptimizations 21.4.1]Character cannot be loaded properly

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.