Index: /orxonox/trunk/src/story_entities/campaign.cc
===================================================================
--- /orxonox/trunk/src/story_entities/campaign.cc	(revision 4597)
+++ /orxonox/trunk/src/story_entities/campaign.cc	(revision 4598)
@@ -41,67 +41,69 @@
 Campaign::Campaign ( TiXmlElement* root)
 {
-  //! \todo loading with load_param....
   this->setClassID(CL_CAMPAIGN, "Campaign");
+
+  PRINTF(3)("Loading Campaign...\n");
+
+  assert( root != NULL);
+
+  this->entities = new tList<StoryEntity>();
+  this->isInit = false;
+
+  this->loadParams(root);
+
+
+  //if( lastCreated != NULL)
+  //lastCreated->setStoryID( WORLD_ID_GAMEEND);
+}
+
+Campaign::~Campaign () {}
+
+
+ErrorMessage Campaign::init()
+{
+  this->isInit = true;
+}
+
+/**
+  \brief loads the Parameters of a Campaign
+  \param root: The XML-element to load from
+ */
+void Campaign::loadParams(const TiXmlElement* root)
+{
   TiXmlElement* element;
   const char* string;
-  int id;
-
-  PRINTF(3)("Loading Campaign...\n");
-
-  assert( root != NULL);
-  GameLoader* loader = GameLoader::getInstance();
-
-  this->entities = new tList<StoryEntity>();
-  this->isInit = false;
-
-  // grab all the necessary parameters
-  string = grabParameter( root, "identifier");
-  if( string == NULL || sscanf(string, "%d", &id) != 1)
-    {
-      PRINTF(2)("Campaign is missing a proper 'identifier'\n");
-      this->setStoryID( -1);
-    }
-  else this->setStoryID( id);
-
-  // find WorldList
-  element = root->FirstChildElement( "WorldList");
-  if( element == NULL)
-    {
-      PRINTF(2)("Campaign is missing a proper 'WorldList'\n");
-    }
-  else
-    element = element->FirstChildElement();
-
+
+  LoadParam<Campaign>(root, "identifier", this, &Campaign::setStoryID);
+
+  LoadParam<Campaign>(root, "WorldList", this, &Campaign::loadWorldListParams, root->FirstChildElement("WorldList"));
+}
+
+/**
+  \brief loads a WorldList
+  \param root: the XML-element to load from
+ */
+void Campaign::loadWorldListParams(const TiXmlElement* root)
+{
+  const TiXmlElement* element = root->FirstChildElement();
   // load Worlds/Subcampaigns/Whatever
   StoryEntity* lastCreated = NULL;
   while( element != NULL)
-    {
-      printf("Campaign: Constructor: adding a world\n");
-      StoryEntity* created = (StoryEntity*) loader->fabricate( element);
+  {
+    printf("Campaign: Constructor: adding a world\n");
+    StoryEntity* created = (StoryEntity*) GameLoader::getInstance()->fabricate(element);
       /*
-      if( lastCreated != NULL)
-        created->setNextStoryID( lastCreated->getStoryID());
-      else
-        created->setNextStoryID( WORLD_ID_GAMEEND);
+    if( lastCreated != NULL)
+    created->setNextStoryID( lastCreated->getStoryID());
+    else
+    created->setNextStoryID( WORLD_ID_GAMEEND);
       */
-      if( created != NULL)
-        {
-          this->addEntity( created);
-          lastCreated = created;
-        }
-      element = element->NextSiblingElement();
-    }
-  //if( lastCreated != NULL)
-  //lastCreated->setStoryID( WORLD_ID_GAMEEND);
-}
-
-Campaign::~Campaign () {}
-
-
-ErrorMessage Campaign::init()
-{
-  this->isInit = true;
-}
-
+    if( created != NULL)
+    {
+      this->addEntity( created);
+      lastCreated = created;
+    }
+    element = element->NextSiblingElement();
+  }
+}
 
 ErrorMessage Campaign::start()
Index: /orxonox/trunk/src/story_entities/campaign.h
===================================================================
--- /orxonox/trunk/src/story_entities/campaign.h	(revision 4597)
+++ /orxonox/trunk/src/story_entities/campaign.h	(revision 4598)
@@ -17,4 +17,7 @@
   Campaign ( TiXmlElement* root);
   virtual ~Campaign ();
+
+  void loadParams(const TiXmlElement* root);
+  void loadWorldListParams(const TiXmlElement* root);
 
   StoryEntity* currentEntity;
Index: /orxonox/trunk/src/util/loading/game_loader.cc
===================================================================
--- /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4597)
+++ /orxonox/trunk/src/util/loading/game_loader.cc	(revision 4598)
@@ -337,5 +337,5 @@
    \param element a XMLElement containing all the needed info
 */
