TeamSpen210 / HammerAddons

Useful tweaks and content for Source Engine Games
123 stars 36 forks source link

Configuration format and parsing #240

Open The1stWii2 opened 1 year ago

The1stWii2 commented 1 year ago

Currently, HammerAddons' PostCompiler utilises a Valve Keyvalue Format file for the storage of configuration options. While the decision to utilise a format of which a parser is already included makes sense, certain aspects are left to be desired. More modern configuration formats are available, for example, Python 3.11 now includes a TOML parser in the standard library. Alternatively, some formats, like JSON, provide schemas, which provides ways to validating structures, with some editors even provide validation during editing.

Further, the PostCompiler regenerates the configuration file every time it is run; this behaviour is the contrary of what is expected from a configuration file. In particular, this means non-configuration modifications, such as comments or formatting, are removed.

TeamSpen210 commented 1 year ago

My thought is that it might be nice to make a GUI for configuration. That could include a FGD exporter allowing customisation of that. And plug-ins could include additional options.