Default Options

Default Options

87M Downloads

DefaultOptions resets my keybinds on every launch

saffaffi opened this issue · 6 comments

commented

Security Notice

  • Users might post VIRUS LINKS in comment responses to issue reports. DO NOT DOWNLOAD ANY FILES FROM HERE.

Minecraft Version

1.21.1

Mod Loader

NeoForge

Mod Loader Version

21.1.41

Mod Version

21.1.1

Balm Version

21.0.19

Describe the Issue

Every time I launch my Technical Electrical: Secret Schemes 5.0.0.29.1 Beta instance (a modpack that includes DefaultOptions), my keybinds reset to their defaults. I have to customise the same ones every time I launch, because they're back to the way they were before.

I tried removing files from the .minecraft/config/defaultoptions/ folder in the hope that that would stop DefaultOptions from doing this, but that didn't work - I had to actually disable (remove) the mod from the modpack, and that then fixed the problem.

The logs I've attached are from a run of the modpack where there were no files in .minecraft/config/defaultoptions/, but the keybinds were reset regardless. The reset happens on launch, before I've joined a server or a world.

Logs

latest.log

Do you use any performance-enhancing mods (e.g. OptiFine) or custom server distributions (e.g. SpongeForge)?

No OptiFine or custom server

commented

was experiencing the same bug, compared my modlist to the previous one, made a profile using only those mods
latest.log
It only seems to reset mod's keybinds

commented

There is only one case where Default Options changes the value of a key mapping, and it's if there's both a default key defined, and the key in question is not an already known key.

The logs show Found 0 default keys and 239 known keys, so neither condition is met and Default Options is not changing the key mapping through any regular means. I can also not reproduce this when using only Default Options by itself, nor with a small pack containing Default Options and another mod adding keybindings.

That means this is most likely an edge case caused by one of the other mods in that pack and it would first need a reliable reproduction case in order to be fixed.

commented

Also running into this, but sadly I have like 150+ mods. I might try forcing options file into the etc and see if it will force it and just prune the options file down.

commented

latest.log
I I tested all mods with bisection, finally only installed balm, defaultoptions and curios, and this bug still occurred
The keybinds will reset at every launch

commented

Hello! I am the author of the Forgified Core modpack, in which I use your Default Options mod. Before exporting the modpack, I configured the controls to my needs and entered the world to export these settings via the /defaultoptions saveAll command. I placed the generated files (options.txt and keybindings.txt) in the .minecraft/config/defaultoptions/ path, and then exported the modpack. When you first launch the modpack (i.e. when you first install/import it via Modrinth), everything works fine, my custom control settings are set. But as soon as I exit the modpack and enter it back, the control settings are reset to default values, and to return those that I set myself, I need to click the "Reset Keys" button.

But as soon as I enter the modpack again, the control settings are reset to default again. Moreover, before launching the modpack, I opened options.txt to see what the control settings were before launching. And my custom settings were there. After that, I entered the game and looked at this file again - my custom control settings were still there. But as soon as I opened the control settings menu itself, I saw that the default values ​​​​are still there, and when I went back to the options.txt file to inspect it, I was offered to overwrite it, although I did not touch anything in the control settings menu. And when I agreed to overwrite, I saw that the control settings were also reset to default values, just like in the control settings menu in the game. Later I managed to find out that it has something to do with the knownkeys.txt file, which is located in the root folder of the game. If you delete this file and try to enter the game again, this time the control settings will be custom, meaning everything will work as expected. But if you enter the game again when this file has already been generated, the control settings will be reset to default again due to the presence of this file in the root folder of the game.

This "anomaly" can be tested in the most current version of my modpack for 1.21.1. Simply run it twice. The first time, the custom control settings will be saved, the second time, they will be overwritten with the default ones. Then you can delete knownkeys.txt and enter the game again - the custom control settings will be in place again. Then try to enter the game without deleting knownkeys.txt - the control settings will be reset to default again.

https://modrinth.com/modpack/forgified-core

commented

I also noticed that in the 1.20.1 version of the mod the format of the control settings in the keybindings.txt file is as follows:
image

But in version 1.21.1 the format is different, namely: :NONE is no longer added at the end of each of the settings.
image

Could this be the cause of this bug?