Index: code/trunk/data/defaultConfig/keybindings.ini
===================================================================
--- code/trunk/data/defaultConfig/keybindings.ini	(revision 8531)
+++ code/trunk/data/defaultConfig/keybindings.ini	(revision 8706)
@@ -21,5 +21,5 @@
 KeyDown="scale -1 moveFrontBack"
 KeyE="scale -1 rotateRoll"
-KeyEnd=boost
+KeyEnd="boost"
 KeyEquals=
 KeyEscape="keyESC"
@@ -119,5 +119,5 @@
 KeySlash=
 KeySleep=
-KeySpace=boost
+KeySpace="boost"
 KeyStop=
 KeySystemRequest="printScreen"
Index: code/trunk/data/gui/layouts/DockingDialog.layout
===================================================================
--- code/trunk/data/gui/layouts/DockingDialog.layout	(revision 8706)
+++ code/trunk/data/gui/layouts/DockingDialog.layout	(revision 8706)
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="MenuWidgets/StaticImage" Name="orxonox/Docking/Background" >
+        <Property Name="FrameEnabled" Value="False" />
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Property Name="BackgroundEnabled" Value="False" />
+        <Window Type="MenuWidgets/StaticText" Name="orxonox/Docking/Title" >
+            <Property Name="Text" Value="Docking" />
+            <Property Name="Alpha" Value="0.8" />
+            <Property Name="InheritsAlpha" Value="False" />
+            <Property Name="HorzFormatting" Value="HorzCentred" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="VertFormatting" Value="TopAligned" />
+            <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.2875,0},{0.75,0},{0.7,0}}" />
+            <Window Type="MenuWidgets/Listbox" Name="orxonox/Docking/Docks" >
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.15,0},{0.95,0},{0.85,0}}" />
+            </Window>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Docking/DockButton" >
+            <Property Name="Text" Value="Dock" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.2875,0},{0.725,0},{0.4875,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="DockingDialog.dockButton_clicked"/>
+        </Window>
+        <Window Type="MenuWidgets/Button" Name="orxonox/Docking/CancelButton" >
+            <Property Name="Text" Value="Cancel" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0.5125,0},{0.725,0},{0.7125,0},{0.775,0}}" />
+            <Event Name="Clicked" Function="DockingDialog.cancelButton_clicked"/>
+        </Window>
+    </Window>
+</GUILayout>
Index: code/trunk/data/gui/layouts/QuestGUI.layout
===================================================================
--- code/trunk/data/gui/layouts/QuestGUI.layout	(revision 8531)
+++ code/trunk/data/gui/layouts/QuestGUI.layout	(revision 8706)
@@ -1,23 +1,78 @@
 <?xml version="1.0" ?>
 <GUILayout>
-    <Window Type="MenuWidgets/StaticImage" Name="orxonox/QuestGUI/Background">
-    <Property Name="UnifiedSize" Value="{{1.0,0},{1.0,0}}"/>
-    <Property Name="Image" Value="set:MainMenuBackground image:Background"/>
-    <Property Name="FrameEnabled" Value="set:true"/>
-    <Property Name="BackgroundEnabled" Value="set:false"/>
-    <Property Name="InheritsAlpha" Value="False" />
+    <Window Type="DefaultWindow" Name="orxonox/QuestGUI/Background">
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
 
-        <Window Type="MenuWidgets/Titlebar" Name="orxonox/QuestGUI/Title">
-            <Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}"/>
-            <Property Name="UnifiedSize" Value="{{0.9,0},{0.05,0}}"/>
-            <Property Name="Text" Value="Your Quests"/>
+        <Window Type="DefaultWindow" Name="orxonox/QuestGUI/MainWindow">
+            <Property Name="UnifiedAreaRect" Value="{{0.1,0},{0.1,0},{0.9,0},{0.9,0}}" />
+
+            <Window Type="MenuWidgets/Titlebar" Name="orxonox/QuestGUI/Title">
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,30}}" />
+                <Property Name="Text" Value="Your Quests"/>
+            </Window>
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/MainWindow/LeftPanel">
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{0.5,0},{1,0}}" />
+
+                <Window Type="MenuWidgets/TabButton" Name="orxonox/QuestGUI/ActiveQuestsButton">
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.5,0},{0,30}}" />
+                    <Property Name="Text" Value="active quests"/>
+                    <Event Name="Clicked" Function="QuestGUI.showActiveQuestsButton_clicked"/>
+                </Window>
+                <Window Type="MenuWidgets/TabButton" Name="orxonox/QuestGUI/FinishedQuestsButton">
+                    <Property Name="UnifiedAreaRect" Value="{{0.5,0},{0,0},{1,0},{0,30}}" />
+                    <Property Name="Text" Value="finished quests"/>
+                    <Event Name="Clicked" Function="QuestGUI.showFinishedQuestsButton_clicked"/>
+                </Window>
+
+                <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/QuestsList">
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{1,0},{1,0}}" />
+                    <Event Name="ItemSelectionChanged" Function="QuestGUI.changeQuest_clicked"/>
+                </Window>
+            </Window>
+
+            <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/MainWindow/RightPanel">
+                <Property Name="UnifiedAreaRect" Value="{{0.5,0},{0,30},{1,0},{1,0}}" />
+
+                <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Title">
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,30}}" />
+                    <Property Name="Text" Value="Quest Title"/>
+                </Window>
+
+                <Window Type="MenuWidgets/ScrollablePane" Name="orxonox/QuestGUI/Quest/ScrollWrapper">
+                    <Property Name="UnifiedAreaRect" Value="{{0,0},{0,30},{1,-4},{1,-4}}" />
+
+                    <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Wrapper">
+                        <Property Name="UnifiedAreaRect" Value="{{0,5},{0,5},{1,-5},{0,0}}" />
+                        <Property Name="FrameEnabled" Value="false" />
+                        <Property Name="Alpha" Value="0" />
+
+                        <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Description">
+                            <Property Name="UnifiedAreaRect" Value="{{0,5},{0,0},{1,-5},{0,0}}" />
+                            <Property Name="InheritsAlpha" Value="False" />
+                            <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
+                            <Property Name="VertFormatting" Value="TopAligned" />
+                            <Property Name="FrameEnabled" Value="false" />
+                            <Property Name="Text" Value="Quest Description"/>
+                        </Window>
+
+                        <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/Quest/SubquestsList">
+                            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+                            <Property Name="InheritsAlpha" Value="False" />
+                            <Event Name="ItemSelectionChanged" Function="QuestGUI.changeToSubquest_clicked"/>
+                        </Window>
+
+                        <Window Type="MenuWidgets/StaticText" Name="orxonox/QuestGUI/Quest/Hints">
+                            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{0,0}}" />
+                            <Property Name="InheritsAlpha" Value="False" />
+                            <Property Name="VertFormatting" Value="TopAligned" />
+                            <Property Name="FrameEnabled" Value="false" />
+                            <Property Name="Text" Value="Hints:" />
+                        </Window>
+                    </Window>
+                </Window>
+            </Window>
         </Window>
-
-        <Window Type="MenuWidgets/Listbox" Name="orxonox/QuestGUI/QuestsList">
-            <Property Name="UnifiedPosition" Value="{{0.07,0},{0.18,0}}" />
-            <Property Name="UnifiedSize" Value="{{0.86,0},{0.8,0}}" />
-            <Property Name="Alpha" Value="0.8" />
-        </Window>
-
     </Window>
 </GUILayout>
Index: code/trunk/data/gui/scripts/DockingDialog.lua
===================================================================
--- code/trunk/data/gui/scripts/DockingDialog.lua	(revision 8706)
+++ code/trunk/data/gui/scripts/DockingDialog.lua	(revision 8706)
@@ -0,0 +1,69 @@
+-- DockingDialog.lua
+
+local P = createMenuSheet("DockingDialog")
+
+P.docks = {}
+
+function P.onLoad()
+
+     --button are arranged in a 1x2 matrix
+    P:setButton(1, 1, {
+            ["button"] = winMgr:getWindow("orxonox/Docking/DockButton"),
+            ["callback"]  = P.dockButton_clicked
+    })
+
+    P:setButton(1, 2, {
+            ["button"] = winMgr:getWindow("orxonox/Docking/CancelButton"),
+            ["callback"]  = P.cancelButton_clicked
+    })
+    
+end
+
+function P.onShow()
+    orxonox.execute("setPause 1")
+    P.update()
+end
+
+function P.onHide()
+    orxonox.execute("setPause 0")
+end
+
+function P.update()
+    -- update dock list
+    P.docks = {}
+    local docks = orxonox.Dock:getNumberOfActiveDocks()
+    for i = 0, docks-1 do
+        table.insert(P.docks, orxonox.Dock:getActiveDockAtIndex(i))
+    end
+
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Docking/Docks"))
+    listbox:resetList()
+
+    for k in pairs(P.docks) do
+        local item = CEGUI.createListboxTextItem("Dock " .. k)
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        listbox:addItem(item)
+        if k == 1 then
+            listbox:setItemSelectState(item, true)
+        end
+    end
+end
+
+function P.dockButton_clicked(e)
+    local listbox = CEGUI.toListbox(winMgr:getWindow("orxonox/Docking/Docks"))
+    local choice = listbox:getFirstSelectedItem()
+    if choice ~= nil then
+        local index = listbox:getItemIndex(choice)
+        local dock = P.docks[index+1]
+        if dock ~= nil then
+            dock:dock()
+        end
+    end
+    hideMenuSheet(P.name)
+end
+
+function P.cancelButton_clicked(e)
+    hideMenuSheet(P.name)
+end
+
+return P
Index: code/trunk/data/gui/scripts/NotificationLayer.lua
===================================================================
--- code/trunk/data/gui/scripts/NotificationLayer.lua	(revision 8531)
+++ code/trunk/data/gui/scripts/NotificationLayer.lua	(revision 8706)
@@ -4,5 +4,4 @@
 
 P.queueList = {}
-P.editMode = false
 
 P.sampleWindow = nil
@@ -17,18 +16,27 @@
 function P.createQueue(name, size)
     local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
-    local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name)
-    queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent.
+    --local queue = winMgr:createWindow("MenuWidgets/Listbox", "orxonox/NotificationLayer/Root/Queue/" .. name)
+    --queue:setProperty("BackgroundColor", "00FFFFFF") -- Set background to be fully transparent.
+    local queue = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/Queue/" .. name)
+    queue:setProperty("Alpha", 0.0)
+    --queue:setProperty("FrameEnabled", "false")
     root:addChildWindow(queue)
-
-    queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
-    queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queue, size))))
 
     local queueTuple =
     {
-        ["window"]  = queue,
-        ["name"]    = name,
-        ["edit"]    = nil,
-        ["visible"] = false
+        ["window"]    = queue,
+        ["name"]      = name,
+        ["maxSize"]   = size,
+        ["visible"]   = false,
+        ["fontSize"]  = 12,
+        ["fontColor"] = "FFFFFFFF",
+        ["alignment"] = "LeftAligned",
+        ["items"]     = {},
+        ["first"]     = 1,
+        ["last"]      = 1
     }
+    
+    queue:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
+    queue:setSize(CEGUI.UVector2(CEGUI.UDim(1.0, 0), CEGUI.UDim(0, P.queueHeightHelper(queueTuple, size))))
 
     P.queueList[name] = queueTuple -- name access
@@ -41,4 +49,5 @@
 
     if queue ~= nil then
+        queue.window:getParent():removeChildWindow(queue.window)
         winMgr:destroyWindow(queue.window)
     end
@@ -52,12 +61,30 @@
         return
     end
-    item = CEGUI.createListboxTextItem(notification)
-    local listbox = CEGUI.toListbox(queue.window)
-    -- Add the item to the top of the listbox.
-    if listbox:getItemCount() == 0 then
-        listbox:addItem(item)
-    else
-        listbox:insertItem(item, listbox:getListboxItemFromIndex(0))
-    end
+
+    if not guiMgr:usingOldCEGUI() then
+        notification = string.gsub(notification, "%[", "\\%[") -- escape '[' which is used to format text since cegui 0.7
+    end
+
+    local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Queue/" .. queueName .. "/" .. queue.last)
+    item:setText(notification)
+    P.setItemFontHelper(item, queue, true)
+    -- Add the item to the top of the queue.
+    local itemHeight = P.itemHeightHelper(queue)
+    if queue.last-queue.first > 0 then -- If the queue is not empty move all items down
+        for i=queue.first,queue.last-1 do
+            local item = queue.items[i]
+            item:setYPosition(CEGUI.UDim(0, itemHeight*(queue.last-i)))
+        end
+    end
+    queue.window:addChildWindow(item)
+    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(0, itemHeight)))
+    item:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 0), CEGUI.UDim(0, 0)))
+    item:setProperty("Alpha", 1.0)
+    item:setProperty("InheritsAlpha", "false")
+    item:setProperty("BackgroundEnabled", "false")
+    item:setProperty("FrameEnabled", "false")
+    item:setProperty("HorzFormatting", queue.alignment)
+    queue.items[queue.last] = item
+    queue.last = queue.last+1
 
     -- If the queue has been invisible, set it to visible.
@@ -73,15 +100,17 @@
         return
     end
-    local listbox = CEGUI.toListbox(queue.window)
-    -- Removes the item from the bottom of the listbox.
-    listbox:removeItem(listbox:getListboxItemFromIndex(listbox:getItemCount()-1))
+    local item = queue.items[queue.first]
+    -- Removes the item from the bottom of the queue.
+    queue.window:removeChildWindow(item)
+    winMgr:destroyWindow(item)
+    queue.first = queue.first+1
 
     -- Sets the queue to invisible if there are no more notifications in it.
-    if listbox:getItemCount() == 0 then
+    if queue.last-queue.first == 0 then
         P.setVisible(queue, false)
     end
 end
 
--- Removes a notification at a given index from the queue.
+-- Removes a notification at a given index from the queue. Where the 0th item is the newest and the nth the (n+1)th newest.
 function P.removeNotification(queueName, index)
     local queue = P.queueList[queueName]
@@ -89,10 +118,33 @@
         return
     end
-    local listbox = CEGUI.toListbox(queue.window)
+
+    index = queue.last-tonumber(index)-1
+    --if index == queue.first then -- If we want to remove the oldest notification, we can just use pop.
+    --    P.popNotification(queueName)
+    --    return
+    --end
+
     -- Removes the item.
-    listbox:removeItem(listbox:getListboxItemFromIndex(tonumber(index)))
+    local item = queue.items[index]
+    queue.window:removeChildWindow(item)
+    winMgr:destroyWindow(item)
+    queue.items[index] = nil
+
+    -- Move the items below, up.
+    local itemHeight = P.itemHeightHelper(queue)
+    local moved = false
+    if index > queue.first then -- Move all older notifications up in the list.
+        for i=index-1,-1,queue.first do
+            cout(0, i)
+            item = queue.items[i]
+            item:setYposition(CEGUI.UDim(0, itemHeight*(queue.last-i-1)))
+            queue.items[i+1] = item
+        end
+    end
+    queue.items[queue.first] = nil
+    queue.first = queue.first+1
 
     -- Sets the queue to invisible if there are no more notifications in it.
-    if listbox:getItemCount() == 0 then
+    if queue.last-queue.first == 0 then
         P.setVisible(queue, false)
     end
@@ -105,6 +157,12 @@
         return
     end
-    local listbox = CEGUI.toListbox(queue.window)
-    CEGUI.toListbox(queue.window):resetList()
+    for i=queue.first,queue.last-1 do
+        local item = queue.items[i]
+        queue.window:removeChildWindow(item)
+        winMgr:destroyWindow(item)
+    end
+    queue.items = {}
+    queue.first = 1
+    queue.last = 1
 
     -- Sets the queue to invisible.
@@ -121,370 +179,118 @@
 end
 
