TuxFleet    to Index


Editing Missions:


TuxFleet has been designed so it's possible for the end-user to easily edit existing missions or create new ones bu simply editing the files mission/*.skirmish with your favorite texteditor.
 

Explanation of Mission Files:


The Syntax is based on a line-per-line basis, each 'command' or entry has to be in a seperate line.
If a line starts with '#", it's defined as commented out.

First, you have to tell the engine which Flightgroups of spaceships is in this mission at startup time:

flightgroup-description    =    <model-name>    <position>    <side>    <group>    <nr-of-waves>    <nr-of-ships>    <ki-name>
(see syntax below)

A Flightgroup is a set of ships of the same Model, Side, Groupname and KI.
A Model is the description of the spaceship as it comes out of the factory. Valid Model names are all strings that have files like
model/*.model as description to load
A Side is the side of the spaceships they fight for. It's a string containing the side-name, i.e. TuxFleet, FSF, Empire, Rebellion
Special Side name is neutral, meaning that it is no emeny for anyone. Same Side means they're friends, different Side - they're enemies.
A Groupname is the name of the group the ship is in. Examples are alpha,beta,herring,maccarel,gold,blue
If there are more than one ship per waves / number of waves, each ship of this flightgroup gets a number appended to its name.
 

Example for a Flightgroup-Description:


axe-wing        0.0    0.0    0.0        TuxFleet        herring        2    4        attacker3
shark                1.0    3.0    2.0        Empire          alpha           2    3        attacker3

This means:

Two Flightgroups get created, one flying on the side of TuxFleet, callsign/groupname herring, it's a group of axe-wings, with the KI attacker3 at virtual joystick and 4 ships in this wave and 2 waves at all. The 4 ships will get called 'herring-0', 'herring-1', etc.
Their position to appear is in the center of the scene.

The other Flightgroup are sharks, fighting for the Empire, callsign alpha, and they are located somewhere 1km right, 3km before and 2km up the center of the scene.

Both Flightgroups are enemies, because they have different Side strings

If you've defined all Flightgroups available at startup, now you have to define the Triggers and Events that control the flow
of the game.
 

Trigger/Event Description:

A Trigger is a check that is done on the game engine. If the check gets true, the Trigger is triggered - meaning, a variable with the trigger-name is set, so that Events can detect the triggering of their Trigger.

An Event is an action that takes place when the Trigger with the same name gets triggered.

With usage of this Trigger/Event Syntax, I think it is possible to write fairly complex missions with lots of things happening.
Triggers and Events are easily expandable for programmers by simply extending class Trigger of Event to your personal favors.
 

Description of Event/Trigger Syntax:

trigger    <trigger-name>    near           <fg1>    <fg2>    <num>    <distance>

    checks, if at least <num> ships of <fg1> are in range of <distance> to <fg2>

trigger    <trigger-name>    targeted    <fg1>     <fg2>    <num>

    checks, if at least <num> ships of <fg2> are targeted by <fg1>

trigger    <trigger-name>    alive          <fg1>     <num>

    checks, if at least <num> ships of <fg1> are still alive

trigger    <trigger-name>    shields        <fg1>    <shield_strength>    <num>

    checks, if at least <num> ships of <fg1> have still <shield_strength> left

trigger    <trigger-name>    time        <trigger-name>    <time>

    checks, if it's <time> seconds since triggering of <trigger-name>

trigger    <trigger-name>    and            <trigger1-name>    <trigger2-name>

    checks, if <trigger1-name> and <trigger2-name> got triggered

trigger    <trigger-name>    or              <trigger1-name>    <trigger2-name>

    checks, if <trigger1-name> or <trigger2-name> got triggered

trigger    <trigger-name>    before        <trigger1-name>    <trigger2-name>

    checks, if <trigger1-name> got triggered before <trigger2-name> got triggered

event      <trigger-name>    <delay>    wave             <flightgroup-description>

    adds a new Flightgroup to the scene

event      <trigger-name>    <delay>    hyperspace    <fg1>

    sends <fg1> into hyperspace

event      <trigger-name>    <delay>    say                <fg1>    <fg2>    <what>

    lets <fg1> say <what> to <fg2>

event      <trigger-name>    <delay>    settarget        <fg1>    <fg2>

    sets the target of <fg1> to a member of <fg2>

General Syntax:


trigger    <trigger-name>    near           <fg1>    <fg2>    <num>    <distance>
trigger    <trigger-name>    targeted    <fg1>     <fg2>    <num>
trigger    <trigger-name>    alive          <fg1>     <num>
trigger    <trigger-name>    shields        <fg1>    <shield_strength>    <num>
trigger    <trigger-name>    time        <trigger-name>    <time>
trigger    <trigger-name>    and            <trigger1-name>    <trigger2-name>
trigger    <trigger-name>    or              <trigger1-name>    <trigger2-name>
trigger    <trigger-name>    before        <trigger1-name>    <trigger2-name>
event      <trigger-name>    <delay>    wave             <flightgroup-description>
event      <trigger-name>    <delay>    hyperspace    <fg1>
event      <trigger-name>    <delay>    say                <fg1>    <fg2>    <what>
event      <trigger-name>    <delay>    settarget        <fg1>    <fg1>

flightgroup-description    =    <model-name>    <position>    <side>    <group>    <nr-of-waves>    <nr-of-ships>    <ki-name>

model-name    =    string
position        =    position-x    position-y    position-z
position-*    =    float
side        =    string
group    =    string
nr-of-waves    =    int
nr-of-ships    =    int
ki-name    =    string

fg1,fg2    =    string
num        =    int
distance    =    float
shield_strength    =    float
time                     =    float
delay        =    float
what        =    string
trigger-name,trigger1-name,trigger2-name    =    string
 


see also:    Startup Gui