Weapon_Variables - beyond-all-reason/springrts_engine_wiki_mirror GitHub Wiki

WeaponType

This is a weapon tag! It allows you to bypass the engine's auto detection and force the weapontype. (example weaponType="StarburstLauncher")

WeaponType

Description

AircraftBomb (dropped=1)

Drops a ballistic projectile (aka Plasma) at the same movement vector as the unit itself. It's only meant for planes. A plane that has a CBombDropper as its weapon1 is a bomber. The CBombDropper automatically calculates its burst and burstrate tags from its reload time and uses 5 as its reload time instead. It will fire if the first bomb would drop within a circle roughly unitspeed*burst*burstrate so the longer the burst and the faster the unit the larger the circle in which it will drop instead of not firing and hoping the next attack run will pass that circle.

BeamLaser (beamlaser=1)

Should be well known, this thing spawns a beam and does a portion of its total damage each frame. It can't have a burst or burstrate, it can't have collidefriendly=0, it can't be emit-sfxed if it has a beamtime longer than one frame and its damage decreases over range if the minIntensity=1 tag isn't used. The largebeamlaser tag allows changing the visual effect of the laser, doesn't affect the behaviour of the weapon itself in any way though. Beamlasers can be really annoying... BTW, their beam doesn't collide with water so if they're set to waterweapon=1 they can shoot normally even when underwater.

