WeaponTemplate - TM-Modding-Wiki

WeaponTemplate

From TM-Modding-Wiki

Jump to: navigation, search

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.

<WeaponTemplate
id="" Required Sets the WeaponTemplate´s name for reference in other Assets; must be unique in the mod; String
Name="" Optional
AttackRange="0" Optional Sets the maximum range in which an attack with this weapon is possible; Real, world units
MinimumAttackRange="0" Optional Sets the minimum range in which an attack with this weapon is possible; Real, world units
RangeBonusMinHeight="0" Optional Sets the minimum height required to gain a range bonus; Real, world units; unverified, possibly not working
RangeBonus="0" Optional Sets the range bonus gained when above RangeBonusMinHeight; Real; unverified, possibly not working
AcceptableAimDelta="0d" Optional Sets the maximum angle at which an attack can be made even when not directly facing the target; Angle
AimDirection="0" Optional
ScatterRadius="0" Optional Sets the radius around the target in which this weapon may hit; disables homing ability when ≠ 0; Real
ScatterLength="0" Optional Sets the range in front of and behind the target in which this weapon may hit; disables homing ability when ≠ 0; Real
ScatterTargetScalar="0" Optional
ScatterIndependently="false" Optional
DisableScatterForTargetsOnWall="false" Optional
WeaponSpeed="99999.0" Optional Sets the speed at which the projectile of this weapon travels; Real, world units/second
MinWeaponSpeed="99999.0" Optional Sets the maximum speed at which the projectile of this weapon travels; Real, world units/second; reported to be inoperable
MaxWeaponSpeed="99999.0" Optional Sets the maximum speed at which the projectile of this weapon travels; Real, world units/second; reported to be inoperable
ScaleWeaponSpeed="false" Optional
CanBeDodged="false" Optional
IdleAfterFiringDelaySeconds="-1s" Optional
HoldAfterFiringDelaySeconds="0s" Optional
HoldDuringReload="false" Optional
CanFireWhileMoving="false" Optional Defines if this weapon can be used while the unit it is assigned to is moving; Bool
CanFireWhileCharging="false" Optional
WeaponRecoil="0d" Optional Sets the angle to which the unit it is assigned to will pitch to from recoil; Angle
MinTargetPitch="-180d" Optional Sets the targeting angle below which a target may not be attacked; Angle
MaxTargetPitch="180d" Optional Sets the targeting angle above which a target may not be attacked; Angle
PreferredTargetBone="" Optional Sets the name of the bone on the target that will be aimed at if applicable; String
FireSound="" Optional
FireSoundPerClip="" Optional
FiringLoopSound="" Optional
FiringLoopSoundContinuesDuringReload="" Optional
FireFX="" Optional
FireVeteranFX="" Optional
FireFlankFX="" Optional
PreAttackFX="" Optional
Personal tools
languages