Weapon Variables: what do they do? - Page 2

Weapon Variables: what do they do?

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Dunno, I understood the description in the changelog already (two bitfields, ANDed, if result >0 intercept).
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

ZOMG. Wow, I suck- been busy with the usual bazillion things, and y'all have done almost everything already. Lemme read through it...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

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.
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. 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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 2:
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.
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 3:
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 4:
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.
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 5:
How long to fire the laser before waiting for ReloadTime to start. Can be any numeric value. Defaults to 1.
Only applies to BeamLasers and LargeBeamLasers. How long to fire the BeamLaser/LargeBeamLaser before waiting for ReloadTime to start. Can be any numeric value. Defaults to 1.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 6:
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.
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 7:
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.
This value had better get fixed for everything someday, or Argh will code it himself.

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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 8:
How fast the Burst fires. If set much below 0.1, it stops having any discernable effect.
How fast the Burst fires. The maximum rate at which a weapon may fire in Spring is 32 times per second, or one "tick". A value lower than 0.03, therefore, is firing as quickly as the engine will allow.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 9: Under heading for Model (since this probably wouldn't be clear otherwise. Please change the following:
model=missile;
To the more-clear examples:

model=missile; Or model=missile.s3o;
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 10: SmokeTrail
Does the projectile leave a smoke trail or not. Can be set to 1 or 0.
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.

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 ;)
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 11: 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.
This variable never worked in OTA, and doesn't work in Spring yet, either. 'Nuff said (until I fix it).
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 12:
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.
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

Edit 13: Wobble
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.
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.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

... 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 :|
Persh
Posts: 24
Joined: 10 Aug 2006, 04:07

Post by Persh »

Er, I hit refresh and 3 more replies come up. Use edit moire!
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Isn't the BeamWeapon tag used for lightning as well?

And Wobble changes the weapon's orientation more than once.
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

1. No, you don't need BeamWeapon for lighting. Just Rendertype=7 and LineofSight=1, I believe.

2. I just got that from a very quick skim of the code. Could be wrong... too tired to look right now.
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

So I assume that means my shield intercept descriptions are pretty good then? Just trying to make sure they are ok as they can confuse the hell out of people not fimilar with them.

IE.. Caydr... those make sense now? =P
Post Reply

Return to “Game Development”