Cannon (anything that didn't trigger another weapon)

Aka plasma. Shoots a ballistic projectile. Unlike the DGun it aims properly. Can't be emit-sfxed properly, maybe a ballistic DGun can fill that role.

DGun (weaponname contains the word "disintegrator")

This shoots a fireball that travels in a straight line. The fireball has no range limitation by itself so if it misses or is fired in FPS mode it will travel across the whole map and further. DGuns don't properly check their line of fire, if terrain is in the way they fire anyway. These things are meant to be used with noexplode=1 but of course you CAN use them without that, too. If ballistic=1 is set the fireball will be affected by gravity, the weapon won't compensate for it though so it will hit the ground before reaching the target. Might be useful for a Scorched Earth mod or something since you'd have to aim it manually to hit anything.

EmgCannon (lineofsight=1 and rendertype=4 and color=2)

Few know about this, it's a line of sight (i.e. not ballistic) weapon that can use billboard rendering (looks like a sprite). No idea what drawbacks this has, noone ever uses it.

Flame (lineofsight=1 and rendertype=5)

The flamethrower. A really annoying weapon. AFAIK it won't even aim ahead of moving targets. Can't say much else about it since I haven't tried using it much but overall I'd avoid the weapontype and fake the effect somehow, it's not pretty when fast and won't hit jack when slow.

LaserCannon (lineofsight=1 and either beamweapon=1 or weaponname contains "laser" (marked as "workaround for SWTA))

The OTA-style laser. Probably one of the least annoying weapons in the engine. Its length is defined by the duration tag (together with the speed), BTW.

LightningCannon (lineofsight=1 and rendertype=7)

An instant hit weapon like the Beamlaser except with a lightning graphic and even more annoying. It won't damage shields and it has a hardcoded inaccuracy (comparable to targetMoveError, the code comment is "should make it weaker against air"...). Shares some of the weirdnesses with the beamlaser, e.g. being able to penetrate water.

Melee (only reachable through WeaponType)

When it fires it simply damages the target, no ifs or buts. It doesn't use a projectile and doesn't care about the line of fire. It won't even report a proper heading and pitch to AimWeapon so if you plan on using it in 75b2 you have to slave it to another weapon to handle the aiming. May be useful to be the damage dealer for a cosmetic weapon, i.e. you slave the Melee to a weapon that does no damage but looks pretty and the Melee does the damage. Kinda like the weapons in Warcraft and so.

MissileLauncher (lineofsight=1 and smoketrail=1)

Shoots a smoke-emitting projectile. It can use acceleration, etc. The projectile's lifetime depends on range/maxspeed so a slowly accelerating missile will fall short. It can also use trajectoryheight to have the shot arc but that has trouble with aiming at targets higher or lower than the shooter (see bug report, this REALLY could use some fixing). Pretty versatile weapon overall, if the laser rendering code was ported into this we could pretty much axe the LaserCannon completely.

Rifle (only reachable through WeaponType)

An instant hit weapon but an apparently unmaintained one. It has a hardcoded firing and explosion effect. I wouldn't use it.

Shield (isShield=1)

The shield. Really not much to say about this, the tags are all documented in the changelog.

StarburstLauncher(vlaunch=1)

Fires a projectile that rises vertically (starts with no velocity) for seconds, then turns at a fixed rate towards its target. The projectile's lifetime depends on its range divided by its max speed (ignores acceleration) and the weapontimer somehow so the weapon can fall short depending on how these values are set. This is the only weapon that can properly perform intercepts and be interceptable. Emits a smoketrail.

TorpedoLauncher (waterweapon=1)

Fires a projectile that will behave ballistically out of water and like a missile in water. Since waterweapon=1 is usually set for them they can fire underwater and they will target underwater units. An aircraft carrying a TorpedoLauncher is a special case, the thing turns into a bomb dropper that will spawn a torpedo projectile, probably to get the whole bomber flight behaviour. Note that the waterweapon tag is also used to make a weapon fire underwater, independent of its type.

CNoWeapon (weaponname is NOWEAPON, not reachable by any tag)

Apparently a placeholder used when a weapon isn't present. It's not really a weapondef but generated when the unit demands a NOWEAPON.

Descriptions

Variable

Description

Examples

Accuracy

How accurate a weapon is. A larger number is less accurate. If this tag is missing entirely, it has perfect accuracy unless its target moves unexpectedly or there is another accuracy-effecting tag present (Sprayangle, Targetmoveerror, NovingAccuracy, Wobble). Accuracy is relative to the distance to the target; for instance, if the target is very close, even a very high accuracy value will probably still hit. If a target is very far away, even a very low accuracy value will likely cause the weapon to miss. Can be any numeric value.

accuracy=400;

AlwaysVisible

Ignore LOS handling and always draw the weapon effect. Can be 1 or 0.

alwaysVisible=0;

AreaOfEffect

How large the weapon's impact explosion is. This affects how powerful the weapon's default impulse strength will be. Currently, BeamLasers with an AreaOfEffect of 16 or above will deform the ground at their point of impact regardless of whether it has been told not to. Can be any numeric value, but should generally be at least 8, regardless of the type of weapon.

areaofeffect=192;

AvoidFeature

This makes the weapon avoid features while targeting (the shoot will still collide with features). Can be 1 or 0.

avoidFeature=0;

AvoidFriendly

If set to 0 units will not try to avoid friendly units in their line of fire. Can be 1 or 0.

avoidFriendly=1;

Ballistic

depreciated in 77b1 (use gravityAffected) Set to 1 for the weapon to be subjected to gravity, travelling in an arc through the air, such as cannons. Can be 1 or 0.

BeamDecay

For BeamLasers, defines the speed of the fadeout (each frame the beam's intensity is multiplied with that value). Purely visual? Can be between 0 and 1.

beamDecay=0.9;

BeamLaser

depreciated Used for autodetection of "BeamLaser" weapontypes. You're probably better off using WeaponType=BeamLaser than this tag. Can be 1 or 0.

BeamTime

How long to fire the laser before waiting for ReloadTime to start. Damage is distributed over the duration of the beamtime, and the weapon will aim to hit the target when the beam is in the middle of its beamtime (IE using prediction). Can be any numeric value. Defaults to 1.

beamtime=0.5;

BeamTTL

For BeamLasers, defines the time (in frames) the beam will stay after being fired. Purely visual. Can be any numeric value.

beamTtl=10;

BeamWeapon

depreciated Used for autodetection of "LaserCannon" weapontypes. You're probably better off using WeaponType=LaserCannon than this tag. Can be 1 or 0.

BounceRebound

The amount of vertical velocity a projectile keeps when it bounces. Generally .3-1, but 0 for a sticky bomb, or 2 for a flubber bomb. Defaults to 1

bouncerebound=.8;

BounceSlip

The amount of horizontal velocity a projectile keeps when it bounces. Generally .3-1, but 0 for a sticky bomb, or 2 for a flubber bomb. Defaults to 1

bounceslip=.8;

BurnBlow

The weapon blows up when it reaches the range the target was at when the weapon fired. Only works on plasma (WeaponType=Cannon) weapons and should now work on Missiles. Can be 1 or 0. A common usage is on flak guns.

burnblow=1;

Burst

How many shots are in a burst. Must be accompanied by burstrate. Can be any numeric value.

burst=3;

BurstRate

How fast the Burst fires. If set much below 0.1, it stops having any discernable effect.

burstrate=0.1

CameraShake

How much the camera shakes on impact. (needs the cameraShake widget to work). Can be any numeric value.

cameraShake=5;

CanAttackGround

Determines if you can force-fire the weapon at the ground. Used for stopping exploitation of overshoot and force-firing on cloaked or unseen units, etc. Can be set to 1 or 0.

canAttackGround=0

CegTag

CegTag is the tag that emits a custom explosion every frame for a projectile. Can be used on any weapon to imitate dynamic lighting, smoke, fire, ball lightning, magic and many other things. Enter the name of your effect to make it emit once per frame.

cegtag=MISSILE_SMOKE_FX;

Color

depreciated Use rgbColor instead.

Color2

depreciated Use rgbColor2 instead.

ColorMap

Only used by flamethrower. Must be a CColorMap type.

colorMap=1 0 0 1  0 1 0 1; (red to green fade)

CollideFriendly

If set to 0 this weapon will not hit friendly units. Can be set to 1 or 0.

collisionFriendly=1;

CollisionSize

Defines the physical size of projectiles, percentage of size for flamethrower and absolute value emg, plasma and laser. Can be any numeric value.

collisionSize=30;

CommandFire

When ordered to attack ground this weapon will only fire once, rather than continuously. This does not work when ordered to attack units (It will continue to fire until the target is dead). If the unit has CanDgun=1 in its FBI, commandfire will identify that weapon with the dgun button. The weapon wont fire unless the dgun button is pressed. Can be set to 1 or 0.

commandfire=1;

CoreThickness

Thickness of the core of a laser (the part which use rgbcolor2). Can be any numeric value.

coreThickness=0.25;

Coverage

The area anti-weapon weapons, like antinukes, will protect. This will be shown on the minimap as a guide if the weapon is stockpile=1. Can be any numeric value.

coverage=1280;

CraterBoost

Adds a constant factor to the terraform the explosion does. Can be any numeric value. (default 0)

craterMult=0.1;

CraterMult

Multiplies with the terraform the explosion does. Can be any numeric value. (default :=impulsFactor)

craterMult=1.2;

CylinderTargeting CylinderTargetting deprecated in 89.0

If greater than 0, range will be checked in a cylinder instead of a sphere: half height=unitradius*cylinderTargeting Defaults to 1 for Melee type weapons, 0 otherwise. In 0.76b1, does not work with BeamLaser weapons.(image)

cylinderTargeting=0;

Dance

For missles, unlike wobble it doesn't rotate the missile and it prevents the missile from going too far off course so a dancing swarm will remain coherent. Can be any numeric value.

dance=97;

Dropped

depreciated Used for autodetection of "AircraftBomb" weapontypes. You're probably better off using WeaponType=AircraftBomb than this tag. Can be 1 or 0.

dropped=1;

Duration

Length of the beam of BeamWeapon projectiles. Purely visual. Effected by velocity (faster beam = longer). Can be any numeric value. Used for rendertype 0 and 7 weapons.

duration=.5;

DynDamageExp

Exponent of the range damage formula, 0 (the default) disables dynamic damage. 1 means linear scaling. Only used by BeamLasers and LightingCannons. Can be any numeric value. (image)

dynDamageExp=0;

DynDamageInverted

Inverts the damage curve (more damage at far range). Only used by BeamLasers and LightingCannons. Can be 0 or 1.

dynDamageInverted=0;

DynDamageMin

Minimum dynamic range damage value. Only used by BeamLasers and LightingCannons. Can be any numeric value.

dynDamageMin=0;

DynDamageRange

If set it will use this value in the dynamic range damage formula instead of the range value from the weapon in the calculation. Only used by BeamLasers and LightingCannons. Can be any numeric value.

DynDamageRange=400;

EdgeEffectiveness

Determines what percent of a weapon's maximum damage value will be applied to units as they are closer to the outer edge of the weapon's AreaOfEffect. Must have a decimal value between 0 and 1. Default in OTA was 0, probably the same in Spring. (image)

edgeEffectiveness=0.25;

EnergyPerShot

Energy used per shot. If the specified amount of energy is not available, the weapon will not be able to shoot. Can also be used to specify how much a Stockpile weapon wll cost to build. Can be any numeric value.

energypershot=5;

ExplosionSpeed

Explosion animation(?) speed/time. (only used by BeamLaser and LightingCannon?) default: gd=max(30, DefaultDamage/20); expSpeed=(8+(gd*2.5))/(9+(sqrt(gd)*.7))/2; Can be any numeric value.

explosionSpeed=5;

FallOffRate

Rate at which the beamweapon fades out after it goes past its maximum range. 0 is never fade out, 1 is finish fading out exactly at max range, the default 0.5 is the previous behaviour. Purely visual.

FallOffRate=0.5;

FireStarter

How likely the weapon will set trees on fire. High values make trees likey to be set on fire, low values make trees likely to just explode or tip over. Can be any numeric value between 0 and 100.

fireStarter=75;

FireSubmersed

If set the weapon can fire underwater, if not then not. Use it for weapons that cannot fire underwater but can hit underwater targets. Works even for torpedoes. Can be 0 or 1.

fireSubmersed=1;

FixedLauncher

For missiles, starburst missiles and torpedoes, this makes the projectile spawn with the orientation of the shooting piece instead of their normal orientation. The weapon will not properly check if allies are in the way so make sure you align the launchers in a way that won't hammer right into your own forces and perhaps use collideFriendly=0. FixedLauncher conflicts with trajectoryHeight and IMO combining them is pointless anyway so don't use both on a weapon. Can be 0 or 1.

fixedLauncher=0;

FlameGFXTime

Makes the flamethrower projectile stay alive as a graphical effect (doesnt do any damage) after it has reached maxrange. It is defined in percent, so 1.2 makes it remain 20% beyond maxrange. Can be any numeric value.

flamegfxtime=1.2;

FlightTime

For missile weapons, how long before their engines turn off and they fall to the ground (becoming essentially ballistic projectiles). Can cause overshoot exploits if too high, or missiles falling short of their targets if too low. Can be any numeric value.

flightTime=10;

GroundBounce

Weather the weapon projectile will bounce on the ground (on land or the ocean floor). The bounce angle is effected by the slope of the terrain. For non-water weapons, the projectile will still explode if it hits the water. Can be 0 or 1, defaults to 0 (off)

groundbounce=1;

Guidance

depreciated (does nothing)

HardStop

For LaserCannon, defines if the laser effect stops or fades out. Can be 0 or 1.

hardStop=0;

HeightBoostFactor

Gives control of cannon range boost from high terrain (more than 1 means increased range, 0 means the cannon has fixed range regardless of height difference to target. default is a magic value calculated on weapon init, based on range tag and theoretical max range.). Can be any numeric value, including negative ones (<0 := automatically calculated).

heightBoostFactor=-1;

HeightMod

Changes the sphere weapon range into an ellipsis. Values above 1.0 mean the weapon cant shoot as high as it can far, values below 1.0 mean it can shoot higher than it can far. 0.5 means it can shoot twice as heigh as far (image). Note that this may not work well with beam weapons, as their minIntensity damage drop off over range is not effected. minIntensity=1 will remove the damage dropoff entirely.

heightMod=1;

ImpulseBoost

A constant factor added on the weapon's impulsefactor. Can be any numeric value, including negative ones.

impulseBoost=0.5;

ImpulseFactor

The multiplier on the weapon's default impulsefactor, which is determined based on a weapon's default damage and AreaOfEffect. The impulse of a weapon is how strong of a kinetic force will be applied to its target or anything near the point of impact. Can be any numeric value, including negative ones.

impulsefactor=2.5;

Intensity

Alpha (brighness and washout effect) of the weapon. Can be used on any rendertype 0, 3, or 4 weapon. Can be any numeric value.

intensity=1.5;

InterceptedByShieldType

Bitfield representing the types of shields that can intercept this weapon. The best way to think about this is to think of it as the resulting binary. Every digit of binary that is set to one means that a shield with that digit set to one will intercept this weapon, for instance, the example will result in the weapons being blocked by shields with types 1 and/or 3. Maxium of 32 unique types. See Shield Interception Tag Use.

InterceptedByShieldType=5;

Interceptor

Can intercept missiles with the Targetable (or Cruise?) tag.

interceptor=1;

LargeBeamLaser

If set to 1 a beamlaser uses an alternate graphics effect. Can be 0 or 1.

largeBeamLaser=0;

LaserFlareSize

Size of the flare for laser weapons, multiplier for thickness. Can be set to any numeric value. (default: 15)

laserFlareSize=15;

Leadbonus

Is multiplied with the unit's experience and added to the lead limit.

leadbonus=1;

LeadLimit

Limits the maximum distance a unit will lead a target (default is -1 which means infinite).

leadLimit=1;

LineOfSight

depreciated It is only used to detect the weapontype of ota weapon configs, just set the weapontype manually and dont use it.

LodDistance

Minimum camera distance at which the default beamweapon projectile is simplified to rectangle. Can be set to any numeric value. (default: 1000)

lodDistance=1000;

ManualBombSettings

For Bombers, use burst and burstrate tags instead of hardcoded values. Can be set to 1 or 0.

manualBombSettings=1;

MetalPerShot

Metal used per shot. If the specified amount is not available, the weapon cannot be fired. Can also be used to specify how much a Stockpile weapon wll cost to build. Can be set to any numeric value.

metalpershot=500;

MinIntensity

Beamlaser damage falls off over its range. MinIntensity determines the minimum amount of damage done. 1=100%, and will thus turn off the damage falloff entirely. Default is 0.4? Can be set to any numeric value?

minIntensity=0.1;

Model

The 3DO or S3O model to be used as this weapon's physical representation. 3DO modesl do not need a .3do extension, but S3O weapon do.

model=missile;

MovingAccuracy

A weapon's accuracy while moving. See Accuracy. Can be any numeric value.

movingaccuracy=1000;

MyGravity

For ballistic weapons (Cannon and Bomb), it overrides the map gravity if used. Regular map gravity is around 0.2.

myGravity=0.2;

NoExplode

Whether or not the weapon will expire on impact or continue. An example is the d-gun. Note that these weapons will do damage every single frame they are inside the hitsphere of an object, underground or under water, massively multiplying their damage. Can be set to 1 or 0.

noexplode=1;

NoSelfDamage

This tag doesnt work. There is a kludgey gadget that can be used in its place. Theoretically, the weapon will not damage the unit that fired it. For instance, a nuke silo could shoot itself and not take any damage. Can be set to 1 or 0.

noselfdamage=1;

NumBounce

The maximum number of times a weapon will bounce. -1 for infinite. Defaults to -1

numbounce=5;

Paralyzer

If active, this weapon will not cause any damage to its target, but will instead paralyze (aka EMP). The default damage value of a weapon with this active will be applied to the target's HP; once the HP is overwhelmed, it will be paralyzed. Can be set to 1 or 0.

paralyzer=1;

ParalyzeTime

On Paralyzer weapons, determines the maximum length of time the target will be paralyzed (In seconds?). The timer is refreshed every time the target is hit by the weapon. Can be set to any numerical value.

paralyzetime=10;

PredictBoost

How much should the weapon predict unit speeds (similar to targetMoveError). Default 0 for non-burnblow, 0.5 for burnblow weapons. Can be set to any numerical value (0.0-1.0).

predictBoost=1;

Projectiles

The weapon fires this many projectiles at once (shotgun style). Make sure you put them on different trajectories somehow (sprayangle or different firepoints) because otherwise they'll all be clumped in one shot. Works well combined with bursts. Can be set to any integer value.

projectiles=1;

ProximityPriority

Acts as a multiplier for the distance to the target in the priority calculation. Note that negative values make weapons prefer distant targets. Can be set to any numerical value.

proximityPriority=1;

PulseSpeed

On LargeBeamLaser, how fast the pulsating effect at the beam start is. Can be set to any numerical value.

pulseSpeed=15;

Range

The maximum range of the weapon. If set to noexplode, the weapon will disappear after this range has been met. If set to burnblow, the weapon will explode after this range has been met. Can be set to any numerical value.

range=750;

ReloadTime

The amount of time between shots. If a unit is paralyzed, this stops counting down. Can be set to any numerical value.

reloadtime=3.5;

Rendertype

depreciated Used for auto detection of ota weapontypes.

RGBColor

The color of the rendertype 0, 3, 4, 7 weapon, specified in RED_GREEN_BLUE format.

rgbcolor=1 0.3 1; - this would make evul-purple

RGBColor2

The color at the core of a rendertype 0 (laser) weapon. Specified the same as above. Defaults to white.

RGBColor2=0 1 0; - this would make a weird green middle for the evul-purple laser

ScrollSeed

Only used by LargeBeamLaser. How fast the beam apears to be moving towards it target. Can be set to any numerical value.

scrollSeed=1;

Selfprop

depreciated (does nothing)

Size

Defines the visible size of projectiles. Can be set to any numerical value. Default size is 2 + min(damage / 400, areaOfEffect / 10).

size=10;

SizeGrowth

Defines how fast flame projectiles will grow in size. Can be set to any numerical value.

sizegrowth=0.6;

SmokeTrail

Does the projectile leave a smoke trail or not. Can be set to 1 or 0.

smoketrail=1;

SoundHit

The sound made when the weapon hits. Must reference a .wav file in the .\Sounds directory. Deprecated in 89.0, use SoundHit{Dry,Wet}

soundhit=emghit;

SoundHitDry

The sound made when the weapon hits land. Must reference a .wav file in the .\Sounds directory.

soundhit=emghit;

SoundHitWet

The sound made when the weapon hits water. Must reference a .wav file in the .\Sounds directory.

soundhit=emghitwater;

SoundHitVolume

Can be any numerical value between 0 and 1.

soundhitvolume=0.5;

SoundStart

The sound made when the weapon begins to fire. Will fire only once if the weapon is shot in a burst. Must reference a .wav file in the .\Sounds directory.

soundstart=emgfire;

SoundStartVolume

Can be any numerical value between 0 and 1.

soundstartvolume=0.5;

SoundTrigger

If active, the weapon will sound every time a shot is fired in a burst sequence. Can be set to 1 or 0.

soundtrigger=1;

SprayAngle

How wide the the angle of a burst from a burst weapon can be. Very similar to Accuracy, except that sprayangle effects each projectile in a burst, while Accuracy does not.

sprayangle=1024;

StartVelocity

The starting speed of the weapon as it is first fired. Only applicable to weapons that can accelerate.

startvelocity=200;

Stockpile

Can this weapon be stockpiled, for instance like a nuke launcher. Can be set to 1 or 0.

stockpile=1;

StockpileTime

Time it takes to create one unit of ammunition (default is weapon's reload time).

stockpiletime=10;

SubMissile

For TorpedoLaunchers, if set to 1 the torpedo will travel outside of water (But still behave like a torpedo, IE, falling with slower gravity etc). It will not emit a smoketrail. When fired from a plane it will behave the same way but the plane will probably be considered a fighter, not a bomber. Can be set to 1 or 0.

subMissile=0;

SweepFire

If 1 (default 0) it will make the weapon continue firing while it aims for a new target. Only works on continous beam lasers currently. Doesnt seem to work very well at all. Can be set to 1 or 0.

SweepFire=1;

TargeBorder

If nonzero, targeting units will TryTarget at the edge of collision sphere (radius*tag_value, [-1;1]) instead of its centre. Can be set between -1 and 1. Defaults to 1 for Melee type weapons, 0 otherwise. (image)

targetBorder=1;

Targetable

If active, the weapon will be automatically targeted by any Interceptor weapons.

targetable=1;

TargetMoveError

The degree to which a weapon's aiming will fail to keep up with its target's movement. If set very low or not set at all, a weapon will lead its target and almost always hit unless there's a lot of micromanagement on the part of the person controlling the target. If set too high (about 0.3 or above), the weapon will have a lot of difficulty even tracking its target enough to get a shot off. Can probably only be set between 0 and 1. Beyond 1, the weapon would be virtually useless.

targetmoveerror=0.15;

Thickness

Thickness of a beamweapon or beamlaser, default is 2. Can be set to any numerical value.

thickness=4;

TileLength

Only used by LargeBeamLaser. Defines the length before the texture used is repeated (tiled).

tileLength=4;

ToAirWeapon

If active, the weapon will only be capable of targeting units with category=VTOL. Also forbids the weapon from attacking ground. Prettymuch the same as an OnlyTargetCategory + CanAttackGround = 0? Can be set to 0 or 1.

toairweapon=1;

Tolerance

The amount to which the weapon's "real" aim can be off while the weapon will still be able to fire accurately at the target. For some weapons (Fighters, Fixedlaunchers) this only determines in what arc the unit will fire, the weapon is still fired forwards and will miss unless it has tracking. Can be set to any numerical value.

tolerance=1500;

Tracks

If the missile tracks a moving target. Can be set to 1 or 0.

tracks=1;

TrajectoryHeight

The height of the arc of a missile weapon. It is useful for compensating for mountains or debris. Is relative to the weapons speed (Higher speed, higher arc) and the range the weapon is firing at (Lower range lower arc). Requires Guidance and Turnrate to hit its target when over 1.

trajectoryheight=0.8;

Turnrate

How fast a guided weapon can turn. Can be any numerical value between 0 and 64000. If set to 0, the weapon can't turn at all, if set to 64000, the weapon can literally defy all known physics and turn 180 degrees in a fraction of a second. This is relative to a weapon's velocity; a weapon with a very low velocity (~200) wouldn't need a very high turnrate to keep up with a fighter, although it would probably never catch it because of its slow speed. A weapon with a very high velocity (~1000) would need a very high value in order to be able to hit targets that turn suddenly.

turnrate=32000;

Turret

Set to 1 if weapon is used by a turret that rotates. Set to 0 if weapon is forward firing, ie, has no rotating turret piece.

turret=1;

TwoPhase

depreciated Unused in 76b1 and 77b1!

VLaunch

depreciated Used to autodetect "StarburstLauncher" weapontypes. Might as well use Weapontype=StarburstLauncher.

WaterBounce

Weather the weapon projectile will bounce on the surface of the water. Can be 0 or 1, defaults to 0 (off)

waterbounce=1;

WaterWeapon

Determines if the weapon can pass through water, fire underwater (though FireSubmersed can change this) and target underwater units. Some weapontypes (Beamlasers, Lightning) can pass through water anyway (players can exploit this with force-firing), but will not auto-fire at underwater targets without this tag. Used for Torpedo weapontype auto-detection, so set the Weapontype manually to use for any other weapon type. Can be set to 1 or 0.

waterweapon=1;

WeaponAcceleration

Tells the weapon how fast it should accelerate from its StartVelocity to its actual WeaponVelocity. Increases the weapon's velocity every second by the amount specified. Can be any numerical value.

weaponacceleration=50;

WeaponTimer

For StarburstLauncher, how long until the weapon will travel before guidance takes effect. The weapon will turn to actually go towards its target after the specified number of seconds has expired. Can be set to any numerical value.

weapontimer=5;

WeaponVelocity

The speed the weapon moves after being fired. If StartVelocity is lower than this number, the weapon will increase speed to its WeaponVelocity at the rate specified by its WeaponAcceleration.

weaponvelocity=800;

Wobble

The amount that a missile will wobble off-course. Requires TurnRate. Turnrate will wrestle with wobble to keep the weapon on course, so wobble must be high enough to compensate to have any effect. Can be set to any numerical value between 0 and 64000.

wobble=15000;

NOTE: Variables that are defined by either a 1 or a 0 are BOOLEAN, where 1 means TRUE and 0 means FALSE.

NOTE 2: "Any numerical value" for things that relate to angles really means any value between 0 and 64,000 since that's between 0 and 360 degrees in spring measurement. Setting it higher than 64,000 will bring it 'full circle' so to speak.

Texture Tags

Weapon

Used Texture Tags

AircraftBomb

texture1 = projectile

BeamLaser

texture1 = beam texture2 = beamend texture3 = flare

Cannon

texture1 = projectile

EmgCannon

texture1 = projectile

FlameThrower

texture1 = flame

LargeBeamLaser

texture1 = beam texture2 = beamend texture3 = muzzle texture4 = flare

LaserCannon

texture1 = beam texture2 = beamend

LightingCannon

texture1 = beam

MissileLauncher

texture1 = flare texture2 = smoketrail

Shield

texture1 = shield

StarburstLauncher

texture1 = flare texture2 = smoketrail texture3 = flame

TorpedoLauncher

texture1 = projectile

NOTE: All textures need to be `atlased`. So you have to define them in the resources.tdf and use the reference name in the texture tags.

Cannon (Plasma) Visuals

Variable

Description

Examples

AlphaDecay

How much a plasma particle is more transparent than the previous particle. Can be set to any numerical value. (default: 1)

AlphaDecay=0.95;

NoGap

If set to 1, the distance between plasma particles is proportional to the size of the two particles. If set to 0, the distance between plasma particles will be proportional to the size of the first particle. Can be set to 1 or 0. (default: 1)

NoGap=0;

Separation

Distance between each plasma particle. Can be set to any number value. (default: 1)

Separation=5;

SizeDecay

How much a plasma particle is smaller than the previous within the same plasma shot. Can be set to any numerical value. (default: 0)

SizeDecay=0.2;

Stages

Number of particles used in one plasma shot. Can be set to any number value. (default: 5)

Stages=20;

Shield/Repulsor Descriptions

Variable

Description

Examples

ExteriorShield

If set to 1, the shield/repulsor will not have any effect on weapons fired from within its field. Can be 1 or 0.

exteriorshield=1;

IsShield

If set to 1, this "weapon" is no longer a weapon, is now a repulsor or a shield, based on the other properties given to it. Can be 1 or 0.

isshield=1;

ShieldAlpha

How clearly visible the shield is, if you have VisibleShield turned on. Value is between 0 and 1.

shieldalpha=0.4;

ShieldEnergyUse

The amount of energy used to repulse or destroy weapons. Will be used constantly while the weapon is in its area of effect if it is a repulsor, will be used only once on impact if it is a shield.

shieldenergyuse=1500;

ShieldForce

The force applied to weapons, an arbitrary number. Set to 1, it will not deflect very well. Only for use on repulsor-type. Can be set to any numerical value.

shieldforce=1.75;

ShieldBadColor

The color the shield is when it is at 0% strength, if you have VisibleShield turned on. Defined in R G B format.

shieldbadcolor=0 1 0;

ShieldGoodColor

The color the shield is when it is at 100% strength, if you have VisibleShield turned on.

shieldgoodcolor=1 0 0;

ShieldInterceptType

Bitfield representing the types of weapons that this shield can intercept. The best way to think about this is to think of it as the resulting binary. Every digit of binary that is set to one means that a weapon with that digit set to one will be intercepted by this shield, for instance, the example will result in the shield blocking weapons with types 2 and/or 3. Maxium of 32 unique types. See Shield Interception Tag Use.

ShieldInterceptType=6;

ShieldMaxSpeed

The maximum speed the repulsor will push weapons away at. Only for use on repulsor-type. Can be set to any numerical value.

shieldmaxspeed=400;

ShieldPower

How much "power" a shield can store. "Power" is not the same as energy; think of it as the shield/repulsor's private battery source. It can be drained completely by defending against weapons, even if you have lots of energy. Power is drained by the affected weapons damage. Can be set to any numerical value.

shieldpower=1000;

ShieldPowerRegen

How quickly the shield regenerates its "power", even when under attack. Regenerates the amount specified every second. Can be set to any numerical value.

shieldpowerregen=25;

ShieldPowerRegenEnergy

How much energy is required to keep the shield regenerating its "power". For instance, you might have it set so that 100 units of energy are necessary for every 25 units of "power".

shieldpowerregenenergy=100;

ShieldRadius

Defines the size of the area the shield/repulsor protects. Can be set to any numerical value.

shieldradius=500;

ShieldRepulsor

If set to 1, the "shield"-type weapon will repulse projectiles. If set to 0, it will destroy them. Can be set to 1 or 0.

shieldrepulsor=1;

ShieldStartingPower

If set the shield starts with this much power instead of 0. Can be set to any numerical value.

shieldStartingPower=100;

SmartShield

If set to 1, the shield/repulsor will not affect owned/allied weapons. Can be set to 1 or 0.

smartshield=1;

VisibleShield

If set to 1, the shield will be visible. Only for use on shield-type. Can be set to 1 or 0.

visibleshield=1;

VisibleShieldHitFrames

Numbers of frames how long the shield should be visible after it got hit (the alpha value fades after the hit). Can be set to any numerical value. (default: 0 frames)

visibleShieldHitFrames=5;

VisibleShieldRepulse

If set to 1, the repulsing effect will be visible. Only for use on repulsor-type. Can be set to 1 or 0.

visibleshieldrepulse=1;

⚠️ **GitHub.com Fallback** ⚠️