 | Creating planes for Micro Flight |  |
|
Micro Flight supports several types of vehicles, the following sections show the detailes of the various formats of
these vehicles and gives instructions for creating them.All of these vehicles have intrument panels which share the
same format and are documented in the following sections.
The
weapons in Micro Flight are located in the Micro
Flight\weapons directory, each weapon is
placed in a seperate directory and must be called weapon_## where
## is the number of
this weapon, inside this directory all the weapon
related files are found.The weapons are
assigned to a plane by a file called stores.cfg which is located
in the plane directory.
| The
structure of the stores.cfg file is as
follows: |
2
[weapons_num]
Missile [weapon_name]
3.0 [weapon_x]
0.4 [weapon_y]
0.0 [weapon_z]
Missile [weapon_name]
-3.0 [weapon_x]
0.4 [weapon_y]
0.0 [weapon_z]
|
Explanation:
|
This file has a fixed format, all
parameters must be specified in this
order.
weapons_num - number of weapons carried.
weapon_name - name of weapon.
weapon_x - the x position of weapon
relative to plane.
weapon_y - the y position of weapon
relative to plane.
weapon_z - the z position of weapon
relative to plane.
|
The weapon
configuration file weapon.cfg allows two types
of weapons:
- Ballistic
weapons such as guns and rockets.
- Guided
missiles, where guidance method is self
guidance.
Inside
each weapon directory are the following files:
 | Weapon.cfg |  |
|
This
file defines the type and characterisitcs of the
weapon.
| The
structure of the weapon.cfg file is as
follows: |
1
[explodes_in_water]
1 [fixed_rotation]
1 [fixed_elevation]
1 [weapon_guided]
15 [mass]
0.01 [cross_section]
5.0 [cd0]
1000.0 [thrust]
10.0 [burn_time]
10.0 [time_max]
25.0 [launch_vel]
0.0 [launch_x]
0.0 [launch_y]
0.0 [launch_z]
0.0 [beta_base]
0.0 [gama_base]
|
Explanation:
|
This file has a fixed format, all
parameters must be specified in this
order.
explodes_in_water - 1 if weapon is shell,
rocket or missile, 0 for torpedo.
fixed_rotation - 1 if weapon can be aimed
in rotation, 0 if rotation is fixed.
fixed_elevation - 1 if can be aimed in
elevation, 0 if elevation is fixed.
weapon_guided - 1 if weapon is guided, 0
if it is not.
mass - mass of shell itself in kg.
cross_section - cross section of shell in
square meters.
cd0 - drag coefficient of shell.
thrust - thrust of rocket or torpedo
propeller in newtons.
burn_time - the time of burnout or end of
motor activation in seconds.
time_max - the maximal time the shell is
allowed to fly in seconds.
lauch_velocity - muzzle velocity of shell
in m/sec.
lauch_x - the initial x position of shell
relative to weapon's base.
lauch_y - the initial y position of shell
relative to weapon's base.
lauch_z - the initial z position of shell
relative to weapon's base.
beta_base- the initial direction of
turret in radians.
gama_base - the initial elevation of
barrel in radians.
|
 | Base.x, Turret.x, File.x, Tail.x, Shell.x |  |
|
These
are the model files which compose the weapon's
base, turret, barrel, shell and fire effects.
All of these files are optional and may be
ommited for weapons without a barrel, turret or
base.
The
functions of these files are:
Base - This part
defines the fixed part of the weapon, for example
the base of a cannon.
Turret - This part is
part which is attached to base and rotates to
allow aiming of weapon in azimuth, this part is
positioned at (0,0) coordinate the base part.
Barrel - This part is the
part which is attached to the turret and allows
aiming the weapon in elevation, this part is
positioned at (0,0) coordinate of the turret
part.
Fire - This part is the
flame or smoke ejected from the weapon at the
moment of launch, it is seen for a fraction of a
second and is scaled in the process to simulate
the effect of fire, this part is positioned at
(0,0) coordinate of the barrel.
Tail - This part is the
flame or smoke ejected from the shell in flight,
it is seen only when the shell is in flight, and
is attached to the shell, it is positioned at the
(0,0) coordinate of the shell.
This
figure illustrates the various parts shortly
after the shell has been fired.

All
of these files are simple one frame hirarchy
mesh files, they can be created by
converting a 3DS file into an X file by using the
command "conv3ds -m
[filename.3ds]" , conv3ds.exe is
a small freeware converter written by Microsoft.
Download
source files and conv3ds
 | Fire.wav, Flight.wav, Explode.wav |  |
|
These
are the sounds which accompany the weapon during
firing, flight and explosion.
They are optional and may be used to override the
default sounds which are at the Micro Flight\sounds
directory.
These wav files should be 8
bit mono files, preferably 11 or 22 khz.
 | Bmp Files |  |
|
All texture files are simple
bmp files that define the textures of the weapon,
they must be 256x256 or 128x128 or 64x64 or
32x32
bmp images.
|