TwelveIterationMods / DefaultOptions

Minecraft Mod. A way for modpacks to ship default settings without having to include an options.txt file.
https://mods.twelveiterations.com/mc/default-options/
Other
9 stars 9 forks source link

Default Keybindings Not applied? #72

Closed WimpieRatte closed 5 months ago

WimpieRatte commented 1 year ago

Minecraft Version

1.20.x

Mod Loader

Forge

Mod Loader Version

47.2.1

Mod Version

18.0.1

Balm Version

7.1.4

Describe the Issue

It seems that the keybinds that I specified are not being applied when the person installs a new instance of the modpack. Other settings, like video, shaders and resource packs, all seem to work, at least.

It's just a bit frustrating to know that new installs will have so many shortcut conflicts.

I'm not sure which details I can share to help troubleshoot this. This is the modpack: https://modrinth.com/modpack/colonies-and-technologies If you install a new instance, you'll notice that even though the "config\defaultoptions\keybindings.txt" has crawl bound to "caps lock", when the game loads, the crawl is not bound to caps lock :(.

key_key.crawlondemand.crawl:key.keyboard.caps.lock:NONE

This is especially "urgh" for super common shortcut keys, like "r". I don't want to override existing keybinds by publishing the options.txt file each time... so I'm really hoping this is a bug that can be confirmed and fixed :D.

Logs

No response

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

No response

natephillips801 commented 1 year ago

This is happening to me too. I created a fresh modpack and tested on forge 47.1.0 and 47.2.0. After modifying some keybinds, saving them, verifying they are correct in the configs and then wiping and regenerating the options.txt the configs do not update the options.txt.

BlayTheNinth commented 12 months ago

Are you deleting knownkeys.txt too when testing? If the keys are in knownkeys.txt Default Options will only set the Default of the keybinding, but not change the actual bound key.

I can not reproduce any issue using the Colonies and Technologies pack. If I delete the shipped options.txt and start it up fresh, my crawl is correctly bound to caps lock.

mahjerion commented 11 months ago

I can also confirm this issue during development of Craft to Exile 2. Oddly, it works for some users and some users don't have the custom default keybinds on install.

EDIT:

More context: MC: 1.20.1 Forge: 47.2.1

WimpieRatte commented 11 months ago

Ok, so should I publish the knownkeys.txt, but not the options.txt? Or do you mean I should put knownkeys.txt into the "defaultoptions\extra" folder?

BlayTheNinth commented 11 months ago

Do not ship knownkeys.txt and options.txt and delete both when testing if they work.

WimpieRatte commented 11 months ago

My process was to only export these folders: config mods resourcepacks shaderpacks

If someone already had a client installed and updated it, then his settings were kept. The issue was when someone installed a new instance. The mods' usual defaults were assigned instead of the keybinds that I wanted for the pack.

I'll publish my new version without the options.txt, because I cannot remember when I reverted to rather include the options.txt. After the update, if a new installation with the new version doesn't have the correct keybinds, I'll load a new version with options.txt again, but can then tell you exactly which colonies and technologies version will demonstrate the issue. Sorry for not mentioning the exact versioning when I logged the ticket :(.

WimpieRatte commented 11 months ago

Everything seems to now work fine on C&T version 22. Maybe a different mod prevented yours from working properly and then got updated to no longer interrupt... I don't know. If I ever get this issue again and I can recreate it like I could back then, I'll message here again. Thanks for the inputs and trying to investigate!

WimpieRatte commented 11 months ago

Closing ticket - unless someone can specify how we can recreate the issue :).

WimpieRatte commented 11 months ago

Ok. Found something that might be re-creatable. On my client that I "updated" to 22 (not a new instance), everything was reset to the mod defaults keybinds. HOWEVER, when I went to the key bindings and clicked "reset all", it set it according to how I originally set it up on the modpack publication.

So it was super quick to fix client-side, but the issue is still there.

Does this help?

mahjerion commented 11 months ago

Thanks for the workaround @WimpieRatte . Hopefully it gets resolved but at least we have this

Proxwian commented 8 months ago

I can confirm that keybinds do not apply on my modpack.

How to recreate issue: 1) Install TerraFirmaAdventure modpack 2) See keybinds 3) Now reset it to default - it becomes now as defaultSettings should do them 4) Close the game, delete options.txt 5) Start game, see keybinds settings - they become wrong again (not from defaultOptions)

BlayTheNinth commented 8 months ago

You need to delete knownkeys.txt as well.

Proxwian commented 8 months ago

It also doesn't help as players installs modpack without knownkeys.txt file and still reports the issue

PepGames commented 5 months ago

It also doesn't help as players installs modpack without knownkeys.txt file and still reports the issue

Yea when I export config, mods, resourcepacks, and shaders, then launch that exported version my defaults are not applied whatsoever and the player has to manually go through and reset every single keybind for them to be what I wanted for the pack.

Fyoncle commented 5 months ago

I also have this problem, knownkeys.txt automatically getting created on modpack's players even tho we dont include it after the first boot they do, that's strange.

Jadan1213 commented 5 months ago

i also ran into an issue related to this. our keybinds would constantly reset. they'd be fine on first install, but subsequent starts would have all the keys reset to mod defaults.

My issue that i discovered was that if the game crashed/didn't close properly, the keys would be reset the next startup. My pack's crashing on exit issue was caused by seamless loading screen. I removed that and "so far" i haven't had them reset post install.

BlayTheNinth commented 5 months ago

If that micro-crash at the start with certain mods was indeed the cause, the new version should fix the issue by forcing an options save immediately after changing the defaults.