ferium icon indicating copy to clipboard operation
ferium copied to clipboard

Add support for .disabled mods

Open JustSimplyKyle opened this issue 2 years ago • 17 comments

Currently I'm using ferium witn polymc, and when I'm debugging mods I will often disable mods via polymc. When a mod is disabled, it will add .disabled at the end of the mod name. But when I do ferium upgrade, it will automatically "enable" the mod again. I want ferium to not touch .disabled mods.

JustSimplyKyle avatar May 02 '22 10:05 JustSimplyKyle

But if the mod has an upgrade could it upgrade the disabled mod (keeping it disabled ofc)? And does PolyMC deal with the disabled mods or are they not loaded by mod loaders?

theRookieCoder avatar May 02 '22 10:05 theRookieCoder

Well I guess no, not until the mod got enabled again in polymc. The mod loader just ignores mod that doesn't end with .jar

JustSimplyKyle avatar May 02 '22 10:05 JustSimplyKyle

Or you could still upgrade it, but keep it disabled. Also, some other launcher will not use .disabled, some will use .old instead

JustSimplyKyle avatar May 02 '22 10:05 JustSimplyKyle

I just realised that we would need to find out which mod was disabled, because it might be an old version. This is again the same problem as #17, identifying which mod a file belongs to. Modrinth actually has this functionality but CurseForge doesn't :(

theRookieCoder avatar May 02 '22 10:05 theRookieCoder

Hmm, wouldn't it be possible using the current updating method? I believe the current updating method is just comparing filenames. If it's that, couldn't you just first ignore the .disabled name and only compare the part that doesn't have it?(e.g. if i disable a mod with name iris-1.18.2-1.1.4.jar, it will become iris-1.18.2-1.1.4.jar.disabled) And after downloading the mod, rename the new mod to have an end with .disabled, and delete the "original" .disabled mod

JustSimplyKyle avatar May 02 '22 10:05 JustSimplyKyle

That's what I thought at first. But the problem is that if an old version was disabled, Ferium would just download the new version and end up 'enabling' the mod again :(

For example if you had iris-1.18.2-1.1.3.jar.disabled but then iris-1.18.2-1.1.4.jar came out, the disabled version would remain but the newer 1.1.4 will be downloaded, effectively enabling Iris again. I can't disable the new version again because the I don't know what mod the old version is

theRookieCoder avatar May 02 '22 10:05 theRookieCoder

Oh I know what you mean! This is quite a nasty problem to solve... Maybe add a boolean to the config to signifies that the mod is disabled? And when ferium checks for upgrading, if the mod is set disabled in config, just straight up don't touch it

JustSimplyKyle avatar May 02 '22 10:05 JustSimplyKyle

Oh yeah that's possible but it's not quite convenient because you would disabled the mod in polymc and ferium

theRookieCoder avatar May 02 '22 10:05 theRookieCoder

This is quite a nasty problem to solve...

I wonder how other mod managers like PolyMC itself deal with this

theRookieCoder avatar May 02 '22 11:05 theRookieCoder

Couldn't you just auto detect a mod with file extension .disabled and auto add it to config?(maybe first ask it when upgrading, smth like (Do you want to disable this mod in Ferium?) And when got enabled again, ferium could detect that in config, the mod is disabled, but in the folder, it doesn't have the .disabled file ending, so ferium enables it in config and upgrades it

JustSimplyKyle avatar May 02 '22 11:05 JustSimplyKyle

This is quite a nasty problem to solve...

I wonder how other mod managers like PolyMC itself deal with this

Well iirc, I don't think PolyMC has auto upgrading, it's a planned feature in 1.3.0, but it has not been implemented

JustSimplyKyle avatar May 02 '22 11:05 JustSimplyKyle

Couldn't you just auto detect a mod with file extension .disabled and auto add it to config?

Sigh same problem again, how would I know what mod was disabled? Even if I used the filename, it might be an older version, yada yada...

theRookieCoder avatar May 02 '22 11:05 theRookieCoder

I wonder how other mod managers like PolyMC itself deal with this

But it seems to be able to detect which mods are in the mods directory. If I remove a few mods, it doesn't show those mods in the menu. But yeah it can't update them

theRookieCoder avatar May 02 '22 11:05 theRookieCoder

Well maybe they just don't store it in another config They just kept checking what mods are in the directory I could be wrong tho, I don't know how does PolyMC works And another question, does curseforge api doesn't have hash checking?

JustSimplyKyle avatar May 02 '22 11:05 JustSimplyKyle

They just kept checking what mods are in the directory

Yup that's what they do. They even parse the mod manifests here. It's C++ though so I don't really understand how they're doing stuff.

And another question, does curseforge api doesn't have hash checking?

That's the problem, it doesn't afaik. I requested it here so go give it an upvote.

theRookieCoder avatar May 02 '22 11:05 theRookieCoder

From my rough reading, it seems like they do read into fabric.mod.json and save things from it

JustSimplyKyle avatar May 02 '22 11:05 JustSimplyKyle

Although it seems like the forge formats are a lot more complicated

JustSimplyKyle avatar May 02 '22 11:05 JustSimplyKyle

Moved to #219

theRookieCoder avatar Apr 06 '23 07:04 theRookieCoder