-
Notifications
You must be signed in to change notification settings - Fork 79
add changes to make compilable for hk 1.5.12331 #164
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
SFGrenade
wants to merge
13
commits into
hk-modding:master
Choose a base branch
from
SFGrenade:hk-beta-branch-unity-6-update
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
add changes to make compilable for hk 1.5.12331 #164
SFGrenade
wants to merge
13
commits into
hk-modding:master
from
SFGrenade:hk-beta-branch-unity-6-update
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Member
Author
|
will note some changes i saw in more comments |
Member
Author
|
for the MAPI itself: currently the language get isn't hooked |
Member
Author
|
Member
Author
|
for HollowKnightAchievementManager: Satchel seems to work fine, BUT trying to create a menu errors with
|
… place, so it can just be created - no clue what to do with `Language.Language.Get(key)` though
- but that requires all `TeamCherry.Localization.Language` to be done dynamically, via strings, as *all* references to it are replaced, even ones manually written here
KunalGehlot
added a commit
to KunalGehlot/api
that referenced
this pull request
Feb 11, 2026
Hollow Knight received a major update on Feb 5, 2026 (build 12459) which upgraded the engine to Unity 6 (6000.0.61f1) and introduced significant changes to controller input handling, localization, and scene management. This commit updates the Modding API to compile against and work correctly with the new game binaries. Build system changes (Assembly-CSharp.csproj): - Use FrameworkPathOverride to resolve assemblies from Vanilla/ directory instead of individual HintPath references (required for Unity 6 which ships additional TeamCherry.* and System.* assemblies) - Add System.Memory NuGet package (Unity 6 uses ReadOnlySpan<byte> in Texture2D.LoadImage) - Remove Newtonsoft.Json from dependencies (now shipped with the game) - Remove mscorlib override (no longer needed with Unity 6 runtime) Localization system rewrite: - Delete Patches/Language.cs: The Language class moved from the global namespace to TeamCherry.Localization in HK 1.5. The old MonoMod patch targeting "global::Language.Language" no longer resolves. - Add Language/Language.cs: A backwards-compatible shim in the Language.Language namespace that delegates to TeamCherry.Localization via reflection, with MonoModLinkFrom to redirect existing mod references. This allows mods using Language.Language.Get() to continue working without recompilation. - Update ModHooks.cs LanguageGet to call Language.Language.GetInternal instead of the removed Patches.Language.GetInternal. Mod loading initialization (StartManager.cs): - Move mod loading bootstrap from OnScreenDebugInfo.Awake to StartManager.Awake. The OnScreenDebugInfo component was removed in HK 1.5, so it can no longer serve as the mod loading entry point. - Delete Patches/OnScreenDebugInfo.cs (component no longer exists in game). - Rewrite StartManager.Start to match the new HK 1.5 startup sequence: language verification, PlayerPrefs loading, and scene load state management. - Add deferred Menu_Title scene loading: when mod preloading is active, wait for mods to finish loading before transitioning to Menu_Title instead of using the allowSceneActivation pattern. HeroController patches updated for HK 1.5 game logic: - rb2d.velocity → rb2d.linearVelocity (Unity 6 Rigidbody2D API change) - wallSlideVibrationPlayer.Stop() → vibrationCtrl.StopWallSlide() (HK 1.5 replaced individual vibration players with HeroVibrationController) - Attack(): Add grubberfly beam (charm_35) support for wall slashes, change health check from == to >= for grubberfly beam activation on normal/up/down attacks (matches upstream game logic) - SoulGain(): String literals to nameof() for PlayerData fields - LookForQueueInput(): Remove duplicate CanDash() call - TakeDamage(): Rename flag → carefreeShouldStopDamage for clarity, string literals to nameof(), add explicit returns after death/hazard coroutine starts to match upstream flow control, fix ternary null check on damage angle - OrigDashVector(): Simplify ternary for bump velocity readability InputHandler.OnGUI rewrite: - Replace direct Cursor.visible/Cursor.lockState manipulation with calls to the game's SetCursorVisible() method. This preserves the OnCursorVisibilityChange event and proper cursor lock management through SetCursorEnabled(), fixing controller detection and connection mode switching that was broken by the old approach. GameManager patches: - Import TeamCherry.SharedUtils.Encryption (class moved in HK 1.5) - Add SetPausedState() MonoModIgnore declaration - Rewrite PauseToggleDynamicMenu to match HK 1.5 pause/unpause flow (SetPausedState calls, reordered input prevention, reduced wait times) - SceneManager.UnloadSceneAsync → SceneManager.UnloadScene (API change) SceneManager patches: - Replace DrawBlackBorders() full replacement with OnCameraAspectChanged() hook. HK 1.5 refactored border drawing into the camera aspect change handler with persistent border transforms (borderLeft/Right/Up/Down) instead of instantiating new GameObjects each time. - The ModHooks.OnDrawBlackBorders hook is preserved by collecting the border transforms after orig_OnCameraAspectChanged runs. Other patch updates: - MenuSetting.cs: Add new HK 1.5 settings enum values (SwitchFrameCap, Dithering, Noise, ControllerRumble, HudVisibility, CameraShake, NativeInput, XInput, MFi) - MenuButtonList.cs: Null-conditional on menuButtonLists to prevent NullReferenceException during early UIManager initialization - UIManager.cs: Add ADVANCED_GAMEPAD_MENU and ADVANCED_VIDEO_MENU to MainMenuState enum - TakeDamage.cs: Fix Multiplier ternary to match HK 1.5 operand order - PlayMakerUnity2DProxy.cs: Add explicit this. qualifier - ModHooks.cs: Add bounds checking on version string split to handle version formats with fewer than 4 segments Version: hollowknight.version updated to 1.5.12459 Tested on macOS (Apple M2 Pro) with Unity 6000.0.61f1: - Game launches and reaches title screen - Mod menu appears in Options with working mod list - CompassAlwaysOn and GatheringSwarmAlwaysOn load and function correctly - Controller support works (USB/Bluetooth, vibration, mode switching) - Scene transitions, pause menu, and settings menus all functional - No errors in Player.log or ModLog.txt Builds on work started in PR hk-modding#164 by SFGrenade. Closes hk-modding#169.
12 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
some todos left