Jomcraft-Network / DefaultSettings-Fabric

DefaultSettings Minecraft FabricMC and QuiltMC Mod
https://www.curseforge.com/minecraft/mc-mods/defaultsettings-fabric
Apache License 2.0
3 stars 1 forks source link

Mod configs do not save. #10

Open CoolMad10 opened 1 year ago

CoolMad10 commented 1 year ago

No matter what you do, it'll always say the folder is empty.

PT400C commented 1 year ago

@CoolMad10 Hey :) DefaultSettings 3.x+ does no longer look at the configs in the root .minecraft/config folder. Files/folders you want to be shipped by the mod have to be copied into the .minecraft/config/defaultsettings/Default (I believe that should be correct) folder. Just copy them straight into that folder, no alteration needed whatsoever.

Then you can execute the command and it should work.

PT400C commented 1 year ago

I consider this issue to be resolved. You may reopen it any time tho.

CoolMad10 commented 1 year ago

I thought (and still think) that .minecraft/config/defaultsettings/Default was wrong, as that simply makes it state: "Couldn't save the config files!" So, I moved it, and made this issue. Still, however, .minecraft/config/defaultsettings/Default leads to the above message. Are you certain that you are correct, and if so, any idea on what this is?

CoolMad10 commented 1 year ago

@PT400C (Apologies for the mention, but I'd rather not reopen in case I am wrong, so I'm just going to do this instead.)

PT400C commented 1 year ago

Okay, that's quite interesting. Could you please post your latest log file (after executing the command) + a screenshot of your file explorer which shows what's inside of the .minecraft/config/defaultsettings/Default folder?

CoolMad10 commented 1 year ago

