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

Add Mod Settings #8

Open
arthuro555 opened this issue Oct 5, 2020 · 2 comments
Open

Add Mod Settings #8

arthuro555 opened this issue Oct 5, 2020 · 2 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@arthuro555
Copy link
Owner

Add a GDMod.json attribute to declare settings, showing them to the user from the loader and passing them to the mod.

@PawBud
Copy link
Contributor

PawBud commented Oct 5, 2020

I would like to work on this, currently, it shows nothing to configure.
Specifically, what are settings are to be displayed, I was thinking, that we should focus on refactoring the GUI first. Your thoughts?

@arthuro555
Copy link
Owner Author

arthuro555 commented Oct 6, 2020

Currently the settings are not implemented. The goal of this issue would be to add a way to add some settings from the mod.
To do so, there would be a new field on the manifest named something like "settings", that would be some sort of object that maps a setting name to a type (to change the input element on the settings menu)
Then you would pass the settings from the UI to the mod class constructor.
The UI would show the mods settings and update it in the API

Something you need to think about is that there are two kinds of loaders: local, which execute before the game runs and modified the game files, and the web one, which modifies the in-memory Js object (as a script being run in the games page), so you need to design the API side in a way it can be set by loader code.
The local loader doesn't has a real UI yet, so you can just not implement it (like the message UI function) but make it in a way that it can still be implemented later.

You could also add an API to the mod class, for when the settings are updated for the mods to react in real time to settings changes.

@arthuro555 arthuro555 reopened this Oct 6, 2020
@arthuro555 arthuro555 added enhancement New feature or request and removed hacktoberfest labels Nov 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants