Data/Abilities/Arm Magazine

## Arm Magazine

### Description

Is a kind of ability that spawns units that are obliged to attack the target of the creator's weapon scope.
Requires a weapon and the **Attack** ability to force spawned units to attack a target.

### Hint

* Internal (Info-Flag) ammo units require the **Use Magazine** effect to release them from the magazine
* External units can automatically choose random targets unless ordered to attack by the host unit's weapon scope
* Used in combination with the **Queue** ability to train multiple units at once
* Can set units to construct under the command card of the unit with the ability eg. Carrier

## Example Usage

### Carrier (Protoss) (Internal)

The protoss carrier has a arm magazine ability (**Carrier - Hangar**) which is internal and does not ignore unit cost under **Stats - Flags**. The Carrier weapon uses a **Use Magazine effect** to release the interceptors from the magazine and as a dummy effect to issue their attack target.

### Brood Lord (Zerg) (Passive) (External)

The Brood Lord is less straight forward compared to the carrier as most of it's effects are generated by the weapon of the ammo unit the **Broodling - (Escourt)**. The Brood Lord arm magazine ability is auto build, autobuild on and external with the spawned units being unselectable, targetable and uncommandable. The spawned units do not automatically seek a target but are only ordered to attack by the dummy **Brood Lord - Broodling Strike** of the host unit.

### Ghost Academy (Internal) (ammo for Use Calldown)

Uses the **Ghost Academy - Arm Magazine (Nuke)** to create **Weapon - Nuke** ammo units for Ghosts to consume with the **Ghost - Nuke (Calldown)** effect of their **Ghost - Nuclear Strike** ability to apply the **Ghost - Nuke (Persistant) effect**.

## Fields Description

The Ability: Info fields are merged into one submenu so shall be covered in detail

### (None): Orders - Display Type

* How the waypoint lines appear when queueing this ability. As this ability does not have any waypoints, this field is unnecessary.
* **Attack:** (Unknown)
* **Confirm:** (Unknown)
* **Legacy:** (Unknown)
* **Move:** (Unknown)
* **Rally:** (Unknown)

### Ability: Alignment

* Determines target prioritization. As this ability does not target units, this field is unnecessary.
* **Negative:** Targets enemies preferentially
* **Neutral:** Targets both friends and foes
* **Positive:** Targets friends preferentially

### Ability: Debug trace

* If enabled logs ability use and execution/errors when testing the map

### Ability: Info - Alert

* The alert played from Alerts if the command for the slot is unable to be used

### Ability: Info - Button - Default Button

* Links the ammo unit to a Button from the Buttons data type
* Used to build the ammo unit in the command card of the unit with this ability

### Ability: Info - Button - Flags

* **Allow Minimap:** (Unknown)
* **Allow Self Cast:** (Unknown)
* **Continuous:** (Unknown)
* **Hidden:** Sets the button to hidden by default
* **Hide Path:** (Unknown)
* **Ignore User:** (Unknown)
* **Send to Selection:** (Unknown)
* **Show In Glossary:** (Unknown)

### Ability: Info - Button - Requirements

* Sets the conditions under which the button can be seen/used
* Refer to the Requirements section

### Ability: Info - Button - State

* **Available:** means the button is always visible
* **Restricted:** means the Show requirements can hide it
* **Supressed:** means the button is hidden by default

### Ability: Info - Charge - Count (Max)

* Determines the maxiumum number of times the ability can be used before having to obtain more charges
* Ability is disabled when charges reach 0

### Ability: Info - Charge - Count (Start)

* Number of starting charges the ability has on unit creation

### Ability: Info - Charge - Count (Use)

* Determines how many charges each use of the ability costs

### Ability: Info - Charge - Enable Charge Time Queueing

* **e\_chargeFlagRestoreAllChargesOnCooldown:** (Unknown)
* **Enable Charge Time Queueing:** (Unknown)

### Ability: Info - Charge - Hide Count

* Hides the number of charges the ability has from the UI

### Ability: Info - Charge - Link

* Alias string to which the charge counts refer
* Allows several abilities/behaviours/weapons to use the same pool of charges

### Ability: Info - Charge - Location

* Determines to what degree the charge pool is shared
* **Ability:** Is if the ability has it's own independent charge pool
* **Behavior:** (Unknown)
* **Global:** Is if there is a single charge pool that all players must share
* **Player:** Is if all units of the player share the same charge pool
* **Unit:** Is if the charge pool is limited only to the abilities on the unit