--- Enter the edit mode of the notification layer.
-function P.enterEditMode()
-    P.editMode = true
-
-    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
-
-    --Add control frame window.
-    local window = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/ControlWindow")
-    local frame = tolua.cast(window, "CEGUI::FrameWindow")
-    frame:setCloseButtonEnabled(false)
-    frame:setText("NotificationLayer Control Window")
-    frame:setSize(CEGUI.UVector2(CEGUI.UDim(0.7, 0), CEGUI.UDim(0.2, 0)))
-    root:addChildWindow(window)
-    local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/ScrollingPane")
-    pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,-20), CEGUI.UDim(1,-30)))
-    pane:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 10), CEGUI.UDim(0, 26)))
-    window:addChildWindow(pane)
-
-    vertOffset = 0
-    horzOffset = 0
-    -- Line to be able to create a new queue.
-    local newQueueTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueTitle")
-    newQueueTitle:setText("Create a new NotificationQueue:")
-    local size = getMinTextSize(newQueueTitle)
-    local textHeight = size[1]
-    newQueueTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight)))
-    newQueueTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    pane:addChildWindow(newQueueTitle)
-    horzOffset = horzOffset + size[2] + 5
-    local newQueueName = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueName")
-    newQueueName:setProperty("ReadOnly", "set:False")
-    newQueueName:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight)))
-    newQueueName:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    horzOffset = horzOffset + size[2] + 5
-    pane:addChildWindow(newQueueName)
-    local create = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/CreateNewQueue")
-    create:setText("create")
-    P.sampleWindow:setText("create")
-    size = getMinTextSize(P.sampleWindow)
-    create:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]+20), CEGUI.UDim(0, textHeight)))
-    create:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    orxonox.GUIManager:subscribeEventHelper(create, "Clicked", P.name .. ".createNewQueue_clicked")
-    pane:addChildWindow(create)
-    horzOffset = horzOffset + size[2]+20 + 5
-    vertOffset = vertOffset + textHeight + 5
-
-    horzOffset = 0
-    -- Button to leave the edit mode.
-    local leave = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/ControlWindow/LeaveEditModeButton")
-    leave:setText("leave Edit Mode")
-    P.sampleWindow:setText("leave Edit Mode")
-    size = getMinTextSize(P.sampleWindow)
-    leave:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]+20), CEGUI.UDim(0, textHeight)))
-    leave:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    orxonox.GUIManager:subscribeEventHelper(leave, "Clicked", P.name .. ".leaveEditMode_clicked")
-    pane:addChildWindow(leave)
-    horzOffset = horzOffset + size[2]+20 + 5
-    vertOffset = vertOffset + textHeight + 5
-
-    --Replace all queues with FrameWindows
-    for k,v in pairs(P.queueList) do
-        if v ~= nil then
-            local queue = P.queueList[k]
-            -- Remove the window that displays the queue from the root window such that it is no longer displayed.
-            root:removeChildWindow(v.window)
-
-            -- Create the frame window, with options to edit the queue, that is displayed instead of the queue.
-            local window = P.createQueueEditFrame(v.name)
-            window:setArea(v.window:getArea()) -- Set the frame window size and position to the same as the queue.
-
-            v.edit = window
-        end
-    end
-end
-
--- Helper function. Creates a frame for the input queue.
-function P.createQueueEditFrame(queueName)
-    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
-
-    window = winMgr:createWindow("MenuWidgets/FrameWindow", "orxonox/NotificationLayer/Root/EditMode/" .. queueName)
-    local frame = tolua.cast(window, "CEGUI::FrameWindow")
-    frame:setCloseButtonEnabled(true)
-    orxonox.GUIManager:subscribeEventHelper(frame, "CloseClicked", P.name .. ".closeQueue_clicked")
-    frame:setText("NotificationQueue \"" .. queueName .. "\"")
-    root:addChildWindow(window)
-    local pane = winMgr:createWindow("MenuWidgets/ScrollablePane", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/ScrollingPane")
-    pane:setSize(CEGUI.UVector2(CEGUI.UDim(1,-20), CEGUI.UDim(1,-30)))
-    pane:setPosition(CEGUI.UVector2(CEGUI.UDim(0, 10), CEGUI.UDim(0, 26)))
-    window:addChildWindow(pane)
-
-    local horzOffset = 0
-    local vertOffset = 0
-
-    -- The line that lets you edit the targets of the queue.
-    local targetsTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/TargetsTitle")
-    targetsTitle:setText("Targets:")
-    local size = getMinTextSize(targetsTitle)
-    local textHeight = size[1]
-    targetsTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight)))
-    targetsTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    pane:addChildWindow(targetsTitle)
-    horzOffset = horzOffset + size[2] + 5
-    local targets = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets")
-    targets:setProperty("ReadOnly", "set:False")
-    local targetsText = orxonox.NotificationManager:getInstance():getQueue(queueName):getTargets()
-    targets:setText(targetsText)
-    P.sampleWindow:setText(targetsText)
-    size = getMinTextSize(P.sampleWindow)
-    targets:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight)))
-    targets:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    horzOffset = horzOffset + size[2]*2+20 + 5
-    pane:addChildWindow(targets)
-    local save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets/Save")
-    save:setText("save")
-    P.sampleWindow:setText("save")
-    size = getMinTextSize(P.sampleWindow)
-    local saveTextWidth = size[2]+20
-    save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight)))
-    save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveTargets_clicked")
-    pane:addChildWindow(save)
-    horzOffset = horzOffset + saveTextWidth
-    vertOffset = vertOffset + textHeight + 5
-
-    horzOffset = 0
-    -- The line that lets you edit the size of the queue.
-    local sizeTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/SizeTitle")
-    sizeTitle:setText("Size:")
-    size = getMinTextSize(sizeTitle)
-    sizeTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight)))
-    sizeTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    pane:addChildWindow(sizeTitle)
-    horzOffset = horzOffset + size[2] + 5
-    local queueSize = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size")
-    queueSize:setProperty("ReadOnly", "set:False")
-    local maxSize = orxonox.NotificationManager:getInstance():getQueue(queueName):getMaxSize()
-    queueSize:setText(maxSize)
-    P.sampleWindow:setText(maxSize)
-    size = getMinTextSize(P.sampleWindow)
-    queueSize:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight)))
-    queueSize:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    horzOffset = horzOffset + size[2]*2+20 + 5
-    pane:addChildWindow(queueSize)
-    save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size/Save")
-    save:setText("save")
-    P.sampleWindow:setText("save")
-    size = getMinTextSize(P.sampleWindow)
-    local saveTextWidth = size[2]+20
-    save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight)))
-    save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveSize_clicked")
-    pane:addChildWindow(save)
-    horzOffset = horzOffset + saveTextWidth
-    vertOffset = vertOffset + textHeight + 5
-
-    horzOffset = 0
-    -- The line that lets you edit the display time of the queue.
-    local displayTimeTitle = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTimeTitle")
-    displayTimeTitle:setText("Display time:")
-    size = getMinTextSize(displayTimeTitle)
-    displayTimeTitle:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]), CEGUI.UDim(0, textHeight)))
-    displayTimeTitle:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    pane:addChildWindow(displayTimeTitle)
-    horzOffset = horzOffset + size[2] + 5
-    local displayTime = winMgr:createWindow("MenuWidgets/Editbox", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime")
-    displayTime:setProperty("ReadOnly", "set:False")
-    local time = orxonox.NotificationManager:getInstance():getQueue(queueName):getDisplayTime()
-    displayTime:setText(time)
-    P.sampleWindow:setText(time)
-    size = getMinTextSize(P.sampleWindow)
-    displayTime:setSize(CEGUI.UVector2(CEGUI.UDim(0, size[2]*2+20), CEGUI.UDim(0, textHeight)))
-    displayTime:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    horzOffset = horzOffset + size[2]*2+20 + 5
-    pane:addChildWindow(displayTime)
-    save = winMgr:createWindow("MenuWidgets/Button", "orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime/Save")
-    save:setText("save")
-    P.sampleWindow:setText("save")
-    size = getMinTextSize(P.sampleWindow)
-    local saveTextWidth = size[2]+20
-    save:setSize(CEGUI.UVector2(CEGUI.UDim(0, saveTextWidth), CEGUI.UDim(0, textHeight)))
-    save:setPosition(CEGUI.UVector2(CEGUI.UDim(0, horzOffset), CEGUI.UDim(0, vertOffset)))
-    orxonox.GUIManager:subscribeEventHelper(save, "Clicked", P.name .. ".saveDisplayTime_clicked")
-    pane:addChildWindow(save)
-    horzOffset = horzOffset + saveTextWidth
-    vertOffset = vertOffset + textHeight + 5
-
-    return window
-end
-
--- Leave the edit mode.
-function P.leaveEditMode()
-    P.editMode = false
-
-    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
-    --Replace all queues with FrameWindows
-    for k,v in pairs(P.queueList) do
-        if v ~= nil then
-            -- Add the queue window to the root window to have it displayed again.
-            root:addChildWindow(v.window)
-            -- Set the size and position of the queue window to the size and position of the queue edit frame.
-            v.window:setArea(v.edit:getArea())
-            -- Destroy the edit frame.
-            winMgr:destroyWindow(v.edit)
-            v.edit = nil
-        end
-    end
-
-    --Remove control window
-    winMgr:destroyWindow(winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/ControlWindow"))
-end
-
--- Is called after the sheet has been hidden.
-function P.onQuit()
-    -- If we leave the edit mode we show the sheet again.
-    if P.editMode then
-        P.leaveEditMode()
-        showMenuSheet(P.name, false, true)
-    end
-end
-
--- If the button to save the targets of a queue has been clicked.
-function P. saveTargets_clicked(e)
-    local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
-
-    local match = string.gmatch(name, "EditMode/.*/Targets/Save")
-    local nameStr = match()
-    local queueName = string.sub(nameStr, 10, string.len(nameStr)-13)
-
-    local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets")
-    local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Targets/Save")
-    local width = window:getWidth():asAbsolute(1)
-
-    local queue = orxonox.NotificationManager:getInstance():getQueue(queueName)
-    -- Set the new targets.
-    queue:setTargets(window:getText())
-    local targets = queue:getTargets()
-
-    window:setText(targets)
-    P.sampleWindow:setText(targets)
-    local size = getMinTextSize(P.sampleWindow)
-    -- Adjust the width of the targets field.
-    window:setWidth(CEGUI.UDim(0, size[2]*2+20))
-    -- Adjust the position of the save button after the targets field.
-    save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1)))
-end
-
--- If the button to save the size if a queue has been clicked.
-function P. saveSize_clicked(e)
-    local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
-
-    local match = string.gmatch(name, "EditMode/.*/Size/Save")
-    local nameStr = match()
-    local queueName = string.sub(nameStr, 10, string.len(nameStr)-10)
-
-    local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size")
-    local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/Size/Save")
-    local width = window:getWidth():asAbsolute(1)
-
-    local queue = orxonox.NotificationManager:getInstance():getQueue(queueName)
-    -- Set the new size.
-    queue:setMaxSize(tonumber(window:getText()))
-    local maxSize = queue:getMaxSize()
-
-    window:setText(maxSize)
-    P.sampleWindow:setText(maxSize)
-    local size = getMinTextSize(P.sampleWindow)
-    -- Adjust the width of the size field.
-    window:setWidth(CEGUI.UDim(0, size[2]*2+20))
-    -- Adjust the position of the save button after the size field.
-    save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1)))
-end
-
--- If the button to save the display time if a queue has been clicked.
-function P. saveDisplayTime_clicked(e)
-    local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
-
-    local match = string.gmatch(name, "EditMode/.*/DisplayTime/Save")
-    local nameStr = match()
-    local queueName = string.sub(nameStr, 10, string.len(nameStr)-17)
-
-    local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime")
-    local save = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/" .. queueName .. "/DisplayTime/Save")
-    local width = window:getWidth():asAbsolute(1)
-
-    local queue = orxonox.NotificationManager:getInstance():getQueue(queueName)
-    -- Set the new display time.
-    queue:setDisplayTime(tonumber(window:getText()))
-    local time = queue:getDisplayTime()
-
-    window:setText(time)
-    P.sampleWindow:setText(time)
-    local size = getMinTextSize(P.sampleWindow)
-    -- Adjust the width of the display time field.
-    window:setWidth(CEGUI.UDim(0, size[2]*2+20))
-    -- Adjust the position of the save button after the display time field.
-    save:setXPosition(CEGUI.UDim(0, save:getXPosition():asAbsolute(1)-width+window:getWidth():asAbsolute(1)))
-end
-
--- if the button to create a new queue has been clicked.
-function P.createNewQueue_clicked(e)
-    local window = winMgr:getWindow("orxonox/NotificationLayer/Root/EditMode/ControlWindow/NewQueueName")
-    local name = window:getText()
-
-    local queue = P.queueList[name]
-    -- Test if a queue with that name already exists.
-    if queue ~= nil then
-        window:setText("Queue with that name already exists.")
-        return
-    end
-
-    -- Creates the new queue.
-    orxonox.NotificationManager:getInstance():createQueue(name)
-
-    queue = P.queueList[name]
-    if queue == nil then
-        return
-    end
-
-    -- Create the frame that represents the queue in edit mode, since that's what we're in.
-    local frame = P.createQueueEditFrame(name)
-    local root = winMgr:getWindow("orxonox/NotificationLayer/Root")
-    -- Remove the queue window from the root window, since we're in edit mode.
-    root:removeChildWindow(queue.window)
-    -- Set the frame window size and position to that of the queue window.
-    frame:setArea(queue.window:getArea())
-    queue.edit = frame
-
-    -- Reset the text to create a new queue.
-    window:setText("")
-end
-
--- If the button to leave the edit mode has been clicked.
-function P.leaveEditMode_clicked(e)
-    hideMenuSheet(P.name)
-end
-
--- If the button to close the queue has been clicked.
-function P.closeQueue_clicked(e)
-    local we = CEGUI.toWindowEventArgs(e)
-    local name = we.window:getName()
-
-    local match = string.gmatch(name, "EditMode/.*")
-    local nameStr = match()
-    local queueName = string.sub(nameStr, 10, string.len(nameStr))
-
-    -- Destroy the frame window,
-    winMgr:destroyWindow(P.queueList[queueName].edit)
-    P.queueList[queueName].edit = nil
-    -- Destroy the queue.
-    orxonox.NotificationManager:getInstance():getQueue(queueName):destroy()
+-- Change the position of the queue.
+-- The parameters are (in order) 'name of the queue', 'relative x-position', 'absolute x-position in pixel', 'relative y-position', 'absolute y-position in pixel'.
+function P.moveQueue(queueName, relativeXPos, absoluteXPos, relativeYpos, absoluteYPos)
+    local queueWindow = P.queueList[queueName].window
+    queueWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(relativeXPos, absoluteXPos), CEGUI.UDim(relativeYpos, absoluteYPos)))
+end
+
+-- Change the size of the queue.
+-- The parameters are (in order) 'name of the queue', 'relative width', 'absolute width in pixel', 'relative height', 'absolute heigth in pixel'.
+-- Additionally the last two parameters can be ommitted, which leads to the height being set such that all notifications can be displayed. using the size of the queue.
+function P.resizeQueue(queueName, relativeWidth, absoluteWidth, relativeHeight, absoluteHeigth)
+    local queue = P.queueList[queueName]
+    local queueWindow = queue.window
+    if queueWindow == nil then
+        return
+    end
+    if absoluteHeigth == nil then
+        absoluteHeigth = P.queueHeightHelper(queue, queue.maxSize)
+        relativeHeight = 0
+    end
+    queueWindow:setSize(CEGUI.UVector2(CEGUI.UDim(relativeWidth, absoluteWidth), CEGUI.UDim(relativeHeight, absoluteHeigth)))
+end
+
+-- Change the horizontal alignment of the displayed notifications.
+-- The parameters are the name of the queue and the alignment parameter,
+function P.changeQueueAlignment(queueName, alignment)
+    local queue = P.queueList[queueName]
+    local queueWindow = queue.window
+    if queueWindow == nil then
+        return
+    end
+
+    queue.alignment = alignment
+    local item = nil
+    for i=queue.first,queue.last-1 do
+        item = queue.items[i]
+        item:setProperty("HorzFormatting", queue.alignment)
+    end
+end
+
+-- Change the font size  of all notifications in a queue.
+-- The parameters are (in order) 'name of the queue', 'font size'.
+function P.changeQueueFontSize(queueName, size)
+    local queue = P.queueList[queueName]
+    local queueWindow = queue.window
+    if queueWindow == nil then
+        return
+    end
+
+    queue.fontSize = size
+    for i=queue.first,queue.last-1 do
+        P.setItemFontHelper(queue.items[i], queue, false)
+    end
+end
+
+-- Change the font color of all notifications in a queue.
+-- The parameters are (in order) 'name of the queue', 'ARGB of the font color in hex notation'.
+function P.changeQueueFontColor(queueName, color)
+    local queue = P.queueList[queueName]
+    local queueWindow = queue.window
+    if queueWindow == nil then
+        return
+    end
+
+    queue.fontColor = color
+    for i=queue.first,queue.last-1 do
+        P.setItemFontHelper(queue.items[i], queue, true)
+    end
+end
+
+-- Helper function to set the font size and color of a item of a queue.
+-- The parameters are (in order) 'the ListboxItem', 'the queue table', 'whether color should be changed as well'
+function P.setItemFontHelper(item, queue, changeColor)
+    --local item = tolua.cast(item, "CEGUI::ListboxTextItem")
+    local fontMgr = CEGUI.FontManager:getSingleton()
+    if (fontMgr["isFontPresent"] and fontMgr:isFontPresent("BlueHighway-" .. queue.fontSize)) or -- cegui 0.6
+        (fontMgr["isDefined"] and fontMgr:isDefined("BlueHighway-" .. queue.fontSize)) then -- cegui 0.7
+        item:setFont("BlueHighway-" .. queue.fontSize)
+    else
+        orxonox.GUIManager:addFontHelper("BlueHighway-" .. queue.fontSize, queue.fontSize, "bluehigh.ttf")
+        item:setFont("BlueHighway-" .. queue.fontSize)
+    end
+    if changeColor then
+        item:setProperty("TextColours", "tl:" .. queue.fontColor .. " tr:" .. queue.fontColor .. " bl:" .. queue.fontColor .. " br:" .. queue.fontColor .. "")
+    end
 end
 
 -- Helper function. Returns height a queue needs to have to display 'size' items.
 function P.queueHeightHelper(queue, size)
-    local listbox = CEGUI.toListbox(queue)
-    local item = CEGUI.createListboxTextItem("Text")
-    listbox:addItem(item)
-    local singleItemHeight = listbox:getTotalItemsHeight()
-    local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(queue:getLookNFeel())
-    local formattedArea = lookAndFeel:getNamedArea("ItemRenderingArea"):getArea():getPixelRect(queue)
-    local frameHeight = queue:getUnclippedOuterRect():getHeight() - formattedArea:getHeight()
-    listbox:removeItem(item)
-    return frameHeight + singleItemHeight*size
+    --local listbox = CEGUI.toListbox(queue.window)
+    --local item = CEGUI.createListboxTextItem("Text")
+    --P.setItemFontHelper(item, queue, false)
+    --listbox:addItem(item)
+    --local singleItemHeight = listbox:getTotalItemsHeight()
+    local singleItemHeight = P.itemHeightHelper(queue)
+    --local lookAndFeel = CEGUI.WidgetLookManager:getSingleton():getWidgetLook(queue.window:getLookNFeel())
+    --local formattedArea = lookAndFeel:getNamedArea("ItemRenderingArea"):getArea():getPixelRect(queue.window)
+    --local frameHeight = queue.window:getUnclippedOuterRect():getHeight() - formattedArea:getHeight()
+    --listbox:removeItem(item)
+    --return frameHeight + singleItemHeight*size
+    return singleItemHeight*size + 1
+end
+
+function P.itemHeightHelper(queue)
+    local item = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/NotificationLayer/Root/Test/")
+    item:setText("text")
+    P.setItemFontHelper(item, queue, true)
+    queue.window:addChildWindow(item)
+    item:setSize(CEGUI.UVector2(CEGUI.UDim(1, 0), CEGUI.UDim(1, 0)))
+    item:setProperty("FrameEnabled", "false")
+    local height = getStaticTextWindowHeight(item)
+    queue.window:removeChildWindow(item)
+    winMgr:destroyWindow(item)
+    return height
 end
 
Index: code/trunk/data/gui/scripts/QuestGUI.lua
===================================================================
--- code/trunk/data/gui/scripts/QuestGUI.lua	(revision 8531)
+++ code/trunk/data/gui/scripts/QuestGUI.lua	(revision 8706)
@@ -3,31 +3,321 @@
 local P = createMenuSheet("QuestGUI")
 
-P.rootWindow = nil
-P.detailsWindows = {}
+P.questManager = nil -- The QuestManager.
+P.showActive = true -- Whether the active or finished quest list is displayed.
+P.currentQuest = nil -- The quest that is currently displayed.
+P.player = nil -- The player the quests are displayed for.
 P.quests = {}
-P.hints = {}
-P.player = nil
+P.subquests = {}
 
 -- design parameters
-P.indentWidth = 20
 P.scrollbarWidth = 13
-P.buttonHeight = 30
+P.frameHeigth = 18
+P.borderSize = 5
 P.titleHeight = 26
-P.borderWidth = 5
+
+--TODO:
+-- Highlight whether we are currently looking at active or finished quests
+-- Distinguish completed from failed quests
+
+function P.onLoad()
+    P.questManager = orxonox.QuestManager:getInstance() -- Store the pointer to the QuestManager as an internal variable to allow for faster access,
+end
 
 function P.onShow()
-
-    local questsList = winMgr:getWindow("orxonox/QuestGUI/QuestsList")
-
+    -- Get the player.
     P.player = orxonox.GUIManager:getInstance():getPlayer(P.name)
-    P.rootWindow = P.createQuestGUI()
-
-    questsList:addChildWindow(P.rootWindow)
-end
-
-function P.onHide()
-    P.cleanup()
-end
-
+
+    -- Load the list of quests to be displayed.
+    P.loadQuestsList(P.currentQuest)
+end
+
+-- Loads the list of quests, depending on P.showActive, either the active (P.showActive == true) or the finished, i.e. inactive quests are loaded.
+-- selectQuest is a pointer to a quest that should be selected, if it is nil the first quest is selected.
+function P.loadQuestsList(selectQuest)
+    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    P.clearQuestList()
+
+    local selectQuestId = nil
+    if selectQuest ~= nil then
+        selectQuestId = P.questManager:getId(selectQuest)
+    end
+
+    -- Iterate through all root-quests.
+    local numRootQuests = P.questManager:getNumRootQuests(P.player)
+    if numRootQuests > 0 then
+        local i = 0
+        while i <= numRootQuests-1 do
+            local quest = P.questManager:getRootQuest(P.player, i)
+            -- Insert the current quest into the list.
+            local item = P.insertQuest(list, quest)
+            -- If the quest was inserted in the list and is has the same id as the selectQuest (thus it is the same quest) it is selected.
+            if selectQuestId ~= nil and item ~= nil and selectQuestId == P.questManager:getId(quest) then
+                list:setItemSelectState(item, true)
+            end
+            -- Insert all subquests of this rootquest.
+            P.insertSubQuests(list, quest, selectQuestId)
+            i = i+1
+        end
+        -- If there were quests added to the list but there was no selectQuest specified (i.e. selectQuest was nil), the first item is selected.
+        if list:getItemCount() > 0 then
+            if selectQuestId == nil then
+                list:setItemSelectState(list:getListboxItemFromIndex(0), true)  -- Select first quest.
+            end
+        -- If there werent any quests added the standard "no quests" message is loaded.
+        else
+            P.loadQuest()
+        end
+    end
+end
+
+-- Helper function, recursively inserts all the (active or inactive, depending on P.showActive) subquests of the input quest.
+-- list is the list into which the subquests should be insterted.
+-- quest is the quest, whose subquests should be inserted.
+-- selectQuestId is the id of the quest that should be selected.
+function P.insertSubQuests(list, quest, selectQuestId)
+    -- Iterate through all sub-quests.
+    local numQuests = P.questManager:getNumSubQuests(quest, P.player)
+    if numQuests > 0 then
+        local i = 0
+        while i <= numQuests-1 do
+            local subquest = P.questManager:getSubQuest(quest, P.player, i)
+            -- Insert the current quest into the list.
+            local item = P.insertQuest(list, subquest)
+            -- If the quest was inserted in the list and is has the same id as the selectQuest (thus it is the same quest) it is selected.
+            if selectQuestId ~= nil and item ~= nil and selectQuestId == P.questManager:getId(subquest) then
+                list:setItemSelectState(item, true)
+            end
+            i = i+1
+        end
+    end
+end
+
+-- Helper function, inserts a quest into the list (depending whether active or inactive quests are being shown). Returns nil if the quest was not inserted.
+-- list is the list into which the quets should be inserted.
+-- quest is the quest to be inserted.
+function P.insertQuest(list, quest)
+    if P.showActive == quest:isActive(P.player) then
+        local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle())
+        item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+        list:addItem(item)
+        table.insert(P.quests, quest)
+        return item
+    end
+    return nil
+end
+
+-- Loads the input quest.
+-- quest the quest to be loaded.
+function P.loadQuest(quest)
+
+    P.clearQuest() -- Clear the old quest.
+    if quest == nil then -- If quets is nil there is nothing to display.
+        return
+    else
+        local offset = 0
+
+        -- Load title and description
+        local description = P.questManager:getDescription(quest)
+        local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title")
+        titleWindow:setText(description:getTitle())
+        local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description")
+        descriptionWindow:setText(description:getDescription())
+        descriptionWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
+        descriptionWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, P.borderSize)))
+        local height = getStaticTextWindowHeight(descriptionWindow)
+        descriptionWindow:setHeight(CEGUI.UDim(0, height))
+        offset = offset + height
+
+        -- Load subquests
+        local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
+        local numQuests = P.questManager:getNumSubQuests(quest, P.player)
+        local i = 0
+        while i <= numQuests-1 do
+            local quest = P.questManager:getSubQuest(quest, P.player, i)
+            local item = CEGUI.createListboxTextItem(P.questManager:getDescription(quest):getTitle())
+            item:setSelectionBrushImage(menuImageSet, "MultiListSelectionBrush")
+            list:addItem(item)
+            table.insert(P.subquests, quest)
+            i = i+1
+        end
+        height = list:getTotalItemsHeight()
+        if height > 0 then
+            height = height+P.frameHeigth
+        end
+        list:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, height)))
+        list:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
+        offset = offset + height + P.borderSize
+
+        -- Load hints
+        local hintsWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints")
+        hintsWindow:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
+        hintsWindow:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(0, 0)))
+        height = P.titleHeight
+        local numHints = P.questManager:getNumHints(quest, P.player)
+        local i = 0
+        while i <= numHints-1 do
+            local hint = P.questManager:getHints(quest, P.player, i)
+            height = height + P.insertHint(hintsWindow, hint, i, height)
+            i = i+1
+        end
+        if numHints == 0 then
+            height = 0
+        end
+        hintsWindow:setHeight(CEGUI.UDim(0, height))
+        offset = offset + height
+
+        -- Set the size of the wrapper
+        local window = winMgr:getWindow("orxonox/QuestGUI/Quest/Wrapper")
+        window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize-P.scrollbarWidth), CEGUI.UDim(0,offset+P.borderSize)))
+    end
+
+    P.currentQuest = quest
+end
+
+-- Clear the currently displayed quest.
+function P.clearQuest()
+    -- clear title
+    local titleWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Title")
+    titleWindow:setText("no Quests")
+
+    -- clear description
+    local descriptionWindow = winMgr:getWindow("orxonox/QuestGUI/Quest/Description")
+    descriptionWindow:setText("There is currently no quest that can be displayed.")
+
+    -- clear list fo subquests
+    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
+    list:resetList()
+    list:setHeight(CEGUI.UDim(0, 0))
+    P.subquests = {}
+
+    -- clear hints
+    local hints = winMgr:getWindow("orxonox/QuestGUI/Quest/Hints")
+    local numChildren = hints:getChildCount()-2 -- TODO: HACK
+    local i = 0
+    while i < numChildren do
+        local hint = hints:getChild("orxonox/QuestGUI/Quest/Hints/" .. i)
+        if hint ~= nil then
+            hints:removeChildWindow(hint)
+            winMgr:destroyWindow(hint)
+        end
+        i = i+1
+    end
+    hints:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.scrollbarWidth-P.borderSize), CEGUI.UDim(0, 0)))
+
+    P.currentQuest = nil
+end
+
+-- Clear the quests list
+function P.clearQuestList()
+    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    list:resetList()
+    P.quests = {}
+end
+
+-- Select an input quest in the input list.
+-- list is the list in which the input quest is to be selected.
+-- quest is the quest to be selected.
+function P.selectQuest(list, quest)
+    if quest == nil then -- If the input quest is nil, there is nothing to be selected, an error is output and the first quest is selected instead.
+        cout(1, "Error in QuestGUI: selectQuest(), input quest is nil. Selecting first.")
+        list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first
+        return
+    end
+
+    local questId = P.questManager:getId(quest)
+    local found = false
+    local index = 0
+    -- Iterate over all quests currently in the list.
+    for k,v in pairs(P.quests) do
+        -- If the id's are the same we have found the quest.
+        if P.questManager:getId(v) == questId then
+            found = true
+            index = k-1
+        end
+    end
+
+    if found then -- If the quest was found it is selected.
+        list:setItemSelectState(list:getListboxItemFromIndex(index), true)
+    else -- If the quest isn't found an error is output and the first quest is selected instead.
+        cout(1, "Error in QuestGUI: selectQuest(), input quest is not in list. Selecting first.")
+        list:setItemSelectState(list:getListboxItemFromIndex(0), true) -- Select first
+    end
+end
+
+-- Helper function, insert the input hint into the input hintsWindow. Returns the height of the newly inserted hint.
+-- hintsWindow is the window in which the hint is to be inserted.
+-- hint is the hint to be inserted.
+-- index is the index of the hint.
+-- offset is the current offset in the hintsWindow.
+function P.insertHint(hintsWindow, hint, index, offset)
+    -- Create the window for the hint.
+    local window = winMgr:createWindow("MenuWidgets/StaticText", "orxonox/QuestGUI/Quest/Hints/" .. index)
+    window:setProperty("HorzFormatting", "WordWrapLeftAligned")
+    window:setProperty("VertFormatting", "TopAligned")
+    window:setProperty("FrameEnabled", "false")
+    window:setID(index)
+    hintsWindow:addChildWindow(window)
+    local description = P.questManager:getDescription(hint)
+    window:setText(description:getDescription())
+    window:setSize(CEGUI.UVector2(CEGUI.UDim(1, -P.borderSize), CEGUI.UDim(1, 0)))
+    local height = getStaticTextWindowHeight(window)
+    window:setHeight(CEGUI.UDim(0, height))
+    window:setPosition(CEGUI.UVector2(CEGUI.UDim(0, P.borderSize), CEGUI.UDim(0, offset)))
+    return height
+end
+
+-- Show the currently active quests in the quests list.
+function P.showActiveQuestsButton_clicked(e)
+    if P.showActive == false then
+        P.showActive = true
+        P.loadQuestsList()
+    end
+end
+
+-- Show the finished (i.e. inactive) quests in the quests list.
+function P.showFinishedQuestsButton_clicked(e)
+    if P.showActive == true then
+        P.showActive = false
+        P.loadQuestsList()
+    end
+end
+
+-- Change to a new quest.
+function P.changeQuest_clicked(e)
+    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local choice = list:getFirstSelectedItem()
+    if choice ~= nil then
+        local index = list:getItemIndex(choice)
+        local quest = P.quests[index+1]
+        if quest ~= nil then
+            P.loadQuest(quest)
+        end
+    end
+end
+
+-- Change to a new subquest.
+function P.changeToSubquest_clicked(e)
+    local list = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/Quest/SubquestsList"))
+    local questsList = CEGUI.toListbox(winMgr:getWindow("orxonox/QuestGUI/QuestsList"))
+    local choice = list:getFirstSelectedItem()
+    if choice ~= nil then
+        local index = list:getItemIndex(choice)
+        local quest = P.subquests[index+1]
+        if quest ~= nil then
+            -- If the P.showActive must be changed to display the quest the quests list also has to be regenerated.
+            if quest:isActive(P.player) == P.showActive then
+                P.selectQuest(questsList, quest)
+            else
+                P.showActive = quest:isActive(P.player)
+                P.loadQuestsList(quest)
+            end
+        else
+            cout(1, "Error in QuestGUI: changeToSubquest(), quest was nil. Ignoring...")
+        end
+    end
+end
+
+-- old:
+--[[
 function P.createQuestGUI()
     local questManager = orxonox.QuestManager:getInstance()
@@ -283,5 +573,5 @@
     winMgr:destroyWindow(P.detailsWindows[detailsNr])
     P.detailsWindows[detailsNr] = nil
-end
+end --]]
 
 return P
Index: code/trunk/data/gui/scripts/SingleplayerMenu.lua
===================================================================
--- code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 8531)
+++ code/trunk/data/gui/scripts/SingleplayerMenu.lua	(revision 8706)
@@ -54,4 +54,5 @@
         index = index + 1
     end
+
     for k,v in pairs(P.levelList) do
         local item = CEGUI.createListboxTextItem(v:getName())
Index: code/trunk/data/levels/FPSTest.oxw
===================================================================
--- code/trunk/data/levels/FPSTest.oxw	(revision 8531)
+++ code/trunk/data/levels/FPSTest.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/asteroids.oxw
===================================================================
--- code/trunk/data/levels/asteroids.oxw	(revision 8531)
+++ code/trunk/data/levels/asteroids.oxw	(revision 8706)
@@ -14,4 +14,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/docking.oxw
===================================================================
--- code/trunk/data/levels/docking.oxw	(revision 8706)
+++ code/trunk/data/levels/docking.oxw	(revision 8706)
@@ -0,0 +1,210 @@
+<LevelInfo
+ name = "Transporter"
+ description = "Level with a Transporter. Demonstrates the docking system."
+ tags = ""
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")
+  include("stats.oxo")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name         = "Transporter"
+ description  = "Docking example level"
+>
+  <templates>
+    <Template link="lodtemplate_default" />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+   ambientlight = "0.5, 0.5, 0.5"
+   skybox       = "Orxonox/skypanoramagen1"
+  >
+
+    <Light type="directional" position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+    <?lua for i = 1, 10, 1 do ?>
+      <SpawnPoint position="<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>,<?lua print(math.random() * 200 - 100) ?>" lookat="0,0,0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+    <?lua end ?>
+
+
+
+      <SpaceShip
+   position               = "280, 150, 115"
+   orientation            = "0.5, 0.5, 0.5, 0.5"
+   hudtemplate            = "spaceshiphud"
+   camerapositiontemplate = "spaceshipassffcameras"
+   engine                 = "spaceshipassffengine"
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = "3"
+   explosionchunks        = "6"
+
+   health            = "100"
+   maxhealth         = "200"
+   initialhealth     = "100"
+
+   primaryThrust     = "100;"
+   auxilaryThrust    = "30;"
+   rotationThrust    = "25;"
+
+   collisionType     = "dynamic"
+   mass              = "100"
+   linearDamping     = "0.7"
+   angularDamping    = "0.9999999"
+  >
+    <attached>
+        <DistanceTriggerBeacon name="bcnSpaceShip" />
+        <DockingTarget name="spaceShip" />
+
+      <Model position="0,0,0" yaw="90" pitch="-90" roll="0" scale="4" mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude="0.1" frequency="0.5" quadratic="1" />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude="0.1" frequency="0.5" phase="180" quadratic="1" />
+      <DistanceTriggerBeacon name="PlayerDistanceTrigger" />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
+      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
+    </collisionShapes>
+<?lua
+  include("includes/weaponSettingsAssff.oxi")
+?>
+  </SpaceShip>
+
+    
+
+
+    <Destroyer
+      position          = "100,150,100"
+      collisionType     = "dynamic"
+      mass              = "100000"
+      velocity          = "0,0,0"
+      angularDamping    = "0.9999999"
+      health            = "10000"
+      maxhealth         = "10000"
+      initialhealth     = "10000"
+    >
+
+      <attached>
+
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+
+
+        <Dock orientation="0.5, 0.5, 0.5, 0.5">
+            <animations>
+                <MoveToDockingTarget target="destroyer" position="10,150,40" />
+            </animations>
+            <effects>
+                <DockToShip target="spaceShip" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event="dockMe" />
+                </execute>
+            </events>
+            <attached>
+                <DistanceTrigger position="0,0,-200" distance="30" target="Pawn" beaconMode="exclude" targetname="bcnDestroyer" name="dockMe" />
+                <Billboard position="0,0,-200" material="Examples/Flare" colour="1.0, 0, 0" />
+            </attached>
+        </Dock>
+
+
+        <TeamSpawnPoint team="1" position="150,0,7" direction="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="0,0,7" lookat="-1,0,0" roll="90"  yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="-50,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="100,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <TeamSpawnPoint team="1" position="50,0,7" lookat="-1,0,0" roll="90" yaw="0" spawnclass="SpaceShip" pawndesign="spaceshipassff" />
+        <?lua for i = 1, 100, 1 do ?>
+          <TeamSpawnPoint
+            team="0"
+            position="<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>,<?lua print((math.random() * 500 + 500) * (math.floor(math.random() + 0.5) * 2 - 1)) ?>"
+            lookat="0,0,0"
+            spawnclass="SpaceShip"
+            pawndesign="spaceshipassff"
+          />
+        <?lua end ?>
+
+        <Model mesh="Carrier.mesh" scale="5" />
+        <Backlight
+          mainstate="activity"
+          active="false"
+          scale="0.4"
+          name="bltest"
+          position=" 7.6, 0, 6"
+          colour="0.2, 0.65, 1.0, 1.0"
+          width="15"
+          length="1500"
+          lifetime="2"
+          elements="50"
+          trailmaterial="Trail/backlighttrail"
+          turnontime="1"
+          turnofftime="1"
+          material="Flares/ThrusterFlare1"
+        />
+        <Backlight
+                  scale="1"
+                  position=" 169, 75, -15"
+                  colour="1, 0.85, 0.5, 0.5"
+                  width="40"
+                  length="1000"
+                  lifetime="5"
+                  elements="15"
+                  trailmaterial="Trail/backlighttrail"
+                  material="Examples/Flare"
+                  />
+        <Backlight
+                  scale="1"
+                  position=" 169, -75, -15"
+                  colour="1, 0.85, 0.5, 0.5"
+                  width="40"
+                  length="1000"
+                  lifetime="5"
+                  elements="15"
+                  trailmaterial="Trail/backlighttrail"
+                  material="Examples/Flare"
+         />
+        <?lua for i=0,8,1 do ?>
+          <BlinkingBillboard
+            position="<?lua print(200-270/8*i)?> ,15,2"
+            material="Examples/Flare"
+            colour="1.0, 0.5, 0.3"
+            phase="<?lua print(-360/8*i)?>"
+            amplitude="0.1"
+            frequency="0.5"
+            quadratic="1"
+          />
+
+          <BlinkingBillboard
+            position="<?lua print(200-270/8*i)?>,-15,2"
+            material="Examples/Flare"
+            colour="1.0, 0.5, 0.3"
+            phase="<?lua print(-360/8*i)?>"
+            amplitude="0.1"
+            frequency="0.5"
+            quadratic="1"
+          />
+        <?lua end ?>
+
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="70,0,-25"      halfExtents="150, 50, 25" />
+        <BoxCollisionShape position="95,75,-16"     halfExtents="70, 10, 12" />
+        <BoxCollisionShape position="95,-75,-16"    halfExtents="70, 10, 12" />
+        <BoxCollisionShape position="77,47,30"      halfExtents="110, 2, 30" />
+        <BoxCollisionShape position="77,-47,30"     halfExtents="110, 2, 30" />
+        <BoxCollisionShape position="77,0,50"       halfExtents="110, 45, 6" />
+        <BoxCollisionShape position="167,0,70"      halfExtents="17, 20, 20" />
+      </collisionShapes>
+
+    </Destroyer>
+
+  </Scene>
+</Level>
Index: code/trunk/data/levels/dynamicMatch.oxw
===================================================================
--- code/trunk/data/levels/dynamicMatch.oxw	(revision 8531)
+++ code/trunk/data/levels/dynamicMatch.oxw	(revision 8706)
@@ -16,4 +16,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/earth.oxw
===================================================================
--- code/trunk/data/levels/earth.oxw	(revision 8531)
+++ code/trunk/data/levels/earth.oxw	(revision 8706)
@@ -19,4 +19,5 @@
     <Template link="lodtemplate_default" />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Template name=PortalDefault>
Index: code/trunk/data/levels/emptyLevel.oxw
===================================================================
--- code/trunk/data/levels/emptyLevel.oxw	(revision 8531)
+++ code/trunk/data/levels/emptyLevel.oxw	(revision 8706)
@@ -12,5 +12,5 @@
 
 <?lua
-  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipAssff2.oxt")
   include("templates/spaceshipPirate.oxt")
 ?>
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
@@ -30,5 +31,5 @@
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <SpawnPoint team=0 position="-200,0,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff2 />
     
   </Scene>
Index: code/trunk/data/levels/events.oxw
===================================================================
--- code/trunk/data/levels/events.oxw	(revision 8531)
+++ code/trunk/data/levels/events.oxw	(revision 8706)
@@ -20,4 +20,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/fightInOurBack.oxw
===================================================================
--- code/trunk/data/levels/fightInOurBack.oxw	(revision 8531)
+++ code/trunk/data/levels/fightInOurBack.oxw	(revision 8706)
@@ -68,4 +68,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
     <!-- Ausgang: Szene ===> ambientlight/skybox -->
Index: code/trunk/data/levels/includes/notifications.oxi
===================================================================
--- code/trunk/data/levels/includes/notifications.oxi	(revision 8706)
+++ code/trunk/data/levels/includes/notifications.oxi	(revision 8706)
@@ -0,0 +1,20 @@
+<Script code="showGUI NotificationLayer false true" needsGraphics="true" />
+
+<NotificationQueueCEGUI
+    name="all"
+    targets="questsystem"
+    displaySize="0.5, 0, 0, 0"
+    position="0, 10, 0.3, 0"
+/>
+
+<NotificationQueueCEGUI
+    name="info"
+    targets="gameinfo"
+    size=1
+    displayTime=-1
+    position="0.2, 0, 0.8, 0"
+    fontSize="24"
+    fontColor="1, 1, 0, 0.8"
+    alignment="HorzCentred"
+    displaySize="0.6, 0, 0, 0"
+/>
Index: code/trunk/data/levels/includes/pickups.oxi
===================================================================
--- code/trunk/data/levels/includes/pickups.oxi	(revision 8531)
+++ code/trunk/data/levels/includes/pickups.oxi	(revision 8706)
@@ -202,5 +202,5 @@
 <PickupRepresentation
     pickupName = "Drone Pickup"
-    pickupDescription = "Adds a Drone to the Players Spaceship"
+    pickupDescription = "Adds a Drone to the Player's Spaceship"
     spawnerTemplate = "dronepickupRepresentation"
 >
@@ -210,2 +210,34 @@
 </PickupRepresentation>
 
+<!-- Shrink Pickup -->
+
+<PickupRepresentation
+    pickupName = "Small Shrink"
+    pickupDescription = "Shrinks the Ship by a bit"
+    spawnerTemplate = "smallshrinkpickupRepresentation"
+>
+    <pickup>
+        <ShrinkPickup template=smallshrinkpickup />
+    </pickup>
+</PickupRepresentation>
+
+<PickupRepresentation
+    pickupName = "Medium Shrink"
+    pickupDescription = "Shrinks the Ship"
+    spawnerTemplate = "mediumshrinkpickupRepresentation"
+>
+    <pickup>
+        <ShrinkPickup template=mediumshrinkpickup />
+    </pickup>
+</PickupRepresentation>
+
+<PickupRepresentation
+    pickupName = "Huge Shrink"
+    pickupDescription = "Shrinks the Ship considerably"
+    spawnerTemplate = "hugeshrinkpickupRepresentation"
+>
+    <pickup>
+        <ShrinkPickup template=hugeshrinkpickup />
+    </pickup>
+</PickupRepresentation>
+
Index: code/trunk/data/levels/includes/weaponSettingsAssff.oxi
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsAssff.oxi	(revision 8531)
+++ code/trunk/data/levels/includes/weaponSettingsAssff.oxi	(revision 8706)
@@ -26,5 +26,5 @@
           <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
           <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
-          <LightningGun mode=1 muzzleoffset="0,0,0" damage=23 />
+          <LightningGun mode=1 muzzleoffset="0,0,0" damage=3.14159 shielddamage=20 />
         </Weapon>
         <Weapon>
@@ -39,6 +39,6 @@
         </Weapon>
         <Weapon>
-          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
-          <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=30 shielddamage=20 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=30 healthdamage=50 shielddamage=20 />
         </Weapon>
       </WeaponPack>
Index: code/trunk/data/levels/includes/weaponSettingsAssff2.oxi
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsAssff2.oxi	(revision 8706)
+++ code/trunk/data/levels/includes/weaponSettingsAssff2.oxi	(revision 8706)
@@ -0,0 +1,55 @@
+    <weaponslots>
+      <WeaponSlot position="-15.0,-1.5,0" />
+      <WeaponSlot position=" 15.0,-1.5,0" />
+      <WeaponSlot position="    0,   0,0" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+      <WeaponSet firemode=2 />
+      <WeaponSet firemode=3 />
+    </weaponsets>
+    <weapons>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+          <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
+        </links>
+        <Weapon>
+          <attached>
+            <Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="-1.9,-.5,1" scale=".5" />
+            <BlinkingBillboard position="-1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
+          </attached>
+          <HsW01 mode=0 munitionpershot=0 delay=0 healthamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" >
+            <attached>
+                <ParticleEmitter position="0,0,6.2" source="Orxonox/weaponshoot" />
+            </attached>
+          </HsW01>
+          <HsW01 mode=0 munitionpershot=0 delay=0 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <LightningGun mode=1 muzzleoffset="0,0,0" shielddamage=23 />
+        </Weapon>
+        <Weapon>
+          <attached>
+            <Model mesh="stunweapon.mesh" pitch="180" roll="0" yaw="0" position="1.9,-.5,1" scale=".5"/>
+            <BlinkingBillboard position="1.9, -.5, -5.5" material="PE/lensflare" colour="0.128, 0.28, 1" amplitude=0.25 frequency=16 quadratic=0 />
+          </attached>
+          <HsW01 mode=0 munitionpershot=0 delay=0     healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 healthdamage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <LightningGun mode=1 muzzleoffset="0,0,0" shielddamage=23 />
+        </Weapon>
+        <Weapon>
+          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" damage=50 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" damage=100 />
+        </Weapon>
+      </WeaponPack>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+        </links>
+        <!--Weapon>
+          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
+        </Weapon-->
+      </WeaponPack>
+    </weapons>
Index: code/trunk/data/levels/includes/weaponSettingsImmTest.oxi
===================================================================
--- code/trunk/data/levels/includes/weaponSettingsImmTest.oxi	(revision 8706)
+++ code/trunk/data/levels/includes/weaponSettingsImmTest.oxi	(revision 8706)
@@ -0,0 +1,57 @@
+    <weaponslots>
+      <WeaponSlot position="-15.0,-1.5,0" />
+      <WeaponSlot position=" 15.0,-1.5,0" />
+      <WeaponSlot position="    0,   0,0" />
+    </weaponslots>
+    <weaponsets>
+      <WeaponSet firemode=0 />
+      <WeaponSet firemode=1 />
+      <WeaponSet firemode=2 />
+      <WeaponSet firemode=3 />
+    </weaponsets>
+    <weapons>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=0 weaponmode=0 />
+          <DefaultWeaponmodeLink firemode=1 weaponmode=1 />
+          <DefaultWeaponmodeLink firemode=2 weaponmode=2 />
+          <DefaultWeaponmodeLink firemode=3 weaponmode=3 />
+        </links>
+            <!-- HsW01 is the standard Weapon, 4 slots => 4 Projectiles spawned at one click -->
+            <!-- LightningGun is the spiral weapon, 2 slots -->
+            <!-- SimpleRocket is the target-following rocket -->
+            <!-- Rocket is the player-guided rocket -->
+        <Weapon>
+          <attached>
+            <Model mesh="LightningGun.mesh" pitch="100" roll="90" yaw="90" position="0,-1.3,0" />
+            <!--Model mesh="LightningGun-s.mesh" pitch="78" roll="90" yaw="90" position="0.2,-1.3,0" /-->
+            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-76" yaw="-90" position="-1.5,1,0.3" scale=0.6 />
+          </attached>
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 0.1, 1.6,-2" />
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-1.6, 1.3,-2" />
+          <LightningGun mode=1 muzzleoffset="0,0,0" shielddamage=5 />
+        </Weapon>
+        <Weapon>
+          <attached>
+            <Model mesh="LightningGun.mesh" pitch="103" roll="90" yaw="90" position="0,-1.35,0" />
+            <!--Model mesh="LightningGun-s.mesh" pitch="103" roll="90" yaw="90" position="0.2,-1.35,0" /-->
+            <Model mesh="hs-w01_reduced.mesh" roll="90" pitch="-104" yaw="-90" position="0,1.3,0.3" scale=0.6 />
+          </attached>
+          <HsW01 mode=0 munitionpershot=0 delay=0     damage=3.14159 material="Flares/point_lensflare" muzzleoffset=" 1.6, 1.3, -2.0" />
+          <HsW01 mode=0 munitionpershot=0 delay=0.125 damage=3.14159 material="Flares/point_lensflare" muzzleoffset="-0.1, 1.6, -2.0" />
+          <LightningGun mode=1 muzzleoffset="0,0,0" healthdamage=0 shielddamage=500 />
+        </Weapon>
+        <Weapon>
+          <SimpleRocketFire mode=2 muzzleoffset="0,0,0" shielddamage=50 />
+          <RocketFire mode=3 muzzleoffset="0,0,0" healthdamage=80 shielddamage=20 />
+        </Weapon>
+      </WeaponPack>
+      <WeaponPack>
+        <links>
+          <DefaultWeaponmodeLink firemode=1 weaponmode=0 />
+        </links>
+        <!--Weapon>
+          <EnergyDrink mode=0 munitionpershot=0 delay=0  material="Flares/point_lensflare"muzzleoffset="2,-0.2,-1" />
+        </Weapon-->
+      </WeaponPack>
+    </weapons>
Index: code/trunk/data/levels/lastManStanding.oxw
===================================================================
--- code/trunk/data/levels/lastManStanding.oxw	(revision 8531)
+++ code/trunk/data/levels/lastManStanding.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/lastTeamStanding.oxw
===================================================================
--- code/trunk/data/levels/lastTeamStanding.oxw	(revision 8531)
+++ code/trunk/data/levels/lastTeamStanding.oxw	(revision 8706)
@@ -22,4 +22,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
@@ -27,4 +28,5 @@
     skybox       = "Orxonox/skypanoramagen1"
   >
+  <?lua include("includes/notifications.oxi") ?>
 
     <?lua
Index: code/trunk/data/levels/lastTeamStandingII.oxw
===================================================================
--- code/trunk/data/levels/lastTeamStandingII.oxw	(revision 8531)
+++ code/trunk/data/levels/lastTeamStandingII.oxw	(revision 8706)
@@ -22,4 +22,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/myTestLevel.oxw
===================================================================
--- code/trunk/data/levels/myTestLevel.oxw	(revision 8531)
+++ code/trunk/data/levels/myTestLevel.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
@@ -30,7 +31,9 @@
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="0,0,0" lookat="2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+    <SpawnPoint team=0 position="0,0,0" direction="1,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
     
-    <SpaceBoundaries warnDistance="1" maxDistance="200" showDistance="100" healthDecrease="0.1" position="0,0,0"/>
+    <SpaceBoundaries warnDistance="1" maxDistance="200" showDistance="150" reactionMode="0" healthDecrease="0.9" position="0,0,0"/>
+    
+    <Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Flares/backlightflare" scale=1 />
     
   </Scene>
Index: code/trunk/data/levels/notifications.oxw
===================================================================
--- code/trunk/data/levels/notifications.oxw	(revision 8531)
+++ code/trunk/data/levels/notifications.oxw	(revision 8706)
@@ -19,4 +19,5 @@
         <Template link=lodtemplate_default />
     </templates>
+    <?lua include("includes/notifications.oxi") ?>
 
     <Scene
@@ -24,6 +25,4 @@
         skybox       = "Orxonox/skypanoramagen1"
     >
-
-    <Script code="showGUI NotificationLayer false true" needsGraphics="true" />
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
Index: code/trunk/data/levels/pickups.oxw
===================================================================
--- code/trunk/data/levels/pickups.oxw	(revision 8531)
+++ code/trunk/data/levels/pickups.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
@@ -190,4 +191,31 @@
     </PickupSpawner>
 
+    <PickupSpawner position="-25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
+      <pickup>
+        <ShrinkPickup template ="smallshrinkpickup"/>
+      </pickup>
+    </PickupSpawner>
+
+    <PickupSpawner position="0,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
+      <pickup>
+        <ShrinkPickup template ="mediumshrinkpickup"/>
+      </pickup>
+    </PickupSpawner>
+
+    <PickupSpawner position="25,-50,-125" respawnTime="60" triggerDistance="20" maxSpawnedItems="5">
+      <pickup>
+        <ShrinkPickup template ="hugeshrinkpickup"/>
+      </pickup>
+    </PickupSpawner>
+
+    <!--StaticEntity position="0,-200,0" direction="0,-1,0" collisionType=static mass=500 friction=0.01 >
+      <attached>
+        <Model position="0,0,0" mesh="cube.mesh" scale3D="10,10,10" />
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape position="0,0,0" halfExtents="10,10,10" />
+      </collisionShapes>
+  </StaticEntity-->
+
   </Scene>
 </Level>
Index: code/trunk/data/levels/pirateAttack.oxw
===================================================================
--- code/trunk/data/levels/pirateAttack.oxw	(revision 8531)
+++ code/trunk/data/levels/pirateAttack.oxw	(revision 8706)
@@ -9,5 +9,4 @@
   include("stats.oxo")
   include("templates/spaceshipAssff.oxt")
-  include("templates/spaceshipHXYSL.oxt")
   include("templates/spaceshipPirate.oxt")
   include("templates/lodInformation.oxt")
@@ -35,4 +34,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
     <Scene
Index: code/trunk/data/levels/planets.oxw
===================================================================
--- code/trunk/data/levels/planets.oxw	(revision 8531)
+++ code/trunk/data/levels/planets.oxw	(revision 8706)
@@ -19,4 +19,5 @@
     <Template link="lodtemplate_default" />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/pong.oxw
===================================================================
--- code/trunk/data/levels/pong.oxw	(revision 8531)
+++ code/trunk/data/levels/pong.oxw	(revision 8706)
@@ -15,5 +15,5 @@
   <PongBat>
     <camerapositions>
-      <CameraPosition position="0,200,0" pitch=-90 absolute=true />
+      <CameraPosition position="0,150,0" pitch=-90 absolute=true />
       <CameraPosition position="0,50,160" drag=true mouselook=true />
       <CameraPosition position="0,40,125" drag=true mouselook=true />
@@ -56,6 +56,7 @@
     <Template link=lodtemplate_default />
   </templates>
-
-  <WorldAmbientSound source="mainmenu.ogg" playOnLoad=true />
+  <?lua include("includes/notifications.oxi") ?>
+
+  <WorldAmbientSound source="Ganymede.ogg" playOnLoad=true looping=true />
 
   <PongBot />
@@ -67,9 +68,5 @@
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
 
-    <?lua
-      for i = 1, 10, 1 do
-    ?>
-      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
-    <?lua end ?>
+    <SpawnPoint position="991.729, -110.11, 435.404" orientation="0.534038, 0.563456, 0.212168, 0.593553" />
 
     <MovableEntity rotationrate=5 rotationaxis="0,0,1">
Index: code/trunk/data/levels/portals.oxw
===================================================================
--- code/trunk/data/levels/portals.oxw	(revision 8531)
+++ code/trunk/data/levels/portals.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
@@ -35,6 +36,6 @@
     </Template>
 
-    <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
-    <PortalEndPoint position="-100,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
+    <PortalEndPoint position="0,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/>
+    <PortalEndPoint position="-300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault" reenterDelay="0"/>
     <PortalLink fromID="1" toID="2" />
     <PortalLink fromID="2" toID="1" />
Index: code/trunk/data/levels/presentation.oxw
===================================================================
--- code/trunk/data/levels/presentation.oxw	(revision 8531)
+++ code/trunk/data/levels/presentation.oxw	(revision 8706)
@@ -19,4 +19,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentation09.oxw
===================================================================
--- code/trunk/data/levels/presentation09.oxw	(revision 8531)
+++ code/trunk/data/levels/presentation09.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentation09b.oxw
===================================================================
--- code/trunk/data/levels/presentation09b.oxw	(revision 8531)
+++ code/trunk/data/levels/presentation09b.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationDM.oxw
===================================================================
--- code/trunk/data/levels/presentationDM.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationDM.oxw	(revision 8706)
@@ -20,4 +20,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationFS10.oxw
===================================================================
--- code/trunk/data/levels/presentationFS10.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationFS10.oxw	(revision 8706)
@@ -26,4 +26,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationFS102.oxw
===================================================================
--- code/trunk/data/levels/presentationFS102.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationFS102.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationFS10Ed.oxw
===================================================================
--- code/trunk/data/levels/presentationFS10Ed.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationFS10Ed.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationFS11.oxw
===================================================================
--- code/trunk/data/levels/presentationFS11.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationFS11.oxw	(revision 8706)
@@ -13,4 +13,5 @@
 <?lua
   include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipAssff2.oxt")
   include("templates/spaceshipPirate.oxt")
 ?>
@@ -27,8 +28,21 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <NotificationQueueCEGUI
+    name="narrative"
+    targets="simpleNotification"
+    size=1
+    displayTime=30
+    position="0.2, 0, 0.1, 0"
+    fontSize="24"
+    fontColor="0.3, 1, 0.2, 0.8"
+    alignment="HorzCentred"
+    displaySize="0.6, 0, 0, 0"
+    />
 
   <Scene
     ambientlight = "0.8, 0.8, 0.8"
-    skybox       = "Orxonox/Starbox"
+    skybox       = "Orxonox/skyboxempty"
   >
 
@@ -38,19 +52,236 @@
 
     <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
-    <SpawnPoint team=0 position="0,0,0" lookat="2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
-
-
-    <!-- PICKUPS -->
-    <PickupSpawner position="-50,50,-125" triggerDistance="10" respawnTime="30" maxSpawnedItems="10">
-      <pickup>
-        <DronePickup template=dronepickup />
-      </pickup>
-    </PickupSpawner>
-
+
+    <!-- SOUND -->
+    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
+    <WorldAmbientSound source="Mars.ogg" looping="true">
+        <events>
+            <activity>
+                <DistanceTrigger position="-72369,803,2" distance=1700 target="Camera" />
+            </activity>
+        </events>
+    </WorldAmbientSound>
+    <WorldAmbientSound source="Jupiter.ogg" looping="true">
+        <events>
+            <activity>
+                <DistanceTrigger position="-73450,5067,-351" distance=800 target="Camera" />
+            </activity>
+        </events>
+    </WorldAmbientSound>
+
+    <!-- EARTH ORBIT -->
+
+    <DistanceTrigger name="spawntrigger" position="0,0,0" target="Pawn" distance=10 stayActive="true" />
+    <DistanceTrigger name="spawndelaytrigger1" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=1 />
+    <DistanceTrigger name="spawndelaytrigger2" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=7 />
+    <DistanceTrigger name="spawndelaytrigger3" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=12 />
+    <DistanceTrigger name="spawndelaytrigger4" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=15 />
+    <DistanceTrigger name="spawndelaytrigger5" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=25 />
+    <DistanceTrigger name="spawndelaytrigger6" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=35 />
+    <DistanceTrigger name="spawndelaytrigger7" position="0,0,0" target="Pawn" distance=10 stayActive="true" delay=40 />
+
+    <SpawnPoint position="0,0,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff>
+        <events>
+            <activity>
+                <EventTrigger invert="true">
+                    <events>
+                        <trigger>
+                            <EventListener event="spawndelaytrigger1" />
+                        </trigger>
+                    </events>
+                </EventTrigger>
+            </activity>
+        </events>
+    </SpawnPoint>
+
+    <SimpleNotification message="Welcome to Earth Orbit" >
+        <events>
+            <trigger>
+                <EventListener event=spawntrigger />
+            </trigger>
+        </events>
+    </SimpleNotification>
+    <SimpleNotification message="Turn right to witness an explosion" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger1 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- EARTH -->
+    <Planet
+      position="80500,0,0"
+      scale="63000"
+      collisionType="dynamic"
+      linearDamping="0.8"
+      angularDamping="0"
+      mass="5.9e21"
+      pitch="-90"
+      yaw="50"
+      mesh="planets/earth.mesh"
+      atmosphere="atmosphere1"
+      rotationaxis="0,1,0"
+      rotationrate="0.2"
+      atmospheresize="80.0f"
+      imagesize="1024.0f"
+      collisiondamage = 2
+      enablecollisiondamage = true
+    >
+      <attached>
+        <ForceField position="0,0,0" mode="newtonianGravity" diameter="140000" massDiameter="126000" mass="5.9e21" />
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="63000" position="0,0,0" />
+      </collisionShapes>
+    </Planet>
+
+    <!-- PARTICLE EFFECT -->
+
+    <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp" autostart="false" lifetime=500 loop=1 startdelay=2.5>
+        <events>
+            <spawn>
+                <EventListener event=spawndelaytrigger1 />
+            </spawn>
+        </events>
+    </ParticleSpawner>
+    <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp2" autostart="false" lifetime=500 loop=1 startdelay=2>
+        <events>
+            <spawn>
+                <EventListener event=spawndelaytrigger1 />
+            </spawn>
+        </events>
+    </ParticleSpawner>
+    <ParticleSpawner position="-50,50,-125" source="Orxonox/RingExp3" autostart="false" lifetime=500 loop=1 startdelay=2>
+        <events>
+            <spawn>
+                <EventListener event=spawndelaytrigger1 />
+            </spawn>
+        </events>
+    </ParticleSpawner>
+    <StaticEntity collisionType = "static" position = "-50,50,-125" scale=1 >
+      <attached>
+        <Model position="0,0,0" scale="2" mesh="ast1.mesh" />
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="8" />
+      </collisionShapes>
+    </StaticEntity>
+       
+    <SimpleNotification message="A particle effect by Tibor" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger2 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- ENEMIES 1st ROUND -->
+
+    <SimpleNotification message="Enemies attacking" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger3 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <Script code="addBots 3" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger3 />
+            </trigger>
+        </events>
+    </Script>
+
+    <SpawnPoint position="100,0,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+        <events>
+            <activity>
+                <EventListener event=spawnpointtrigger />
+            </activity>
+        </events>
+    </SpawnPoint>
+
+    <SpawnPoint position="0,-100,0" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+        <events>
+            <activity>
+                <EventListener event=spawnpointtrigger />
+            </activity>
+        </events>
+    </SpawnPoint>
+
+    <SpawnPoint position="0,0,100" lookat="-2,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+        <events>
+            <activity>
+                <EventListener event=spawnpointtrigger />
+            </activity>
+        </events>
+    </SpawnPoint>
+
+    <Trigger name="spawnpointtrigger" mode="xor" invert="true" >
+        <EventTrigger>
+            <events>
+                <trigger>
+                    <EventListener event=spawndelaytrigger1 />
+                </trigger>
+            </events>
+        </EventTrigger>
+        <EventTrigger invert="true">
+            <events>
+                <trigger>
+                    <EventListener event=portaltrigger />
+                </trigger>
+            </events>
+        </EventTrigger>
+    </Trigger>
+
+    <!-- SPACE BOUNDARY -->
+
+    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-90000,0,0"/>
+    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,10000,0"/>
+    <SpaceBoundaries warnDistance="1" maxDistance="450" showDistance="300" healthDecrease="0.1" position="0,0,0"/>
+    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-30000,0,0"/>
+
+    <SimpleNotification message="Notice the shields by Simon" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger4 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="and space boundaries by Maurus" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger5 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="Let's get out of here" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger6 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <Script code="killBots" onLoad="false">
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger6 />
+            </trigger>
+        </events>
+    </Script>
+
+    <SimpleNotification message="Boost enhancement by Dominik" >
+        <events>
+            <trigger>
+                <EventListener event=spawndelaytrigger7 />
+            </trigger>
+        </events>
+    </SimpleNotification>
     
-    <!-- BOUNDARIES AND PORTALS -->
-    
-    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="0,0,0"/>
-    <SpaceBoundaries warnDistance="1" maxDistance="400" showDistance="300" healthDecrease="0.1" position="-10000,0,0"/>
+    <!-- PORTALS -->
 
     <Template name=PortalDefault>
@@ -62,39 +293,187 @@
     </Template>
 
-    <PortalEndPoint position="350,0,0" id="1" distance="40" target="MobileEntity" design="PortalDefault"/>
-    <PortalEndPoint position="-10300,0,0" id="2" distance="40" target="MobileEntity" design="PortalDefault"/>
-    <PortalLink fromID="1" toID="2" />
-    <PortalLink fromID="2" toID="1" />
-
-
-
-    <!-- MODELS, DEBRIS, ETC -->
-
+    <PortalEndPoint position="-350,0,0" id="3" distance="40" target="MobileEntity" design="PortalDefault" active="false">
+        <events>
+            <activity>
+                <EventListener event=spawndelaytrigger6 />
+            </activity>
+        </events>
+    </PortalEndPoint>
+    <PortalEndPoint position="-72000,0,0" id="4" distance="40" target="MobileEntity" design="PortalDefault" />
+    <PortalLink fromID="3" toID="4" />
+    <PortalLink fromID="4" toID="3" />
+
+    <DistanceTrigger name="portaltrigger" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" />
+    <DistanceTrigger name="portaldelaytrigger1" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=5 />
+    <DistanceTrigger name="portaldelaytrigger2" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=10 />
+    <DistanceTrigger name="portaldelaytrigger3" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=15 />
+    <DistanceTrigger name="portaldelaytrigger4" position="-72000,0,0" target="Pawn" distance=10 stayActive="true" delay=17 />
+
+    <SimpleNotification message="Welcome to Moon Orbit" >
+        <events>
+            <trigger>
+                <EventListener event=portaltrigger />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="Portals by Andreas" >
+        <events>
+            <trigger>
+                <EventListener event=portaldelaytrigger1 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- MOON AREA -->
+    
+    <!-- MOON -->
     <Planet
-      position="-5000,0,0"
-      scale="400"
+      position="-80000,0,0"
+      scale="4000"
       collisionType="dynamic"
       linearDamping="0.8"
       angularDamping="0"
-      mass="10000000"
+      mass="7.36e19"
       pitch="0"
-      mesh="planets/muunilinst.mesh"
+      mesh="planets/moon.mesh"
       atmosphere="atmosphere1"
-      rotationaxis="1,0,0"
-      rotationrate="1.0"
-      atmospheresize="300.0f"
+      rotationaxis="0,1,0"
+      rotationrate="0.2"
+      atmospheresize="0.0f"
       imagesize="1024.0f"
+      collisiondamage = 2
+      enablecollisiondamage = true
     >
+      <attached>
+        <ForceField position="0,0,0" mode="newtonianGravity" diameter="40000" massDiameter="34740" mass="7.36e19" />
+      </attached>
       <collisionShapes>
-        <SphereCollisionShape radius="400" position="0,0,0" />
+        <SphereCollisionShape radius="4000" position="0,0,0" />
       </collisionShapes>
     </Planet>
 
-    <MovableEntity position="0,0,0">
-      <attached>
-        <Billboard position="-5000,0,0" material="Examples/Flare" colour="0, 0, 1" scale=10/>
-      </attached>
-    </MovableEntity>
-
+    <SimpleNotification message="Hydrogen farmer/space station by Hans" >
+        <events>
+            <trigger>
+                <EventListener event=portaldelaytrigger2 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <!-- HYDROGEN FARMER & DOCKING -->
+    <SpaceShip position="-74000,2500,0" roll=90 yaw=180 pitch=20 mass=10000 health=100000 >
+      <attached>
+        <!-- Docking -->
+        <DistanceTriggerBeacon name="bcnDestroyer" />
+        <DockingTarget name="destroyer" />
+
+        <Model mesh="HydroHarvester.mesh" mass=10 position="0,0,0" scale=100 />
+        <!-- <Model mesh="cube.mesh" mass=10 position="-1120,0,0" scale3D="230,200,490"  /> -->
+        <!-- <Model mesh="cube.mesh" mass=10 position="580,0,-960" scale3D="230,200,490" yaw=-120 /> -->
+        <!-- <Model mesh="cube.mesh" mass=10 position="580,0,960" scale3D="230,200,490" yaw=-240 /> -->
+        <!-- <Model mesh="cube.mesh" mass=10 position="0,0,0" scale3D="600,200,100" /> -->
+      </attached>
+      <collisionShapes>
+        <BoxCollisionShape  position="-1120,0,0" halfExtents="230,200,490" />
+        <BoxCollisionShape  position="580,0,-960" halfExtents="230,200,490" yaw=-120 />
+        <BoxCollisionShape  position="580,0,960" halfExtents="230,200,490" yaw=-240 />
+      </collisionShapes>
+    </SpaceShip>
+
+    <Dock position="-73942, 1288, -255" roll=90 yaw=180 >
+        <animations>
+            <MoveToDockingTarget target="destroyer" />
+        </animations>
+        <effects>
+            <DockToShip target="spaceShip" />
+        </effects>
+        <events>
+            <execute>
+                <EventListener event="dockMe" />
+            </execute>
+        </events>
+        <attached>
+            <DistanceTrigger position="10,-202, -42" distance="800" target="Pawn"
+                beaconMode="exclude" targetname="bcnDestroyer" name="dockMe"
+            />
+        </attached>
+    </Dock>
+
+    <SpaceShip template="spaceshipassff2" position="-73915,3786,67" orientation="-0.14045, 0.68254, 0.68144, 0.223774" >
+      <attached>
+        <DockingTarget name="spaceShip" />
+      </attached>
+    </SpaceShip>
+
+    <!-- PICKUPS -->
+    <SimpleNotification message="Oh, what have we here?" >
+        <events>
+            <trigger>
+                <EventListener event=portaldelaytrigger3 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="Shrink pickup by Sandro" >
+        <events>
+            <trigger>
+                <EventListener event=portaldelaytrigger4 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <PickupSpawner position="-72487,420,-63" respawnTime="10" triggerDistance="20" maxSpawnedItems="5" active="false">
+      <pickup>
+        <ShrinkPickup template ="smallshrinkpickup"/>
+      </pickup>
+      <events>
+        <activity>
+            <EventListener event=portaldelaytrigger3 />
+        </activity>
+      </events>
+      <attached>
+        <ParticleSpawner position="0,0,0" source="Orxonox/Shield" autostart="false" lifetime=500 loop=0 >
+            <events>
+                <spawn>
+                    <EventListener event=portaldelaytrigger3 />
+                </spawn>
+            </events>
+        </ParticleSpawner>
+      </attached>
+    </PickupSpawner>
+
+    <SpaceBoundaries warnDistance="1" maxDistance="1700" showDistance="500" healthDecrease="0.1" position="-72369,803,2"/>
+    <SpaceBoundaries warnDistance="1" maxDistance="800" showDistance="300" healthDecrease="0.1" position="-73450,5067,-351"/>
+
+    <!-- FINISH -->
+
+    <DistanceTrigger name="dockingtrigger" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" />
+    <DistanceTrigger name="dockingdelaytrigger1" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" delay=3 />
+    <DistanceTrigger name="dockingdelaytrigger2" position="-73942, 1288, -255" target="Pawn" distance=20 stayActive="true" delay=10 />
+
+    <SimpleNotification message="Docking by Sven" >
+        <events>
+            <trigger>
+                <EventListener event=dockingtrigger />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="Weapons by Jonas" >
+        <events>
+            <trigger>
+                <EventListener event=dockingdelaytrigger1 />
+            </trigger>
+        </events>
+    </SimpleNotification>
+
+    <SimpleNotification message="Steering enhancement by Manuel" >
+        <events>
+            <trigger>
+                <EventListener event=dockingdelaytrigger2 />
+            </trigger>
+        </events>
+    </SimpleNotification>
     
   </Scene>
Index: code/trunk/data/levels/presentationHS09.oxw
===================================================================
--- code/trunk/data/levels/presentationHS09.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationHS09.oxw	(revision 8706)
@@ -24,4 +24,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/presentationHS09b.oxw
===================================================================
--- code/trunk/data/levels/presentationHS09b.oxw	(revision 8531)
+++ code/trunk/data/levels/presentationHS09b.oxw	(revision 8706)
@@ -29,4 +29,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/princessAeryn.oxw
===================================================================
--- code/trunk/data/levels/princessAeryn.oxw	(revision 8531)
+++ code/trunk/data/levels/princessAeryn.oxw	(revision 8706)
@@ -24,4 +24,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/quests.oxw
===================================================================
--- code/trunk/data/levels/quests.oxw	(revision 8706)
+++ code/trunk/data/levels/quests.oxw	(revision 8706)
@@ -0,0 +1,232 @@
+<LevelInfo
+ name = "Quests showcase"
+ description = "Level to test and showcase quests."
+ tags = "test, showcase"
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")
+  include("stats.oxo")
+  include("templates/spaceshipAssff.oxt")
+  include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name         = "Questsystem"
+ description  = "Just a few tests"
+>
+    <templates>
+        <Template link=lodtemplate_default />
+    </templates>
+    <?lua include("includes/notifications.oxi") ?>
+
+    <Scene
+        ambientlight = "0.5, 0.5, 0.5"
+        skybox       = "Orxonox/Starbox"
+    >
+
+        <Script code="showGUI NotificationLayer false true" needsGraphics="true" />
+
+        <GlobalQuest id="quest0">
+            <QuestDescription title="Quest 0" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+            Ut consequat leo ut quam congue semper et eget nibh. Nunc sit amet velit eu lorem pretium adipiscing eu ut ante. Nulla facilisi. Pellentesque interdum, neque nec consectetur vulputate, mauris risus feugiat nunc, ac sollicitudin neque quam ut tellus. Morbi elit velit, tincidunt et hendrerit eget, rutrum at erat. Duis eros nulla, faucibus vitae blandit vitae, pharetra sollicitudin justo." failMessage="Fail message 0" completeMessage="Complete message 0" />
+        </GlobalQuest>
+        <GlobalQuest id="quest1">
+            <QuestDescription title="Quest 1" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor." failMessage="Fail message 1" completeMessage="Complete message 1" />
+            <hints>
+                <QuestHint id="quest1hint1">
+                    <QuestDescription title="The super Hint." description="Be proud of yourself." />
+                </QuestHint>
+                <QuestHint id="quest1hint2">
+                    <QuestDescription title="The super Hint2." description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor." />
+                </QuestHint>
+                <QuestHint id="quest1hint3">
+                    <QuestDescription title="The super Hint3." description="Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus." />
+                </QuestHint>
+            </hints>
+            <subquests>
+                <GlobalQuest id="quest1.1">
+                    <QuestDescription title="Quest 1: Subquest 1" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam." failMessage="Fail message 2" completeMessage="Complete message 2" />
+                </GlobalQuest>
+                <GlobalQuest id="quest1.2">
+                    <QuestDescription title="Quest 1: Subquest 2" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor." failMessage="Fail message 2" completeMessage="Complete message 2" />
+                </GlobalQuest>
+                <GlobalQuest id="quest1.3">
+                    <QuestDescription title="Quest 1: Subquest 3" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas." failMessage="Fail message 2" completeMessage="Complete message 2" />
+                </GlobalQuest>
+                <GlobalQuest id="quest1.4">
+                    <QuestDescription title="Quest 1: Subquest 4" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam. Lorem ipsum dolor sit amet, consectetur adipiscing elit." failMessage="Fail message 2" completeMessage="Complete message 2" />
+                </GlobalQuest>
+                <GlobalQuest id="quest1.5">
+                    <QuestDescription title="Quest 1: Subquest 5" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam." failMessage="Fail message 2" completeMessage="Complete message 2" />
+                </GlobalQuest>
+            </subquests>
+        </GlobalQuest>
+        <GlobalQuest id="quest2">
+            <QuestDescription title="Quest 2" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac." failMessage="Fail message 2" completeMessage="Complete message 2" />
+        </GlobalQuest>
+        <GlobalQuest id="quest3">
+            <QuestDescription title="Quest 3" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam. Lorem ipsum dolor sit amet, consectetur adipiscing elit." failMessage="Fail message 1" completeMessage="Complete message 1" />
+        </GlobalQuest>
+        <GlobalQuest id="quest4">
+            <QuestDescription title="Quest 4" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. Integer a nisl odio, in iaculis tortor. Nam erat erat, commodo quis tincidunt et, congue at quam. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
+
+            Ut consequat leo ut quam congue semper et eget nibh. Nunc sit amet velit eu lorem pretium adipiscing eu ut ante. Nulla facilisi. Pellentesque interdum, neque nec consectetur vulputate, mauris risus feugiat nunc, ac sollicitudin neque quam ut tellus. Morbi elit velit, tincidunt et hendrerit eget, rutrum at erat. Duis eros nulla, faucibus vitae blandit vitae, pharetra sollicitudin justo. Donec luctus est a tortor auctor feugiat." failMessage="Fail message 1" completeMessage="Complete message 1" />
+        </GlobalQuest>
+        <GlobalQuest id="quest5">
+            <QuestDescription title="Quest 5" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa." failMessage="Fail message 1" completeMessage="Complete message 1" />
+        </GlobalQuest>
+        <GlobalQuest id="quest6">
+            <QuestDescription title="Quest 6" description="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus at dolor quis dui gravida faucibus quis ut augue. Nulla sed accumsan nulla. Sed eleifend arcu ante, vel congue neque. Praesent vel felis sit amet lacus elementum laoreet at et massa. Pellentesque imperdiet orci sit amet sem gravida a ornare odio tempor. Donec posuere scelerisque purus, et porttitor ipsum dictum ac. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed non turpis non eros porttitor dignissim. Phasellus at elit vel diam gravida malesuada ut a lorem. Etiam vel lacus massa. In arcu neque, ultrices at placerat in, facilisis a metus. Curabitur erat nunc, molestie sed pretium ac, ullamcorper eget tellus. Vivamus tortor magna, mollis ut vulputate vel, lacinia nec neque. " failMessage="Fail message 1" completeMessage="Complete message 1" />
+        </GlobalQuest>
+
+        <EventMultiTrigger name=spawntrigger>
+            <events>
+                <trigger>
+                    <SpawnPoint position="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff />
+                </trigger>
+            </events>
+        </EventMultiTrigger>
+
+        <QuestEffectBeacon times=1>
+            <effects>
+                <AddQuest questId="quest0" />
+                <AddQuest questId="quest1" />
+                <AddQuest questId="quest1.1" />
+                <AddQuest questId="quest1.2" />
+                <AddQuest questId="quest1.3" />
+                <AddQuest questId="quest1.4" />
+                <AddQuest questId="quest1.5" />
+                <AddQuest questId="quest2" />
+                <AddQuest questId="quest3" />
+                <AddQuest questId="quest4" />
+                <AddQuest questId="quest5" />
+                <AddQuest questId="quest6" />
+                <AddQuestHint hintId ="quest1hint1" />
+                <AddQuestHint hintId ="quest1hint2" />
+                <AddQuestHint hintId ="quest1hint3" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=spawntrigger />
+                </execute>
+            </events>
+        </QuestEffectBeacon>
+
+        <QuestEffectBeacon position="-100,0,0" times=1>
+            <effects>
+                <FailQuest questId="quest1.1" />
+                <FailQuest questId="quest1.2" />
+                <FailQuest questId="quest1.3" />
+                <FailQuest questId="quest1.4" />
+                <FailQuest questId="quest1.5" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=dtrigger1 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="1.0,0,0" material="Examples/Flare" />
+                <DistanceTrigger name=dtrigger1 position="0,0,0" distance=10 target="Pawn" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <QuestEffectBeacon position="100,0,0" times=-1>
+            <effects>
+                <CompleteQuest questId="quest0" />
+                <CompleteQuest questId="quest1" />
+                <CompleteQuest questId="quest1.1" />
+                <CompleteQuest questId="quest1.2" />
+                <CompleteQuest questId="quest1.3" />
+                <CompleteQuest questId="quest1.4" />
+                <CompleteQuest questId="quest1.5" />
+                <CompleteQuest questId="quest2" />
+                <CompleteQuest questId="quest3" />
+                <CompleteQuest questId="quest4" />
+                <CompleteQuest questId="quest5" />
+                <CompleteQuest questId="quest6" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=dtrigger2 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="0,1.0,0" material="Examples/Flare" />
+                <DistanceTrigger name=dtrigger2 position="0,0,0" distance=10 target="Pawn" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <!--QuestEffectBeacon position="0,0,100" times=-1>
+            <effects>
+                <AddQuest questId="b80c2c60-e62c-4637-80f8-5aa18dc93b34" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=qebdt1 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="1.0,1.0,1.0" material="Examples/Flare" />
+                <DistanceTrigger name=qebdt1 position="0,0,0" distance=10 target="ControllableEntity" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <QuestEffectBeacon position="-100,0,0" times=-1>
+            <effects>
+                <FailQuest questId="b80c2c60-e62c-4637-80f8-5aa18dc93b34" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=qebdt2 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="1.0,0,0" material="Examples/Flare" />
+                <DistanceTrigger name=qebdt2 position="0,0,0" distance=10 target="ControllableEntity" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <QuestEffectBeacon position="100,0,0" times=-1>
+            <effects>
+                <CompleteQuest questId="b80c2c60-e62c-4637-80f8-5aa18dc93b34" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=qebdt3 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="0,1.0,0" material="Examples/Flare" />
+                <DistanceTrigger name=qebdt3 position="0,0,0" distance=10 target="ControllableEntity" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <QuestEffectBeacon position="0,100,0" times=-1>
+            <effects>
+                <AddQuestHint hintId="022a859d-08dd-4eac-a085-c28c29c06d48" />
+            </effects>
+            <events>
+                <execute>
+                    <EventListener event=qebdt4 />
+                </execute>
+            </events>
+            <attached>
+                <Billboard position="0,0,0" colour="0,0,1.0" material="Examples/Flare" />
+                <DistanceTrigger name=qebdt4 position="0,0,0" distance=10 target="ControllableEntity" />
+            </attached>
+        </QuestEffectBeacon>
+
+        <ParticleEmitter name=firecenter position="0,0,0" source="Orxonox/fire3" active=false>
+            <events>
+                <activity>
+                    <QuestListener questId="b80c2c60-e62c-4637-80f8-5aa18dc93b34" mode="complete" />
+                </activity>
+            </events>
+        </ParticleEmitter-->
+
+    </Scene>
+</Level>
+
Index: code/trunk/data/levels/screenshot.oxw
===================================================================
--- code/trunk/data/levels/screenshot.oxw	(revision 8531)
+++ code/trunk/data/levels/screenshot.oxw	(revision 8706)
@@ -22,4 +22,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/shieldTest.oxw
===================================================================
--- code/trunk/data/levels/shieldTest.oxw	(revision 8706)
+++ code/trunk/data/levels/shieldTest.oxw	(revision 8706)
@@ -0,0 +1,83 @@
+<LevelInfo
+ name = "Shield Testlevel"
+ description = "A simple Level with one shielded drone to shoot at"
+ tags = "test"
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")
+  include("stats.oxo")
+  include("templates/spaceshipImmTest.oxt")
+  include("templates/lodInformation.oxt")
+?>
+
+<Level
+ name         = "shieldTL"
+ description  = "LEVEL-DESCRIPTION"
+>
+
+<templates>
+  <Template link=lodtemplate_default />
+</templates>
+<?lua include("includes/notifications.oxi") ?>
+
+<Scene
+   ambientlight = "0.8, 0.5, 0.5"
+   skybox       = "Orxonox/Starbox"
+>
+
+<Drone name="meineDrohne"
+    primarythrust= "80"
+    auxilarythrust= "10"
+    rotationthrust= "10"
+    mass= "50"
+    linearDamping= "0.9"
+    angularDamping= "0.7"
+
+    health= 100
+    maxhealth= 150
+    inithealth= 200
+
+    shieldhealth= 100
+    initialshieldhealth= 200
+    maxshieldhealth= 250
+
+    shieldabsorption= 1
+
+    reloadrate= "10"
+    reloadwaittime= 1
+
+>
+  <attached>
+    <Model scale="4" mesh="drone.mesh"/>
+  </attached>
+  <collisionShapes>
+    <BoxCollisionShape position="0,0,0"      halfExtents="10, 10, 10" />
+  </collisionShapes>
+</Drone>
+
+<Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+
+    <?lua
+      for i = 1, 10, 1 do
+    ?>
+      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipimmtest />
+    <?lua end ?>
+
+    <GlobalShader compositor="Bloom" visible=false>
+      <events>
+        <visibility>
+          <DistanceTrigger position="0,0,0" distance=30 target="Spectator" switch=true />
+        </visibility>
+      </events>
+    </GlobalShader>
+    <Model position="0,0,0" scale=8 mesh="ast1.mesh" />
+    <StaticEntity position="0,0,0" collisionType=static>
+      <collisionShapes>
+        <SphereCollisionShape radius="20" />
+      </collisionShapes>
+    </StaticEntity>
+
+  </Scene>
+</Level>
Index: code/trunk/data/levels/sound.oxw
===================================================================
--- code/trunk/data/levels/sound.oxw	(revision 8531)
+++ code/trunk/data/levels/sound.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/spaceRace.oxw
===================================================================
--- code/trunk/data/levels/spaceRace.oxw	(revision 8706)
+++ code/trunk/data/levels/spaceRace.oxw	(revision 8706)
@@ -0,0 +1,468 @@
+<LevelInfo
+ name = "Space Race"
+ description = "Test level for the gametype Space Race."
+ tags = "test"
+/>
+
+<?lua
+  include("stats.oxo")
+  include("HUDTemplates3.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<?lua
+  include("templates/spaceshipAssff.oxt")
+  include("templates/spaceshipPirate.oxt")
+?>
+
+<Level
+ name         = "Space Race"
+ description  = "Test level for the gametype Space Race."
+ gametype     = SpaceRace
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+    ambientlight = "0.8, 0.8, 0.8"
+    skybox       = "Orxonox/skyBoxMoreNebula"
+  >
+
+    <?lua math.randomseed(98) ?>
+
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0"/>
+
+    <SimpleNotification message="Reach the last check point within 150 seconds!!" />
+
+    <!-- ------------------SpawnPoint----------------- -->
+    <SpawnPoint position="0,-2100,0" lookat="0,0,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="true" >
+      <events>
+        <activity>
+          <EventTrigger invert="true">
+            <events>
+                <trigger>
+                    <EventListener event="checkpoint2" />
+                </trigger>
+            </events>
+          </EventTrigger>
+        </activity>
+      </events>
+    </SpawnPoint>
+    
+    <!-- ------------------CheckPoints----------------- -->
+    <RaceCheckPoint name="checkpoint1" position="0,-2000,1000" direction="0,-1,1" collisionType="static" scale="1" distance="40" checkpointindex="0" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint2" position="0,-900,2300" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="1" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint2" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint3" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint3" position="0,700,2700" stayActive="true" direction="0,0,1" collisionType="static" scale="1" distance="40" checkpointindex="2" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <SpawnPoint position="0,0,0" lookat="0,1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint3" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint4" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint4" position="0,2100,2300" stayActive="true" direction="0,1,1" collisionType="static" scale="1" distance="40" checkpointindex="3" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger3" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint4" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint5" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint5" position="0,2200,500" stayActive="true" direction="0,1,0" collisionType="static" scale="1" distance="40" checkpointindex="4" islast="false">
+        <attached>
+        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        <DistanceTrigger name="trigger4" position="0,0,0" distance=40 stayActive="true" />
+        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+            <events>
+            <activity>
+                <Trigger mode="xor" invert="true" >
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint5" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger invert="true">
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint6" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </activity>
+            </events>
+        </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint6" position="0,1500,-800" stayActive="true" direction="0,1,-1" collisionType="static" scale="1" distance="40" checkpointindex="5" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger5" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint6" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint7" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint7" position="0,200,-1900" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="6" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger6" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <Trigger mode="xor" invert="true" >
+                        <EventTrigger>
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint7" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                        <EventTrigger invert="true">
+                            <events>
+                                <trigger>
+                                    <EventListener event="checkpoint8" />
+                                </trigger>
+                            </events>
+                        </EventTrigger>
+                    </Trigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint8" position="0,-700,-1400" stayActive="true" direction="0,-1,-1" collisionType="static" scale="1" distance="40" checkpointindex="7" islast="false">
+        <attached>
+        <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        <DistanceTrigger name="trigger7" position="0,0,0" distance=40 stayActive="true" />
+        <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+            <events>
+            <activity>
+                <Trigger mode="xor" invert="true" >
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint8" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                    <EventTrigger invert="true">
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint9" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </Trigger>
+            </activity>
+            </events>
+        </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint9" position="0,-1300,-800" stayActive="true" collisionType="static" scale="1" distance="40" checkpointindex="8" islast="false">
+        <attached>
+            <Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+            <DistanceTrigger name="trigger8" position="0,0,0" distance=40 stayActive="true" />
+            <SpawnPoint position="0,0,0" lookat="0,-1000,0" spawnclass=SpaceShip pawndesign=spaceshipassff active="false" >
+                <events>
+                <activity>
+                    <EventTrigger>
+                        <events>
+                            <trigger>
+                                <EventListener event="checkpoint9" />
+                            </trigger>
+                        </events>
+                    </EventTrigger>
+                </activity>
+                </events>
+            </SpawnPoint>
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <RaceCheckPoint name="checkpoint10" position="0,-2100,0" collisionType="static" scale="1" distance="40" checkpointindex="9" islast="true" timelimit="150">
+        <attached>
+        <   Model mass="50" scale="50" mesh="raceCheckPoint.mesh" />
+        </attached>
+        <collisionShapes>
+            <BoxCollisionShape position="0,0,55"      halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="0,0,-55"     halfExtents="55, 10, 10" />
+            <BoxCollisionShape position="55,0,0"      halfExtents="10, 10, 55" />
+            <BoxCollisionShape position="-55,0,0"     halfExtents="10, 10, 55" />
+        </collisionShapes>
+    </RaceCheckPoint>
+
+    <!-- ------------------Planet----------------- -->
+    <Planet position="0,0,0" scale=300 pitch=-90 mesh="iceplanet.mesh" atmosphere="atmosphere1" rotationaxis="8,1,0" rotationrate="1" atmospheresize=224.0f imagesize=1024.0f />
+    <StaticEntity position="0,0,0" collisionType=static>
+        <collisionShapes>
+            <SphereCollisionShape radius="399" />
+        </collisionShapes>
+    </StaticEntity>
+
+    <!-- ---------------asteroid ellipse----------------- -->
+    <?lua
+    max = 20
+    for i = 0, max, 1
+    do
+    y = math.sin(i/max*6)*2000
+    z = math.cos(i/max*6)*2500
+    x = 0
+    ?>
+    <?lua
+    for k = 1, 15, 1
+    do
+    j = math.random()
+    ?>
+
+    <MovableEntity
+      position = "<?lua print(x + math.random() * 500) ?>,<?lua print(y + math.random() * 500) ?>,<?lua print(z + math.random() * 1000) ?>"
+      collisionType = "dynamic"
+      linearDamping = "0.5"
+      angularDamping = "0.01"
+      collisiondamage = "0.01"
+      enablecollisiondamage = "true"
+      scale="<?lua print(j * 5) ?>" >
+      <attached>
+        <Model position="0,0,0" scale="<?lua print(j * 10) ?>" mesh="ast<?lua print( math.mod(i,6) + 1) ?>.mesh">
+      <?lua if k == 5 then ?><attached><!-- ---------asteroid fog----- -->
+            <ParticleEmitter position="0,0,0" source="Orxonox/Steam" />
+          </attached> <?lua end ?>
+        </Model>
+      </attached>
+      <collisionShapes>
+        <SphereCollisionShape radius="<?lua print(j * 80) ?>" />
+      </collisionShapes>
+    </MovableEntity>
+    <?lua
+    end
+    ?>
+    <?lua end ?>
+
+    <!-- ---------------ForceFields----------------- -->
+    <ForceField position="0,-700,2700" direction="0,1,0" diameter=500 velocity=2000 length=600 />
+        <MovableEntity position="0,-400,2700">
+            <attached>
+                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
+                <?lua for i=0,15,1 do ?>
+                    <Billboard position="-200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                    <Billboard position="200,<?lua print(i*40) ?>,0" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                <?lua end ?>
+                </attached>
+        </MovableEntity>
+
+     <ForceField position="0,2500,2000" direction="0,0,-1" diameter=250 velocity=2000 length=600 />
+        <MovableEntity position="0,2500,2000">
+            <attached>
+                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
+                <?lua for i=0,15,1 do ?>
+                    <Billboard position="-100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                    <Billboard position="100,0,-<?lua print(i*40) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                <?lua end ?>
+                </attached>
+        </MovableEntity>
+
+    <ForceField position="0,1300,-800" direction="0,-1,-1" diameter=250 velocity=2000 length=800 />
+        <MovableEntity position="0,1300,-800">
+            <attached>
+                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
+                <?lua for i=0,20,1 do ?>
+                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(-i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                <?lua end ?>
+                </attached>
+        </MovableEntity>
+
+    <ForceField position="0,-1400,-700" direction="0,-1,1" diameter=250 velocity=2000 length=600 />
+        <MovableEntity position="0,-1400,-700">
+            <attached>
+                <Billboard position="0,0,0" material="Flares/ringflare2" colour="0.5,0,0" scale=2/>
+                <?lua for i=0,15,1 do ?>
+                    <Billboard position="-100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                    <Billboard position="100,<?lua print(-i*40*0.7071) ?>,<?lua print(i*40*0.7071) ?>" material="Examples/Flare" colour="0.5,0,0" scale=1/>
+                <?lua end ?>
+                </attached>
+        </MovableEntity>
+
+    <!-- ---------------SpaceShips----------------- -->
+    <SpaceShip position="0,2000,2000" lookat="0,0,0" team=1 >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+         <WaypointPatrolController alertnessradius=1500 team=0 >
+            <waypoints>
+                <Model scale=0 position="0,2000,2000" />
+            </waypoints>
+         </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+    <SpaceShip position="0,2000,-2000" lookat="0,0,0" team=1 >
+      <templates>
+        <Template link=spaceshipassff />
+      </templates>
+      <controller>
+        <WaypointPatrolController alertnessradius=1500 team=0 >
+            <waypoints>
+                <Model scale=0 position="0,2000,-2000" />
+            </waypoints>
+        </WaypointPatrolController>
+      </controller>
+    </SpaceShip>
+
+  </Scene>
+</Level>
Index: code/trunk/data/levels/teamBaseMatch.oxw
===================================================================
--- code/trunk/data/levels/teamBaseMatch.oxw	(revision 8531)
+++ code/trunk/data/levels/teamBaseMatch.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/teamDeathMatch.oxw
===================================================================
--- code/trunk/data/levels/teamDeathMatch.oxw	(revision 8531)
+++ code/trunk/data/levels/teamDeathMatch.oxw	(revision 8706)
@@ -22,4 +22,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/templates/lodInformation.oxt
===================================================================
--- code/trunk/data/levels/templates/lodInformation.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/lodInformation.oxt	(revision 8706)
@@ -14,4 +14,5 @@
       <MeshLodInformation mesh=SolarPanel.mesh enabled=false/>
       <MeshLodInformation mesh=CuboidLandingZone.mesh enabled=false/>
+      <MeshLodInformation mesh=HydroHarvester.mesh enabled=false />
 
       <!-- disable LOD for some debris meshes which caused a crash (fixed in Ogre 1.7.3) -->
Index: code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt
===================================================================
--- code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/pickupRepresentationTemplates.oxt	(revision 8706)
@@ -391,4 +391,79 @@
   <InvisiblePickup 
     duration = 20.0
+    activaionType = "immediate"
+    durationType = "continuous"
+  />
+</Template>
+
+<Template name=smallshrinkpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.4 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=smallshrinkpickup>
+  <InvisiblePickup 
+    duration = 10.0
+    shrinkFactor = 2.5
+    activaionType = "immediate"
+    durationType = "continuous"
+  />
+</Template>
+
+<Template name=mediumshrinkpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=0.7 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=mediumshrinkpickup>
+  <InvisiblePickup 
+    duration = 30.0
+    shrinkFactor = 5.0
+    activaionType = "immediate"
+    durationType = "continuous"
+  />
+</Template>
+
+<Template name=hugeshrinkpickupRepresentation>
+    <PickupRepresentation>
+        <spawner-representation>
+            <StaticEntity>
+                <attached>
+                    <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Sphere2" scale=0.1>
+                        <attached>
+                            <Billboard position="0,0,0" colour="1.0,0.55,1.0" material="Shrink" scale=1.0 />
+                        </attached>
+                    </Billboard>
+                </attached>
+            </StaticEntity>
+        </spawner-representation>
+    </PickupRepresentation>
+</Template>
+
+<Template name=hugeshrinkpickup>
+  <InvisiblePickup 
+    duration = 60.0
+    shrinkFactor = 10.0
     activaionType = "immediate"
     durationType = "continuous"
Index: code/trunk/data/levels/templates/spaceshipAssff.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipAssff.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipAssff.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipassffcameras
-   engine                 = spaceshipassffengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -12,7 +11,25 @@
    initialhealth     = 100
 
-   primaryThrust     = 100;
-   auxilaryThrust    = 30;
-   rotationThrust    = 25;
+   shieldhealth        = 30
+   initialshieldhealth = 30
+   maxshieldhealth     = 50
+   shieldabsorption    = 0.8
+   reloadrate          = 1
+   reloadwaittime      = 1
+
+   primaryThrust     = 100
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 15
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
 
    collisionType     = "dynamic"
@@ -21,4 +38,8 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
@@ -77,9 +98,6 @@
     </EffectContainer>
     <EffectContainer condition="not idle">
-      <FadingBillboard mainstate=activity active=false scale=0.1 position="0, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-<!--
-      <Light mainstate=visibility position=" 8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
-      <Light mainstate=visibility position="-8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
--->
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="-7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
     </EffectContainer>
     <EffectContainer condition="normal or brake">
@@ -87,6 +105,6 @@
     </EffectContainer>
     <EffectContainer condition="normal or boost">
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
     </EffectContainer>
     <EffectContainer condition="boost">
@@ -94,5 +112,5 @@
       <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
     </EffectContainer>
-    <EffectContainer condition="brake">
+<!--    <EffectContainer condition="brake">
       <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
       <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
@@ -100,4 +118,5 @@
       <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
     </EffectContainer>
+-->
   </MultiStateEngine>
 </Template>
Index: code/trunk/data/levels/templates/spaceshipAssff2.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipAssff2.oxt	(revision 8706)
+++ code/trunk/data/levels/templates/spaceshipAssff2.oxt	(revision 8706)
@@ -0,0 +1,160 @@
+<Template name=spaceshipassff2>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras2
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 50
+   maxhealth         = 100
+   initialhealth     = 50
+
+   shieldhealth        = 130
+   initialshieldhealth = 130
+   maxshieldhealth     = 150
+   shieldabsorption    = 0.95
+   reloadrate          = 5
+   reloadwaittime      = 0.5
+
+   primaryThrust     = 100
+   auxilaryThrust    = 30
+   rotationThrust    = 50
+
+   lift = 1;
+   stallSpeed = 220;
+
+   boostPower            = 10
+   boostPowerRate        = 1
+   boostRate             = 5
+   boostCooldownDuration = 10
+
+   shakeFrequency = 15
+   shakeAmplitude = 9
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+  >
+    <engines>
+      <MultiStateEngine position=" 7.6, 0, 6" template=spaceshipassffengine2 />
+      <MultiStateEngine position="-7.6, 0, 0" template=spaceshipassffengine2 />
+    </engines>
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
+      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
+    </collisionShapes>
+<?lua
+  include("includes/weaponSettingsAssff2.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffcameras2 defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+      <!--CameraPosition position="0,150,-25" pitch=-90 drag=true />
+      <CameraPosition position="0,0,-40" yaw=180 drag=true />
+      <CameraPosition position="0,3,-14" yaw=0 />
+      <CameraPosition position="-50,5,-8" yaw=-90 drag=true />
+      <CameraPosition position="50,5,-8" yaw=90 drag=true /-->
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffengine2 baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="-7.6, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 0" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+<!--    <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+-->
+  </MultiStateEngine>
+</Template>
+
+<!--Template name=spaceshippirate>
+  <SpaceShip
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   maxspeed          = 250
+   maxsecondaryspeed = 50
+   maxrotation       = 100
+   transacc          = 200
+   rotacc            = 140
+   transdamp         = 75
+  >
+    <attached>
+      <Model position="0,-10,-45" yaw=90 pitch=-90 roll=0 scale=4 mesh="pirate.mesh" />
+    </attached>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipspacecruiser>
+  <SpaceShip
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   maxspeed          = 250
+   maxsecondaryspeed = 50
+   maxrotation       = 100
+   transacc          = 200
+   rotacc            = 140
+   transdamp         = 75
+  >
+    <attached>
+      <Model position="8,-30,-120" yaw=90 pitch=-90 roll=0 scale=4 mesh="spacecruiser.mesh" />
+    </attached>
+  </SpaceShip>
+</Template-->
Index: code/trunk/data/levels/templates/spaceshipGhost.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipGhost.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipGhost.oxt	(revision 8706)
@@ -3,5 +3,5 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipghostcameras
-   engine                 = spaceshipghostengine
+
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,5 +21,7 @@
    angularDamping    = 0.9999999
   >
-
+    <engines>
+      <MultiStateEngine position="0,0,0" template=spaceshipghostengine/>
+    </engines>
     <attached>
       <Model position="0,0,0" scale=2 yaw=90 pitch=-90 roll=0 mesh="ghost.mesh" />
Index: code/trunk/data/levels/templates/spaceshipH2.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipH2.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipH2.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipHtwocameras
-   engine                 = spaceshipHtwoengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -25,5 +24,8 @@
   include("includes/weaponSettingsH2.oxi")
 ?>
+    <engines>
+      <MultiStateEngine position="0,0,0" template=spaceshipHtwoengine />
 
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale3D="3,0.833,0.833" mesh="h2_green.mesh" />
Index: code/trunk/data/levels/templates/spaceshipHXY.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipHXY.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipHXY.oxt	(revision 8706)
@@ -21,4 +21,7 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipHXYengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=180 pitch=-90 roll=0 scale=4 mesh="HXY.mesh" />
Index: code/trunk/data/levels/templates/spaceshipHXYSL.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipHXYSL.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipHXYSL.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipHXYcameras
-   engine                 = spaceshipHXYengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,4 +20,7 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipHXYengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=180 pitch=-90 roll=0 scale=4 mesh="HXY.mesh" />
@@ -38,53 +40,2 @@
   </SpaceShip>
 </Template>
-
-<Template name=spaceshipHXYcameras defaults=0>
-  <SpaceShip>
-    <camerapositions>
-      <CameraPosition position="0,8, 60" drag=true mouselook=true />
-      <CameraPosition position="0,16, 120" drag=true mouselook=true />
-      <CameraPosition position="0,24,180" drag=true mouselook=true />
-      <CameraPosition position="0,60,10" pitch="-80" drag=true mouselook=true />
-    </camerapositions>
-  </SpaceShip>
-</Template>
-
-<Template name=spaceshipHXYengine baseclass=MultiStateEngine>
-  <MultiStateEngine
-   boostfactor    = 6
-
-   speedfront     = 150
-   speedback      =  50
-   speedleftright =  50
-   speedupdown    =  50
-
-   accelerationfront     = 500
-   accelerationbrake     = 500
-   accelerationback      =  125
-   accelerationleftright =  125
-   accelerationupdown    =  125
-  >
-    <EffectContainer condition="idle">
-    </EffectContainer>
-    <EffectContainer condition="not idle">
-
-    </EffectContainer>
-    <EffectContainer condition="normal or brake">
-
-    </EffectContainer>
-    <EffectContainer condition="normal or boost">
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 2, 0, 20" colour="1, 0.7, 0.1, 1.0" width=10 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-2, 0, 20" colour="1, 0.7, 0.1, 1.0" width=10 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-    </EffectContainer>
-    <EffectContainer condition="boost">
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 2, 0, 20" colour="1, 0.7, 0.1, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
-      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-2, 0, 20" colour="1, 0.7, 0.1, 0.7" width=25 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
-    </EffectContainer>
-    <EffectContainer condition="brake">
-      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 2, 0, 20" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=0.3 position="-2, 0, 20" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 2, 0, 20" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=0.15 position="-2, 0, 20" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
-    </EffectContainer>
-  </MultiStateEngine>
-</Template>
Index: code/trunk/data/levels/templates/spaceshipImmTest.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipImmTest.oxt	(revision 8706)
+++ code/trunk/data/levels/templates/spaceshipImmTest.oxt	(revision 8706)
@@ -0,0 +1,106 @@
+<Template name=spaceshipimmtest>
+  <SpaceShip
+   hudtemplate            = spaceshiphud
+   camerapositiontemplate = spaceshipassffcameras
+   engine                 = spaceshipassffengine
+   spawnparticlesource    = "Orxonox/fairytwirl"
+   spawnparticleduration  = 3
+   explosionchunks        = 6
+
+   health            = 100
+   maxhealth         = 200
+   initialhealth     = 100
+
+   primaryThrust     = 100;
+   auxilaryThrust    = 30;
+   rotationThrust    = 25;
+
+   collisionType     = "dynamic"
+   mass              = 100
+   linearDamping     = 0.7
+   angularDamping    = 0.9999999
+   
+   shakeFrequency    = 15
+  >
+    <attached>
+      <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="assff.mesh" />
+      <BlinkingBillboard position="17,-1.5,0" material="Examples/Flare" colour="1.0, 0.5, 0.3" amplitude=0.1 frequency=0.5 quadratic=1 />
+      <BlinkingBillboard position="-17,-1.5,0" material="Examples/Flare" colour="0.5, 1.0, 0.3" amplitude=0.1 frequency=0.5 phase=180 quadratic=1 />
+    </attached>
+    <collisionShapes>
+      <BoxCollisionShape position="0,0,0"      halfExtents="10, 3, 5" />
+      <BoxCollisionShape position="13,-1.3,0"  halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="-13,-1.3,0" halfExtents="3, 1, 2" />
+      <BoxCollisionShape position="0,0,7"      halfExtents="3, 2, 2" />
+      <BoxCollisionShape position="0,0.1,-11"  halfExtents="2.2, 1.8, 6" />
+      <BoxCollisionShape position="0,0.1,-19"  halfExtents="1.4, 1, 2" />
+    </collisionShapes>
+<?lua
+  include("includes/weaponSettingsImmTest.oxi")
+?>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffcameras defaults=0>
+  <SpaceShip>
+    <camerapositions>
+      <CameraPosition position="0,10, 40" drag=true mouselook=true />
+      <CameraPosition position="0,20, 80" drag=true mouselook=true />
+      <CameraPosition position="0,30,120" drag=true mouselook=true />
+      <!--CameraPosition position="0,150,-25" pitch=-90 drag=true />
+      <CameraPosition position="0,0,-40" yaw=180 drag=true />
+      <CameraPosition position="0,3,-14" yaw=0 />
+      <CameraPosition position="-50,5,-8" yaw=-90 drag=true />
+      <CameraPosition position="50,5,-8" yaw=90 drag=true /-->
+    </camerapositions>
+  </SpaceShip>
+</Template>
+
+<Template name=spaceshipassffengine baseclass=MultiStateEngine>
+  <MultiStateEngine
+   boostfactor    = 2
+
+   speedfront     = 150
+   speedback      =  50
+   speedleftright =  50
+   speedupdown    =  50
+
+   defEngineSndNormal = "sounds/Engine_low.ogg"
+   defEngineSndBoost = "sounds/Engine_high.ogg"
+
+   accelerationfront     = 500
+   accelerationbrake     = 500
+   accelerationback      =  125
+   accelerationleftright =  125
+   accelerationupdown    =  125
+  >
+    <EffectContainer condition="idle">
+      <WorldSound mainstate="activity" source="sounds/Engine_idle.ogg" looping=1 active=false/>
+    </EffectContainer>
+    <EffectContainer condition="not idle">
+      <FadingBillboard mainstate=activity active=false scale=0.1 position="0, 0, 9" colour="0.2, 0.65, 1.0, 1.0" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+<!--
+      <Light mainstate=visibility position=" 8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
+      <Light mainstate=visibility position="-8, 0, 8" diffuse="0.3, 0.6, 1.0" specular="0.3, 0.6, 1.0" attenuation="600, 1.0, 0.007, 0.0002" type=point />
+-->
+    </EffectContainer>
+    <EffectContainer condition="normal or brake">
+
+    </EffectContainer>
+    <EffectContainer condition="normal or boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.2, 0.65, 1.0, 1.0" width=15 length=1500 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
+    </EffectContainer>
+    <EffectContainer condition="boost">
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position=" 7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+      <Backlight mainstate=activity active=false scale=0.4 name=bltest position="-7.6, 0, 6" colour="0.6, 0.75, 0.8, 0.7" width=40 length=1000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
+    </EffectContainer>
+    <EffectContainer condition="brake">
+      <FadingBillboard mainstate=activity active=false scale=0.3 position=" 8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.3 position="-8, 0, 6" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position=" 8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+      <FadingBillboard mainstate=activity active=false scale=0.15 position="-8, 0, 6" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
+    </EffectContainer>
+  </MultiStateEngine>
+</Template>
+
Index: code/trunk/data/levels/templates/spaceshipPirate.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipPirate.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipPirate.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshippiratecameras
-   engine                 = spaceshippirateengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,4 +20,7 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshippirateengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=90 pitch=-90 roll=0 scale=4 mesh="pirate.mesh" />
Index: code/trunk/data/levels/templates/spaceshipSwallow.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipSwallow.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipSwallow.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipswallowcameras
-   engine                 = spaceshipswallowengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,5 +20,7 @@
    angularDamping    = 0.9999999
   >
-
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipswallowengine />
+    </engines>
     <attached>
       <Model position="0,0,0" scale=2 yaw=90 pitch=-90 roll=0 mesh="swallow_mat.mesh" />
Index: code/trunk/data/levels/templates/spaceshipTransporter.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipTransporter.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipTransporter.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipTransportercameras
-   engine                 = spaceshipTransporterengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,4 +20,7 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=10 mesh="Transporter.mesh" />
Index: code/trunk/data/levels/templates/spaceshipTransporterSL.oxt
===================================================================
--- code/trunk/data/levels/templates/spaceshipTransporterSL.oxt	(revision 8531)
+++ code/trunk/data/levels/templates/spaceshipTransporterSL.oxt	(revision 8706)
@@ -3,5 +3,4 @@
    hudtemplate            = spaceshiphud
    camerapositiontemplate = spaceshipTransportercameras
-   engine                 = spaceshipTransporterengine
    spawnparticlesource    = "Orxonox/fairytwirl"
    spawnparticleduration  = 3
@@ -21,4 +20,7 @@
    angularDamping    = 0.9999999
   >
+    <engines>
+      <MultiStateEngine position=" 0, 0, 0" template=spaceshipTransporterengine />
+    </engines>
     <attached>
       <Model position="0,0,0" yaw=0 pitch=0 roll=0 scale=10 mesh="Transporter.mesh" />
@@ -38,54 +40,2 @@
   </SpaceShip>
 </Template>
-
-<Template name=spaceshipTransportercameras defaults=0>
-  <SpaceShip>
-    <camerapositions>
-      <CameraPosition position="0,90,350" drag=true mouselook=true />
-      <CameraPosition position="0,150, 400" drag=true mouselook=true />
-      <CameraPosition position="0,200,550" drag=true mouselook=true />
-      <CameraPosition position="0,120,200" pitch="-80" drag=true mouselook=true />
-    </camerapositions>
-  </SpaceShip>
-</Template>
-
-<Template name=spaceshipTransporterengine baseclass=MultiStateEngine>
-  <MultiStateEngine
-   boostfactor    = 2
-
-   speedfront     = 50
-   speedback      =  10
-   speedleftright =  10
-   speedupdown    =  10
-
-
-   accelerationfront     = 20
-   accelerationbrake     = 20
-   accelerationback      = 10
-   accelerationleftright =  10
-   accelerationupdown    =  10
-  >
-    <EffectContainer condition="idle">
-    </EffectContainer>
-    <EffectContainer condition="not idle">
-
-    </EffectContainer>
-    <EffectContainer condition="normal or brake">
-
-    </EffectContainer>
-    <EffectContainer condition="normal or boost">
-      <Backlight mainstate=activity active=false scale=2 name=bltest position=" 22, -10, 87" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-      <Backlight mainstate=activity active=false scale=2 name=bltest position="-22, -10, 87" colour="1, 0.7, 0.1, 1.0" width=10 length=3000 lifetime=2 elements=50 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Flares/ThrusterFlare1" />
-    </EffectContainer>
-    <EffectContainer condition="boost">
-      <Backlight mainstate=activity active=false scale=3 name=bltest position=" 22, -10, 87" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
-      <Backlight mainstate=activity active=false scale=3 name=bltest position="-22, -10, 87" colour="1, 0.7, 0.1, 0.7" width=25 length=2000 lifetime=1 elements=30 trailmaterial="Trail/backlighttrail" turnontime=1 turnofftime=1 material="Examples/Flare" />
-    </EffectContainer>
-    <EffectContainer condition="brake">
-      <FadingBillboard mainstate=activity active=false scale=2 position=" 22, -10, 87" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=2 position="-22, -10, 87" colour="0.5, 0.0, 0.0, 0.3" material="Examples/Flare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=1 position="22, -10, 87" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
-      <FadingBillboard mainstate=activity active=false scale=1 position="-22, -10, 87" colour="1.0, 0.0, 0.0, 1.0" material="Flares/backlightflare" turnontime=0.5 turnofftime=0.5 />
-    </EffectContainer>
-  </MultiStateEngine>
-</Template>
Index: code/trunk/data/levels/testStars.oxw
===================================================================
--- code/trunk/data/levels/testStars.oxw	(revision 8531)
+++ code/trunk/data/levels/testStars.oxw	(revision 8706)
@@ -23,4 +23,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/testSwallow.oxw
===================================================================
--- code/trunk/data/levels/testSwallow.oxw	(revision 8531)
+++ code/trunk/data/levels/testSwallow.oxw	(revision 8706)
@@ -22,4 +22,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/tetris.oxw
===================================================================
--- code/trunk/data/levels/tetris.oxw	(revision 8706)
+++ code/trunk/data/levels/tetris.oxw	(revision 8706)
@@ -0,0 +1,62 @@
+<LevelInfo
+ name = "Tetris"
+ description = "Tetris in space!"
+ tags = ""
+/>
+
+<?lua
+  include("HUDTemplates3.oxo")
+  include("stats.oxo")
+  include("templates/lodInformation.oxt")
+?>
+
+<Template name=tetrisstonecameras defaults=0>
+  <TetrisStone>
+    <camerapositions>
+      <CameraPosition position="55,75,200" absolute=true />
+      <CameraPosition position="0,50,160" drag=true mouselook=true />
+      <CameraPosition position="0,50,0" pitch=-90 drag=true mouselook=true />
+    </camerapositions>
+  </TetrisStone>
+</Template>
+
+<Template name=tetrisstone>
+  <TetrisStone camerapositiontemplate=tetrisstonecameras>
+    <attached>
+      <Model position="0,0,0" mesh="crate.mesh" scale=1 />
+    </attached>
+  </TetrisStone>
+</Template>
+
+<Level
+ name         = "Presentation"
+ description  = "A simple testlevel"
+ gametype     = "Tetris"
+>
+  <templates>
+    <Template link=lodtemplate_default />
+  </templates>
+  <?lua include("includes/notifications.oxi") ?>
+
+  <Scene
+   ambientlight = "0.5, 0.5, 0.5"
+   skybox       = "Orxonox/skypanoramagen1"
+  >
+    <Light type=directional position="0,0,0" direction="0.253, 0.593, -0.765" diffuse="1.0, 0.9, 0.9, 1.0" specular="1.0, 0.9, 0.9, 1.0" />
+
+    <?lua
+      for i = 1, 10, 1 do
+    ?>
+      <SpawnPoint position="<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>,<?lua print(math.random() * 1000 - 500) ?>" lookat="0,0,0" />
+    <?lua end ?>
+
+    <TetrisCenterpoint name=tetriscenter width=11 height=15 stoneSize=10 stoneTemplate=tetrisstone stoneSpeed=10 position="-55,-75,0">
+        <attached>
+            <Model position="55,-1,0" mesh="cube.mesh" scale3D="57,1,11" />
+            <Model position="-1,76,0" mesh="cube.mesh" scale3D="1,76,1" />
+            <Model position="111,76,0" mesh="cube.mesh" scale3D="1,76,1" />
+        </attached>
+    </TetrisCenterpoint>
+
+  </Scene>
+</Level>
Index: code/trunk/data/levels/theTimeMachine.oxw
===================================================================
--- code/trunk/data/levels/theTimeMachine.oxw	(revision 8531)
+++ code/trunk/data/levels/theTimeMachine.oxw	(revision 8706)
@@ -68,4 +68,6 @@
         <Template link=lodtemplate_default />
     </templates>
+    <?lua include("includes/notifications.oxi") ?>
+    
     <Scene
         ambientlight="0.8,0.8,0.8"
Index: code/trunk/data/levels/tutorial.oxw
===================================================================
--- code/trunk/data/levels/tutorial.oxw	(revision 8531)
+++ code/trunk/data/levels/tutorial.oxw	(revision 8706)
@@ -19,4 +19,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/underAttack.oxw
===================================================================
--- code/trunk/data/levels/underAttack.oxw	(revision 8531)
+++ code/trunk/data/levels/underAttack.oxw	(revision 8706)
@@ -15,4 +15,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/levels/waypoints.oxw
===================================================================
--- code/trunk/data/levels/waypoints.oxw	(revision 8531)
+++ code/trunk/data/levels/waypoints.oxw	(revision 8706)
@@ -21,4 +21,5 @@
     <Template link=lodtemplate_default />
   </templates>
+  <?lua include("includes/notifications.oxi") ?>
 
   <Scene
Index: code/trunk/data/overlays/HUDTemplates3.oxo
===================================================================
--- code/trunk/data/overlays/HUDTemplates3.oxo	(revision 8531)
+++ code/trunk/data/overlays/HUDTemplates3.oxo	(revision 8706)
@@ -35,5 +35,5 @@
      background        = "Orxonox/HealthBarBackground"
      size              = "0.35, 0.0875"
-     position          = "0.0 , 0.95 "
+     position          = "0.0 , 0.9 "
      pickpoint         = "0, 1"
      bartexture        = "healthbar_bar.png"
@@ -56,5 +56,5 @@
      background    = "Orxonox/BarBackground"
      size          = "0.35, 0.05"
-     position      = "0.0 , 1.0 "
+     position      = "0.0 , 0.95 "
      pickpoint     = "0, 1"
      correctaspect = false
@@ -64,4 +64,17 @@
       <BarColour position = 1.0 colour = "0.7,0.2,0.2" />
     </HUDSpeedBar>
+
+    <HUDBoostBar
+     name          = "BoostBar1"
+     backgroundtex = "bar1.png"
+     size          = "0.35, 0.05"
+     position      = "0.0 , 1.0 "
+     pickpoint     = "0, 1"
+     correctaspect = false
+    >
+      <BarColour position = 0.0 colour = "0.7,0.2,0.2" />
+      <BarColour position = 0.5 colour = "0.7,0.7,0.2" />
+      <BarColour position = 1.0 colour = "0.2,0.7,0.2" />
+    </HUDBoostBar>
 
     <HUDNavigation
Index: code/trunk/data/overlays/debug.oxo
===================================================================
--- code/trunk/data/overlays/debug.oxo	(revision 8531)
+++ code/trunk/data/overlays/debug.oxo	(revision 8706)
@@ -84,12 +84,4 @@
     />
 
-    <GametypeStatus
-     name     = "state"
-     position = "0.5, 0.85"
-     font     = "VeraMono"
-     textsize = 0.05
-     colour   = "1.0, 1.0, 0.0, 0.8"
-     align    = "center"
-    />
   </OverlayGroup>
 </Template>
Index: code/trunk/data/particle/RingExp.particle
===================================================================
--- code/trunk/data/particle/RingExp.particle	(revision 8706)
+++ code/trunk/data/particle/RingExp.particle	(revision 8706)
@@ -0,0 +1,135 @@
+
+particle_system Orxonox/RingExp
+{
+	quota	500
+	material	PE/lensflare
+	particle_width	65
+	particle_height	40
+	cull_each	false
+	renderer	billboard
+	sorted	false
+	local_space	false
+	iteration_interval	0
+	nonvisible_update_timeout	0
+	billboard_type	oriented_self
+	billboard_origin	center
+	billboard_rotation_type	vertex
+	common_up_vector	0 1 0
+	point_rendering	false
+	accurate_facing	false
+
+	emitter Point
+	{
+		angle	55
+		colour	0.9 0.9 1 1
+		colour_range_start	0.9 0.9 1 1
+		colour_range_end	0.9 0.9 1 1
+		direction	-1 0 0
+		emission_rate	1250
+		position	0 0 0
+		velocity	65
+		velocity_min	65
+		velocity_max	65
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	emitter Point
+	{
+		angle	55
+		colour	0.9 0.9 1 1
+		colour_range_start	0.9 0.9 1 1
+		colour_range_end	0.9 0.9 1 1
+		direction	1 0 0
+		emission_rate	1250
+		position	0 0 0
+		velocity	65
+		velocity_min	65
+		velocity_max	65
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	emitter Point
+	{
+		angle	55
+		colour	0.9 0.9 1 1
+		colour_range_start	0.9 0.9 1 1
+		colour_range_end	0.9 0.9 1 1
+		direction	0 0 -1
+		emission_rate	1250
+		position	0 0 0
+		velocity	65
+		velocity_min	65
+		velocity_max	65
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	emitter Point
+	{
+		angle	55
+		colour	0.9 0.9 1 1
+		colour_range_start	0.9 0.9 1 1
+		colour_range_end	0.9 0.9 1 1
+		direction	0 0 1
+		emission_rate	1250
+		position	0 0 0
+		velocity	65
+		velocity_min	65
+		velocity_max	65
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 -2 0
+		plane_normal	0 1 0
+		bounce  1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 2 0
+		plane_normal	0 -1 0
+		bounce	1
+	}
+
+	affector ColourFader
+	{
+		red	-0.3
+		green	-0.3
+		blue	-0.3
+		alpha	-0.3
+	}
+
+}
Index: code/trunk/data/particle/RingExp2.particle
===================================================================
--- code/trunk/data/particle/RingExp2.particle	(revision 8706)
+++ code/trunk/data/particle/RingExp2.particle	(revision 8706)
@@ -0,0 +1,58 @@
+
+particle_system Orxonox/RingExp2
+{
+	quota	500
+	material	PE/ringflare
+	particle_width	35
+	particle_height	35
+	cull_each	false
+	renderer	billboard
+	sorted	false
+	local_space	false
+	iteration_interval	0
+	nonvisible_update_timeout	0
+	billboard_type	oriented_self
+	billboard_origin	center
+	billboard_rotation_type	vertex
+	common_up_vector	0 1 0
+	point_rendering	false
+	accurate_facing	false
+
+	emitter Point
+	{
+		angle	30
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 0.7 0.7 1
+		direction	0 1 0
+		emission_rate	1000
+		position	0 0 0
+		velocity	50
+		velocity_min	50
+		velocity_max	100
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.5
+		duration_min	0.5
+		duration_max	0.5
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	affector ColourFader
+	{
+		red	-0.3
+		green	-0.3
+		blue	-0.3
+		alpha	-0.3
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	5
+		scope	1.0
+		keep_velocity	true
+	}
+}
Index: code/trunk/data/particle/RingExp3.particle
===================================================================
--- code/trunk/data/particle/RingExp3.particle	(revision 8706)
+++ code/trunk/data/particle/RingExp3.particle	(revision 8706)
@@ -0,0 +1,58 @@
+
+particle_system Orxonox/RingExp3
+{
+	quota	500
+	material	PE/ringflare
+	particle_width	35
+	particle_height	35
+	cull_each	false
+	renderer	billboard
+	sorted	false
+	local_space	false
+	iteration_interval	0
+	nonvisible_update_timeout	0
+	billboard_type	oriented_self
+	billboard_origin	center
+	billboard_rotation_type	vertex
+	common_up_vector	0 1 0
+	point_rendering	false
+	accurate_facing	false
+
+	emitter Point
+	{
+		angle	30
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 0.7 0.7 1
+		direction	0 -1 0
+		emission_rate	1000
+		position	0 0 0
+		velocity	50
+		velocity_min	50
+		velocity_max	100
+		time_to_live	4
+		time_to_live_min	4
+		time_to_live_max	4
+		duration	0.5
+		duration_min	0.5
+		duration_max	0.5
+		repeat_delay	10
+		repeat_delay_min	10
+		repeat_delay_max	10
+	}
+
+	affector ColourFader
+	{
+		red	-0.3
+		green	-0.3
+		blue	-0.3
+		alpha	-0.3
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	5
+		scope	1.0
+		keep_velocity	true
+	}
+}
Index: code/trunk/data/particle/Shield.particle
===================================================================
--- code/trunk/data/particle/Shield.particle	(revision 8706)
+++ code/trunk/data/particle/Shield.particle	(revision 8706)
@@ -0,0 +1,49 @@
+
+particle_system Orxonox/Shield
+{
+	quota	2000
+	material	PE/lensflare
+	particle_width	25
+	particle_height	25
+	cull_each	false
+	renderer	billboard
+	sorted	false
+	local_space	true
+	iteration_interval	0
+	nonvisible_update_timeout	0
+	billboard_type	point
+	billboard_origin	center
+	billboard_rotation_type	texcoord
+	common_up_vector	0 1 0
+	point_rendering	false
+	accurate_facing	false
+
+	emitter HollowEllipsoid
+	{
+		angle	0
+		colour	0 0.298701 1 0.1
+		colour_range_start	0 0.298701 1 0.1
+		colour_range_end	0 0.298701 1 0.1
+		direction	0 1 0
+		emission_rate	2000
+		position	0 0 0
+		velocity	0
+		velocity_min	0
+		velocity_max	0
+		time_to_live	0.1
+		time_to_live_min	0.1
+		time_to_live_max	0.3
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.2
+		repeat_delay	1000000
+		repeat_delay_min	1000000
+		repeat_delay_max	1000000
+		width	100
+		height	100
+		depth	100
+		inner_width	0.999999
+		inner_height	0.999999
+		inner_depth	0.999999
+	}
+}
Index: code/trunk/data/particle/weaponflare.particle
===================================================================
--- code/trunk/data/particle/weaponflare.particle	(revision 8706)
+++ code/trunk/data/particle/weaponflare.particle	(revision 8706)
@@ -0,0 +1,46 @@
+
+particle_system Orxonox/weaponflare
+{
+	quota	10000
+	material	PE/lensflare
+	particle_width	4
+	particle_height	4
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter HollowEllipsoid
+	{
+		angle	0
+		colour	0.128 0.28 1 1
+		colour_range_start	0.128 0.28 1 1
+		colour_range_end	0.05 0.05 1 1
+		direction	0 0 0
+		emission_rate	130
+		position	0 0 0
+		velocity	-0.8
+		velocity_min	-0.8
+		velocity_max	-0.8
+		time_to_live	.000001
+		time_to_live_min	.000001
+		time_to_live_max	.000004
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	0.1
+		height	0.1
+		depth	0.1
+		inner_width	0.001
+		inner_height	0.001
+		inner_depth	0.001
+	}
+
+	affector LinearForce
+	{
+		force_vector	0 0 0
+		force_application	add
+	}
+}
Index: code/trunk/data/particle/weaponshoot.particle
===================================================================
--- code/trunk/data/particle/weaponshoot.particle	(revision 8706)
+++ code/trunk/data/particle/weaponshoot.particle	(revision 8706)
@@ -0,0 +1,57 @@
+
+particle_system Orxonox/weaponshoot
+{
+	quota	2000
+	material	PE/lensflare
+	particle_width	3
+	particle_height	3
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Point
+	{
+		angle	0.5
+		colour	0 0 0.8 1
+		colour_range_start	0 0 0.8 1
+		colour_range_end	0.1 0.1 0.9 1
+		direction	0 0 1
+		emission_rate	6
+		position	0 0 0
+		velocity	35
+		velocity_min	35
+		velocity_max	35
+		time_to_live	5
+		time_to_live_min	5
+		time_to_live_max	5
+		duration	1
+		duration_min	1
+		duration_max	1
+		repeat_delay	4
+		repeat_delay_min	4
+		repeat_delay_max	4
+	}
+
+	emitter Point
+	{
+		angle	90
+		colour	0 0 0.8 1
+		colour_range_start	0 0 0.8 1
+		colour_range_end	0.1 0.1 1 1
+		direction	0 0 -1
+		emission_rate	1500
+		position	0 0 0
+		velocity	15
+		velocity_min	15
+		velocity_max	15
+		time_to_live	0.005
+		time_to_live_min	0.005
+		time_to_live_max	0.0075
+		duration	0.75
+		duration_min	0.75
+		duration_max	0.75
+		repeat_delay	4.25
+		repeat_delay_min	4.25
+		repeat_delay_max	4.25
+	}
+}
