Index: code/branches/presentation2/src/libraries/core/CMakeLists.txt
===================================================================
--- code/branches/presentation2/src/libraries/core/CMakeLists.txt	(revision 6241)
+++ code/branches/presentation2/src/libraries/core/CMakeLists.txt	(revision 6243)
@@ -86,5 +86,5 @@
   TOLUA_FILES
     CommandExecutor.h
-      ConfigFileManager.h
+    ConfigFileManager.h
     Game.h
     Loader.h
Index: code/branches/presentation2/src/libraries/core/ConfigValueContainer.h
===================================================================
--- code/branches/presentation2/src/libraries/core/ConfigValueContainer.h	(revision 6241)
+++ code/branches/presentation2/src/libraries/core/ConfigValueContainer.h	(revision 6243)
@@ -121,6 +121,6 @@
                 @param defvalue The default-value
             */
-            template <class V>
-            ConfigValueContainer(ConfigFileType type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<V>& defvalue)
+            template <class D, class V>
+            ConfigValueContainer(ConfigFileType type, Identifier* identifier, const std::string& sectionname, const std::string& varname, const std::vector<D>& defvalue, const std::vector<V>& value)
             {
                 this->init(type, identifier, sectionname, varname);
Index: code/branches/presentation2/src/libraries/core/ConfigValueIncludes.h
===================================================================
--- code/branches/presentation2/src/libraries/core/ConfigValueIncludes.h	(revision 6241)
+++ code/branches/presentation2/src/libraries/core/ConfigValueIncludes.h	(revision 6243)
@@ -23,11 +23,12 @@
  *      Fabian 'x3n' Landau
  *   Co-authors:
- *      ...
+ *      Reto Grieder (functions)
  *
  */
 
 /**
-    @file
-    @brief Definition of macros for config-values.
+@file
+@brief
+    Definition of macros and functions for config-values.
 */
 
@@ -41,74 +42,124 @@
 #include "ConfigFileManager.h"
 
+namespace orxonox
+{
+    /** Sets a runtime configurable value.
+        If the container for the value doesn't yet exist, a new one is created.
+        Also, the @a variable argument will be modified and set to the new value (default or from ini file).
+    @param object
+        Class instance that the config value should belong to (usually just 'this')
+    @param variable
+        Pointer to the variable where the value should be written to
+    @param type
+        Type of the config file, usually ConfigFileType::Settings
+    @param sectionName
+        Name of the section in the ini file (e.g. [MySection])
+    @param entryName
+        Name of the entry in the ini file (e.g. [MySection] myValue)
+    @param defaultValue
+        Value to be used if it cannot be read from the ini file
+    */
+    template <class T, class D, class V>
+    inline ConfigValueContainer& setConfigValueGeneric(T* object, V* variable, ConfigFileType type, const std::string& sectionName, const std::string& entryName, const D& defaultValue)
+    {
+        ConfigValueContainer* container = object->getIdentifier()->getConfigValueContainer(entryName);
+        if (!container)
+        {
+            container = new ConfigValueContainer(type, object->getIdentifier(), sectionName, entryName, defaultValue, *variable);
+            object->getIdentifier()->addConfigValueContainer(entryName, container);
+        }
+        return container->getValue(variable, object);
+    }
+}
 
-/**
-    @brief Assigns the value, defined in the config-file, to the variable (or the default-value, if there is no entry in the file).
-    @param varname The name of the variable
-    @param defvalue The default-value of the variable
+/** Sets a runtime configurable value (simplified macro version of setConfigValueGeneric)
+    If the container for the value doesn't yet exist, a new one is created.
+    Also, the @a varname argument will be modified and set to the new value (default or from ini file).
+@param varname
+    Variable name as C++ identifier. It will be used as entry name and as variable pointer
+@param defaultValue
+    Value to be used if it cannot be read from the ini file
 */
-#define SetConfigValueGeneric(type, varname, entryname, sectionname, defvalue) \
-    static orxonox::Identifier* identifier##varname = this->getIdentifier(); \
-    orxonox::ConfigValueContainer* container##varname = identifier##varname->getConfigValueContainer(entryname); \
-    if (!container##varname) \
-    { \
-        container##varname = new orxonox::ConfigValueContainer(type, identifier##varname, sectionname, entryname, defvalue, varname); \
-        identifier##varname->addConfigValueContainer(entryname, container##varname); \
-    } \
-    container##varname->getValue(&varname, this)
-
-#define SetConfigValue(varname, defvalue) SetConfigValueGeneric(ConfigFileType::Settings, varname, #varname, identifier##varname->getName(), defvalue)
+#define SetConfigValue(varname, defaultValue) \
+    orxonox::setConfigValueGeneric(this, &varname, ConfigFileType::Settings, this->getIdentifier()->getName(), #varname, defaultValue)
 
 
-/**
-    @brief Assigns the vector-values, defined in the config-file, to the vector (or the default-value, if there are no entries in the file).
-    @param varname The name of the std::vector
-    @param defvalue The default-value
+namespace orxonox
+{
+    /** Resets a runtime configurable value to its default.
+        If the container for the value doesn't yet exist, a warning is displayed.
+        Also, the @a variable argument will be modified and set to the default value.
+    @param object
+        Class instance that the config value should belong to (usually just 'this')
+    @param variable
+        Pointer to the variable where the value should be written to
+    @param entryName
+        Name of the entry in the ini file (e.g. [MySection] myValue)
+    */
+    template <class T, class V>
+    inline void resetConfigValueGeneric(T* object, V* variable, const std::string& entryName)
+    {
+        ConfigValueContainer* container = object->getIdentifier()->getConfigValueContainer(entryName);
+        if (container)
+        {
+            container->reset();
+            container->getValue(variable, object);
+        }
+        else
+        {
+            COUT(2) << "Warning: Couldn't reset config-value '" << entryName << "' in class '"
+                    << object->getIdentifier()->getName() << "', corresponding container doesn't exist." << std::endl;
+        }
+    }
+}
+
+/** Resets a runtime configurable value to its default (simplified macro version of modifyConfigValueGeneric)
+    If the container for the value doesn't yet exist, a warning is displayed.
+    Also, the @a varname argument will be modified and set to the default value.
+@param varname
+    Variable name as C++ identifier. It will be used as entry name and as variable pointer
 */
-#define SetConfigValueVectorGeneric(type, varname, defvalue) \
-    static orxonox::Identifier* identifier##varname = this->getIdentifier(); \
-    orxonox::ConfigValueContainer* container##varname = identifier##varname->getConfigValueContainer(#varname); \
-    if (!container##varname) \
-    { \
-        container##varname = new orxonox::ConfigValueContainer(type, identifier##varname, identifier##varname->getName(), #varname, defvalue); \
-        identifier##varname->addConfigValueContainer(#varname, container##varname); \
-    } \
-    container##varname->getValue(&varname, this)
-
-#define SetConfigValueVector(varname, defvalue) SetConfigValueVectorGeneric(ConfigFileType::Settings, varname, defvalue)
+#define ResetConfigValue(varname) \
+    orxonox::resetConfigValueGeneric(this, &varname, #varname)
 
 
-/**
-    @brief Sets the variable and the config-file entry back to the previously defined default-value.
-    @param varname The name of the variable
+/** Modifies a runtime configurable value by using a modifier and some arguments.
+    If the container for the value doesn't yet exist, a warning is displayed.
+    Also, the @a variable argument will be modified and set to the current value.
+@param object
+    Class instance that the config value should belong to (usually just 'this')
+@param variable
+    Pointer to the variable where the value should be written to
+@param entryName
+    Name of the entry in the ini file (e.g. [MySection] myValue)
+@param modifier
+    On of these functions: set, tset, add, remove, reset, update
+@param ...
+    Arguments for the modifier function
 */
-#define ResetConfigValue(varname) \
-    orxonox::ConfigValueContainer* container##varname##reset = this->getIdentifier()->getConfigValueContainer(#varname); \
-    if (container##varname##reset) \
+#define ModifyConfigValueGeneric(object, variable, entryName, modifier, ...) \
+    if (orxonox::ConfigValueContainer* container = object->getIdentifier()->getConfigValueContainer(entryName)) \
     { \
-        container##varname##reset->reset(); \
-        container##varname##reset->getValue(&varname, this); \
+        container->modifier(__VA_ARGS__); \
+        container->getValue(variable, object); \
     } \
     else \
     { \
-        COUT(2) << "Warning: Couldn't reset config-value '" << #varname << "', corresponding container doesn't exist." << std::endl; \
+        COUT(2) << "Warning: Couln't modify config-value '" << entryName << "' in class '" \
+                << object->getIdentifier()->getName() << "', corresponding container doesn't exist." << std::endl; \
     }
 
-
-/**
-    @brief Modifies a config-value by using a modifier and some arguments.
-    @param varname The name of the config-value
-    @param modifier The name of the modifier: set, tset, add, remove, reset, update
+/** Modifies a runtime configurable value by using a modifier and some arguments.
+    If the container for the value doesn't yet exist, a warning is displayed.
+    Also, the @a varname argument will be modified and set to the current value.
+@param varname
+    Variable name as C++ identifier. It will be used as entry name and as variable pointer
+@param modifier
+    On of these functions: set, tset, add, remove, reset, update
+@param ...
+    Arguments for the modifier function
 */
 #define ModifyConfigValue(varname, modifier, ...) \
-    orxonox::ConfigValueContainer* container##varname##modify##modifier = this->getIdentifier()->getConfigValueContainer(#varname); \
-    if (container##varname##modify##modifier) \
-    { \
-        container##varname##modify##modifier->modifier(__VA_ARGS__); \
-        container##varname##modify##modifier->getValue(&varname, this); \
-    } \
-    else \
-    { \
-        COUT(2) << "Warning: Couln't modify config-value '" << #varname << "', corresponding container doesn't exist." << std::endl; \
-    }
+    ModifyConfigValueGeneric(this, &varname, #varname, modifier, __VA_ARGS__) 
 
 #endif /* _ConfigValueIncludes_H__ */
Index: code/branches/presentation2/src/libraries/core/Core.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Core.cc	(revision 6241)
+++ code/branches/presentation2/src/libraries/core/Core.cc	(revision 6243)
@@ -183,5 +183,5 @@
         const unsigned int defaultLevelLogFile = 4;
 #endif
-        SetConfigValueGeneric(ConfigFileType::Settings, softDebugLevelLogFile_, "softDebugLevelLogFile", "OutputHandler", defaultLevelLogFile)
+        setConfigValueGeneric(this, &this->softDebugLevelLogFile_, ConfigFileType::Settings, "OutputHandler", "softDebugLevelLogFile", defaultLevelLogFile)
             .description("The maximum level of debug output shown in the log file");
         OutputHandler::getInstance().setSoftDebugLevel(OutputHandler::logFileOutputListenerName_s, this->softDebugLevelLogFile_);
Index: code/branches/presentation2/src/libraries/core/Shell.cc
===================================================================
--- code/branches/presentation2/src/libraries/core/Shell.cc	(revision 6241)
+++ code/branches/presentation2/src/libraries/core/Shell.cc	(revision 6243)
@@ -98,5 +98,5 @@
         SetConfigValue(historyOffset_, 0)
             .callback(this, &Shell::commandHistoryOffsetChanged);
-        SetConfigValueVectorGeneric(commandHistoryConfigFileType_, commandHistory_, std::vector<std::string>());
+        setConfigValueGeneric(this, &commandHistory_, commandHistoryConfigFileType_, "Shell", "commandHistory_", std::vector<std::string>());
 
 #ifdef ORXONOX_RELEASE
@@ -105,5 +105,5 @@
         const unsigned int defaultLevel = 3;
 #endif
-        SetConfigValueGeneric(ConfigFileType::Settings, softDebugLevel_, "softDebugLevel" + this->consoleName_, "OutputHandler", defaultLevel)
+        setConfigValueGeneric(this, &softDebugLevel_, ConfigFileType::Settings, "OutputHandler", "softDebugLevel" + this->consoleName_, defaultLevel)
             .description("The maximal level of debug output shown in the Shell");
         this->setSoftDebugLevel(this->softDebugLevel_);
Index: code/branches/presentation2/src/orxonox/gametypes/TeamDeathmatch.cc
===================================================================
--- code/branches/presentation2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 6241)
+++ code/branches/presentation2/src/orxonox/gametypes/TeamDeathmatch.cc	(revision 6243)
@@ -61,5 +61,5 @@
         static std::vector<ColourValue> defaultcolours(colours, colours + sizeof(colours) / sizeof(ColourValue));
 
-        SetConfigValueVector(teamcolours_, defaultcolours);
+        SetConfigValue(teamcolours_, defaultcolours);
     }
 
Index: code/branches/presentation2/src/orxonox/infos/Bot.cc
===================================================================
--- code/branches/presentation2/src/orxonox/infos/Bot.cc	(revision 6241)
+++ code/branches/presentation2/src/orxonox/infos/Bot.cc	(revision 6243)
@@ -94,5 +94,5 @@
         static std::vector<std::string> defaultnames(names, names + sizeof(names) / sizeof(std::string));
 
-        SetConfigValueVector(names_, defaultnames);
+        SetConfigValue(names_, defaultnames);
     }
 }
