DefaultSettings Fabric/Quilt

DefaultSettings Fabric/Quilt

620k Downloads

How can I prevent overwriting existing options files?

Blue-Beaker opened this issue · 3 comments

commented

I'm using this mod in a 1.12.2 modpack.
How can I prevent overwriting options files when player has changed them?

I tested in this condition:

1.First I packed the modpack (Developing instance) with options saved with this mod
2.Then import this to PrismLauncher to create a new instance (Called Testing instance)
3.Change some options in the Testing instance
4.Change some options in the Developing instance and re-exported the pack (not including the vanilla options.txt)
5.Update the modpack from the file exported in step 4
6.Relaunch the Testing instance
7.Options got overwritten with the new defaults.

What should I config, to let this mod only write defaults only when player run my modpack for the first time and options.txt is not present, and do not overwrite existing options after updating the modpack?

commented
commented

Well, I've figured out a workaround by removing hashes in config/defaultsettings.json, it makes the mod to skip checking hashes for changes to saved default config. However my workaround is tricky, so it's fine to make it an easy option for pack makers to use.

commented

@Blue-Beaker Okay it depends on which version you use.

I'm going to refer to the latest available which is identical to the ones for Minecraft 1.20+:

If you export the pack, you use the /ds save command, right? That one will actually prompt you that you (as the developer) have changed the game's options. If you're NOT using the forceOverride argument, the files shouldn't be overridden on your users' end when they already have run the modpack once.

It's that gold/orange message you get after executing the command.

Or is something different on your end?