Weapon TDF Information

Last updated: 09/29/98 19:33

Wow, I thought this was going to be a pretty short section until I compiled the list of weapon variables!

In the following

[Hellfire_LASER]
    {
    ID=243;
    name=High Energy Laser;
    rendertype=0;
    lineofsight=1;
    turret=1;
    range=460;
    reloadtime=.865;
    weaponvelocity=400;
    areaofeffect=15;
    duration=.2;
    soundstart=ion;
    soundhit=Laser2;
    firestarter=100;
    beamweapon=1;
    color=165; /*Pink & Dark Pink*/
    color2=225;
    tolerance=8000;
    explosiongaf=hellfirelaser;
    explosionart=pinkboom1;
    waterexplosiongaf=fx;
    waterexplosionart=h2oboom1;
    lavaexplosiongaf=fx;
    lavaexplosionart=lavasplashsm;
    startsmoke=1;
    [DAMAGE]
        {
        default=130;
        }
    }

From the default weapons.tdf file included with Total Annihilation comes the following statements:

"A weapon must fit into one of these basic categories:"

  1. Ballistic
    Weapon is fired according to a ballistic path using gravity
  2. Lineofsight
    Weapon is fired in a straight line, gravity does not effect path
  3. Dropped
    Weapon is dropped in order to use it, typically a bomb but could be a chemical
Variable Description Examples
[DAMAGE] A section within the weapon description itself, it contains two parts:
  • A default value, which defines how much damage the weapon does to an enemy unit by default.
  • A list of specific values (on a per-unit basis) that defines how much damage is done by the weapon to a particular unit. (Units such as the "ARM Shooter" use this feature to enable it to inflict extra damage on Cans, Sumos, and Krogoths, and less damage to a Commander).
[DAMAGE]
    {
    default=1230;
    corkrog=2460;
    armcom=615;
    corcom=820;
    corcan=2810;
    corsumo=5000;
    }
accuracy How accurate is this weapon? Lower values are more accurate. I believe it has a maximum of about 32768 (?). Most weapons don't have it set, and I presume it defaults to 0. accuracy=500;
aimrate How fast (on average) the weapon aims, (0-32768)/sec. This is only used in UnitViewer and is only set for long range artillery, so it is probably not needed. aimrate=2500;
areaofeffect The total area that receives damage when this weapon "explodes". Any unit in the area gets "hit" once per explosion. areaofeffect=8;
ballistic Is this a "ballistic" weapon? In other words, does it fire in an arc, like artillery shells? ballistic=1;
beamweapon Weapon is a straight beam weapon like a laser. beamweapon=1;
burnblow Weapon will detonate when it comes to the end of its range burnblow=1;
burst How many times a weapon will fire per burst, such as the Flamethrower or EMG, which will for example fire 3 shots in a burst. burst=3
burstrate The time delay (in seconds) between shots in the burst. Note: this is different from reload time, which is the time between the bursts themselves. burstrate=0.1;
color Color of beam weapon from the game palette. The example is color 144 in the palatte. It's hard to tell which color corresponds to which value without actually looking at the palette file. (PAL) color=144; /* Purple */
color2 "Color to use on the beam weapon to make better and cooler" - I'm not really sure what that means, but the game somehow blends the two colors? color2=217;
commandfire This weapon will need to be expressly fired by the user each and every time it is used, such as the D-gun or nuclear missiles. commandfire=1;
cruise This has to do with the very long range missiles like the nukes, although I'm not sure of the exact effect. cruise=1;
dropped Is the weapon dropped? (like a bomb out of a bomber) dropped=1;
duration I believe this has to do with laser weapons, and how long the "beam" is. A longer duration results in a longer "beam". duration=.2;
edgeeffectiveness The percentage (0-1.0) of the damage that is inflicted at the edge of the blast. Units at the outer edge of the area defined with areaofeffect, recieve this amount of the original damage. In the example, units at the outskirts would get 25% of the amount of damage that a unit at the center would get. Units in-between the center and edge receive an amount somewhere in-between, depending on their proximity. edgeeffectiveness=0.25;
endsmoke Draw a puff of smoke when weapon terminates endsmoke=1;
energy "Amount of energy needed per shot" - I don't think this is true, and it doesn't appear to do anything. Use "energypershot".
energypershot How much energy is consumed each time the weapon is fired. Most use none. energypershot=1500;
explosionart The name of the image within the GAF file specified that is the actual animation sequence. (For example, "pinkboom1" is the animation sequence within "hellfirelaser.gaf" that models a pink explosion). Name of animation sequence for explosion. explosionart=explode5;
explosiongaf The name of the GAF file that contains the explosion animation. Omit the .GAF extension. explosiongaf=fx;
firestarter What is the (percentage) chance that this weapon will start a fire if something flamable is hit. Weapon will cause fires, expressed as a %, where 100% guarantees a fire. firestarter=90;
flighttime The time the unit will fly for after it enters the second phase of operation, used for starburst missiles flighttime=400;
groundbounce Weapon will not detonate when it hits ground but instead bounces, for example the D-Gun. groundbounce=1;
guidance Indicates that weapon is guided and uses the turn rate specified to track enemy unit guidance=1;
ID What is the Weapon ID for this weapon. Weapon ID's, much like Unit ID's, must be unique. Total Annihilation has a hard-coded limit of 255 weapon ID's. TA and the expansion packs used up over 200 of them, so it may be difficult to find a unique ID for your unit considering the many 3rd party groups out there making their own units. ID=160;
lavaexplosionart Same as "explosionart" but when the weapon impacts a section of map that is lava. lavaexplosionart=lavasplashsm;
lavaexplosiongaf The name of the GAF file that contains the lava explosion animation. Omit the .GAF extension. lavaexplosiongaf=fx;
lineofsight Does this weapon fire in a straight line? For example, lasers or rockets. lineofsight=1;
metal "Amount of metal needed" - Again, I don't think this has an effect. Use "metalpershot".
metalpershot How much metal is consumed each time the weapon is fired. metalpershot=5;
meteor Defines if this weapon is a meteor or not. It's used in the Cavedog meteor weapon, and I presume you could have custom meteor's on your map using this tag. meteor=1;
minbarrelangle The minimum angle (in degrees) the barrels can point. Used in ballistic calculations. For example, this is used to limit Bertha cannons so they cannot fire at units that are very close to them. minbarrelangle=-15;
model The 3D model to use when displaying this weapon, omit the .3do extension. The file must be located in the objects3d subdirectory. model=missile;
name Name of the weapon, for reference. Generally more of short a description of the weapon. name=Annihilator Weapon;
noautorange When set the weapon will not detonate when it reaches it's maximum range, but carry on until it hits something. Used mostly for heavy rockets noautorange=1;
noexplode No explosion when weapon impacts it's target. It's a little misleading, as it is more of a "don't stop" when it hits something. It will still explode but instead of terminating, the shot will continue on to it's maximum range. Thing D-Gun. noexplode=1;
noradar I would assume that the shot will not appear on radar as the little yellow dot that you usually see. noradar=1;
paralyzer Does the weapon act as a paralyzer? Weapon will stun the enemy for a length of time described in the damage field, time=ticks. paralyzer=1;
pitchtolerance See "tolerance" - this refers to the up and down aspect of aiming. pitchtolerance=12000;
propeller If the 3do model has a propeller that spins. I'm not sure how TA decides which object to spin, but it may just spin all objects that are not the base. propeller=1;
randomdecay Used mainly in flamethrowers, this specifies a time which is used to end the shot at varying points. For example, if the flame usually lasts for 1.5 seconds, and randomdecay is set to 0.3 then the shot may last 1.2 or 1.4 seconds. (Note: this may work the other way, and have the weapon last 0.3 seconds LONGER than regular shots) randomdecay=0.3;
range The weapon's range, in pixels. range=600;
reloadtime Seconds between shots, or bursts if it is a burst weapon. (decimals are allowed) reloadtime=20;
rendertype Type of rendering system to use, 3D model, bitmap, etc.
0=laser
1=modelled
2=not rendered
3=dgun
4=plasma shell
5=flame
6=bomb
7=lightning
rendertype=0;
selfprop Is the weapon self-propelled? I think this keeps a weapon going even past it's set range. For example a tracking torpedo will continue going until it hits the target, regardless of the weapons range. selfprop=1;
shakeduration If the weapon is big enough to shake the screen, how long does the shaking last. shakeduration=2;
shakemagnitude If the weapon is big enough to shake the screen, how violent is the shaking? shakemagnitude=32;
smokedelay Time between puffs of smoke emitted by the weapon. Only used if "smoketrail=1;" smokedelay=.1;
smoketrail Indicates whether or not a weapon will emit a smoke trail as it heads towards it's target. smoketrail=1;
soundhit Sound to make when (if) the weapon detonates. Sound must be located in the sounds subdirectory. The value here does not contain the .WAV file extension. soundhit=xplolrg1;
soundstart Sound to make when the weapon fires. Same conditions as above. soundstart =annigun1;
soundtrigger Toggle used on burst weapons, does it make the soundstart sound on every shot (1), or just once per burst (0). soundtrigger=1;
soundwater Sound to make when the weapon hits the water
sprayangle Maximum deviation from the straight line to the target the weapon strays, used for burst weapons to "spray" - for example Flamethrowers. sprayangle=1024;
startsmoke Draw a puff of smoke when the weapon fires, it is emitted from the piece that the weapon is fired from. startsmoke=1;
startvelocity Weapon will start at this velocity instead of 0 startvelocity=250;
stockpile Can you build these up and store them, used in the long range missiles like nukes. stockpile=1;
targetable Can this weapon be shot down, for example nukes. targetable=1;
tolerance Amount of accuracy weapon will use when aiming, most are default 0 which means the weapon must be aiming exactly at the target. The higher the tolerance, the farther away the weapon can be from actually aiming at the target and still be fired. (? Maximum 32767 ?) tolerance=8000;
tracks When set the weapon will track a moving target after a weapon conversion. For example a starburst missile, will fire straight up, but after switching to the downward mode, it will start tracking it's target. tracks=1;
turnrate Used for guided weapons. It is in angular units (0-32768)/second turnrate=32768;
turret Does the weapon originate from a rotateable turret on the unit? This is usually set to 1, but is not used for things like starburst missiles and bombs. turret=1;
twophase Indicates weapon has two distinct stages, usually used in vertical launch weapons. The first phase is straight-up the second heads towards the target. I don't know if it has any other applications. twophase=1;
unitsonly Does the weapon only affect other units? Weapon will only detonate on enemy units as opposed to obstructing terrain. unitsonly=1;
vlaunch Is the weapon launched vertically? vlaunch=1;
waterexplosionart Same as "explosionart" but when the weapon impacts a section of map that is water. waterexplosionart =h2oboom1;
waterexplosiongaf The name of the GAF file that contains the water explosion animation. Omit the .GAF extension. waterexplosiongaf=fx;
waterweapon Weapon is meant to travel through water waterweapon=1;
weaponacceleration Expressed in (pixels/second)/second. The weapon will start at "startvelocity" and accelerate at this amount until reaching "weaponvelocity". weaponacceleration=131;
weapontimer How long weapon is active in seconds (decimal point allowed), trajectory weapons use 0 so it is calculated weapontimer=2;
weapontype2 Describes another weapon that the weapon turns into in the second phase. You would think this works in conjunction with the "twophase" tag, but it doesn't appear to be used.
weaponvelocity Maximum attainable weapon veolocity in pixels/second weaponvelocity=1000;