From f18c8a9bb98da8c0fae34af65e5961c8ac362eb1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20M=C3=A4ki?= Date: Wed, 27 Nov 2024 14:42:47 +0200 Subject: [PATCH 1/2] Fix MelonLoader installation for four games When the "recommended version" feature was added, MelonLoader was removed from MODLOADER_PACKAGES, but custom ModLoaderPackageMappings to compensate this were added only for BONEWORKS and BONELABS. For the other four games using MelonLoader, this caused the mod loader to be installed like a regular mod, placing the version.dll file in the wrong location and failing to copy it to the game folder when the game is launched modded. --- .../profile_installers/ModLoaderVariantRecord.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts b/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts index 71c87a178..064968685 100644 --- a/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts +++ b/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts @@ -73,6 +73,7 @@ export const MODLOADER_PACKAGES = [ new ModLoaderPackageMapping("NotNet-GDWeave", "", PackageLoader.GDWEAVE), ]; +const DEFAULT_MELONLOADER_MAPPING = [new ModLoaderPackageMapping("LavaGang-MelonLoader", "", PackageLoader.MELON_LOADER)]; /** * While this object is a bit silly given that all the keys are pointing to the @@ -113,11 +114,11 @@ const VARIANTS = { Titanfall2: MODLOADER_PACKAGES, Peglin: MODLOADER_PACKAGES, VRising: MODLOADER_PACKAGES, - HardBullet: MODLOADER_PACKAGES, + HardBullet: DEFAULT_MELONLOADER_MAPPING, GreenHellVR: MODLOADER_PACKAGES, "20MinutesTillDawn": MODLOADER_PACKAGES, VTOL_VR: MODLOADER_PACKAGES, - BackpackHero: MODLOADER_PACKAGES, + BackpackHero: DEFAULT_MELONLOADER_MAPPING, Stacklands: MODLOADER_PACKAGES, ETG: MODLOADER_PACKAGES, Ravenfield: MODLOADER_PACKAGES, @@ -133,7 +134,7 @@ const VARIANTS = { AtrioTheDarkWild: MODLOADER_PACKAGES, AncientDungeonVR: MODLOADER_PACKAGES, Brotato: MODLOADER_PACKAGES, - RUMBLE: MODLOADER_PACKAGES, + RUMBLE: DEFAULT_MELONLOADER_MAPPING, DomeKeeper: MODLOADER_PACKAGES, SkulTheHeroSlayer: MODLOADER_PACKAGES, SonsOfTheForest: MODLOADER_PACKAGES, @@ -141,7 +142,7 @@ const VARIANTS = { WrestlingEmpire: MODLOADER_PACKAGES, Receiver2: MODLOADER_PACKAGES, ThePlanetCrafter: MODLOADER_PACKAGES, - PatchQuest: MODLOADER_PACKAGES, + PatchQuest: DEFAULT_MELONLOADER_MAPPING, ShadowsOverLoathing: MODLOADER_PACKAGES, WestofLoathing: MODLOADER_PACKAGES, SunHaven: MODLOADER_PACKAGES, From e93bcb8ec9de4b39f8104a774b19e36eab9f0538 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antti=20M=C3=A4ki?= Date: Wed, 27 Nov 2024 14:54:59 +0200 Subject: [PATCH 2/2] Remove overly optimistic comment --- .../installing/profile_installers/ModLoaderVariantRecord.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts b/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts index 064968685..bdb2d662f 100644 --- a/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts +++ b/src/r2mm/installing/profile_installers/ModLoaderVariantRecord.ts @@ -218,9 +218,7 @@ export function getModLoaderPackageNames() { const names = MODLOADER_PACKAGES.map((mapping) => mapping.packageName); // Hard code MelonLoader to avoid having to iterate over MODLOADER_PACKAGES - // for each game separately. Hopefully we'll get rid of this once ML v0.6.6 - // is released, as it's supposed to fix a bug that forces some games to - // currently use the older versions. + // for each game separately. names.push("LavaGang-MelonLoader"); return names; }