Data Weapon - BLKTower/TestWiki GitHub Wiki

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

Template {Template}

FieldType: Template

Parent {Parent}

FieldType: Parent

Family {Family}

Used for enabling/disabling families of weapons via behaviors.

Effect {Effect}

The Effect created by the weapon on the target unit.

See: Data/Effect

Critical Chance {Critical-Chance}

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.

Critical Effect {Critical-Effect}

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

Independent Target Acquisition {Independent-Target-Acquisition}

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.

Independent Pre And Back Swing {Independent-Pre-And-Back-Swing}

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.

Can Fire While Moving {Can-Fire-While-Moving}

If this is checked, using this weapon will not stop movement.

When checked, allows the weapon to be used while the unit is moving.

Channeled {Channeled}

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:

Force Cast Followthrough {Force-Cast-Followthrough}

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.

No Turn Outside Of Arc {No-Turn-Outside-Of-Arc}

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).

Validators {Validators}

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.

Stats {Stats}

Pre Swing {Pre-Swing}

The delay between the weapon starting to fire and the effect being executed.

Used with Back Swing for the purposes of animating the unit.

Random Preswing Delay Min {Random-Preswing-Delay-Min}

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.

Random Preswing Delay Max {Random-Preswing-Delay-Max}

The maximum random delay added to the weapon's Pre Swing stats. Supports negative numbers.

Back Swing {Back-Swing}

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.

Period {Period}

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.

Use Initial Cooldown {Use-Initial-Cooldown}

If checked, this weapon will start on cooldown.

Use Cooldown On Enable {Use-Cooldown-On-Enable}

If checked, this weapon will enter cooldown when it is disabled then enabled.

Minimal Range {Minimal-Range}

The minimum distance the weapon can fire at.

Range {Range}

The maximum distance the weapon can fire at.

Scan Range {Scan-Range}

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.

Arc {Arc}

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.

Buffer Range {Buffer-Range}

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.

Distance Check Mode {Distance-Check-Mode}

EnumType: DistanceCheckModes

Distance Extend Mode {Distance-Extend-Mode}

EnumType: DistanceExtendModes

Target Filter {Target-Filter}

Used to determine the valid target types for the weapon.

Primary Sort Keys {Primary-Sort-Keys}

Potential targets are sorted based on these parameters.

Key {Key}

EnumType: SearchFilter.FilterSortMethod

The method used to sort potential targets.

Order {Order}

EnumType: SearchFilter.FilterSortOrder

The order in which potential targets are sorted for priority.

Secondary Sort Keys {Secondary-Sort-Keys}

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.

Key {Key}

EnumType: SearchFilter.FilterSortMethod

The method used to sort potential targets.

Order {Order}

EnumType: SearchFilter.FilterSortOrder

The order in which potential targets are sorted for priority.

Player {Player}

EnumType: SearchFilter.Flag

Targets owned by the player that created the search will match the filter.

Ally {Ally}

EnumType: SearchFilter.Flag

Targets owned by an ally of the player that created the search will match the filter.

Enemy {Enemy}

EnumType: SearchFilter.Flag

Targets owned by an enemy of the player that created the search will match the filter.

Neutral {Neutral}

EnumType: SearchFilter.Flag

Targets that are neutral to the player that created the search will match the filter.

Unit {Unit}

EnumType: SearchFilter.Flag

Targets that use the "Unit" category will match the filter.

Missile {Missile}

EnumType: SearchFilter.Flag

Targets that use the "Missile" category will match the filter.

Structure {Structure}

EnumType: SearchFilter.Flag

Targets that use the "Structure" category will match the filter.

Air {Air}

EnumType: SearchFilter.Flag

Targets that use air unit collision will match the filter.

Ground {Ground}

EnumType: SearchFilter.Flag

Targets that use ground unit collision will match the filter.

Stealth {Stealth}

EnumType: SearchFilter.Flag

Targets with a behavior that uses the stealth flag will match the filter.

Invulerable {Invulerable}

EnumType: SearchFilter.Flag

Targets with the invulnerable flag will match the filter.

Alive {Alive}

EnumType: SearchFilter.Flag

Targets that are currently alive will match the filter.

Disabled {Disabled}

When checked, the weapon is disabled by default. Requires behaviors or other means to be enabled.

⚠️ **GitHub.com Fallback** ⚠️