Data/Abilities

From SC2Mapster Wiki
Jump to: navigation, search

Abilities[edit | edit source]

Description[edit | edit source]

Abilities are Data Types with lists of commands. Usually they are linked to a unit through a Button. When a player presses the button the orders defined in the Ability are executed.

Hints[edit | edit source]

  • Abilities manage cargo and magazines, like the Carrier and its Interceptors as well as the Medivac.
  • Abilities can not be added on to a unit with scripts. Thus they have to be added in the Data Module directly.
  • Abilities can be turned off and on using triggers.

Update 5.0[edit | edit source]

On any ability, modders can set whether any given ability command will automatically Generate Ability Buttons such that the ability would work as soon as it is applied to a unit. No longer will users have to set these button and icons in the unit command card manually.

Example Usage[edit | edit source]

Cargo Space[edit | edit source]

Make a new Ability and set its type to "Transport". A unit with this ability will get cargo space. Set the values of "Stats - Cargo Count Maximum", "Stats - Cargo Size Maximum" and "Stats - Cargo Size Maximum" to your prefered values.

Sub Types (Classes)[edit | edit source]

The classes have some shared fields, as well as some unique ones. Look at existing abilities for reference.

Ability: Sub Types (Classes)[edit | edit source]

Fields[edit | edit source]

Even though Abilities have several subtypes, most have the following fields.

Common Field[edit | edit source]

(None): Categories[edit | edit source]

Category that can be used by a behavior to enable/disable this ability

(None): Data Collection[edit | edit source]

Collection name of the ability, in order to create alternate copy of it.

(None): Default Button Card Id[edit | edit source]

In order to allow for abilities to be easily applied to any unit, all buttons now have a property to allow modders to set their default button position and submenu Id on the command card (this is perhaps good for triggers that add abilities on unit that have no settings of the ability on their command card).

(None): Levels[edit | edit source]

Can directly set the max level of an ability. Combined with the accumulator system, modders will no longer need to implement 1000 sets of abilities for abilities that have 1000 levels.

  • Not on all abilities
  • The Levels field is also upgradable so that modders will be able to change max ability levels at runtime.
  • When the Levels field is set to 0, the default value, the ability level system will fallback to the previous functionality.

(None): State Behavior[edit | edit source]

This field creates a behavior when an ability is created. It will destroy it when the ability is destroyed, and it will disable/enable it when the ability is disabled/enabled.

(None): Veterancy Level Min[edit | edit source]

(Unknown)

(None): Veterancy Level Skip[edit | edit source]

(Unknown)

Ability: Alignment[edit | edit source]

Selects whether there is any preference given to friendly or enemy units while targeting with this ability (for auto-cast).

  • Negative: Enemy units are preferred while targeting
  • Neutral: No preference is given to pick either friendly or enemy units when targeting with this ability.
  • Positive: Friendly units are preferred while targeting.

Ability: Commands[edit | edit source]

Auto Queue Id[edit | edit source]

(Unknown)

Default Button[edit | edit source]

Button used to identify the right ability command on the Command Board of the unit.

  • Since patch 5.0, the command flag allows this button to generate the default button on the unit's command card

Flags[edit | edit source]

  • Allow Minimap: Permits the command to be cast on the minimap. Commands which require a unit cannot be cast on the minimap even if this flag is set.
  • Allow Self Cast: If the self cast hotkey is used when issuing this command, it will pick the caster as the target without going into targeting mode.
  • Continuous: Indicate if this command should be issued repeatedly while its hotkey is being held down.
  • Create Default Button: The ability would work as soon as it is applied to a unit. No longer will users have to set these button and icons in the unit command card manually (this is perhaps good for triggers that add abilities on unit that have no settings of the ability on their command card).
  • Hidden: Prevents this command from being shown in the command card.
  • Hide Path: This command will not be used by the path display UI.
  • Ignore User: Ignore any user requests to issue this command. Useful for making passive abilities that auto-cast or not (the auto-cast can be swapped).
  • Send To Selection: This command will be issued to all units in the selection who can handle it even if they aren't in the active subgroup.
  • Show In Glossary: This command will be displayed in the unit help glossary ability section.
  • Use Default Button: In order to allow for abilities to be easily applied to any unit, property that allow modders to set their default button.

State[edit | edit source]

