-
Notifications
You must be signed in to change notification settings - Fork 0
Data Weapon
Table of Contents |
Data\Weapon {DataDataWeapon}
Weapons are used to create auto-attacks for units. Similar to abilities, weapons create effect trees that determine their functionality. Common Weapon Patterns
- Melee Weapon: Weapon > Damage
- Melee Weapon (AOE): Weapon > Area Search > Damage
- Ranged Weapon: Weapon > Launch Missile > Damage
FieldType: Template
FieldType: Parent
Used for enabling/disabling families of weapons via behaviors.
The Effect created by the weapon on the target unit.
See: Data/Effect
The chance that the weapon attack is considered a critical. The value is a fraction, so 0 is 0% chance and 1 is 100% chance of critical hit.
The effect that is executed instead of the Effect when the ability is a critical. If this is not set, the default Effect will be used on critical instead.
See: Data/Effect
If this is set, this weapon can acquire its own target and search for a target.
When checked, the weapon can acquire its own target, rather than being limited to the current target of the unit. This is useful for making secondary weapons.
If this is checked, this weapon can fire when other weapons are in pre or back swing stage.
When checked, the weapon can be fired while other weapons on the unit are in preswing/backswing state. Otherwise only weapon can be fired at a time.
If this is checked, using this weapon will not stop movement.
When checked, allows the weapon to be used while the unit is moving.
If this is checked, this weapon will be a channelling weapon along with a channeling persistent effect
When checked, the weapon will function as a channeled weapon if the effect is a persistent effect. Channeled weapons will continuously fire after the Pre Swing, using data from the persistent effect:
- The periodic durations as the channeled tick rate.
- The periodic effects as the channeled effects each tick rate.
- The periodic count for will be ignored, as the weapon will fire continuously as long as it has a valid target.
If target dies, this flag will keep the weapon firing to the last valid target position
When checked, the weapon will continue firing and execute its effect if the target dies or becomes invalid during the Pre Swing, rather than canceling the attack (and attack animation). This tends to make ranged weapon attack animations look better when facing many targets as it prevents the unit from continuously canceling animations.
If the flag is set and target is out of arc, this weapon cannot be used to attack
When checked, the unit won't turn to face targets that are outside of the primary weapon arc. This is useful for units that are not meant to turn (such as in shoot-em-up type games).
Weapon does not execute if any validator fails (does not trigger cost or cooldown)
Each validator must succeed in order for the weapon to be able to be fire.
The delay between the weapon starting to fire and the effect being executed.
Used with Back Swing for the purposes of animating the unit.
The minimum random delay added to the weapon's Pre Swing stats. Supports negative numbers.
Useful for preventing groups of units that share the same weapon from firing in sync.
The maximum random delay added to the weapon's Pre Swing stats. Supports negative numbers.
The delay between the effect being executed and the weapon firing state ending.
Used with Pre Swing for the purposes of animating the unit. The sum of Pre Swing plus Back Swing is the minimum cooldown of the weapon.
The cooldown of the weapon or how long the unit must wait to use it again.
The duration of the cooldown is effectively extended by the Pre Swing, as the period doesn't begin counting down until after the damage point.
If checked, this weapon will start on cooldown.
If checked, this weapon will enter cooldown when it is disabled then enabled.
The minimum distance the weapon can fire at.
The maximum distance the weapon can fire at.
The range that the unit will use to search for targets to acquire when using this weapon.
Typically set to the same value as Range.
The angle in front of the caster that targets must be in. If the target is outside this arc, the caster will attempt to turn to face the target before casting.
Example: Arc 360 means the ability can be cast in any direction, 90 is a cone in front, and 0 is directly facing the target.
Determines the distance targets must move beyond of the weapon range that will cause the weapon to cancel during pre swing. The default value of 0 causes the buffer range to be infinite.
Determines the distance targets must move beyond of the weapon range that will cause the weapon to cancel during pre swing. The default value of 0 causes the buffer range to be infinite.
EnumType: DistanceCheckModes
EnumType: DistanceExtendModes
Used to determine the valid target types for the weapon.
Potential targets are sorted based on these parameters.
EnumType: SearchFilter.FilterSortMethod
The method used to sort potential targets.
EnumType: SearchFilter.FilterSortOrder
The order in which potential targets are sorted for priority.
If a pair of targets have the same priority value due to Primary Sort Keys, this sort key is then used to determine which unit to target.
EnumType: SearchFilter.FilterSortMethod
The method used to sort potential targets.
EnumType: SearchFilter.FilterSortOrder
The order in which potential targets are sorted for priority.
EnumType: SearchFilter.Flag
Targets owned by the player that created the search will match the filter.
EnumType: SearchFilter.Flag
Targets owned by an ally of the player that created the search will match the filter.
EnumType: SearchFilter.Flag
Targets owned by an enemy of the player that created the search will match the filter.
EnumType: SearchFilter.Flag
Targets that are neutral to the player that created the search will match the filter.
EnumType: SearchFilter.Flag
Targets that use the "Unit" category will match the filter.
EnumType: SearchFilter.Flag
Targets that use the "Missile" category will match the filter.
EnumType: SearchFilter.Flag
Targets that use the "Structure" category will match the filter.
EnumType: SearchFilter.Flag
Targets that use air unit collision will match the filter.
EnumType: SearchFilter.Flag
Targets that use ground unit collision will match the filter.
EnumType: SearchFilter.Flag
Targets with a behavior that uses the stealth flag will match the filter.
EnumType: SearchFilter.Flag
Targets with the invulnerable flag will match the filter.
EnumType: SearchFilter.Flag
Targets that are currently alive will match the filter.
When checked, the weapon is disabled by default. Requires behaviors or other means to be enabled.