It's because AzerothCore use them as a "fallback" for configurations that you don't have on copied .conf file ( for example if we updated the dist or you've removed a conf )
All configuration files load their properties under 2 macro groups ( you must have one of them on your configuration file header) :
[authserver] -> for authserver configurations
[worldserver] -> for worldserver configurations
A property is composed by a name and a value that will be loaded inside an object at server startup / config reloading.
At server startup we read first the .dist files and load all propoerties under sConfig object. The .conf file will be loaded Right after: all new properties will be added to the sConfig object , instead properties with the same name overwrite old one from .dist
This allow you to create tiny .conf file that DOES NOT REQUIRE to have all .conf.dist properties inside since they have been already loaded before.
For example, if you want to keep all default conf but you've to change just the database properties, you can create a worldserver.conf file with just:
[worldserver]
LoginDatabaseInfo = "127.0.0.1;3306;root;root;azerothcore_test_auth"
WorldDatabaseInfo = "127.0.0.1;3306;root;root;azerothcore_test_world"
CharacterDatabaseInfo = "127.0.0.1;3306;root;root;azerothcore_test_chars"
After normal .conf
and .conf.dist
files have been loaded, you are able to load an infinite number of configuration files using scripts/modules API. They will have the same behaviour as described above.
Note: We do not recommend you to overwrite server configuration properties since you can have concurrency issues with other modules that use them too. Instead, create new namespaced properties.
For example, if you want to modify the "disable water breath" functionality in your module. Instead of using the existing property from worldserver.conf.dist
:
DisableWaterBreath = x
Use a namespace like:
MyModuleName.DisableWaterBreath = x
and work with that.
Yes, but it's not recommended. Each path is relative to the directory from where you launched the authserver/worldserver, whether you launch it manually or through a script. So if you do this (linux example):
cd /tmp/test
./path/to/worldserver
And you have relative paths in the worldserver.conf like LogsDir = "../logs/worldserver/"
It will create the logs inside /logs/worldserver
.
Configuration files will be loaded following this flow:
authserver.conf.dist
authserver.conf (overwrite properties from authserver.conf.dist)
worldserver.conf.dist
worldserver.conf (overwrite properties from worldserver.conf.dist)
modules *.conf.dist
modules *.conf (overwrite properties from each module's .conf.dist)