Members | Sign In
All Forums > Mission Scripting
avatar

Mission - The Cody Asher Marooned

posted May 15, 2011 10:32:25 by David
Here's a mission I've come up with for my crew. Based, of course, on a certain training excercise at a hypothetical space corps academy.

It's simple, but designed to be annoying. I don't know how else to post a complete mission on this forum, so I'm just going to copy and paste the text in here, and if anyone wants to play it, they can copy and paste it into their own .xml file.
I'm not a programmer - at least not since my Commondore 64 days - so most of this is stolen from the other missions.



<!-- mission_data is the big wrapper for all the parts of a mission -->
<mission_data version="1.31">

<!-- ******************************************************************************************** -->
<!-- all the things that exist at the start of the mission -->
<start>
<create type ="station" x="50000" y="0" z="20000" name="Far Port"/>
<create type ="station" x="90000" y="0" z="0" name="DS182"/>
<create type ="station" x="1000" y="0" z="1000" name="DS183"/>
<create type ="station" x="0" y="0" z="90000" name="DS185"/>
<create type ="player" x="50100" y="0" z="20300" name="Artemis" angle="180"/>
<create type ="neutral" x="67500" y="0" z="52500" name="Cody Asher" angle="60"/>
<set_object_property name="Cody Asher" property="willAcceptCommsOrders" value="0" />
<direct name="Cody Asher" targetName="Far Port"/>


<create type ="nebulas" count="20" startX="60000" startY="0" startZ="60000" radius ="5000" startAngle="0" endAngle="360" randomRange="2000" randomSeed="2"/>

<create type ="nebulas" count="20" startX="80000" startY="0" startZ="40000" radius ="6000" startAngle="0" endAngle="360" randomRange="3000" randomSeed="3"/>

<create type ="nebulas" count="20" startX="30000" startY="0" startZ="50000" radius ="5000" startAngle="0" endAngle="360" randomRange="4000" randomSeed="4"/>

<create type ="asteroids" count="30" startX="70000" startY="0" startZ="80000" radius ="50000" startAngle="0" endAngle="40" randomRange="1000" randomSeed="6"/>

<create type ="mines" count="30" startX="70000" startY="0" startZ="10000" endX="70000" endY="0" endZ="30000"/>

<create type ="mines" count="30" startX="70500" startY="0" startZ="10000" endX="70500" endY="0" endZ="30000"/>


<big_message title="The Cody Asher: Marooned" subtitle1="written by David Grounds"/>

<set_timer name="start_timer" seconds="10"/>

<log text="Starting\n\n"/>

</start>

<!-- ******************************************************************************************** -->

<event>
<if_variable name="briefing" comparator="!=" value="1"/>
<if_timer_finished name="start_timer"/>

<incoming_comms_text from="Cody Asher">
MAYDAY! MAYDAY! This is the Cody Asher.^
We have a leak in our Reactor Coolant System.^
Life support is failing. Any vessel in range, help us!^
</incoming_comms_text>
<set_timer name="pause_timer" seconds="5"/>
<set_variable name="briefing" value="1"/>
</event>

<event>
<if_variable name="briefing2" comparator="!=" value="1"/>
<if_timer_finished name="pause_timer"/>

<incoming_comms_text from="Cody Asher">
MAYDAY! Artemis, can you hear us? Respond, over!^
</incoming_comms_text>
<set_variable name="briefing2" value="1"/>
</event>



<!-- ******************************************************************************************** -->
<!-- inhibit warp around the Cody Asher Marooned -->
<event>
<if_inside_sphere name="Artemis" centerX="65000" centerY="0" centerZ="50000" radius ="4000"/>
<if_variable name="offline" comparator="!=" value="1"/>
<set_object_property name="Artemis" property="systemDamageWarp" value="50" />
<set_variable name="offline" value="1"/>
<incoming_comms_text from="ENGINEERING">
Sir! Our Warp Engines are Offline!^
</incoming_comms_text>

</event>

<!-- ******************************************************************************************** -->

<!-- enemies in ambush near the Cody Asher Marooned -->

<event>
<if_variable name="attack1" comparator="!=" value="1"/>
<if_inside_sphere name="Artemis" centerX="65000" centerY="0" centerZ="50000" radius ="3500"/>

<create type ="enemy" hulltype="10" x="63000" y="0" z="51000" angle="0" name="KR01" fleetnumber="1"/>
<create type ="enemy" hulltype="10" x="63000" y="0" z="52500" angle="0" name="KR02" fleetnumber="1"/>
<create type ="enemy" hulltype="11" x="63000" y="0" z="52000" angle="0" name="KR03" fleetnumber="1"/>

<log text="Fleet 1 Created\n\n"/>

<set_variable name="attack1" value="1"/>
</event>


<!-- ******************************************************************************************** -->




<!-- ******************************************************************************************** -->

<!-- handle the heckling of the Artemis for walking into a trap!-->

<event>
<if_variable name="heckle" comparator="!=" value="1"/>
<if_variable name="attack1" comparator="=" value="1"/>

<incoming_comms_text from="ALIEN SWINE">
FOOLISH HUMANS! YOUR COMPASSION FOR YOUR FELLOWS HAS DOOMED YOU ALL!^
DOOMED!^
NOW YOU DIE!^
</incoming_comms_text>

<set_variable name="heckle" value="1"/>
</event>

<event>
<if_variable name="attack1" comparator="=" value="1"/>
<if_variable name="attack2" comparator="!=" value="1"/>
<if_fleet_count fleetnumber="1" comparator="<=" value="0"/>
<create type ="enemy" hulltype="11" x="65000" y="0" z="51000" angle="90" name="KR04" fleetnumber="2"/>
<create type ="enemy" hulltype="10" x="65000" y="0" z="52500" angle="90" name="KR05" fleetnumber="2"/>
<create type ="enemy" hulltype="12" x="65000" y="0" z="52000" angle="90" name="KR06" fleetnumber="2"/>
<create type ="enemy" hulltype="10" x="60000" y="0" z="52500" angle="90" name="KR07" fleetnumber="2"/>
<create type ="enemy" hulltype="12" x="60000" y="0" z="52000" angle="90" name="KR08" fleetnumber="2"/>

<log text="Fleet 2 created\n\n"/>

<set_variable name="attack2" value="1"/>
</event>

<event>
<if_variable name="missionComplete" comparator="!=" value="1"/>
<if_variable name="attack2" comparator="=" value="1"/>
<if_fleet_count fleetnumber="2" comparator="<" value="1"/>
<set_variable name="missionComplete" value="1"/>
</event>



<event>
<if_variable name="missionComplete" comparator="=" value="1"/>
<end_mission/>

</event>

<!-- ******************************************************************************************** -->
</mission_data>
[Last edited May 15, 2011 10:38:27]
Login below to reply: