WeaponTemplate
From TM-Modding-Wiki
WeaponTemplates define the effects of weapons. A weapon can have a variety of functions and is not limited to dealing damage; many dummy weapons deal no damage at all and only use side effects. Aside from being used by units, weapons may also be triggered by Special Powers or called upon by certain modules.
Weapon Template
Values are set to 1.09 default values.
<WeaponTemplateid=""Required Sets the WeaponTemplate´s name for reference in other Assets; must be unique in the mod; StringName=""OptionalAttackRange="0"Optional Sets the maximum range in which an attack with this weapon is possible; Real, world unitsMinimumAttackRange="0"Optional Sets the minimum range in which an attack with this weapon is possible; Real, world unitsRangeBonusMinHeight="0"Optional Sets the minimum height required to gain a range bonus; Real, world units; unverified, possibly not workingRangeBonus="0"Optional Sets the range bonus gained when above RangeBonusMinHeight; Real; unverified, possibly not workingAcceptableAimDelta="0d"Optional Sets the maximum angle at which an attack can be made even when not directly facing the target; AngleAimDirection="0"OptionalScatterRadius="0"Optional Sets the radius around the target in which this weapon may hit; disables homing ability when ≠ 0; RealScatterLength="0"Optional Sets the range in front of and behind the target in which this weapon may hit; disables homing ability when ≠ 0; RealScatterTargetScalar="0"OptionalScatterIndependently="false"OptionalDisableScatterForTargetsOnWall="false"OptionalWeaponSpeed="99999.0"Optional Sets the speed at which the projectile of this weapon travels; Real, world units/secondMinWeaponSpeed="99999.0"Optional Sets the maximum speed at which the projectile of this weapon travels; Real, world units/second; reported to be inoperableMaxWeaponSpeed="99999.0"Optional Sets the maximum speed at which the projectile of this weapon travels; Real, world units/second; reported to be inoperableScaleWeaponSpeed="false"OptionalCanBeDodged="false"OptionalIdleAfterFiringDelaySeconds="-1s"OptionalHoldAfterFiringDelaySeconds="0s"OptionalHoldDuringReload="false"OptionalCanFireWhileMoving="false"Optional Defines if this weapon can be used while the unit it is assigned to is moving; BoolCanFireWhileCharging="false"OptionalWeaponRecoil="0d"Optional Sets the angle to which the unit it is assigned to will pitch to from recoil; AngleMinTargetPitch="-180d"Optional Sets the targeting angle below which a target may not be attacked; AngleMaxTargetPitch="180d"Optional Sets the targeting angle above which a target may not be attacked; AnglePreferredTargetBone=""Optional Sets the name of the bone on the target that will be aimed at if applicable; StringFireSound=""OptionalFireSoundPerClip=""OptionalFiringLoopSound=""OptionalFiringLoopSoundContinuesDuringReload=""OptionalFireFX=""OptionalFireVeteranFX=""OptionalFireFlankFX=""OptionalPreAttackFX=""Optional
