Skip to content
New issue

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

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

Already on GitHub? # to your account

Expand configs: Add type, min/max #178

Closed
Tracked by #181
ithinkandicode opened this issue Mar 11, 2023 · 3 comments · Fixed by #237
Closed
Tracked by #181

Expand configs: Add type, min/max #178

ithinkandicode opened this issue Mar 11, 2023 · 3 comments · Fixed by #237
Assignees
Labels
enhancement New feature or request refactor / cleanup Improves readability or maintainability
Milestone

Comments

@ithinkandicode
Copy link
Collaborator

ithinkandicode commented Mar 11, 2023

As discussed on the Brotato Discord here, it would be good to expand the configs to add support for setting types, and perhaps min/max values too.

It adds a bit of extra complexity when parsing the default configs, but I think it's worth it, as it would make implementing a GUI much easier for modders/game developers.

Example:

image

Ideas for options:

  • All: type, default
  • Text: min_length, max_length, regex
  • Float/Int: min_value, max_value, step (ie. the amount the value should be incremented by in a mod's GUI)
@ithinkandicode ithinkandicode added enhancement New feature or request refactor / cleanup Improves readability or maintainability labels Mar 11, 2023
@Qubus0
Copy link
Collaborator

Qubus0 commented Mar 11, 2023

So, in essence, you want to use json schema.
We might be able to use an existing asset for that -
https://godotengine.org/asset-library/asset/514

https://godotengine.org/asset-library/asset/955

@KANAjetzt KANAjetzt mentioned this issue Mar 23, 2023
37 tasks
@KANAjetzt KANAjetzt added this to the v6.0.0 milestone Mar 23, 2023
@KANAjetzt KANAjetzt self-assigned this Apr 18, 2023
@KANAjetzt
Copy link
Member

Adding to this refactor:

Ste — Yesterday at 13:45
we should also provide methods in ModLoaderConfig to get and set values in the config (with a save at the end), just so people don't have to use get_mod_config and do it themselves. then we can private all those methods as well

@ithinkandicode ithinkandicode linked a pull request May 7, 2023 that will close this issue
@KANAjetzt
Copy link
Member

closed by #237

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request refactor / cleanup Improves readability or maintainability
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants