Targetware: Flight Model Development


Targetware ACM File Guide

PART REFERENCE: Gun

group = guns in the same group fire together.  Different groups can be selected separately.
max_ammo = number of rounds

    If the gun file is a separate .acm file, it should contain the following entries:

size = width, length, height (dimensions of damage box for the gun)
ammo_mass = mass of the belted ammo in grams
mass = mass of the gun in kilograms
rof = rate of fire in rounds per minute
diameter = diameter of the round in millimeters
duration = time in seconds that the simulation tracks the round
blast_time = time in seconds that you want the muzzle blast animation to last. Used only if modeler uses link #304 in the anm file for the plane, ship, or weapon.
num_types = number of different types of ammo

    The different types of ammo are as follows:

BALL: simple lead slug
AP: armor piercing
HE: high explosive
I: incendiary
T: tracer
APHE: armor piercing high explosive
API: armor piercing incendiary
APT: armor piercing tracer
APHEI: armor piercing high explosive incendiary
APHET: armor piercing high explosive tracer
APIT: armor piercing incendiary tracer
APHEIT: armor piercing high explosive incendiary tracer
HEI: high explosive incendiary
HET: high explosive tracer
HEIT: high explosive incendiary tracer
IT: incendiary tracer

    For each type of ammo, depending on the num_types entry, you will also need to specify the mass, muzzle velocity, fuse type, and hit particle the round should use.  Note that if you do not define fuse type, it defaults to impact type fuses, which is what aircraft cannons should be using. Also, fusing settings are ignored for any round that isn't HE, HEI, HET, HEIT, or APHE. For example, say you specified num_types = 1, you would define that type as follows:

type_1 = one of the above listed types
mass_1 = mass of the round in grams
muzzle_v_1 = velocity in meters per second
fuse_1 = Type of fuse, either 'time' or 'prox' (for proximity fuses)
hit_par_1 = Link to a particle effect that will be called when/if the round strikes an object or explodes

    If more than one type is needed, just keep adding them, changing type_1 to type_2 and so on down the line.  Finally, the order of the rounds in the belt and the sound of the gun are listed.  The belt can have any number of rounds of any type and any combination of types as long as they're separated by a comma.

belt = any number of rounds of the supported type with multiple types separated by a comma

Sound can be assigned to the gun's firing, as below:

sound = path to gun sound effect file
use_looping_sound = 0/1 If 0, the sound clip specified above will play once per round fired. If 1, the sound above will loop whenever the trigger is held down. Defaults to 1. 

Note that looping sounds should be used by all fast-firing guns, or sound anomalies will occur. Non-looping sounds are appropriate for slow-firing guns such as the 75mm gun in a B-25H. For looping sounds, the length of the sound clip must match the time required for a single round to be fired. To determine the correct length for your sound clip, take the Rate of Fire, and divide 60 by it. For example, if the ROF is 600 rounds per minute, your sound clip should be 60 / 600 = 0.1 seconds.

Sample Code

Here is a sample gun file from Target Rabaul, a 20mm Hispano cannon, all ready to be used as an include in any aircraft that uses US 20mm guns:

type = gun
valid_targets = air, personnel, soft ground, soft sea, submarine
size = 0.2, 1.0, 0.2

ammo_mass = 348
mass = 59
rof = 600
diameter = 20
duration = 2
num_types = 10

type_1 = BALL
mass_1 = 132
muzzle_v_1 = 890
hit_par_1 = /tr/particles/guns/20mm_nonhe.par

type_2 = T
mass_2 = 132
muzzle_v_2 = 890
hit_par_2 = /tr/particles/guns/20mm_nonhe.par

type_3 = I
mass_3 = 132
muzzle_v_3 = 890
hit_par_3 = /tr/particles/guns/20mm_nonhe.par

type_4 = IT
mass_4 = 132
muzzle_v_4 = 890
hit_par_4 = /tr/particles/guns/20mm_nonhe.par

type_5 = AP
mass_5 = 132
muzzle_v_5 = 890
hit_par_5 = /tr/particles/guns/20mm_nonhe.par

type_6 = API
mass_6 = 132
muzzle_v_6 = 890
hit_par_6 = /tr/particles/guns/20mm_nonhe.par

type_7 = APHE
mass_7 = 132
muzzle_v_7 = 890
hit_par_7 = /tr/particles/guns/20mm_he.par

type_8 = HEI
mass_8 = 132
muzzle_v_8 = 890
hit_par_8 = /tr/particles/guns/20mm_he.par

type_9 = HEIT
mass_9 = 132
muzzle_v_9 = 890
hit_par_9 = /tr/particles/guns/20mm_he.par

type_10 = HE
mass_10 = 132
muzzle_v_10 = 890
hit_par_10 = /tr/particles/guns/20mm_he.par

belt = 2 HE, 2 HEIT, 1 API

sound = /tr/sounds/guns/us_20mm_hispano_m2.wav