Weapon Variables
From Spring
Weapon Variable 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. 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; |
| 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 targetting (the shoot will still collide with features). Can be 1 or 0. | avoidFeature=0; |
| Ballistic | Set to 1 for the weapon to be subjected to gravity, travelling in an arc through the air, such as cannons. Ballistic is mutually exclusive to LineOfSight and Dropped. Can be 1 or 0. | ballistic=1; |
| BeamLaser | Whether this weapon is a beam laser or not. Beam lasers instantly hit their targets. Rendertype must be 0. Mutually exclusive to BeamWeapon. Can be 1 or 0. | beamlaser=1; |
| BeamTime | How long to fire the laser before waiting for ReloadTime to start. Can be any numeric value. Defaults to 1. | beamtime=0.5; |
| BeamWeapon | Whether this weapon is a regular laser or not. BeamWeapons (lasers) do not instantly hit their targets, and are affected by the weaponvelocity tag. Mutually exclusive to BeamLaser. Can be 1 or 0. | beamweapon=1; |
| 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 enemy units range, only works on plasma (rendertype=4) weapons last I checked. 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 |
| CanAttackGround | 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 | An obsolete tag only recognized for compatibility purposes. While this still works for lasers, using rgbcolor=X X X; is a much, much better route. Plus, the RGBColor tag will override any color=x; tags in the tdf. | color=1; |
| Color2 | An obsolete tag only recognized for compatibility purposes. | color=2; |
| ColorMap | Only used by ballistic ('cannon' type) weapons. Must be a CColorMap type. | colorMap=1 0 0 1 0 1 0 1; (red to green fade) |
| 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; |
| Coverage | The range for anti-weapon weapons, like antinukes. This will be shown on the minimap as a guide. Can be any numeric value. | coverage=1280; |
| CylinderTargetting | If greater than 0, range will be checked in a cylinder instead of a sphere:
half height=unitradius*cylinderTargetting Defaults to 1 for Melee type weapons, 0 otherwise. (image) |
cylinderTargetting=0; |
| Dropped | Sets the weapon to be dropped, like from a bomber. Must be RenderType=6 and needs the Model tag to be specified. Mutually exclusive to Ballistic and LineOfSight. Can be set to 1 or 0. | dropped=1; |
| Duration | For how many seconds a beam weapon will be fired before waiting for reload time. 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. | 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. | 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; |
| 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; |
| 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. | FallOffRate=0.5; |
| GroundBounce | Weather the weapon projectile will bounce on the ground (on land or the ocean floor). Can be 0 or 1, defaults to 0 (off) | groundbounce=1; |
| Guidance | Specifies whether or not the weapon is capable of correcting its trajectory mid-flight. Will not track a moving target. Works only on missile and torpedo weapons. Can be set to 1 or 0. See TurnRate for information on specifying how well a weapon can track a target. Requires rendertype=1, lineofsight=1, and selfprop=1; | guidance=1; |
| HeightMod | Changes the sphere weapon range into an ellipsis. If it is larger 1.0 the weapon can't shoot as height as far, i.e. 0.5 means it can shoot twice as height as far (image). Note that this may not work well with beam weapons, use minIntensity (0..1) tag to fix that. | heightMod=1; |
| 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 Cruise tag. | interceptor=1; |
| LineOfSight | LineOfSight weapons ignore gravity and must have a direct line from the firing point to the impact point in order to be fired. Can be set to 1 or 0. Mutually exclusive to Ballistic and Dropped. | lineofsight=1; |
| 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; |
| 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 | For beamlasers - always hit with some minimum intensity (a damage coeffcient normally dependent on distance - range 0 to 1). 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; |
| NoExplode | Whether or not the weapon will explode on impact or continue on its path. An example is the d-gun. Can be set to 1 or 0. | noexplode=1; |
| NoSelfDamage | This weapon will not damage the unit that fired it. For instance, a nuke silo could shoot itself and not take any damage if this was active. 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; |
| ParalyzerTime | 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=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 | The way the weapon will be displayed. Certain rendertypes are incompatibile with other tags, but it's generally for a logical reason. The rendertypes are as follows: 0 - Laser, 1 - Model, 3 - Plasma, 4 - Unit explosion (usally), 5 - Flamethrower, 6 - Dropped, 7 - Lightning. There's no documented use of rendertype=2 in OTA, and it probably doesn't do anything in Spring. 3 and 4 are usually interchangeable, both can be used to render a plasma/EMG/whatever shot; this is probably for compatibility. | rendertype=1; |
| 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 |
| Selfprop | Required for Guidance tag. This weapon can propel itself and can have things like acceleration, rather than always travelling at one speed. See Guidance, StartVelocity, WeaponAcceleration, WeaponVelocity. Can be set to 1 or 0. | selfprop=1; |
| SmokeTrail | Does the projectile leave a smoke trail or not. Can be set to 1 or 0. | smoketrail=1; |
| SoundHit | The sound made whe the weapon hits. Must reference a .wav file in the .\Sounds directory. | soundhit=emghit; |
| 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; |
| 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 if a weapon has no sprayangle, all the shots will be fired at the same spot, even if the weapon's aim is off. | 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; |
| 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. Can be set to 1 or 0. | SweepFire=1; |
| TargeBorder | If nonzero, targetting units will TryTarget at the edge of collision sphere (radius*tag_value, [-1;1]) instead of its centre. Can be set between 0 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; |
| ToAirWeapon | If active, the weapon will only be capable of targetting units which are flying, or are capable of flying. 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. This worked in OTA, but I'm not 100% sure if it works in Spring. 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 | Weapon operates in two phases... eh... yeah, I honestly have no idea what the difference between this and VLaunch is. Generally use it with VLaunch as well. Can be set to 1 or 0. | twophase=1; |
| VLaunch | Set to 1 to launch the weapon vertically. Can only be used with missile-type weapons with a TurnRate. Cannot be used at the same time as Turret. Set to 1 or 0. | vlaunch=1; |
| 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 | Water weapons behave somewhat like Dropped weapons out of water, and like missiles underwater. Is the only type of weapon that can fire under water. 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 | How long until the weapon will go into its second phase. For use with missile weapons. For VLaunch weapons, the weapon will turn to actually go towards its target after the specified number of seconds has expired. For non-VLaunch missiles with a TurnRate, the weapon will go randomly off-course after this period of time. 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.
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 Variable 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; |
| 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; |