Weapon

CreateWeaponType(string name)
Multiple
name: Name of the weapon type.
Style(string style)
Required
style: Weapons come in three styles.
Damage()
Required
Damage defines how much damage this weapon does to various armour classes.
Amount(integer amount)
Required
amount: Amount of damage this weapon does.
Effective(string armourclass, float percentage)
Multiple, Range percentage(0%, 100%)
Armour classes which are not defined default to 0% effectiveness.
armourclass: Armour class which the effectiveness is being defined.
percentage: The percentage of the amount of damage which is applied to this armour class.
Modifiers()
Optional
See here for more details.
NodeStyle(string style)
Optional(NULL)
style: The node style allows for the weapon to manipulate the geometry of the unit in differing ways.
Nodes(string node1, string node2)
Optional (depending upon the node style)
If one node is required then then a single node should be specified.
If two nodes are required then two nodes should be specified.
node1: Name of the first node. Nodes should be prefixed by "CP-".
node2: Name of the second node.
MaxRange(float range)
Optional(50), Range(0, 500)
range: The maximum range of this weapon.
MinRange(float range)
Optional(0), Range(0, MaxRange)
range: The minimum range of this weapn.
AvoidRange(flaot range)
Optional(20), Range(0, 100)
range: Range to consider objects which are not the target and avoid hitting them.
VertAngle(float angle)
Optional(90), Range(0, 180)
angle: The centre of the allowed firing frustrum measured in degrees from directly up.
HorizAngle(float angle)
Optional(90), Range(-180, 180)
angle: The centre of the allowed firing frustrum measured in degrees from right increasing anti-clockwise.
VertSerparation(float angle)
Optional(10), Range(0, 180)
angle: The seperation from the VertAngle of the allowed firing frustrum in degress.
HorizSeperation(float angle)
Optional(10), Range(0, 180)
angle: The seperation from the HorizAngle of the allowed firing frustrum in degress.
VertDefault(float angle)
Optional(VertAngle), Range(0, 180)
angle: The default verticle angle to orient the weapon.
HorizDefault(float angle)
Optional(HorizAngle), Range(-180, 180)
angle: The default horizontal angle to orient the weapon.
TurnRate(float rate)
Optional(3600)
rate: Number of degrees per second to allow the weapon to rotate.
TurnError(float error)
Optional(0.005), Range(0, 1)
error: Amount of allowed error when turning the weapon before being satisfied and firing anyhow. This value is compared to 1 - the dot product of the direction of the weapon and the direction it need to be facing.
Ammunition(integer amount)
Optional(0)
amount: Amount of ammunition this weapon holds. If set to 0 then this weapon has infinite ammunition.
HeightOffset(float distance)
Optional(0), Range(0, 500)
distance: Amount of distance to target above the target.
Delay(float time)
Required(except for constant style weapons where this value is irrelevant)
time: Minimum time between firings of the weapon.
distance: Amount of distance to target above the target.
Fixed(bool flag)
Optional(0)
flag: Set this to have the weapon fire projectiles using the orientation of the firing point instead of using the direction to the solution. Only really useful for guided trajectory projectiles.
KillUser(bool flag)
Optional(0)
flag: When the weapon is fired it kills the unit which is holding the weapon.
HighTrajectory(bool flag)
Optional(0)
flag: Selects the high trajectory solution when calculating arc projectile trajectories.
OneShot(bool flag)
Optional(0)
flag: Fires once and then stops firing.
LeadAngle(bool flag)
Optional(0)
flag: Weapon will fire at the predicted position of the target. Can make hitting of moving targets better.
PotShot(bool flag)
Optional(1 if horizontal serpation is >= 90)
flag: Weapon will take pot shots at targets when the units is on the move.
InitialSpeed(float speed)
Optional, Applicable to Projectile style weapon with Straight or Guided trajectory projectiles.
speed: The initial speed to give projectiles in kilometres per hour.
Projectile(string projectile)
Required for Projectile style weapons.
projectile: The projectile which this weapon fires.
FirePoints()
Optional
Fire points allows specification of where the weapon fires from.
Add(string node, float frame)
Multiple, Optional frame(0)
node: Name of the node of the units mesh where this firing point is located.
frame: Frame of the firing animation (if any) to fire from this firing point.