User interface for Lua settings
There needs to be a way for the user to change mod and built-in script settings.
@ptmikheev and I have discussed it, and I have come up with this prototype:
Video
Lua code snippet
C++ prototype branch

There are multiple problems left open:
- As we continue to dehardcode various mechanics, more and more "base game" settings will go through this system. So just adding an Advanced / Mods / Lua tab isn't good enough. It would already be strange to have Camera settings in Advanced, much worse for key bindings or always using best strike direction.
- We were sticking with a pretty small Settings window size until now, to stay consistent with the original game. IMO it's about time we changed that. Many setting pages could benefit from more screen space, in particular key bindings. Mod settings will also be arbitrary, and having a tiny window might encourage people to split their settings into multiple parts.
- My prototype includes a way to search through the added setting pages. Currently it only searches through the names, but it should probably be expanded in some way. However, I feel like we need a global setting search as well. Even now many users fail to find certain settings which they know exist, and I myself take a couple minutes to find them.
My suggestion to resolve these problems:
- Rather than trying to separate core and mod settings, allow adding setting pages to any settings tab. E. g. the recently dehardcoded Camera settings would go to the Video tab. Inside each tab we would have an interface similar to the prototype, with a list of pages on one side, and the current page rendering on the other. In fact, we already do something similar for the Video tab: it has multiple sub-tabs.
- I would suggest expanding the Settings Window to cover the entire screen, or at least a much larger part of it than currently. Point 1 would step away from a vanilla-like menu, and so does the concept of built-in scripts already.
- In my prototype, the search is just for that particular tab. But if all the tabs are custom, maybe it should be through all of them at once. Typing in the search field would filter the current tab's pages, but also hide non-current tabs which don't have any matching pages.
Just searching through pages names is obviously not good enough, but searching through arbitrary UI elements could be quite challenging. A simple solution I see is adding tooltips to setting pages, and searching through those as well. Then the script authors will have control over what search terms would work for their page.
Edited by uramer