Index: /code/branches/resource2/src/core/GraphicsManager.cc
===================================================================
--- /code/branches/resource2/src/core/GraphicsManager.cc	(revision 5659)
+++ /code/branches/resource2/src/core/GraphicsManager.cc	(revision 5660)
@@ -103,4 +103,5 @@
         // Load resources
         resources_.reset(new XMLFile("resources.oxr", "dataRoot"));
+        resources_->setLuaSupport(false);
         Loader::open(resources_.get());
 
@@ -110,4 +111,5 @@
             Ogre::ResourceGroupManager::getSingleton().addResourceLocation(Core::getExternalDataPathString(), "FileSystem", "externalDataRoot", false);
             extResources_.reset(new XMLFile("resources.oxr", "externalDataRoot"));
+            extResources_->setLuaSupport(false);
             Loader::open(extResources_.get());
         }
Index: /code/branches/resource2/src/core/Loader.cc
===================================================================
--- /code/branches/resource2/src/core/Loader.cc	(revision 5659)
+++ /code/branches/resource2/src/core/Loader.cc	(revision 5660)
@@ -122,9 +122,23 @@
         Loader::currentMask_s = file->getMask() * mask;
 
-        // Use the LuaState to replace the XML tags (calls our function)
-        scoped_ptr<LuaState> luaState(new LuaState());
-        luaState->setIncludeParser(&Loader::replaceLuaTags);
-        luaState->includeFile(file->getFilename(), file->getResourceGroup(), false);
-        //luaState->doString(luaInput);
+        std::string xmlInput;
+        if (file->getLuaSupport())
+        {
+            // Use the LuaState to replace the XML tags (calls our function)
+            scoped_ptr<LuaState> luaState(new LuaState());
+            luaState->setIncludeParser(&Loader::replaceLuaTags);
+            luaState->includeFile(file->getFilename(), file->getResourceGroup(), false);
+            xmlInput = luaState->getOutput().str();
+        }
+        else
+        {
+            shared_ptr<ResourceInfo> info = Resource::getInfo(file->getFilename(), file->getResourceGroup());
+            if (info == NULL)
+            {
+                COUT(1) << "Error: Could not find XML file '" << file->getFilename() << "'." << std::endl;
+                return false;
+            }
+            xmlInput = Resource::open(file->getFilename(), file->getResourceGroup())->getAsString();
+        }
 
         try
@@ -134,5 +148,5 @@
 
             ticpp::Document xmlfile(file->getFilename());
-            xmlfile.Parse(luaState->getOutput().str(), true);
+            xmlfile.Parse(xmlInput, true);
 
             ticpp::Element rootElement;
Index: /code/branches/resource2/src/core/LuaState.cc
===================================================================
--- /code/branches/resource2/src/core/LuaState.cc	(revision 5659)
+++ /code/branches/resource2/src/core/LuaState.cc	(revision 5660)
@@ -79,6 +79,5 @@
 
         // Parse init script
-        // Note: We have to use a hard coded path because the script is required for the resource loading
-        this->doString("dofile(\"" + Core::getDataPathString() + "lua/LuaStateInit.lua\")");
+        this->doFile("LuaStateInit.lua");
     }
 
Index: /code/branches/resource2/src/core/XMLFile.h
===================================================================
--- /code/branches/resource2/src/core/XMLFile.h	(revision 5659)
+++ /code/branches/resource2/src/core/XMLFile.h	(revision 5660)
@@ -50,7 +50,10 @@
             { }
 
+            void setLuaSupport(bool val) { bLuaSupport_ = val; }
+
             const std::string& getFilename() const { return this->filename_; }
             const std::string& getResourceGroup() const { return this->group_; }
             const ClassTreeMask& getMask() const { return this->mask_; }
+            bool getLuaSupport() const { return this->bLuaSupport_; }
 
         private:
@@ -58,4 +61,5 @@
             std::string group_;
             ClassTreeMask mask_;
+            bool bLuaSupport_;
     };
 }
Index: /code/branches/resource2/src/orxonox/LevelManager.cc
===================================================================
--- /code/branches/resource2/src/orxonox/LevelManager.cc	(revision 5659)
+++ /code/branches/resource2/src/orxonox/LevelManager.cc	(revision 5660)
@@ -142,5 +142,9 @@
                 it = availableLevels_.erase(it);
             else
+            {
+                size_t pos = it->find(".oxw");
+                *it = it->substr(0, pos);
                 ++it;
+            }
     }
 }
