Skip to content

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

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

[Mod Manager] - Remake the Mod Manager to be cross-platform and conform to modern standards.#1288
TopazTK wants to merge 73 commits into
OpenKH:masterfrom
TopazTK:master

Conversation

@TopazTK

@TopazTK TopazTK commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

NOTE: I am pretty new in MVVM programming and Avalonia, so there may be some unorthodox decisions made within this PR. I will try my best to abide by the feedback I receive and adjust to them as necessary.

What is this PR?

This PR seeks to completely overhaul the Mod Manager and make it fast, user friendly, modern, and cross-platform.

Feature Checklist

General Checklist

  • Installation of mods from GitHub.
  • Installation of mods from other Git hosts.
  • Installation of mods from branches within Git hosts.
  • Installation of mods from ZIP Archives.
  • Installation of KHPCPatches.
  • Installation of standalone Lua files.
  • Reordering mod priority and obeying it.
  • Removal of mods of all kinds.
  • Cancellation and clean-up of mods during installation.
  • Ability to navigate to the source folder of mods.
  • Mods being marked invalid if they need be.
  • Invalid mods being ordered to the bottom priority.
  • Construction of metadata for invalid mods.
  • Memorization of mod order and activations on a per-game basis.
  • Building mods from extracted data. [PC]
  • Building mods from game data without prior extraction. [PC]
  • Detecting a JP copy and building mods accordingly [PC].
  • Building mods from game data without prior extraction. [PCSX2]
  • Ability to run games with the launcher [Epic Games Store]
  • Ability to run games with the launcher [Steam]
  • Ability to run games directly [Steam / Windows]
  • Ability to run games directly [Steam / Linux]
  • Valid configuration detection and feedback.
  • Properly setting mod metadata.
  • Properly setting mod source and issues pages if it is a Git mod.
  • Properly setting and displaying mod contents.
  • Switching games and displaying modlists accordingly.
  • Menu bar and its functionality.
  • Console output during building mods.
  • Error handling during building mods. [Halfway complete but GitHub doesn't have half-check boxes]
  • Ability to run games via the Emulator.
  • Ability to set Panacea parameters.
  • Online Mod Catalog.
  • Mod Builder Dialog.

Setup Wizard Checklist:

  • Automatic path detection and manual path selection for 1.5+2.5 and 2.8 on Steam [Windows]
  • Automatic path detection and manual path selection for 1.5+2.5 and 2.8 on Steam [Linux]
  • Automatic path detection and manual path selection for 1.5+2.5 and 2.8 on Epic Games Store
  • Manual path selection for emulator.
  • Page conditions and blocks according to the chosen platform or current action.
  • Panacea installation for 1.5+2.5 and 2.8 on Steam and Epic Games Store [Windows]
  • Panacea installation for 1.5+2.5 and 2.8 on Steam Epic Games Store [Linux]
  • LuaBackend installation for 1.5+2.5 and 2.8 on Steam and Epic Games Store [Windows]
  • LuaBackend installation for 1.5+2.5 and 2.8 on Steam and Epic Games Store [Linux]
  • Direct Launch installation and Launch Argument settings for 1.5+2.5 and 2.8 on Steam [Windows]
  • Direct Launch installation and Launch Argument settings for 1.5+2.5 and 2.8 on Steam [Linux]
  • Ability to extract files from 1.5+2.5 and 2.8 on Steam and Epic Games Store
  • Cancellation and invalidation of extraction.
  • Ability to extract files from PS2 games.

Panacea-Specific:

  • Running built mods for PC.
  • Running built mods for emulator

NOTE: There may be some features I have forgotten about. This tool is MASSIVE. Please let me know if there are features missing from the checklist so I can adapt.

Screenshots

image image image

Videos

Extractionless Test on Linux:

https://cdn.discordapp.com/attachments/1312193609461796864/1545785001893699766/extractionless-test.mp4?ex=6a9e10b7&is=6a9cbf37&hm=df778106e637b1b92ce761dc9512531950464e3324f2288f183ab34a230c43b1&

Extraction-Based Test on Linux:

https://cdn.discordapp.com/attachments/1312193609461796864/1545785105446863020/extraction-test.mp4?ex=6a9e10d0&is=6a9cbf50&hm=83fe701c820e2df3fede329bd5dbbd0b36892129eed35a5c03f742eaf333e492&

Builds

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

Latest Windows Build: https://drive.proton.me/urls/KQBVPG4X00#2hSl1j502Tqt
Latest Linux Build: https://drive.proton.me/urls/ZSFN1X4X3M#4San0N98lPq0

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

Some Notes

I know this isn't as featureful as the AI PR that was closed. I do realize this. But I wanted to prioritize the Desktop builds of the Mod Manager first before dabbling in controller support and touch UI and etc.

I do hope that this PR will be to y'all's satisfaction.

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,.
@coderabbitai

coderabbitai Bot commented Sep 6, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Team

Run ID: 75a10e12-25a6-4d3a-a1db-0c08acf5d517

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@TopazTK
TopazTK marked this pull request as draft September 6, 2026 08:07
Comment thread OpenKh.Tools.ModManager/Services/ModService.cs Fixed
Comment thread OpenKh.Command.Launcher/Program.cs Fixed
Comment thread OpenKh.Command.Launcher/Program.cs Fixed
Comment thread OpenKh.Patcher/Metadata.cs Fixed
Comment thread OpenKh.Tools.ModManager/Classes/Config.cs Fixed
Comment thread OpenKh.Tools.ModManager/Wizard/WizardGameSetup.axaml.cs Fixed
Comment thread OpenKh.Tools.ModManager/Wizard/WizardGameSetup.axaml.cs Fixed
Comment thread OpenKh.Tools.ModManager/Wizard/WizardGameSetup.axaml.cs Fixed
Comment thread OpenKh.Tools.ModManager/Wizard/WizardGameSetup.axaml.cs Fixed
Comment thread OpenKh.Tools.ModManager/Wizard/WizardPanaceaSetup.axaml.cs Fixed
@TopazTK

TopazTK commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Build is failing due to some dependencies to OpenKh.Kh2 which was updated to accommodate BDX. Will fix.

@TopazTK

TopazTK commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

I get it Sonar I suck I promise to fix it leave me alone T_T

@TopazTK

TopazTK commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

Yea so tests are failing, obviously, gotta remake 'em I guess but I am not really good with tests. We'll see how this goes.

continue;

// Construct the target paths for the file and the directory.
var _fetchFileTarget = Path.Combine(_fetchCurrentModDir, _fetchEntry.FullName);
var _pathSplit = _fetchEntry.FullName.Split(_fetchEntry.FullName.IndexOf('/') > -1 ? "/" : "\\");
var _pathPackage = _pathSplit[0];

var _accommodatePath = _fetchEntry.FullName.Replace("original/", "").Replace(_pathPackage + "/", "");
@shananas

shananas commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

Just a very quick and dirty test in debug.

  • couldnt build with <LangVersion>14.0</LangVersion> got this error Invalid option '14.0' for /langversion. Use '/langversion:?' to list supported values. removing it worked but may very well just be something i need to download in VS installer so might be on me.
  • Have to manually create the mods folder and the game subfolders otherwise get an error that they dont exist when you look through the folder to display the mods. That needs to be created either just before if it doesnt exist or at startup like old MM (Honestly if youre renaming mod to build why not rename this to like installed mods not sure of a more descriptive name and maybe this should stay the same idk)
  • The Presets feature is missing and I dont see that documented here.
  • After manually selecting my game extraction from current MM I cannot hit next on the extraction screen. If this is the last screen there should not be a next button
  • Yaml Generator feature is not here. But tbh not sure why it was ever in mod manager in the first place. Either bring yamlgen to new MM or just keep yaml generator as its own WPF program for now and any migration can occur later. One of these needs to be done or a different alternative if you think of a better one but removal of the feature is not ok.
  • Cannot Build with no mods installed (can do so if mods are installed but unchecked) and there is no equivalent to Fast Restore (I dont care what the name is but the ability to without unchecking all mods delete the built mods.
  • Info button currently displays nothing (I know this wasnt a focus and its not feature complete but mentioning everything I see)
  • I still believe patching should be supported it doesnt seem like it is. Of course it can be hidden unless the end user enables via a toggle somewhere like info but there are some mods only mod manager can patch (as they were designed for mod manager) and it does not hurt to keep the ability for an advanced user to enable it (same thing I know its not a priority just something that should be implemented before merging)

@TopazTK

TopazTK commented Sep 6, 2026

Copy link
Copy Markdown
Contributor Author

@shananas

Thanks for testing! Now onto the details:

  • LangVersion error is due to VS, it requires the latest dev tools on 2026.
  • Will be done. Don't know about the renaming parts, I wanted to keep the names short and descriptive.
  • Will document, will reimplement.
  • Yea, Next gets disabled and Cancel is replaced by Finish as per the regular wizard behavior. I can replace Next with Finish instead if that would be ideal.
  • Did document [Mod Builder], will reimplement.
  • Yea preventing building whilst mods existed proved difficult. I will reimplement restoration.
  • Yeah, will be done later.
  • It will be done. I was the one who advocated for its inclusion in the old manager anyways. This is just for Panacea/PC functionality at this moment.

I want to reiterate that this is in no way done. I just needed to get the PR out to get extended feedback from y'all.

@TopazTK

TopazTK commented Sep 7, 2026

Copy link
Copy Markdown
Contributor Author

Quality Gate Failed Quality Gate failed

Failed conditions 41.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Code duplication stems mostly from BDX implementation on OpenKh.Kh2, I will fix.

@sonarqubecloud

sonarqubecloud Bot commented Sep 7, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
41.2% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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.

3 participants