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

Config cleanup, part 3 #183

Open
HenryLoenwind opened this issue Jul 14, 2024 · 7 comments
Open

Config cleanup, part 3 #183

HenryLoenwind opened this issue Jul 14, 2024 · 7 comments

Comments

@HenryLoenwind
Copy link

HenryLoenwind commented Jul 14, 2024

The following changes have been talked about:

  • Add a way to specify a name or translation key for a config file to streamline the label in the UI
  • Add a way to backfeed the Type to the IConfigSpec so it can react to its "needGameRestart" implications
  • Add a way to query the full path (or patch relative to the instance) of a modConfig for display in the UI
  • Add a way to query if a modConfig is using a per-save override or the global file for display in the UI
  • Add a way to save a loaded global config as a per-save override (including switching the file watcher etc.) for the UI
  • Add a way for the mod to trigger the same or specify it when it registers a config. This would allow a mod to store config values the player can trigger in-world/in-mod-GUI without having to attach them to the world save or the player entity.
  • Add a way to either backup config files or keep an automatic per-file history (when saving from inside the game) and a way to go back to an older version.

Nothing has been decided yet. Discuss on Discord, brainstorming>config stuff, then document any decisions here.

@TelepathicGrunt
Copy link
Contributor

TelepathicGrunt commented Jul 17, 2024

For server configs: If it is saved outside a world, it should edit default server config. And if inside world, it should save new server config into the world’s serverconfig folder. Dunno what the underlying architecture would be to support this use case

@HenryLoenwind
Copy link
Author

For server configs: If it is saved outside a world, it should edit default server config. And if inside world, it should save into the world’s serverconfig folder. Dunno what the underlying architecture would be to support this use case

A server config cannot be edited outside the world, as it is not loaded and is completely inaccessible.

@TelepathicGrunt
Copy link
Contributor

Hmm. That’s a bit annoying that you would need to make a world first to be able to edit default server configs through the config gui. I would like to see some sort of system that allows us to allow editing just the default file if exists outside of worlds. Just food for thought as I’m not personally a fan of making new world, edit default config in gui, delete world, make second world to have the values applied for worldgen and stuff

@azukaar
Copy link

azukaar commented Jul 17, 2024

(IMO it should also edit the world config by default, and have a checkbox/button (for the UI) or a booelan param (for the API) to set the global config too, as those are user defined settings when inside their world, and the dont necessarily expect to be editing the default global config, especially in the UI where they might not be aware of how config files actually work)

EDIT: adding to this that this is only an issue for singleplayer setup (with multiple saves) where the user is even less likely to be aware of those internal mechanics

@HenryLoenwind
Copy link
Author

Just remember that the user most likely does have no idea the config could even be made world-specific. Also, I'd expect them to expect to edit the config that currently is loaded and in effect, not another one. So creating a per-world silently in the background that isn't even the one that's active in the world they are in would be surprising.

@thedarkcolour
Copy link
Contributor

You could do it similar to how old NEI did its config. I think it had global by default and world-specific was accessed by changing which set of configs you wanted to edit.

@HenryLoenwind
Copy link
Author

You could do it similar to how old NEI did its config. I think it had global by default and world-specific was accessed by changing which set of configs you wanted to edit.

Something like that was my idea, just not on a per-value level as the config system can't do that. I would add a button to the top-most screen of any server config that would show if the config was global or per-world, and if it was the former, the button would become pressable and would write the current config out as a per-world config. Propper tooltips explaining this included.

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

No branches or pull requests

4 participants