BeamMP / BeamMP-Server

Server for the multiplayer mod BeamMP for BeamNG.drive
https://beammp.com
GNU Affero General Public License v3.0
116 stars 49 forks source link

Assume `General` category in `settings` command #316

Open lionkor opened 1 month ago

lionkor commented 1 month ago

Typing settings set General MaxPlayers 34 is more common than setting Misc or other settings, and thus we should provide overloads for settings set which only take a setting name, and either:

Related to #295

jimkoen commented 1 month ago

I'd rather we drop namespaces completely (so far we only have two values for the Misc namespace) or add a mandatory delimiter with auto-completion, like general::max_players.

lionkor commented 1 month ago

We need them for later plugin settings support.

Autocomplete should be trivial to add, lets do that

Neptnium commented 1 month ago

@lionkor I feel like putting every plugin in the main config file would be a bad idea. It could quickly become a huge mess, I personally have my plugins create a shared "configs" folder at the root of the server files, and every plugin create its own .TOML config file with the name of the plugin. (Kinda like minecraft even tho minecraft plugin's config are in the same folder as plugins, but its not possible in beammp as every folder is treated like a plugin in the servers resource folder)

Putting every plugin in the main would have issues when removing a plugin from the server and if plugins have big configs (My next plugin has like 30+ config settings, would be a mess if there are multiple like that)

lionkor commented 1 month ago

Either way I'd like to be able to query and change settings via the server cli

Neptnium commented 1 month ago

Yeah, I agree, would be a good idea, but just the fact of having every plugin's config in the same file would be a bad idea for me, Idk if you understand my opinion but yeah a cli command to change settings would be good!