Index: orxonox/branches/levelloader/src/game_loader.cc
===================================================================
--- orxonox/branches/levelloader/src/game_loader.cc	(revision 3501)
+++ orxonox/branches/levelloader/src/game_loader.cc	(revision 3503)
@@ -25,4 +25,5 @@
 #include "command_node.h"
 #include "vector.h"
+#include "factory.h"
 
 #include <string.h>
@@ -162,4 +163,5 @@
   {
 		PRINTF(ERR)("No filename specified for loading");
+		return NULL;
   }
   
Index: orxonox/branches/levelloader/src/game_loader.h
===================================================================
--- orxonox/branches/levelloader/src/game_loader.h	(revision 3501)
+++ orxonox/branches/levelloader/src/game_loader.h	(revision 3503)
@@ -35,5 +35,5 @@
   
   void registerFactory( Factory* factory);
-  StoryEntity* fabricate( TiXMLElement* data);
+  BaseObject* fabricate( TiXMLElement* data);
   
  private:
Index: orxonox/branches/levelloader/src/story_entities/campaign.cc
===================================================================
--- orxonox/branches/levelloader/src/story_entities/campaign.cc	(revision 3501)
+++ orxonox/branches/levelloader/src/story_entities/campaign.cc	(revision 3503)
@@ -21,4 +21,5 @@
 #include "camera.h"
 #include "story_entity.h"
+#include "factory.h"
 
 using namespace std;
@@ -36,4 +37,6 @@
 {
 	TiXMLElement* element;
+	char string;
+	int id;
 	
 	assert( root != NULL);
@@ -44,12 +47,19 @@
   
   // grab all the necessary parameters
-  
+	string = grabParameter( root, "identifier");
+	if( string == NULL || if( sscanf(string, "%d", &id) != 1))
+	{
+		PRINTF(ERR)("Campaign is missing a proper 'identifier'\n");
+		setStoryId( -1);
+	}
+	else setStoryId( id);
+  	
   // find WorldList
   element = root->FirstChildElement( "WorldList");
   
-  // load Worlds
+  // load Worlds/Subcampaigns/Whatever
 	while( element != NULL)
 	{
-		StoryEntity created = loader->fabricate( element);
+		StoryEntity* created = (StoryEntity*) loader->fabricate( element);
 		if( created != NULL) addEntity( created);
 		element = element->nextSiblingElement();
Index: orxonox/branches/levelloader/src/story_entities/world.cc
===================================================================
--- orxonox/branches/levelloader/src/story_entities/world.cc	(revision 3501)
+++ orxonox/branches/levelloader/src/story_entities/world.cc	(revision 3503)
@@ -29,4 +29,5 @@
 #include "light.h"
 #include "fontset.h"
+#include "factory.h"
 
 using namespace std;
@@ -35,14 +36,31 @@
 World::World( TiXMLElement* root)
 {
-	TiXMLElement* element;
-	// load parameters
-		// identifier
-	element = FirstChildrenElement("identifier");
-	if( element == NULL)
-	{
-		PRINTF(ERR)("World created with missing identifier\n");
-		setStoryID( -1);
-	}
-		// file
+	char *string, *name;
+	int id;
+
+	// identifier
+	string = grabParameter( root, "identifier");
+	if( string == NULL || if( sscanf(string, "%d", &id) != 1))
+	{
+		PRINTF(ERR)("World is missing a proper 'identifier'\n");
+		setStoryId( -1);
+	}
+	else setStoryId( id);
+	
+	// path
+	string = grabParameter( root, "path");
+	if( string == NULL)
+	{
+		PRINTF(ERR)("World is missing a proper 'path'\n");
+		setPath( NULL);
+	}
+	else
+	{
+		name = new char[strlen(string + 2)];
+		strcpy( name, string);
+		setPath( name);
+	}
+	
+	
 }
 
@@ -115,4 +133,72 @@
 ErrorMessage World::load()
 {
+	if( 0)	// temporary until we really load from files
+	{
+			GameLoader* loader = GameLoader::getInstance();
+			
+		  if( getPath() == NULL)
+		  {
+				PRINTF(ERR)("World has no path specified for loading");
+				return (ErrorMessage){213,"Path not specified","World::load()"};
+		  }
+		  
+			TiXMLDocument* XMLDoc = new TiXMLDocument( name);
+			// load the campaign document
+			if( !XMLDoc.LoadFile())
+			{
+				// report an error
+				PRINTF(ERR)("Error loading XML File: %s @ %d:%d\n", XMLDoc.ErrorDesc(), XMLDoc.ErrorRow(), XMLDoc.ErrorCol());
+				delete XMLDoc;
+				return (ErrorMessage){213,"XML File parsing error","World::load()"};
+			}
+			
+			// check basic validity
+			TiXMLElement* element = XMLDoc.RootElement();
+			assert( element != NULL);
+			
+			element = element->FirstChildElement( "WorldDataFile");
+			
+			if( element == NULL )
+			{
+				// report an error
+				PRINTF(ERR)("Specified XML File is not an orxonox world data file (WorldDataFile element missing)\n");
+				delete XMLDoc;
+				return (ErrorMessage){213,"Path not a WorldDataFile","World::load()"};
+			}
+			
+			// load the parameters
+				// name
+			char* temp;
+			char* string = grabParameter( root, "name");
+			if( string == NULL)
+			{
+				PRINTF(ERR)("World is missing a proper 'name'\n");
+				setStoryId( -1);
+			}
+			else
+			{
+				temp = new char[strlen(string + 2)];
+				worldName = temp;
+			}
+			
+			
+			// find WorldEntities
+		  element = root->FirstChildElement( "WorldEntities");
+		  
+		  // load Players/Objects/Whatever
+			while( element != NULL)
+			{
+				WorldEntity* created = (WorldEntity*) loader->fabricate( element);
+				if( created != NULL) spawn( created);
+				element = element->nextSiblingElement();
+			}
+			
+			// find Track
+				// TODO: load the track somehow
+			
+			// free the XML data
+			delete XMLDoc;
+	}
+	
   //  BezierCurve* tmpCurve = new BezierCurve();
   if(this->debugWorldNr != -1)
@@ -916,2 +1002,11 @@
 }
 
+void World::setPath( char* name)
+{
+	path = name;
+}
+
+char* World::getPath()
+{
+	return path;
+}
Index: orxonox/branches/levelloader/src/story_entities/world.h
===================================================================
--- orxonox/branches/levelloader/src/story_entities/world.h	(revision 3501)
+++ orxonox/branches/levelloader/src/story_entities/world.h	(revision 3503)
@@ -52,5 +52,7 @@
   void spawn (WorldEntity* entity);
   void spawn (WorldEntity* entity, Vector* absCoor, Quaternion* absDir);
-
+	
+	void setPath( char* name);
+	char* getPath();
 
 
@@ -65,4 +67,5 @@
 
   char* worldName;              //!< The name of this World
+  char* path;										//!< The path to the data file used by this World
   int debugWorldNr;             //!< The Debug Nr. needed, if something goes wrong
 