### Ability: Info - Charge - Time Start

* Initial time taken for a charge to be generated since one was last generated
* With some abilities this has been changed since WoL to be the time taken to first generate a charge but this modification is inconsistently implemented

### Ability: Info - Charge - Time Use

* The increment to the time needed to regenerate a charge with each use of a charge
* Does not reset with time
* Can be a negative number
* 0.0002(s) is the smallest increment/decrement possible
* With some abilities this has been changed since WoL to be the time taken to generate a charge after use but this modification is inconsistently implemented

### Ability: Info - Cooldown - Link

* Alias string used for cooldown of the ability
* Can be used to have several abilities/behaviors/weapons share the same cool down

### Ability: Info - Cooldown - Location

* Determines to what degree the cooldown is shared
* **Ability:** Is if the ability has it's own independent cooldown
* **Behavior:** (Unknown)
* **Global:** Is if there is a single cooldown for the abilitiy that all players must share
* **Player:** Is if all units of the player share the same cooldown for the ability
* **Unit:** Is if the cooldown sharing is limited only to the abilities on the unit

### Ability: Info - Cooldown - Operation

* **Add:** (Unknown) Adds the Cost: Cost - Cooldown - Time Start value onto the current cooldown with each use?
* **Add If Not In Cooldown:** (Unknown) Adds the Cost: Cost - Cooldown - Time Start value if the weapon is not already in cooldown?
* **Max:** (Unknown)
* **Min:** (Unknown)
* **Multiply:** (Unknown) Multiply the current cooldown by the Cost: Cost - Cooldown - Time Start value?
* **Set:** (Unknown)

### Ability: Info - Cooldown - Time Start

* Time taken for the ability to cooldown
* With some abilities this has been changed since WoL to be the time taken to be able to first use the ability but this modification is inconsistently implemented

### Ability: Info - Cooldown - Time Use

* Increment to cooldown with each use
* Does not reset with time
* Can be a negative number
* 0.0002(s) is the smallest increment/decrement possible
* With some abilities this has been changed since WoL to be the time taken to cooldown after ability use but this modification is inconsistently implemented

### Ability: Info - Cost Display

* Dictates what resources and/or vitals are shown for the cost

### Ability: Info - Count Start

* Determines the number of **Ability: Info - Unit** units the host unit starts with when created

### Ability: Info - Count

* Number of the **Ability: Info - Unit** unit that is spawned at once
* Needs the Queue ability

### Ability: Info - Distance

* The distance from the host unit that the spawned units default to when not in combat
* Combine with the **Data - External Angle** field
* Only useful if the ammo units are external

### Ability: Info - Flags

* **Auto Build:** Determines if the ability can be auto cast
* **Auto Build On:** Means that the ability defaults to autocast when the host unit is created
* **External:** Determines if the ammo units are kept outside the host unit
	+ If external is not selected then the Use Magazine or Use Calldown effect are required for launch
* **Leash Retarget:** (Unknown)

### Ability: Info - Manage

* **Destroy:** Means the ammo unit is destroyed as soon as the host unit is no longer engaging in combat and the ammo is not attacking/casting an ability. Works best with the **Retarget** Flag, as without it, the ammo might never get linked/destroyed from the caster's scope.
* **Ignore:** Means that once the host unit and ammo units are no longer engaging in combat, the ammo units just stand at their present location until receiving further orders or engaging an enemy (if they can)
* **Recall:** Means that when the host unit is not in combat, the ammo units return to either inside the magazine if internal or to their locations determined by **Ability: Info - Distance** and **Data - External Angle**.

### Ability: Info - Technology Resource Cost

* Cost of minerals, vespene, terrazine and custom resources needed by the caster player to use the ability

### Ability: Info - Time

* The time taken to train the **Ability: Info - Unit** unit.

### Ability: Info - Unit

* The unit from Units spawned by the ability

### Ability: Info - Vital Fraction

* Not part of submenu for some reason
* Determines the vital fraction cost for using the ability

### Ability: Info - Vitals

* The cost to the caster's vitals to use the ability

### Ability: Launch Type

