Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overhaul The Custom Config File Format #582

Open
GameWyrm opened this issue Apr 18, 2024 · 0 comments
Open

Overhaul The Custom Config File Format #582

GameWyrm opened this issue Apr 18, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@GameWyrm
Copy link

The current implementation of the config.json contains a lot of duplicate information from default-config.json, and because of that, it does not update certain information, such as titles and tooltips, when the default config is updated. It also does not support multiple profiles. I suggest that the format of the config file be completely changed so that it only contains information as to what value each config option is set to. Information such as the type each option is, its settings, the title, and tooltip, would instead only be read from the default config file.

The new format for the config would be an array of profile objects, each containing key-value pairs for all options in the mod config, like so:

[
    "@GlobalSettings": {
        "UseGlobalSettings": true,
        "StringSetting": "hello",
        "BoolSetting": false,
        "FloatSetting": 42
    },
    "GameWyrm": {
        "UseGlobalSettings": true,
        "StringSetting": "hey",
        "BoolSetting": false,
        "FloatSetting": 17
    },
    "Tester Profile": {
        "UseGlobalSettings": false,
        "StringSetting": "yo",
        "BoolSetting": true,
        "FloatSetting": 52.6
    }
]

@GlobalSettings is the Global Settings described in my other issue. The “UseGlobalSettings” option determines if a profile will use the Global Settings or its own, while the other options are the mod config options defined in the default config. The prefix is simply to make it unlikely that an actual profile of the same name does not already exist. If a legacy config file is detected, it is parsed and then its settings copied over to the Global Settings.

On Xbox profiles are ignored and only the Global Settings will appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants