Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/campaignHS15/data/levels/expeditionSector.oxw @ 10854

Last change on this file since 10854 was 10839, checked in by bhatiab, 9 years ago

Worked on the Prologue

File size: 12.1 KB
Line 
1<!--TODO: Rename screenshot as soon as it is in data_extern branch -->
2<LevelInfo
3    name = "Expedition to Sector 5C"
4    description = "Commander, our scientists are reporting strange binary radio signals from a yet unexplored and thought to be uninhabited region, sector 5C. Explore the sector and get to the bottom of these messages!"
5    tags = "mission"
6    screenshot = "missionOne.png"
7/>
8
9<?lua
10    include("stats.oxo")
11    include("HUDTemplates3.oxo")
12    include("templates/lodInformation.oxt")
13
14    include("templates/spaceshipAssff.oxt")
15    include("templates/spaceshipPirate.oxt")
16    include("templates/spaceshipEscort.oxt")
17    include("templates/spaceshipShuttle.oxt")
18    include("templates/FPS.oxt")
19    include("templates/pickupRepresentationTemplates.oxt")
20?>
21
22<Level gametype = "Mission">
23    <templates>
24        <Template link="lodtemplate_default" />
25    </templates>
26
27    <?lua include("includes/notifications.oxi") ?>
28
29    <NotificationQueueCEGUI
30        name="narrative"
31        targets="simpleNotification"
32        size=3
33        displayTime=3.9
34        position="0.15, 0, 0.1, 0"
35        fontSize="15"
36        fontColor="0.3, 1, 0.2, 0.8"
37        alignment="HorzCentred"
38        displaySize="0.7, 0, 0, 0"
39    />
40
41    <!-- GLOBAL LUA VARIABLES -->
42    <?lua
43
44        --[[ Coordinates in (y,z,x). NOTE: Indexing starts at 1 in lua! Don´t forget to adapt the for loops, too! ]]--
45        cCenter = {0, 0, 0}
46        cSpawn = {-50, 0, 0}
47
48        cStationA = {1400, 400, -800}   
49        cNewShip = {1000, 250, -350}
50
51        cPlanet1 = {-9000, -8000, 14000}
52        cPlanet2 = {12000, -1500, -10000}
53
54        cEnemyBasePlanet = {-20000, -5500, -8000}
55
56        cField1 = {-5000, -4000, -3000}
57        cField2 = {4000, 2000, 4500}
58
59        --[[ Function to print Coordinates. Quotes not included! ]]--
60        function printC(coord)
61          print(coord[1] .. [[,]] .. coord[2] .. [[,]] .. coord[3])
62        end
63    ?>
64
65    <Scene
66        ambientlight = "0.8, 0.8, 0.8"
67        skybox = "Orxonox/skyBoxMoreNebula"
68        hasPhysics = true
69    >
70
71    <SpawnPoint name="playerSpawn" team=0 position="<?lua printC(cSpawn) ?>" lookat="<?lua printC(cCenter) ?>" spawnclass=SpaceShip pawndesign=spaceshipescort />
72
73    <WorldAmbientSound source="Earth.ogg" looping="true" playOnLoad="true" />
74
75    <Light type=directional position="<?lua printC(cCenter) ?>" 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"/>
76
77    <!--QUEST DEFINITIONS-->
78
79    <GlobalQuest id="quest1">
80        <QuestDescription title="Quest 1" description="We received some extraterrestial binary radio signals from Sector 5C! We'd like yout to take the portal and fly over there to check out if life can be found there as we believed to be an inhabitated region in space." failMessage="" completeMessage="" />
81        <hints>
82        </hints>
83        <complete-effects>
84            <AddQuest questId="quest2" />
85        </complete-effects>
86    </GlobalQuest>
87
88    <!--EVENTS AND TRIGGERS
89        Usable events and triggers:
90        spawntrigger
91    -->
92
93    <EventMultiTrigger name="spawntrigger">
94        <events>
95            <trigger>
96                <EventListener event="playerSpawn" />
97            </trigger>
98        </events>
99    </EventMultiTrigger>
100
101    <!--TODO: Complete the DistanceTriggers for completing/succeeding correctly! -->
102
103    <DistanceTrigger active=false name="missionComplete" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
104        <events>
105            <activity>
106                <EventListener event="missionCompletePrereq" />
107            </activity>
108        </events>
109    </DistanceTrigger>
110
111    <Script code="Mission endMission true" onLoad="false">
112        <events>
113            <trigger>
114                <EventListener event="missionComplete" />
115            </trigger>
116        </events>
117    </Script>
118
119    <DistanceTrigger active=false name="missionFailed" position="2000,0,0" distance=100 target="SpaceShip" stayactive=true>
120        <events>
121            <activity>
122                <EventListener event="missionFailedPrereq" />
123            </activity>
124        </events>
125    </DistanceTrigger>
126
127    <Script code="Mission endMission fail" onLoad="false">
128        <events>
129            <trigger>
130                <EventListener event="failMission" />
131            </trigger>
132        </events>
133    </Script>
134
135    <!--QUEST EFFECT BEACONS -->
136
137    <QuestEffectBeacon times=1>
138        <effects>
139            <AddQuest questId="quest1" />
140        </effects>
141        <events>
142            <execute>
143                <EventListener event="spawntrigger" />
144            </execute>
145        </events>
146    </QuestEffectBeacon>
147
148    <!--NOTIFICATIONS -->
149
150    <SimpleNotification broadcast="true" message="Welcome, Commander.">
151        <events>
152            <trigger>
153                <EventTrigger stayactive="true" delay=4 >
154                   <events>
155                      <trigger>
156                         <EventListener event="spawntrigger" />
157                      </trigger>
158                   </events>
159                </EventTrigger>
160            </trigger>
161        </events>
162    </SimpleNotification>
163
164    <SimpleNotification broadcast="true" message="Please check your quests!">
165        <events>
166            <trigger>
167                <EventTrigger stayactive="true" delay=7 >
168                   <events>
169                      <trigger>
170                         <EventListener event="spawntrigger" />
171                      </trigger>
172                   </events>
173                </EventTrigger>
174            </trigger>
175        </events>
176    </SimpleNotification>
177
178    <!--STATIONS -->
179
180    <Template name="station">
181        <Pawn mass=10000000 collisionType=dynamic friction=0.01>
182            <attached>
183                <Model mesh="HydroHarvester.mesh" position="0,0,0" scale=50 />
184                <DistanceTriggerBeacon name="NPC" />
185            </attached>
186            <collisionShapes>
187                <BoxCollisionShape  position="-560,0,0" halfExtents="115,100,245" /><!-- Three lower boxes -->
188                <BoxCollisionShape  position="290,0,-480" halfExtents="115,100,245" yaw=-120 />
189                <BoxCollisionShape  position="290,0,480" halfExtents="115,100,245" yaw=-240 />
190                <BoxCollisionShape  position="-280,0,0" halfExtents="163,50,50" /><!-- Three lower connections -->
191                <BoxCollisionShape  position="140,0,-240" halfExtents="163,50,50" yaw=-120 />
192                <BoxCollisionShape  position="140,0,240" halfExtents="163,50,50" yaw=-240 />
193                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" /><!-- Upper Tower -->
194                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-120 />
195                <BoxCollisionShape  position="0,530,0" halfExtents="172,52,298" yaw=-240 />
196                <BoxCollisionShape  position="0,400,0" halfExtents="43,110,26" yaw=-30 /><!-- Middle one-->
197                <BoxCollisionShape  position="-200,100,0" halfExtents="26,50,43" /><!--Three lower legs -->
198                <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=-30 />
199                <BoxCollisionShape  position="100,100,-173" halfExtents="43,50,26" yaw=30 />
200                <BoxCollisionShape  position="-100,264,0" halfExtents="26,105,43" roll=-49 /><!--Three upper legs -->
201                <BoxCollisionShape  position="50,264,-87" halfExtents="26,105,43" roll=-49 yaw=-120 />
202                <BoxCollisionShape  position="50,264,87" halfExtents="26,105,43" roll=-49 yaw=-240 />
203            </collisionShapes>
204        </Pawn>
205    </Template>
206
207    <Pawn name="statA" team=0 radarname="Outer Base - Sector 4B" position="<?lua printC(cStationA) ?>" direction="<?lua printC(cSpawn) ?>" yaw=45 pitch=-5 roll=-25 initialhealth=10000 maxhealth=10000 >
208        <templates>
209            <Template link="station" />
210        </templates>
211        <attached>
212            <DockingTarget name="dockTargetA" />
213            <Dock position="0,0,0" active=true>
214                <animations>
215                    <MoveToDockingTarget target="dockTargetA" />
216                </animations>
217                <effects>
218                    <DockToShip target="newSpaceShip" />
219                </effects>
220                <events>
221                    <execute>
222                        <EventListener event="dockA" />
223                    </execute>
224                </events>
225            </Dock>
226        </attached>
227    </Pawn>
228
229    <!-- New SpaceShip as destination of dock A-->
230    <SpaceShip
231            template            = "spaceshipassff"
232            team                = "0"
233            position            = "<?lua printC(cNewShip) ?>"
234            lookat              = "0, 0, 0"
235            health              = "400"
236            initialhealth       = "400"
237            maxhealth           = "1500"
238            shieldhealth        = "80"
239            initialshieldhealth = "80"
240            maxshieldhealth     = "120"
241            shieldabsorption    = "0.8"
242            reloadrate          = "1"
243            reloadwaittime      = "1"
244            name                = "newSpaceShip"
245            radarname           = "ScoutShip" >
246        <attached>
247            <DockingTarget name="newSpaceShip" />
248            <DistanceTriggerBeacon name="newSpaceShip" />
249        </attached>
250    </SpaceShip>
251
252    <!--ELEMENTS -->
253
254    <!-- Asteroids you have to fly through to get to the EnemyBase -->
255   
256    <?lua
257        dofile("includes/asteroidField.lua")
258       asteroidField(cField1[1], cField1[2], cField1[3], 20, 30, 4500, 500, 0)
259    ?>   
260
261    <!-- Other Asteroid-Fields -->
262
263    <?lua
264        dofile("includes/asteroidField.lua")
265       asteroidField(cField2[1], cField2[2], cField2[3], 20, 30, 4500, 500, 0)
266    ?>
267
268    <!-- Planets -->
269
270   <Planet
271        position="<?lua printC(cPlanet1) ?>"
272        scale="3000"
273        collisionType="dynamic"
274        linearDamping="0.8"
275        angularDamping="0"
276        mass="5000000"
277        pitch="0"
278        mesh="planets/muunilinst.mesh"
279        atmosphere="atmosphere1"
280        rotationaxis="1,0,0"
281        rotationrate="1.0"
282        atmospheresize="80.0f"
283        imagesize="1024.0f"
284        collisiondamage = 2
285        enablecollisiondamage = true
286        visible=true
287        active=true
288      >
289      <attached>
290        <ForceField position="0,0,0" mode="sphere" diameter="6000" velocity="-500" />
291        </attached>
292          <collisionShapes>
293            <SphereCollisionShape radius="3000" position="0,0,0" />
294      </collisionShapes>
295    </Planet>
296
297    <?lua
298        dofile("includes/asteroidField.lua")
299        asteroidBelt(cPlanet1[1], cPlanet1[2], cPlanet1[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
300    ?>
301
302    <Planet
303        position="<?lua printC(cPlanet2) ?>"
304        scale="2000"
305        collisionType="dynamic"
306        linearDamping="0.8"
307        angularDamping="0"
308        mass="5000000"
309        pitch="0"
310        mesh="planets/ganymede.mesh"
311        atmosphere="atmosphere1"
312        rotationaxis="1,0,0"
313        rotationrate="1.0"
314        atmospheresize="80.0f"
315        imagesize="1024.0f"
316        collisiondamage = 2
317        enablecollisiondamage = true
318        visible=true
319        active=true
320      >
321      <attached>
322        <ForceField position="0,0,0" mode="sphere" diameter="4000" velocity="-500" />
323        </attached>
324          <collisionShapes>
325            <SphereCollisionShape radius="2000" position="0,0,0" />
326      </collisionShapes>
327    </Planet>
328
329    <?lua
330        dofile("includes/asteroidField.lua")
331        asteroidBelt(cPlanet2[1], cPlanet2[2], cPlanet2[3], 30, 20, 100, 20, 40, 3400, 3700, 400, 1)
332    ?>
333
334    <!-- EnemyPlanet(s) -->
335
336    <Planet
337        position="<?lua printC(cEnemyBasePlanet) ?>"
338        scale="5000"
339        collisionType="dynamic"
340        linearDamping="0.8"
341        angularDamping="0"
342        mass="5000000"
343        pitch="0"
344        mesh="planets/jupiter.mesh"
345        atmosphere="atmosphere1"
346        rotationaxis="1,0,0"
347        rotationrate="1.0"
348        atmospheresize="80.0f"
349        imagesize="1024.0f"
350        collisiondamage = 2
351        enablecollisiondamage = true
352        visible=true
353        active=true
354      >
355      <attached>
356        <ForceField position="0,0,0" mode="sphere" diameter="10000" velocity="-500" />
357        </attached>
358          <collisionShapes>
359            <SphereCollisionShape radius="5000" position="0,0,0" />
360      </collisionShapes>
361    </Planet>
362
363    </Scene>
364</Level>
Note: See TracBrowser for help on using the repository browser.