ferium
ferium copied to clipboard
Add support for .disabled mods
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.
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?
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
Or you could still upgrade it, but keep it disabled.
Also, some other launcher will not use .disabled
, some will use .old
instead
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 :(
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
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
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
Oh yeah that's possible but it's not quite convenient because you would disabled the mod in polymc and ferium
This is quite a nasty problem to solve...
I wonder how other mod managers like PolyMC itself deal with this
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
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
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...
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
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?
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.
From my rough reading, it seems like they do read into fabric.mod.json and save things from it
Although it seems like the forge formats are a lot more complicated
Moved to #219