HWRVariableAttackStyle

**Description**

A reference for the variables contained in Attack Style scripts.

**Variables**

AttackStyleName = <sDescription>: valid observed values are FaceTarget, AttackRun, JustShoot, CircleStrafe, FlyRound, Kamikaze, MoveToTargetAndShoot, DogFight

Data Table = {}

* *howToBreakFormation* = <sDescription>: valid observed values are StraightAndScatter, BreakImmediately, ClimbAndPeelOff

* *inRangeFactor* = <fAmount>: Once past (this amount \* the weapon range) the ship will stop and turn it's side to the target. (FaceTarget)

* *inRangeMultiplier* = <fAmount>: Multiply (weapons?) range by this to work out when we are in range and can stop moving. (CircleStrafe)

* *happilySameHeight* = <fAmount>: We want to be less than this many metres different in height from our target. (MoveToTargetAndShoot)

* *m\_tooLongOutOfRange* = <fAmount>: When facing faster targets we will start moving after they have been out of range for this long. (FaceTarget, MoveToTargetAndShoot)

* *moveAttackMaxDistanceMultiplier* = <fAmount>: When doing a move attack we will break off after we get further than this multiplied by our max weapon range from the target. (MoveToTargetAndShoot)

* *maxTimeToSpendTryingToMatchHeight* = <fAmount>: (MoveToTargetAndShoot)

* *optimumRangeMultiplier* = <fAmount>: Our ship radius multiplied by this and then added on to the enemy radius defines the distance which we will try to maintain from the target. (CircleStrafe)

* *rangeMultiplierForHeight* = <fAmount>: Multiply the optimum range by this to work out the +/- bounds for height difference from the target. (CircleStrafe)

* *slideDistanceMultipler* = <fAmount>: Once in range and facing the target we will slide around maintaining heading until we are more than this distance multiplied by our range from the target, then we will fly normally to catch up. (FaceTarget)

* *tooSlowSpeed* = <fAmount>: (FaceTarget)

* *tooFastMultiplier* = <fAmount>: (FaceTarget)

* *facingAngle* = <iAmount>: (FaceTarget)

* *moveAttackMaxDistanceMultiplier* = <fAmount>: When doing a move attack we will break off after we get further than this multiplied by our max weapon range from the target. (FaceTarget)

* *tryToMatchHeight*= <iBoolean> Valid values are 0 or 1. (FaceTarget)

* *tryToGetAboveTarget*= <iBoolean> Valid values are 0 or 1. (FaceTarget)

* *angleFromUp* = <iAmount>: Ship is happy if we are less than this angle from the target up vector. (FaceTarget)

* *maxTimeToSpendFlyingToAbove* = <fAmount>: FaceTarget

* *flyToTargetBecauseItsFarOutOfRangeDelay* = <fAmount>: Delays for the things the attack style can do, stated in seconds. (FaceTarget)

* *flyToTargetBecauseItsMovingAwayDelay* = <fAmount>: Delays for the things the attack style can do, stated in seconds. (FaceTarget)

* *stopAndFaceTheTargetDelay* = <fAmount>: Delays for the things the attack style can do, stated in seconds. (FaceTarget)

* *flyToAboveTheTargetDelay* = <fAmount>: Delays for the things the attack style can do, stated in seconds. (FaceTarget)

* *maxBreakDistance* = <fAmount>: Maximum distance to get from the target when breaking away. (AttackRun)

* *distanceFromTargetToBreak* = <fAmount>: Break off the attack run when this distance from the target. (AttackRun)

* *safeDistanceFromTargetToDoActions* = <fAmount>: (AttackRun)

* *useTargetUp* = <iBoolean>: Valid values are 0 or 1. (AttackRun)
* faceTarget = <iBoolean>: Face target horizontally and vertically. Valid values are 0 or 1. (CircleStrafe)

* *faceTargetHorizontal* = <iBoolean>: Face the target horizontally only, don't tilt up or down. Valid values are 0 or 1. (JustShoot)

* *faceTargetVertical* = <iBoolean>: Face the target vertically only, don't rotate left or right. Valid values are 0 or 1. (JustShoot)

* *coordSysToUse*= <sDescription>: Valid observed values are Attacker, Target, TargetAttackPoint. (AttackRun)

* *horizontalMin* = <fAmount>: Data for picking the position in space to fly to when we break off the attack run. (AttackRun)

* *horizontalMax* = <fAmount>: Data for picking the position in space to fly to when we break off the attack run. (AttackRun)

* *horizontalFlip* = <fAmount>: Data for picking the position in space to fly to when we break off the attack run. (AttackRun)

* *verticalMin* = <fAmount>: Data for picking the position in space to fly to when we break off the attack run. (AttackRun)

* *verticalMax* = <fAmount>: Data for picking the position in space to fly to when we break off the attack run. (AttackRun)

* *verticalFlip* = <iAmount>: Data for picking the position in space to fly to when we break off the attack run Possibly a boolean. (AttackRun)

* *axisRotation* = <fAmount>: Axis used for circling will be rotated by between -/+ this amount each step of the circle. (FlyRound)

* *maxAxisRotation* = <fAmount>: Axis will never be more than this many degrees from vertical. (FlyRound)

* *circleSegmentAngle* = <fAmount>: Angle between points on the circle. (FlyRound)

* *angleVariation* = <fAmount>: Multiply CircleSegmentAngle by from 1-AngleVariation to 1+AngleVariation. (FlyRound)
* *circleHeight* = <fAmount>: Circle midpoint will be this far above the target centre. (FlyRound)

* *distanceFromTarget* = <fAmount>: Ships will fly at this distance from the target's surface. (FlyRound)

* *distanceVariation* = <fAmount>: Multiply DistanceFromTarget by from 1-DistanceVariation to 1+DistanceVariation. (FlyRound)

* *percentChanceOfCutting* = <fAmount>: Percentage chance that after completing a segment of the circle a ship will cut across the circle. (FlyRound)

* *minSegmentsToCut* = <iAmount>: When cutting across the circle skip at least this many segments. (FlyRound)

* *maxSegmentsToCut* = <iAmount>: When cutting across the circle skip up to this many segments. (FlyRound)

* *minSpeedFraction* = <fAmount>: Ships will try to go no slower than this fraction of their max speed in a dogfight. (DogFight)

**Description**

The following are placed inside the Data table after the variables listed above. They determine what the ship does at the end of each cycle.

* Random Actions = {}

* BeingAttackedActions = {}

* FiringActions = {}

**Variables**

* *Type* = <sDescription>: observed valid values are NoAction, PickNewTarget, InterpolateTarget, MoveRoundTarget, FlightManuever, StrafeReRange, StrafeReHeight, StrafeReSpin

* *Weighting* = <iAmount>

* *minParam* = <iAmount>: used for InterpolateTarget, MoveRoundTarget, StrafeReRange, StrafeReHeight, StrafeReSpin

* *maxParam* = <iAmount>: used for InterpolateTarget, MoveRoundTarget, StrafeReRange, StrafeReHeight, StrafeReSpin

* *FlightManeuverName* = <sDescription>: corresponds to manuevers listed in flightmanuevers.lua