State of the button which controls its availability:

  • Available: This command will be available unless triggers explicitly restrict it. If not using triggers, this should be a default setting.
  • Restricted: This command is explicitly restricted until triggers make it available.
  • Supressed: This command will be only avaiable if other commands not currently restricted required it.

Take note that the word "available" has nothing to do with the command being free of any requirement. Requirements can still forbide it and hide it.

Also, in order to use these fields, one must activate their use from triggers; Enable/Disable Tech Tree Restrictions.

Requirement[edit | edit source]

Value from the Requirements that allows/disallows hide/show the ability command and button.

  • When moding, pay attention to this field, even if ignoring it, it only takes a single click on any requirement to imput it., even when scrolling down just to check.

Preempt Level[edit | edit source]

In case this ability command is issued as a Preempt command toward other commands that are Preempt as well (Preempt means: going as prior command, the contrary of being put in queue), then this number will deceide which ability has the lead as the first used ability.

Ability: Debug Trace[edit | edit source]

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

Ability: Set ID[edit | edit source]

An arbitrary identifier that can be set on different abilities of the same type to make commands issued by one ability apply to any other abilities on other units in the selection with the same identifier.

Ex: Using an issue order effect on a Zerg to unburrow it can use any unburrow ability that have the Set ID: "BrwU". Since all (most) unburrow abilities carry this Set ID, they will all be activated from this single issue order effect.

Ability: Shared Flags[edit | edit source]

Generic flags for most abilities.

  • Disable While Dead: If set, this ability will be disabled while the unit that has it is dead. Disabled by magazine abilities that want their production to live after the death of their carrier unit.
  • Disabled: If set, this ability is disabled from on its own. This can be reverted from triggers/buff behaviors.
  • Register Charge Event: Allows the CActorUnit of the unit using the ability to be able to use "Ability Cooldown" events.
  • Register Cooldown Event: Allows the CActorUnit of the unit using the ability to be able to use "Ability Cooldown" events.
  • Hide Target Cursor For Invalid Targets: If set, the target cursor model will be hidden if the target is invalid.
  • Ignore Produce Limit: (Unsure) Ignores supplies?
  • Skip Preload: (Unknown)
  • Snap Target To Unit Radius: If set, the target cursor will target the unit radius circle of a unit instead of the unit center when targeting a unit.
  • Target Cursor Visible in Black Mask: As the name states.

Ability: Tech Player[edit | edit source]