Upon running the command, this is what appears in the log (I'm not sending the full log due to it being very long, and me not wanting to search the whole thing for personal info, such as private names in file paths): configuration files false [continues to spam "false" about 2430 times] false

This is the file path: the_file_path

Here's the message it sends in the chatlogs: n§fCouldn\u0027t save the config files! @PT400C

Any ideas on what is going on?

CoolMad10 commented 1 year ago

I'm running the latest version of DS as well.

CoolMad10 commented 1 year ago

Got it working, I had to remove the config file and folder related to DS and then restart the game.

PT400C commented 1 year ago

Alright, that log isn't really conclusive as I can't really spot any errors in there. The massive spam of "false" is something I can't really recognize either. Did you update DS from a previous major version like 3.x?

If you still have a copy of the old DS config files and folder, could you quickly remove relevant private information from the file paths (e.g. with a replace-all in Notepad++) and upload those files to this issue?

Other than that, I'm happy to see that you got it working :)

CoolMad10 commented 1 year ago

I did not use another major version before this, as I've just recently started with DS. I also do not have any backups of the old configs, as it was mostly about me just trying to get it working. The false spam doesn't make much sense and doesn't seem to have any relevancy to my other mods, so I'm unsure about that (Could it possibly be pasting all of the disabled values into the log?). I'm also now experiencing another issue, that may or may not be issue #5, I'm uncertain though as they were quite vague. I'm experimenting with this one to see if it's on me, will send more info on this one later.

CoolMad10 commented 1 year ago

Just checking now, are the mod configs supposed to only be in default or in both default and the normal config folder?

CoolMad10 commented 1 year ago

(For the new issue)

PT400C commented 1 year ago

They're supposed to be in both. Trying to show this with those (really high quality) screenshots.

image image

And in CF:

image

image

Tl;dr: Just copy them into the "Default" folder, don't change the files in the actual config folder location. Never put the "defaultsettings.json" file into the "Default" folder. In CF, do NOT export the actual config files (like shown in the screenshots), only export the "defaultsettings/Default" folder :)

CoolMad10 commented 1 year ago

So basically, only export the DS folder and put the configs in it?

PT400C commented 1 year ago

Yeah, the "defaultsettings" folder + the "defaultsettings.json" file, both are necessary.

CoolMad10 commented 1 year ago

Both ds json files?

PT400C commented 1 year ago

Both ds json files?

You mean "ds_private_storage.json" and "defaultsettings.json"? No, only the "defaultsettings.json", the other one should stay private. Or do you mean something else? 🤔

CoolMad10 commented 1 year ago

It had created 2 defaultsettings.json files, even though file explorer complains the names are duplicates.

PT400C commented 1 year ago

Uhm, honestly I'm surprised that this is even possible with the windows file system. There should always only be one "defaultsettings.json" - at any time! Is something wrong with your harddrive/filesystem? Did something like that ever happen before?

CoolMad10 commented 1 year ago

Nope, they do hold different contents though. I cannot move the file back in after moving it out in a dupe, so it's quite confusing.

PT400C commented 1 year ago

Could you try restarting the windows explorer.exe process or rather your entire computer? Hopefully that fixes that weird glitch.

CoolMad10 commented 1 year ago

Let me try that.

CoolMad10 commented 1 year ago

It is now a "defaultsettings-fabric.pw.toml" file upon relaunch.

CoolMad10 commented 1 year ago

Should that be exported?

PT400C commented 1 year ago

Could you show what's inside that file? I honestly can't tell you what it is as I've never encountered that. Should probably not be exported, it's nothing our mod ever uses/creates neither under fabric nor forge.

CoolMad10 commented 1 year ago

image

CoolMad10 commented 1 year ago

The contents inside the file have not changed, just the name.

PT400C commented 1 year ago

Well, okay. We're entering interesting territory at this point. That's probably internal files of the CurseForge launcher/modpack manager that landed somewhere completely wrong. At this point I can assure you that this isn't related to our mod as I've not seen this happen once since 2019.

Did similar files like this pop up? Do you maybe have a mod installed that also messes with mod files? Like an automatic updater mod or something like that?

CoolMad10 commented 1 year ago

I do not use any mods related to automatic updates, and this is on Prism Launcher, which doesn't tamper with the files. This isn't the only file with a fabric.pw.toml, as seen here: image image image Thing is, though, out of the 150-ish mods I use, only 7 have these files. And they have nothing to do with each other.

CoolMad10 commented 1 year ago

They're all completely different mods with no correlation other than they're using Fabric, they don't even come from the same platform. Blur and Smoothboot are from Modrinth, and Cleanview and DS are from Curseforge.

PT400C commented 1 year ago

Okay, haven't tried out the Prism launcher yet. In that case it might be wise to also copy those files into the "defaultsettings/Default" folder 🤔

CoolMad10 commented 1 year ago

This may be some form of storing metadata used by modern launchers?

CoolMad10 commented 1 year ago

They all hold metadata in a similar format

PT400C commented 1 year ago

That could be the case, yeah. Not sure why that would be necessary but you could also experiment what happens if you do/don't include them in the pack export.

CoolMad10 commented 1 year ago

I'll test that.

CoolMad10 commented 1 year ago

Not now, but I'll see what happens.

CoolMad10 commented 1 year ago

I'm going to setup the DS configs again and see what happens, will supply info later.

CoolMad10 commented 1 year ago

Quickly rechecking, this should be config, image This should be in DS folder, image And this should be in default? image image

(Example images of some configs)

PT400C commented 1 year ago

Yap, looks correct to me.

CoolMad10 commented 1 year ago

Question, why does saving mod configs not have the "override" and only "forceoverride" If override is to apply to new users only, why does it only have the ability to force onto all users?

CoolMad10 commented 1 year ago

@PT400C What does running the cmd actually do? I assume it logs the hashes, but I'm uncertain.

PT400C commented 1 year ago

Question, why does saving mod configs not have the "override" and only "forceoverride" If override is to apply to new users only, why does it only have the ability to force onto all users?

As the /ds save ... command does automatically copy the selected files to it's destination it has three modes of operation (1. Copy and update hashes (no argument at all, only works once), 2. only copy (override argument) and 3. copy and update hashes (forceOverride, basically identical to 1. but always executes even if the files already exist).

The /ds saveconfigs command doesn't automatically copy, thus there's no need for the override argument (as you're copying manually).

PT400C commented 1 year ago

@PT400C What does running the cmd actually do? I assume it logs the hashes, but I'm uncertain.

Exactly. For the /ds save command 1. running it the first time (applies to each type of settings, e.g. keybinds) and 2. with the forceOverride argument updates the stored file hashes.

In case of the /ds saveconfigs command 1. running it the first time (applies to each individual file/folder ofc and 2. with the override argument updates the stored file hashes.