-BaseObject* GameLoader::fabricate( TiXmlElement* element)
+BaseObject* GameLoader::fabricate(const TiXmlElement* element)
 {
   assert( element != NULL);
Index: /orxonox/trunk/src/util/loading/game_loader.h
===================================================================
--- /orxonox/trunk/src/util/loading/game_loader.h	(revision 4597)
+++ /orxonox/trunk/src/util/loading/game_loader.h	(revision 4598)
@@ -1,6 +1,6 @@
-/*! 
+/*!
     \file game_loader.h
     \brief loads campaigns, worlds and all other story_entities
-*/ 
+*/
 
 #ifndef _GAME_LOADER_H
@@ -60,7 +60,7 @@
   bool worldCommand(Command* cmd);
   ErrorMessage loadDebugCampaign(Uint32 campaignID);
-  
+
   void registerFactory( Factory* factory );
-  BaseObject* fabricate( TiXmlElement* data);
+  BaseObject* fabricate(const TiXmlElement* data);
 
   void process(const Event &event);
@@ -78,5 +78,5 @@
 
   Campaign*              currentCampaign;      //!< reference to the current campaign playing
-  
+
   EventHandler*          eventHandler;         //!< reference to the eventHandler
 
Index: /orxonox/trunk/src/util/loading/load_param.cc
===================================================================
--- /orxonox/trunk/src/util/loading/load_param.cc	(revision 4597)
+++ /orxonox/trunk/src/util/loading/load_param.cc	(revision 4598)
@@ -30,10 +30,11 @@
 */
 BaseLoadParam::BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName,
-                             int paramCount, bool multi, ...)
+                             int paramCount, bool multi, const void* pointerToParam, ...)
 {
   this->setClassID(CL_LOAD_PARAM, "LoadParam");
   this->loadString = NULL;
-
-  if (paramCount == 0)
+  this->pointerToParam = pointerToParam;
+
+  if (paramCount == 0 || this->pointerToParam)
     this->loadString = "none";
   else
@@ -63,5 +64,5 @@
 
       va_list types;
-      va_start (types, multi);
+      va_start (types, pointerToParam);
       for(int i = 0; i < paramCount; i++)
         {
Index: /orxonox/trunk/src/util/loading/load_param.h
===================================================================
--- /orxonox/trunk/src/util/loading/load_param.h	(revision 4597)
+++ /orxonox/trunk/src/util/loading/load_param.h	(revision 4598)
@@ -26,4 +26,5 @@
 #include "debug.h"
 #include "substring.h"
+#include "tinyxml.h"
 
 // Forward Declaration //
@@ -41,30 +42,35 @@
 /**
    useable FunctionParameters are:
-   l_INT:    int
-   l_LONG:   long
-   l_SHORT:  short
-   l_FLOAT:  float
-   l_STRING: const char*
-*/
-
-#define l_INT_TYPE       int              //!< The type of an INT
-#define l_INT_FUNC       atoi             //!< the function to call to parse INT
-#define l_INT_NAME       "int"            //!< the name of an INT
-
-#define l_LONG_TYPE      long             //!< The type of a LONG
-#define l_LONG_FUNC      atol             //!< The function to parse a LONG
-#define l_LONG_NAME      "long"           //!< The name of a LONG
-
-#define l_SHORT_TYPE     short            //!< The type of a SHORT
-#define l_SHORT_FUNC     atoi             //!< The function to parse a SHORT
-#define l_SHORT_NAME     "short"          //!< The name of a SHORT
-
-#define l_FLOAT_TYPE     float            //!< The type of a FLOAT
-#define l_FLOAT_FUNC     atof             //!< The function to parse a FLOAT
-#define l_FLOAT_NAME     "float"          //!< The name of a FLOAT
-
-#define l_STRING_TYPE    const char*      //!< The type fo a STRING
-#define l_STRING_FUNC                     //!< The function to parse a STRING
-#define l_STRING_NAME    "string"         //!< The name of a STRING
+   l_INT:       int
+   l_LONG:      long
+   l_SHORT:     short
+   l_FLOAT:     float
+   l_STRING:    const char*
+   l_XML_ELEM:  TiXmlElement*
+*/
+
+#define l_INT_TYPE       int                  //!< The type of an INT
+#define l_INT_FUNC       atoi                 //!< the function to call to parse INT
+#define l_INT_NAME       "int"                //!< the name of an INT
+
+#define l_LONG_TYPE      long                 //!< The type of a LONG
+#define l_LONG_FUNC      atol                 //!< The function to parse a LONG
+#define l_LONG_NAME      "long"               //!< The name of a LONG
+
+#define l_SHORT_TYPE     short                //!< The type of a SHORT
+#define l_SHORT_FUNC     atoi                 //!< The function to parse a SHORT
+#define l_SHORT_NAME     "short"              //!< The name of a SHORT
+
+#define l_FLOAT_TYPE     float                //!< The type of a FLOAT
+#define l_FLOAT_FUNC     atof                 //!< The function to parse a FLOAT
+#define l_FLOAT_NAME     "float"              //!< The name of a FLOAT
+
+#define l_STRING_TYPE    const char*          //!< The type of a STRING
+#define l_STRING_FUNC                         //!< The function to parse a STRING
+#define l_STRING_NAME    "string"             //!< The name of a STRING
+
+#define l_XML_ELEM_TYPE  const TiXmlElement*  //!< The type of an XML_ELEM
+#define l_XML_ELEM_FUNC                       //!< The function to parse an XML_ELEM
+#define l_XML_ELEM_NAME  "XML"                //!< The name of an XML_ELEM
 
 // 1. TYPE
@@ -75,5 +81,5 @@
 #define LoadParam1(type1) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE), bool multi = false) \
-   : BaseLoadParam(root, pt2Object, paramName, 1, multi, type1##_NAME)          \
+  : BaseLoadParam(root, pt2Object, paramName, 1, multi, NULL, type1##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -92,5 +98,5 @@
 #define LoadParam2(type1, type2) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE), bool multi = false) \
-   : BaseLoadParam(root, pt2Object, paramName, 2, multi, type1##_NAME, type2##_NAME) \
+  : BaseLoadParam(root, pt2Object, paramName, 2, multi, NULL, type1##_NAME, type2##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -117,5 +123,5 @@
 #define LoadParam3(type1, type2, type3) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE), bool multi = false)\
-   : BaseLoadParam(root, pt2Object, paramName, 3, multi, type1##_NAME, type2##_NAME, type3##_NAME) \
+  : BaseLoadParam(root, pt2Object, paramName, 3, multi, NULL, type1##_NAME, type2##_NAME, type3##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -143,5 +149,5 @@
 #define LoadParam4(type1, type2, type3, type4) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE), bool multi = false) \
-   : BaseLoadParam(root, pt2Object, paramName, 4, multi, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
+  : BaseLoadParam(root, pt2Object, paramName, 4, multi, NULL, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -170,5 +176,5 @@
 #define LoadParam5(type1, type2, type3, type4, type5) \
  LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE, type2##_TYPE, type3##_TYPE, type4##_TYPE, type5##_TYPE), bool multi = false) \
-   : BaseLoadParam(root, pt2Object, paramName, 5, multi, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
+  : BaseLoadParam(root, pt2Object, paramName, 5, multi, NULL, type1##_NAME, type2##_NAME, type3##_NAME, type2##_NAME, type4##_NAME, type5##_NAME) \
     { \
       if (loadString != NULL && root != NULL) \
@@ -185,4 +191,18 @@
     }
 
+// Pointer TYPE
+/**
+   \brief a Macro to easily implement many different Constructors for the LoadParam-Class with 1 argument
+   \param type1 The type of the Pointer
+ */
+#define LoadParamPT(type1) \
+ LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(type1##_TYPE), type1##_TYPE pointerToParam, bool multi = false) \
+  : BaseLoadParam(root, pt2Object, paramName, 1, multi, pointerToParam, type1##_NAME) \
+{ \
+      if (pointerToParam != NULL && root != NULL) \
+        (*pt2Object.*function)((type1##_TYPE) pointerToParam); \
+      else \
+        PRINTF(4)("Not loaded parameter %s of %s\n", paramName, pt2Object->getClassName()); \
+}
 
 //! A class that handles the description of loadable parameters
@@ -235,5 +255,5 @@
 
  protected:
-  BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, bool multi, ...);
+  BaseLoadParam(const TiXmlElement* root, BaseObject* object, const char* paramName, int paramCount, bool multi, const void* pointerToParam, ...);
 
  protected:
@@ -241,4 +261,5 @@
   LoadParamDescription*    paramDesc;            //!< The LoadParameterDescription of this LoadParameter
   const char*              loadString;           //!< The string loaded by this LoadParam
+  const void*              pointerToParam;       //!< A Pointer to a Parameter.
 };
 
@@ -249,5 +270,5 @@
  public:
   LoadParam(const TiXmlElement* root, const char* paramName, T* pt2Object, void(T::*function)(), bool multi = false)
-    : BaseLoadParam(root, pt2Object, paramName, 0, multi, "")
+    : BaseLoadParam(root, pt2Object, paramName, 0, multi, NULL, "")
     {
       if (loadString != NULL && root != NULL)
@@ -284,4 +305,6 @@
   //! makes functions with four floats loadable
   LoadParam4(l_FLOAT, l_FLOAT, l_FLOAT, l_FLOAT);
+
+  LoadParamPT(l_XML_ELEM);
 };
 