The Player used when requirement checks are run by this ability. By default, this is set to the "Upkeep" player (the player who pays for this unit's food cost).

  • Caster: Refers to the Caster player, when using interact ability to cast ability that does not belong to himself.
  • Owner: Refers to the primary player that has control of the unit that has this ability.
  • Upkeep: Refers to the primary player which this unit and ability provide tech to (ex: Supply Depot provides tech to allow a player to build a Barracks).

Cost: Cost[edit | edit source]

Cost for using an ability in time, resource or vitals.

  • The field category is (None) on some new abilities.
  • We can include any Cancel - Cost what so ever other fields that have most of the same fields. Sometimes we find these fields in the Info - Array of the ability, because they are included with their unit fields (ex: build, train, Arm Magazine).

Index[edit | edit source]

Numeric index of the cost. Create only 1 index for most abilities (which is Index 0). More indexes means abilities with levels that use different costs at higher level.

Charge - Count (Max)[edit | edit source]

Number of charges maximum that the user of the ability can have.

Charge - Count (Start)[edit | edit source]

Number of charges that the user of the ability start with.

Charge - Count (Use)[edit | edit source]

Number of charges that the user of the ability uses up per casting the ability

Charge - Enable Charge Time Queuing[edit | edit source]

Flags for the Charge fields

  • Enable Charge Time Queuing: (Unknown)
  • Ignore Time Delay: This allows abilities to ignore the TimeDelay set in the unit and instead use the ability’s own settings.
  • Restore All Charges On Cooldown: (Unknown)

Charge - Hide Count[edit | edit source]

Hides the numeric value of Charges on the button

Charge - Link[edit | edit source]

Link of the ability for Charges only. When using a link that matches with other links, any cooldown indicated here will be applied the other abilities as well. This is used by the Terran Merc Compound, that limits the use of summoning Mercs.

Charge - Location[edit | edit source]

Where the ability link for charges should link at.

  • Ability: On any ability sharing the same ability link that are currently on the same unit.
  • Behavior: (Unknown)
  • Global: For all units of all players sharing the same ability link, a shared cooldown, enemies/allies alike
  • Player: For all units of the same player sharing the same ability link.
  • Unit: For the same unit, indluding a morph alteratate unit. Ex: A burrowed Zerg that has an ability while unburrowed can affect its same ability while unburrowed (just don't forget to put abilities on both units). This wouldn't work on the "Ability" location, as it is only for the same unit (a morphed unit is a second unit in that way).

Charge - Time Delay[edit | edit source]

Works similarly to TimeStart, but it only affects the first charge of the ability, item, or behavior.

  • When TimeDelay = 0, the charge system will work as before.
  • When TimeDelay > 0, TimeStart will be ignored.
  • When the ability begins to stock charges, the first charge’s regen time will use the TimeDelay value, and any following charges will use the TimeUse value.

Charge - Time Start[edit | edit source]

Charge time that is required for each Charges at the start of the ability's availability.

  • Ex: If an ability has 4 charges, with a time start of 10, it will take 40 second for the 4 charges to be ready.
  • Having 0 in this field means that all 4 charges would be up for start.

Charge - Time Use[edit | edit source]

Charge time that is required per charge ability use, per charge.

  • Ex: if an ability has 4 charges and it uses 4 charges per cast with a time use of 10, even if the ability was used only once, each charge will still require 10 sec to recharge.

Cooldown - Link[edit | edit source]

Link of the ability for Cooldown only. When using a link that matches with other links, any cooldown indicated here will be applied the other abilities as well.

Cooldown - Location[edit | edit source]

Where the ability link for cooldown should link at.

  • Ability: On any ability sharing the same ability link that are currently on the same unit.
  • Behavior: (Unknown)
  • Global: For all units of all players sharing the same ability link, a shared cooldown, enemies/allies alike
  • Player: For all units of the same player sharing the same ability link.
  • Unit: For the same unit, indluding a morph alteratate unit. Ex: A burrowed Zerg that has an ability while unburrowed can affect its same ability while unburrowed (just don't forget to put abilities on both units). This wouldn't work on the "Ability" location, as it is only for the same unit (a morphed unit is a second unit in that way).

Cooldown - Operation[edit | edit source]

The operator that deceides how the cooldown is set.

  • Add: Addition/substraction (numbers in negative for substraction) that modifies the current cooldown.
  • Add If not In Cooldown: Default operator. Adds a cooldown only in the matter that the ability is not undergoing a cooldown.
  • Max: (Unsure) Imputs a maximum value for the cooldown time value
  • Min: (Unsure) Imputs a minimum value for the cooldown time value
  • Multiply: (Unsure) Multiplies the current cooldown by multiplying it.
  • Set: Set the cooldown to this exact value right now, no matter if there was time left or not.

Cooldown - Time Start[edit | edit source]

Waiting time before casting the ability for the first time, always relative to the location of the link.

Cooldown - Time Use[edit | edit source]

Waiting time after using the ability. This time can pair up with Charge time without trouble, and will act as a secondary time out check.

Cost Display[edit | edit source]

Allows the ability to pop a small resource text (a small text actor) that indicates how much resource/vital was just spent on use

Technology Resource Cost[edit | edit source]

Cost, in resource for using the ability.

  • Upgrade abilities use this field for the cost.
  • Abilities with "Ignore Unit Cost" flags enable do not affect these values.
  • It is very possible to put values in negative to gain resource on using the ability! This will also compare to the unit's cost (if train/building a unit/structure) and calculate on its own.
  • Good alternative when it is desire to increase the cost of a Zerg unit without changing all the units field. For example, an Hydralisk can be charged more or less when upgrading this field, and this won't affect the difference for morphing into a lurker (in which case the units cost are compared to give the right price).

Vital Fraction[edit | edit source]

Cost in percentage of a vital (Energy/Life/Shields)

  • Does not calculate the flat amount, it will instead show the cost in percentage on the button.

Vital[edit | edit source]

Cost in flat amount of a vital (Energy/Life/Shields)

UI: Orders[edit | edit source]

Order fields allow you to customize the appearance of the waypoint lines that show up when you queue orders (targeting).

UI: Toolip Priority[edit | edit source]

Determines the order that this ability appears in an "info" toolip tag. If the priority is set to 0, then it will not be shown.