* Only affects internal magazines
* **Fire At Target:** Sends the ammo unit from the caster unit towards the target
* **Release At Source:** Makes the units be released at the caster unit with no initial targets
* **Release At Target:** Makes the units be released directly where the target is standing
	+ Has potential use for attacks from the underground

### Ability: Leash

* Determines how far the ammo units can stray from the host unit before being ordered to return

### Ability: Max Count

* The total unit capacity of the internal magazine shared between all slots
* A value of 0 is infinite capacity

### Ability: Return Life Fraction

* Percentage of the **Life** vital at which ammo units will retreat from combat back into the hangar until repaired

### Ability: Shared Flags

* **Disable While Dead:** Disables the ability if the host unit is dead until the unit is revived or the corpse expires
* **Hide Target Cursor For Invalid Targets:** (Unknown)
* **Skip Preload:** (Unknown)
* **Snap Cursor To Unit Radius:** (Unknown)
* **Target Cursor Visible In Black Mask:** (Unknown)

### Ability: Tech Alias

* String used as an alias to group data objects together as equivalent for use by Requirements

### Ability: Tech Player

* **Owner:** Player currently in control of the unit (eg. neural parasite) is used for requirements of the ability
* **Upkeep:** Player paying the supply of the unit is used for requirements of the ability

### Cost: Refund Fraction - Charge

* Percentage of the **Ability: Info - Charge - Count (Use)** refunded if training of the ammo unit is canceled

### Cost: Refund Fraction - Cooldown

* Percentage of the **Ability: Info - Cooldown - Time Use** refunded if training of the ammo unit is canceled

### Cost: Refund Fraction - Resource

* Percentage of the **Ability: Info - Technology Resource Cost** refunded if training of the ammo unit is canceled

### Cost: Refund Fraction - Vital Fraction

* Percentage of the **Ability: Info - Vital Fraction** refunded if training of the ammo unit is canceled

### Cost: Refund Fraction - Vitals

* Percentage of the **Ability: Info - Vitals** refunded if training of the ammo unit is canceled

### Data - External Angle

* Affects default positions of each spawned unit relative to the host
* Affects direction units spawn and are released from

### Effect: Calldown Effect

* Determines which Use Calldown effect links to this magazine
* Only works on internal magazines
* Use Calldown consumes a number of ammo units from any player owned unit to use an effect or launches the unit at the target if no effect is specified by the calldown

### Effect: Effects

* **Create:** Effect applied to the ammo unit on creation
* **Death:** Determines what effect is cast when the ammo units suicide if the host unit is destroyed
	+ Has potential to be combined with the Revive ability via a created dummy unit using a Create Unit] effect)
* **Launch:** Determines what effect is applied to the ammo unit when the ammo unit is launched from an internal magazine or when created with an external magazine. In older patches the ammo units were known as the casters but this has been fixed.
* Recall: Effect applied to the ammo units when recalled
* Release: Effect applied to the ammo units when a Release Magazine effect is used on the ammo unit
* Retarget: Effect applied to the ammo units when they are ordered to change target by the host unit

### Stats - Flags

* Auto Create: (Unknown)
* Best Unit: Means that only 1 unit will use it when you have multiple units selected and you give the order.
* Ignore Unit Cost: Means that the created units are produced for free irrespective of how much the unit actually costs
* Retarget: Forces all magazine units to target the selected target from the caster. This is also forces magazine units to attack any new hostile units appearing in the caster's leash range. If the magazine units were allowed to be controlled individually by the player, one should not use the retarget flag, as it will spam and oblige to acquire the caster's target at all cost. This flag is usually handy in situations where the magazine units fail to obey acquiring the caster's target (when they withdraw for exemple).
* Show Status: Toggle the rectangular bar that appears above the unit, showing how many magazine units are present and not. This has comparable use to the Status Bar Flags found in a unit actor.
* Transient: Ordering an ammo unit to be trained does not interrupt the current order queue of the host unit
* Turn Auto Cast Off When Owner Leaves: Means that in multiplayer if the player leaves the auto cast of this ability is turned off
* Use Unit Order Queue: Prevents the caster from acting when a magazine unit is in progress.
* Wait For Supplies: Chooses if the magazine unit will queue or not when there's not enough supply to produce it. Disabling this flag can still be cheated by spamming the magazine unit in the queue before the supply limit is triggered..

## Related

* Use Magazine
* Use Calldown