Default Options by BlayTheNinth

Video Review

Coming soon or you can submit one.

Description

Default Key Configuration!

Default Options!

Local Configs!

Stop plaguing your players with config resets due to modpack updates!

Setting up Default Keys

Configure the keys how you’d like them to be in the default configuration
Run the “/defaultoptions saveKeys” command: the file defaultkeys.txt will be saved in the config folder
Make sure to ship the defaultkeys.txt and NOT the options.txt in your modpack. Victory!
Check the Controls GUI to see that the default settings have updated. Players will now start with these keys by default.
Setting up Default Options

Configure the options (e.g. FOV, video and audio settings) how you’d like them to be in the default configuration
Run the “/defaultoptions saveOptions” command: the file defaultoptions.txt will be saved in the config folder
Make sure to ship the defaultoptions.txt and NOT the options.txt in your modpack. Woohoo!
Fresh installations of your pack (=> no existing options.txt) will now get the default options you specified.
Setting up Local Configs

Some mods add options that might frequently be changed on the client side, such as configurable GUI positions or special render effects.

This is the solution to those, that doesn’t require the mod developer to store those values in a separate file.
Head into your config directory and open up the localconfig.txt file (run the game with this mod at least once for it to be generated)
Define config options that should be treated as local options and be restored to what they were before modpack updates
Either create the config/modpack-update file by hand or run the “/defaultoptions createUpdateFile” command ingame
Make sure to ALWAYS ship the modpack-update and localconfig.txt file inside the config directory, but do NOT ship the localconfig.cfg file inside the Minecraft directory. Success!
When starting the pack after an update (=> the modpack-update file will exist), the client will restore the specified values from a backup file before the update.

Spoiler for ocal Config Format

# In this file, modpack creators can define config options that should NOT get  by modpack updates.
# The values for these options will be restored to what they were before the pack update.
# The format is the following: FILE/CATEGORY.TYPE:NAME
# If the config file is inside a sub-directory, encase the path inside square brackets, ex. [eirairc/shared.cfg]
# Categories and sub-categories are split by periods, ex. general.subcategory<
# The type is a single-character just like Forge's configuration type prefix: B, I, S, D; for lists, append <> to the type character
# Full Example #1: trashslot.cfg/general.I:trashSlotX
# Full Example #2: [eirairc/client.cfg]/notifications.D:notificationSoundVolume

 

Resources

Source(s):

Licensing

MIT