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

set options as default for new game #1705

Draft
wants to merge 9 commits into
base: options-XML3
Choose a base branch
from

Conversation

kianzarrin
Copy link
Collaborator

@kianzarrin kianzarrin commented Dec 2, 2022

TMPE.zip
fixes #363
fixes #1709

  • Resetting all config resets global config + sets default options for new games to built-in defaults
  • Set as default for new games option was added. this can be pressed both in main menu and in game.
  • all options can always be modified in main menu, game, or asset editor (except dynamic lane changing cannot be modified in asset editor).

Bonus:

  • moved some duplicate code to base class SerializableUIOptionBase
  • the resetAll parameter when resetting global was redundant - even misleading. so I dropped it. if the oldConfig parameter is null it is all reset (as it was the case before).

@kianzarrin kianzarrin added Settings Road config, mod options, config xml Dependent This issue is blocked by another issue. serialization load/store data in memory or on disk labels Dec 2, 2022
@kianzarrin kianzarrin self-assigned this Dec 2, 2022
@@ -13,10 +13,15 @@ public static class MaintenanceTab_ConfigGroup {
Handler = OnReloadGlobalConfigClicked,
};
public static ActionButton ResetGlobalConfig = new() {
Label = "Maintenance.Button:Reset global configuration",
Label = "Maintenance.Button:Reset all configuration",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? This will be super confusing for users.
1, they will ask what happened to reset global config button
2. they will ash what does "all" even mean.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

global is also not accurate because we are resetting defaults for new game too.
@krzychu124 what do you suggest I do?

Copy link
Member

@krzychu124 krzychu124 Dec 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why you decided to save defaults in global config?
Global settings are user regardless of state but the defaults would be used only in specific condition which suggest that is not the best place for that.
Maybe we just need something like TMPE_DefaultGameSettings.xml created automatically, and then the user could even change things by hand? This way we could easily handle multiple versions of settings, e.g.: with popup with list of configs to use, similar to MoveIt Import/Export modal (it could simply overwrite the main file with selected one). That seem to be more future proof and most likely easier to manage.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool I create new file.

@krzychu124 but I still don't understand what should I call that button? should I split it into 2 buttons?

i mean its kind of global and currently there is no way for user to tell which settings are global except for trial and error (or read the xml files).

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, maybe we need and icon or something to mark in-game specific options? I can be even ❔ button with a tooltip informing that setting is in-game only

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or maybe saved game options can have different text color in main menu.

@krzychu124 but I still don't understand what should I call that button? should I split it into 2 buttons?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Leave it like it was "Global configuration" has its own meaning in the mod, wiki etc., always refers to GlobalConfig configuration file

TLM/TLM/State/OptionsTabs/MaintenanceTab_ConfigGroup.cs Outdated Show resolved Hide resolved
TLM/TLM/State/SavedGameOptions.cs Outdated Show resolved Hide resolved
@krzychu124 krzychu124 modified the milestones: 11.7.3.0, 11.7.4.0 Dec 13, 2022
@kianzarrin kianzarrin marked this pull request as draft December 16, 2022 19:44
@krzychu124 krzychu124 modified the milestones: 11.7.4.0, Planned stuff Mar 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dependent This issue is blocked by another issue. serialization load/store data in memory or on disk Settings Road config, mod options, config xml
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants