[Feature]: load and save "StartServerDialog" settings from the dialog
Describe the Problem
If you play with multiple groups you have to fill in the ServerDialog by hand every time you start a game with different settings. In the discord we discussed that it would be great if it would be possible to save and load different setups from the dialog.
The Solution you'd like
Save and Load different setups from the dialog in XML.
Alternatives that you've considered.
Refactor the dialog, so that it uses protobuf to generate DTO objects from json and then export and import that into the dialog, to get it transitioned to the new method. It was also a wish to create a dropdown and populate it with the last exports, so that you can load a setup directly without the open dialog, but in my opinion it is easy and quick enough to just open different files.
Additional Context
No response
Could you link the discussion that's already taken place so others can reference it?
I believe it would be better if users didn't have to think about where to store server settings in the file system, or about the format it was saved in. Instead they could just choose to remember the current settings under some name, then recall it by selecting from a drop down list of all saved settings. This is being motivated by what I imagine would be the typical usage:
- Starting servers for various games at various times...
- from the same computer...
- and needing relatively few sets of server settings to be saved and loaded.
Point (2) would mean distribution isn't important, so probably no need to expose the files (of course it could still be implemented as files). Point (3) means the list used for recall could be a complete listing and wouldn't need to be restricted only to recent settings (though it could ordered by recency).
There's also some overlap in this feature with #3746, If taken to its extreme, that feature would reduce the server properties to just connection information plus the host's role -- everything else would become part of the campaign instead. If done, that would narrow the focus of this feature to only storing the host role plus the information the clients have to care about.
The discussion now takes place at https://discord.com/channels/296230822262865920/1133051381536784464
The Idea originally came from Azhrei in general_support, where he suggested: „My thinking was to allow the user to export/import the settings as XML to begin with. This lets people save and restore as many as they want and doen't require a lot of work from us (meaning the Java developer). In addition, a command line option for starting a server or connecting to a server could be created that took the XML file as a parameter. That lets a GM distribute a client configuration to people for easy connections (although they'll want to leave the Player Name field empty so that the player must fill it in). The second version of the feature could read the list of XML files from a directory (under MAPTOOL_DATADIR) and use that to fill in a dropdown list. Now it's even easier since one doesn't have to browse the filesystem looking for a file.„
For me I was just curious in looking into the code to see if I could manage to patch some of that in and learn something on the way.