I create config on my own without IConfiguration and its API, I use SerializerBuilder and DeserializerBuilder because I have a 3 different implementations of my plugin (OpenMod, RocketMod, Vanilla), and to don't make the config duplications I made 1 C# model (class) and the same with translations to solve problem in one single place, but when I use config.yaml and translations.yaml as file names, openmod fires an event when config updated, etc
OpenMod also cause an exception when trying to deserialize my config.yaml and translations.yaml however, without success, so, this forces me to create a plugin-config.yaml and plugin-translations.yaml, to suppress those issues as a temp solution, I don't want to stay with plugin- prefix because for a user its hard to understand that this is config or translations of the plugin, because it's more known for everyone (users of openmod) that config is config.yaml and translations if translations.yaml
I suggest making a plugin.yaml file as an embedded resource in the plugin with all configuration settings for the OpenMod when activating the plugin, as an example I made this simple config:
plugin.yaml
plugin:
ignoreConfiguration: true
ignoreTranslations: true
I create config on my own without IConfiguration and its API, I use
SerializerBuilderandDeserializerBuilderbecause I have a 3 different implementations of my plugin (OpenMod, RocketMod, Vanilla), and to don't make the config duplications I made 1 C# model (class) and the same with translations to solve problem in one single place, but when I useconfig.yamlandtranslations.yamlas file names, openmod fires an event when config updated, etcOpenMod also cause an exception when trying to deserialize my config.yaml and translations.yaml however, without success, so, this forces me to create a
plugin-config.yamlandplugin-translations.yaml, to suppress those issues as a temp solution, I don't want to stay withplugin-prefix because for a user its hard to understand that this is config or translations of the plugin, because it's more known for everyone (users of openmod) that config isconfig.yamland translations iftranslations.yamlI suggest making a
plugin.yamlfile as an embedded resource in the plugin with all configuration settings for the OpenMod when activating the plugin, as an example I made this simple config:plugin.yaml