Similar to the CGame::ServerConfigGetInt(string name) method, I am proposing a method to retrieve strings from the server configuration. This has a few benefits, primarily being able to store data like API keys or other more sensitive data as a server configuration, akin to environment variables.
- Operating System
- Windows 10 x64
New patch 1.10 has added the ability to read from the globlas.xml, you could make use of that.
GetCEApi().GetCEGlobalInt(string varName); GetCEApi().GetCEGlobalFloat(string varName); GetCEApi().GetCEGlobalString(string varName);
You can automate your configuration and append the XML, however that might be more work rather than just setting up your own configuration loading/saving within the $profiles or $saves dir
@Arkensor It is already possible to read from the file with methods provided by CommunityFramework as seen here. It would be just more convienient to have it built-in alongside the already existing method
@markkoky44 this is a good work-around, but I'm hoping that they can simply add reading serverDZ.cfg directly. Currently I read from a text file, so it's not like this missing feature hinders me at all