Tutorial - Beam Weapons
This is a short tutorial into both making of beam weapons and in tweaking them. Some knowledge on table editing is usefull and as is basic understanding of Weapons.tbl.
Contents
Making a Basic Beam Weapon
Adding Beam Sections
Adding new beam sections is rather straightforward when it is done with weapons.tbl, however there may be problems when using *-wep.tbms to add or change existing beam sections if the additional +Index: table option is not properly used. If no index number is given to a beam section in -wep.tbm game assumes it to be an additional beam texture even if it wouldnt be completely defined. However if you define index for the beam section you can edit an existing beam section.
Different Beam Types
Beam types in FreeSpace open are clearly different from each other. Understanding their differences and also their unique features is usefull in creating or editing beam weapon's table entry.
Type 0 Beams
Type 0 beams are basic straightfiring beam weapons without anything additional features. They use +Miss Factor: values for determining weapon accuracy. Generally if they hit their target they will cause full damage. Type 0 beams do not function as fighter beams.
Few examples are SGreen, BGreen and BFRed.
Type 1 Beams
Type 1 beams are slashing beams. These beams use certain target models size (or more precisely, octants) in determining the lenght of the slash and tend to miss fairly often. They also use +Miss Factor: values for determining weapon accuracy. Generally it is very rare occurrance if they cause full damage however slashing beams tend to damage ship subsystems as well as the hull quite efficiently unlike type 0 beams. Type 1 beams do not function as fighter beams.
Few examples are TerSlash, and VSlash.
Type 2 Beams
Type 2 beams are direct fire beams. When mounted on turrets they operate as type 0 beams however they can be used as fighter beams. When used as fighter beams they disregard any +Miss Factor: settings.
Type 3 Beams
Type 3 beams have different behaviours depending on the type of its target. Against small targets, or more precisely against targets defined with this certain Objecttypes.tbl option, they fire a number of short beam pulses (defined with +Shots:) that have their total lifetime equal to the defined lifetime of the beam. Against larger targets they behave exactly like type 0 beams. In both cases the beam use +Miss Factor: values for it's accuracy. Type 3 beams do not function as fighter beams.
Few examples are AAAf, and SAAA.
Type 4 Beams
Type 4 beams are direct fire beams that fire only along the firing turrets normal. If mounted on single-part turret they will only fire where that turret's normal is pointing in similar manner as the 'swarm primaries' - that is they wont anything unless using extremely strict mission design - but with multi-part turrets function quite nicely. They do not +Miss Factor: values for determining weapon accuracy and this can make these beams exceesingly deadly however unlike other beam weapons these will become inaccurate if firing ship's weapons subsystem is damaged.
There are no examples of this beam type.
Adjusting Beam Ranges and Accuracy
Beam weapons use several different table options for setting the beam ranges.
Beam Targetting Ranges
Generally beams target any legal - that is anything not protected by other weapon settings such as 'huge' - target withing the set weapon range. However this range can be set by using +Weapon Range: and +Weapon Min Range: for setting the maximum and minimum targetting ranges respectively. It should be also noted that beams do use the range calculated for other weapons as well (lifetime x Velocity) despite the fact they actually do not use these values for anything else. That if the lifetime x velocity is smaller than the set weapon range then beam uses the lifetime x velocity for determining the maximum range. AI uses this range for determining when to and against how distant targets they fire the beam weapons.
Actual Beam Range
Normally beam range is 30 000 m. This can however be adjusted using +Range: option under $BeamInfo: in weapons.tbl. This effectively stops or rather dissipates (not a sharp ending) the beam at that range. It is worth noting that if the actual beam range is shorter than the set beam targetting range then AI will start firing the beam against targets beyond its range.
Beam Accuracy
Normally beam accuracy is determined with +Miss Factor: that uses set accuracy values for each difficulty level. Higher values increase the change of beams missing their targets. However direct fire beams (type 2 beams as fighter beams or type 4 beams in turrets) use normal targetting 'rules'. That is they use the weapon velocity and target velocity and range for calculating lead for the target. As beams are instantanous this causes the beams to miss their targets or rather AI to fire its' beams exactly in front of the target.