Weapon Variables: what do they do?
Moderator: Moderators
First fix:
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. All weapons in Spring default to Ballistic (CannonWeapon) behaviors unless certain other variables are set. Ballistic weapons may use Texture1, which is a texture with an alpha channel that determines transparency values, and may use the values RGBColor and RGBColor2, in the Float3 format- i.e., "0.0 0.0 1.0" is pure BLUE. Preferably as of 0.73b, this should be a TGA, 32-bit, for maximum compatibility. Ballistic weapons may also use a model in either 3DO or S3O format, which may not (at this time) be subject to animation instructions.
Should read: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.
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. All weapons in Spring default to Ballistic (CannonWeapon) behaviors unless certain other variables are set. Ballistic weapons may use Texture1, which is a texture with an alpha channel that determines transparency values, and may use the values RGBColor and RGBColor2, in the Float3 format- i.e., "0.0 0.0 1.0" is pure BLUE. Preferably as of 0.73b, this should be a TGA, 32-bit, for maximum compatibility. Ballistic weapons may also use a model in either 3DO or S3O format, which may not (at this time) be subject to animation instructions.
Edit 2:
This TDF value is actually confusing to many new modders. This specifies how inaccurate a weapon is. The number is any number from 0 to 65535, with 65535 describing a nearly-360-degree arc of possible inaccuracy, determined by a random number generator. A larger number is less accurate. If this tag is missing entirely, then the shot's position will exactly match the angle XYZ of the firing weapon, subject to the error built into Tolerance. The values for Accuracy are entirely random, and result in a cone. No corrections are made for shots that will hit a nearby friendly target or the ground.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.
Edit 3:
How large the weapon's impact explosion is, in Spring Units. 8 Spring Units, on a square, is the size of one "Footprint", the universal square used for all Spring objects. For best efficiency, you should use powers of 8, but this is not necessary, and this variable is a Float, so you can use fine controls if you wish- but be aware that Spring calculates hits by looking at a quadfield of cubes. This value also affects how powerful the weapon's default impulse strength will be. As of this writing, 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, but this bug may be fixed before 0.73b is released. Setting this to below a value of 8 may result in occasional "misses" when in actuality the shots have hit the targets.
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.
How large the weapon's impact explosion is, in Spring Units. 8 Spring Units, on a square, is the size of one "Footprint", the universal square used for all Spring objects. For best efficiency, you should use powers of 8, but this is not necessary, and this variable is a Float, so you can use fine controls if you wish- but be aware that Spring calculates hits by looking at a quadfield of cubes. This value also affects how powerful the weapon's default impulse strength will be. As of this writing, 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, but this bug may be fixed before 0.73b is released. Setting this to below a value of 8 may result in occasional "misses" when in actuality the shots have hit the targets.
Edit 4:
Whether this weapon is a BeamLaser or not. BeamLasers hit the target point every tick, and do damage, per tick, based on Damage/Beamtime/ticks. Each tick, the BeamLaser will show a custom ExplosionGenerator effect, so these effects must be either very fast, or have very low alpha values, to avoid ugly overdraw problems. Rendertype must be 0. Mutually exclusive to BeamWeapon. Can be 1 or 0.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.
Edit 6:
BeamWeapons ("lasers") are weapons that are not affected by gravity and use a bitmap that is aligned with the vector they are shot. They can be longer or shorter, depending on the WeaponVelocity and Duration tags (WeaponVelocity/Duration=Length). These weapons do not instantly hit their targets, and are affected by the WeaponVelocity tag. This value is mutually exclusive to BeamLaser. To make them prettier, you can specify a Texture1 (the main "beam", a Texture2 (this is a texture that is split down the middle and used for the "endcaps" of the beam) and a RGBColor, RGBColor2 which specify the outer and inner colors. You can also use the values Intensity, which overrides the source bitmaps's alpha, and Thickness, which is the width of the textured rectangle in Spring Units (default is 1.0). And finally, with 0.73b, we can specify CoreThickness, which is a value specifying the balance between the RGB values of the core and outer edge of the beam, and LaserFlareSize, which specifies the size of the flare shown (if a part is shown/hidden during the firing portion of its COB script). Can be 1 or 0.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.
Edit 7:
Er, I meant:
The weapon explodes at the end of its Range. This value only works with "plasma" (rendertype=4) weapons last time Caydr checked. Can be 1 or 0. A common usage is on flak guns, or other weapons that need to explode precisely at the end of their ranges.
This value had better get fixed for everything someday, or Argh will code it himself.The weapon blows up at the end of its range, only works on plasma (rendertype=4) weapons last I checked. Can be 1 or 0. A common usage is on flak guns.
Er, I meant:
The weapon explodes at the end of its Range. This value only works with "plasma" (rendertype=4) weapons last time Caydr checked. Can be 1 or 0. A common usage is on flak guns, or other weapons that need to explode precisely at the end of their ranges.
Edit 10: SmokeTrail
If anybody has proven this wrong with 0.72b or higher, let me know, but I found that out awhile ago. Luckily, with 0.73b, we can use an invisible texture and get rid of that little problem
Determines the projectile leave a smoke trail or not. Can be set to 1 or 0. This must be set to 1 for guidance to work. Will not work with LineOfSight or Ballistic weapons, but you can create a Ballistic weapon by making a Guided weapon with a TurnRate of 0 and TrajectoryHeight > 1.Does the projectile leave a smoke trail or not. Can be set to 1 or 0.
If anybody has proven this wrong with 0.72b or higher, let me know, but I found that out awhile ago. Luckily, with 0.73b, we can use an invisible texture and get rid of that little problem

Edit 11: TwoPhase
This variable never worked in OTA, and doesn't work in Spring yet, either. 'Nuff said (until I fix it).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.
Edit 12:
All weapons in Spring that are CannonWeapons (i.e., "balistic", in Spring's mis-spelled code) or MissileWeapons can use this value. The default value of this is 0.8 for CannonWeapons, and 0.0 for MissileWeapons. This value is a multiplier, affecting the curve of the weapon's trajectory. Setting it lower will result in a flatter trajectory arc, and vice versa (for really weird results, try values over 1 or under 0). This is most useful for missiles that we want to have a partially-ballistic flightpath, or for forcing high-velocity Ballistic weapons to curve more than gravity demands.The amount that the weapon is fired upwards. I'm pretty sure this can only work on missile weapons. It is useful for compensating for mountains or debris. Can be set between 0 and 1. 0 fires straight, 1 fires at 90 degrees (directly upward). Obviously, only useful on weapons with guidance.
Edit 13: Wobble
Wobble determines the amount the weapon will vary from its impact point. This variance is determined after 16 "ticks", precisely, so the point at which Wobble takes effect depends on the current WeaponVelocity of the projectile. This acts exactly like Accuracy, only the point at which the vector is generated is not the weapon's aimpoint, but the point XYZ that the projectile is at when WobbleTime reaches zero. See Accuracy for further details. Only affects MissileWeapons with TurnRate and TrajectoryHeight specified.The amount that a missile will wobble off-course. Probably doesn't work with Guidance weapons. Requires TurnRate. Can be set to any numerical value.
... other than that small stuff, looks pretty darn good folks, and really complete. Please feel free to correct my corrections- on a couple of points, I am sure somebody a little less lazy will go read the sourcecode of WeaponDefHandler.cpp or the Projectile code and get the really, completely accurate story.
I'm going to go take a nap now, and then go to Work
I'm going to go take a nap now, and then go to Work

-
- Posts: 197
- Joined: 04 Nov 2004, 00:33