gdmod
gdmod copied to clipboard
Add Mod Settings
Add a GDMod.json attribute to declare settings, showing them to the user from the loader and passing them to the mod.
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?
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.