Skip to content

[Mod Manager] - Remake the Mod Manager to be cross-platform and conform to modern standards. - #1288

Draft
TopazTK wants to merge 174 commits into
OpenKH:masterfrom
TopazTK:master
Draft

TopazTK wants to merge 174 commits into
OpenKH:masterfrom
TopazTK:master

Conversation

@TopazTK

@TopazTK TopazTK commented Sep 6, 2026 •

Copy link
Copy Markdown
Contributor

What is this PR?

Simply put, this PR seeks to remake the Mod Manager to be cross-platform, modern, fast, and packed full of features for the user and the developer alike.

The Current Scope

The current scope of this particular PR is to ensure the following:

  • The program chooses simplicity over complexity in all of its aspects.
  • The program has feature parity with the program it replaces.
  • The program works on Windows and Linux Distributions.
  • The program is easy to use with no extra resources or setup necessary.
  • The program is able to work extractionless on PC for all games.

Checklists

The following Checklist is purely for feature parity:

  • Ability to install mods from GitHub and alternative Git hosts in the following formats:
    • Author / Repository
    • Author / Repository : Branch
    • Author / Repository @ Platform
    • Author / Repository : Branch @ Platform
  • Ability to install mods from ZIP Archives for OpenKH mods, KHPCPATCH files, and Lua Scripts.
  • Creation of proper metadata if any non-OpenKH mods are installed.
  • Parsing of metadata for every installed mod and its proper output to the user.
  • Setting the proper info for mods installed from Git sources and displaying them.
  • Memorization of active mods.
  • Ability to remove mods at any time.
  • Ability to reorder mods and memorization of said ordering.
  • Ability to navigate to the source folder of installed mods.
  • Ability to invalidate the current mod builds, reverting the game to a vanilla state.
  • Detection of any updates pending for installed mods, if any.
  • Ability to install any updates pending for installed mods, if any.
  • Ability to hard-patch the games should Panacea not be used.
  • Ability to reverse any hard-patches applied to the game files.
  • Invalidation of any mods with an incorrectly prepared metadata file and the subsequent creation of placeholder metadata.
  • Ability to build mods using extracted game data on PC.
  • Separate building logic for JP vs WW regions on PC.
  • Ability to build mods using extracted game data for PlayStation 2 and PlayStation Portable games.
  • Separate building logic for FM/JP/NTSC/PAL regions for PlayStation 2 and PlayStation Portable games.
  • Ability to directly run the games on Windows.
  • Ability to run the 1.5 + 2.5 / 2.8 launcher on Windows for all platforms.
  • Ability to run PCSX2 with the Mod Loader injected.
  • Ability to choose what game to apply mods to and subsequent categorization of mods according to the game.
  • Menu Bar and its functionality.
  • Automatic path detection and manual path selection for 1.5 + 2.5 / 2.8 on Windows for both platforms on the Setup Wizard.
  • Page conditions and blocks according to the chosen platform or current action on the Setup Wizard.
  • Panacea installation and subsequent configuration for 1.5 + 2.5 / 2.8 on Windows for both platforms on the Setup Wizard.
  • LuaBackend installation and subsequent configuration for 1.5 + 2.5 / 2.8 on Windows for both platforms on the Setup Wizard.
  • Direct launch configuration for 1.5 + 2.5 / 2.8 on Windows for Steam on the Setup Wizard.
  • Ability to extract files from 1.5 + 2.5 / 2.8 on Windows for both platforms on the Setup Wizard.
  • Ability to cancel file extraction and the subsequence invalidation of it.
  • Ability to extract files from PlayStation 2 and PlayStation Portable games.
  • The existence of the Online Mod Catalog, including:
    • Ability to parse all mods from the curated list. [Invalidated.]
    • Ability to search mods from said curated list. [Invalidated.]
    • Parsing and subsequent output of metadata of all parsed mods.
  • Accurate progress display during mod installation.
  • Error handling and feedback during mod installation.
  • Accurate progress display during mod building.
  • Console output during mod building.
  • Error handling and feedback during mod building.
  • The existence of the YAML Generator Dialog.

This following Checklist is for new features and/or improvements from the old program:

  • Support for Mod Properties on the metadata and their interactions with the end user.
    • Supports the following types of inputs: Toggle, Options.
  • Support for Mod Dependencies on the metadata and their subsequent validation.
    • Informing the user if the dependencies do not exist and allowing them to automatically install them.
  • Support for declaration and verification of the Target Game on the metadata, warning the user if the target game doesn't match the current modlist.
  • Ability to install multiple Git mods at once, retaining the Git format previously mentioned:
    • SomeAuthor/SomeMod ; SomeOtherAuthor/SomeCoolMod@SomePlatform ; ...
  • Addition of Profiles, which are virtual file systems for mods that can co-exist for the same game.
  • Ability to link an existing mod from a profile to another, eliminating the need for a hard-reinstall and saving space.
  • Online Catalog being independent from a curated list, instead parsing mods from GitHub making use of specific topics.
    • Main Topic for mod discovery: openkh-mod
    • Topics for the games: kh1, kh2, recom, bbs, kh3d.
  • Ability to run natively on Linux distributions.
  • Ability to directly run the games on Linux distributions.
  • Preliminary automatic setup of the game prefix for 1.5 + 2.5 / 2.8 on Linux distributions.
  • Automatic path detection and manual path selection for 1.5 + 2.5 / 2.8 on Linux distributions for Steam on the Setup Wizard.
  • Ability to build mods without extracted game data on PC.
  • Automatic region detection for 1.5 + 2.5 / 2.8 on all operating systems and all platforms.
  • Mod installations and building being done with multi-threading, increasing the speeds considerably.
  • Game extractions being done with multi-threading, increasing the speeds considerably.
  • Ability to declare launch arguments for use with 1.5 + 2.5 / 2.8 on all operating systems for Steam.
  • Ability to run the 1.5 + 2.5 / 2.8 launcher on Linux distributions for all platforms.
  • Memorization of the order of disabled mods within the modlists.
  • Automatic sorting of invalid mods to the bottom of the modlists.
  • Existence of the status bar and its featureset:
    • Ability to detect if the configuration (including Panacea) is improper and the subsequent notification to the end user.
    • Ability to detect if mods are installed, prompt to "Build and Run" if so, prompt to "Run" otherwise.
  • Ability to re/install Panacea without the Setup Wizard.
  • Ability to re/install LuaBackend without the Setup Wizard.
  • Dynamic popup system and its featureset, including QUESTION, MESSAGE, INPUT, OPTIONS, and PROGRESS dialogs.
  • Ability to inject the mod loader to the latest versions of PCSX2.
  • Ability to inject the mod loader to PCSX2 on Linux distributions.
  • Ability to run the mod loader without extraction for Kingdom Hearts II - PS2.
  • Ability to build mods without extraction for Kingdom Hearts II - PS2.

Readily Compiled Builds

For the sake of convenience, here are the latest builds for Windows and Linux.
They are Proton Drive links because GitHub is ass. The dates of the builds are on the files themselves.

Latest Windows Build: https://drive.proton.me/urls/NB6FPHG1TM#UExuZ20STLd1
Latest Linux Build: https://drive.proton.me/urls/K1C3Q0J0XG#N8fTVOPktr1Z

They are self-contained single-binary builds, as they should be.

Screenshots

image image image image image image image

Currently Present Third Party Libraries

It seems that it is nigh impossible to find any sort of library that is completely free of Generative AI and LLM involvement. As this is the case, I sadly have to compromise.

The following libraries, although they may or may not make use of AI assistance, have high-quality codebases that are human controlled and refactored.
The libraries listed here do NOT allow vibe-coded contributions nor autonomously generated code within their development nor codebase.
This is, quite literally, the best I could do.

Finishing Notes

This PR does NOT make use of any sort of Generative AI or LLMs within its codebase, idea phase, or any other aspect of its development.
Any libraries making use of AI assistance is out of my control.

TopazTK added 30 commits August 29, 2026 05:09
…Io linkage from OpenKh.Patcher to allow Linux deployment.
…ods are always on the bottom, fix some bugs,.
@TopazTK

TopazTK commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

Vlad it isn't even out of DRAFT yet

@TopazTK

TopazTK commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

The above push is a result of me being sick of LibGit2Sharp's bullshit speeds and resorting to alternate solutions.
Those alternate solutions being, hopefully, a much faster and efficient way to parse Git info and clone repositories.

This should also solve all the ".git" problems.

Repository Info is not available yet, so checking for updates doesn't work.
Checking updates works, updating itself don't yet.

This does not touch parsing the mods on the modlist yet.
This isn't complete yet, mark as not usable atm.

Supports GitHub, Codeberg, all Gitea Instances, all Forgejo instances.
GitLab requires a workaround much like Github due to not reporting it's zipball size, hence, I am NOT bothering with that. Someone else can do so after this merges.

@TopazTK

TopazTK commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

If you ask me why I bothered writing my OWN multithreaded single-file download code instead of taking advantage of the many libraries for it: All those many libraries have AI generated code.

@Vladabdf

Copy link
Copy Markdown
Collaborator

Install Panacea option crashes the mod manager.
Event Viewer log below:

Application: OpenKh.Tools.ModManager.exe CoreCLR Version: 8.0.3126.42015 .NET Version: 8.0.31 Description: The process was terminated due to an unhandled exception. Exception Info: System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.IO.DirectoryNotFoundException: Could not find a part of the path 'G:\OpenKh\OpenKh.Tools.ModManager\bin\Release\net8.0\assembly\dependencies'. at System.IO.Enumeration.FileSystemEnumerator1.CreateDirectoryHandle(String path, Boolean ignoreNotFound)
at System.IO.Enumeration.FileSystemEnumerator1.Init() at System.IO.Enumeration.FileSystemEnumerable1..ctor(String directory, FindTransform transform, EnumerationOptions options, Boolean isNormalized)
at System.IO.Enumeration.FileSystemEnumerableFactory.UserFiles(String directory, String expression, EnumerationOptions options)
at System.IO.Directory.InternalEnumeratePaths(String path, String searchPattern, SearchTarget searchTarget, EnumerationOptions options)
at System.IO.Directory.GetFiles(String path, String searchPattern, EnumerationOptions enumerationOptions)
at OpenKh.Tools.ModManager.Services.PackageService.InstallPanacea(Config currentConfig) in G:\OpenKh\OpenKh.Tools.ModManager\Services\PackageService.cs:line 113
at OpenKh.Tools.ModManager.Wizard.WizardPanaceaSetup.OnInstallClick(Object sender, RoutedEventArgs e) in G:\OpenKh\OpenKh.Tools.ModManager\Wizard\WizardPanaceaSetup.axaml.cs:line 58
at InvokeStub_EventHandler1.Invoke(Object, Span1)
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithFewArgs(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Delegate.DynamicInvokeImpl(Object[] args)
at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e)
at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e)
at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e)
at Avalonia.Controls.Button.OnClick()
at Avalonia.Controls.Button.OnPointerReleased(PointerReleasedEventArgs e)
at Avalonia.Input.InputElement.<>c.<.cctor>b__34_11(InputElement x, PointerReleasedEventArgs e)
at Avalonia.Reactive.LightweightObservableBase1.PublishNext(T value) at Avalonia.Interactivity.EventRoute.RaiseEventImpl(RoutedEventArgs e) at Avalonia.Interactivity.EventRoute.RaiseEvent(Interactive source, RoutedEventArgs e) at Avalonia.Interactivity.Interactive.RaiseEvent(RoutedEventArgs e) at Avalonia.Input.MouseDevice.MouseUp(IMouseDevice device, UInt64 timestamp, IInputRoot root, Point p, PointerPointProperties props, KeyModifiers inputModifiers, IInputElement hitTest) at Avalonia.Input.MouseDevice.ProcessRawEvent(RawPointerEventArgs e) at Avalonia.Controls.PresentationSource.HandleInputCore(Object state) at Avalonia.Threading.Dispatcher.Send(SendOrPostCallback action, Object arg, Nullable1 priority)
at Avalonia.Controls.PresentationSource.HandleInput(RawInputEventArgs e)
at Avalonia.Win32.WindowImpl.AppWndProc(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.WindowImpl.WndProcMessageHandler(IntPtr hWnd, UInt32 msg, IntPtr wParam, IntPtr lParam)
at Avalonia.Win32.Interop.UnmanagedMethods.DispatchMessage(MSG& lpmsg)
at Avalonia.Win32.Win32DispatcherImpl.RunLoop(CancellationToken cancellationToken)
at Avalonia.Threading.DispatcherFrame.Run(IControlledDispatcherImpl impl)
at Avalonia.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
at Avalonia.Threading.Dispatcher.MainLoop(CancellationToken cancellationToken)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.StartCore(String[] args)
at Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(String[] args)
at Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(AppBuilder builder, String[] args, Action1 lifetimeBuilder) at OpenKh.Tools.ModManager.Program.Main(String[] args) in G:\OpenKh\OpenKh.Tools.ModManager\Program.cs:line 12

@TopazTK

TopazTK commented Sep 27, 2026

Copy link
Copy Markdown
Contributor Author

@Vladabdf The files are not yet being populated on build. Grab the latest build and copy the assembly folder to the build output for testing.

Also the last few pushes are currently incomplete. You may want to wait a bit for testing.

@Vladabdf

Vladabdf commented Sep 27, 2026 •

Copy link
Copy Markdown
Collaborator

You may want to wait a bit for testing.

>:(

Comment thread OpenKh.Tools.ModManager/Classes/PINEStream.cs Fixed
Comment thread OpenKh.Tools.ModManager/Classes/PINEStream.cs Fixed

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants