Targeting

General Settings

These settings allow enabling AI targeting even for human players.

[SuperWeapon]►SW.UseAITargeting= (boolean)

Whether AI targeting will decide the target used when firing this super weapon. If yes, clicking the cameo will not allow manual target selection and instead fire the super weapon at an automatically determined location. Defaults to no.

All applicable AI targeting constraints have to be satisfied for the super weapon to fire and actually discharge. If the constraints are not satisfied, the cameo will be darkened. If the player tries to fire the super weapon anyhow, the message Message.CannotFire is displayed.

[SuperWeapon]►SW.AutoFire= (boolean)
Sets whether this super weapon will be launched automatically once ready even for human players. If set to yes, the AI targeting options are used to infer the target cell. Defaults to no.
[SuperWeapon]►SW.ManualFire= (boolean)

Sets whether this super weapon can be manually fired by the owning player. If set to no, the player will not be able to get a selection cursor for this super weapon when clicking the cameo. This setting is ignored if SW.AutoFire=no is set, because the player would have no way to fire this super weapon. Defaults to yes.

Note

You can use this on auto-firing super weapons where the targeting mode might prevent it from being fired (like the Lightning Storm or Psychic Dominator, if another super weapon of this type is currently active).

New in version 0.2.

Changed in version 3.0.

Manual Target Selection

These settings only apply to human players.

[SuperWeapon]►SW.FireIntoShroud= (boolean)
Whether or not this super weapon is allowed to fire into an unexplored area of the map. Default is yes.
[SuperWeapon]►SW.RequiresTarget= (enumeration none|land|water|empty|infantry|units|buildings)

Which items this super weapon can fire at. Hovering above an allowed item will show the Cursor, otherwise the player gets the NoCursor and it is not possible to launch the super weapon. For an example see SW.AffectsTarget=.

Note

Please be aware of the problems that can arise if this and SW.AffectsTarget= are set to mutually exclusive values not allowing the super weapon to affect anything.

[SuperWeapon]►SW.RequiresHouse= (enumeration none|owner|allies|team|enemies|all)
Which house’s items this super weapon can fire at.

New in version 0.2.

Automatic Target Selection

Define the way the AI selects eligible targets to fire the super weapon at.

[SuperWeapon]►SW.AITargeting= (enumeration SW Targeting Type)
Select one of the following values to define how the AI will use this super weapon:
  • None

    Does not fire. Effectively disables this super weapon for the AI.

  • Nuke

    Selects a valid target using the Ion Cannon rules or picks a target by preferred type. Ignores cloaked targets.

  • LightningStorm

    Selects a valid target using the Ion Cannon rules or picks a target by preferred type. Ignores cloaked targets. Cannot fire when a Lightning Storm is currently active.

  • PsychicDominator

    Selects the valid target that has the most enemy units in Cell Spread range 3 nearby that can be permanently mind-controlled. Does not fire if a preferred target cell is set. Ignores cloaked targets.

  • GeneticMutator

    Selects the valid target that has the most enemy infantry units in Cell Spread range 1 nearby. Does not fire if a preferred target cell is set. Ignores cloaked targets.

  • IronCurtain

    Will not fire automatically. Instead, will wait for a team script requesting an Iron Curtain with matching SW.Group.

  • ForceShield

    Fires at the position the last super weapon with AIDefendAgainst=yes was fired at. This honors the AISuperDefense tags, and not all super weapons might be defended against.

  • ParaDrop

    Searches for a free area of 5 by 5 cells close to the favorite enemy player’s base center. If the owner has not settled for a favorite enemy yet, tries to find a location around the owning player’s base center.

  • DropPod

    Fires at a randomly chosen land cell in one of the four outer sectors around the owning player’s base center.

  • Offensive

    Selects a valid target using the Ion Cannon rules. Ignores cloaked targets.

  • MultiMissile

    Selects a valid target by looking at the summed ThreatPosed values of the area around them. For cloaked targets, a random value between 0 and 100 is used.

  • HunterSeeker

    Fires at no target, but only if the owning player settled for a favorite enemy. This is only useful with certain super weapons, or when a super weapon has a full map effect.

  • NoTarget

    Fires at no target. This is only useful with certain super weapons, or when a super weapon has a full map effect.

  • Stealth

    Selects a valid target using the Ion Cannon rules. Only considers cloaked targets.

  • Self

    Selects a building owned by the firing player which provides this super weapon and satisfies power requirements. The target is the center of the building.

  • Base

    Fires at what the game considers the firing player’s base center.

  • EnemyBase

    Fires at what the game considers the base center of the firing player’s favorite enemy.

  • Attack

    Fires like NoTarget when the last attack on a building was recent.

  • LowPower

    Fires to the same cell as NoTarget when the owning house has insufficient power.

  • LowPowerAttack

    Fires like LowPower, but only if the last attack on a building was recent. This can be used to activate auxiliary power or to force-overcharge base defenses.

  • LightningRandom

    Targets a random cell no matter its contents, and is not otherwise constrained except for checking Designators and Inhibitors.

[SuperWeapon]►SW.AIRequiresTarget= (enumeration none|land|water|empty|infantry|units|buildings|all)
Specifies which targets will be considered eligible by AI players or human owned automatically fired super weapons. The default value depends on the SW.AITargeting setting. See the table below.
[SuperWeapon]►SW.AIRequiresHouse= (enumeration owner|allies|team|enemies|others|all)
Specifies which houses will be considered eligible by AI players or human owned automatically fired super weapons. The default value depends on the SW.AITargeting setting. See the table below.
[SuperWeapon]►SW.AITargeting.Constraints= (enumeration SW Targeting Constraints)
A comma-separated list of constraints that all have to be satisfied for the super weapon to fire. Defaults depend on the Type=.
  • None

    No constraint.

  • Enemy

    This targeting mode will only select a target automatically if the house has settled for a favorite enemy player. This is usually determined when a player is attacked. Without a favorite enemy, the super weapon will not fire.

  • Offensive_Cell_Set

    Requires the offensive cell to be set by Map Action 135. In combination with the offensive preference, can be used to create user-triggered super weapons at a location the mapper decides.

  • Offensive_Cell_Clear

    Requires the offensive cell to be not set by Map Action 135.

  • Defensive_Cell_Set

    Requires the defensive cell to be set by Map Action 140. In combination with the defensive preference, can be used to create user-triggered super weapons at a location the mapper decides.

  • Defensive_Cell_Clear

    Requires the defensive cell to be not set by Map Action 140.

  • LightningStorm_Inactive

    Satisfied if there currently is no Lightning Storm manifesting or active. This constraint does not apply to human players manually firing the super weapon.

  • Dominator_Inactive

    Satisfied if there currently is no Psychic Dominator active. This constraint does not apply to human players manually firing the super weapon.

  • Attacked

    Satisfied if the firing house has been attacked recently. This constraint does not apply to human players manually firing the super weapon.

  • LowPower

    Satisfied if the firing house currently has low power. This constraint does not apply to human players manually firing the super weapon.

[SuperWeapon]►SW.AITargeting.Preference= (enumeration SW Targeting Preference)
The preference overrides the actual targeting. As long as these overrides are set, the super weapons will prefer these set targets. Defaults depend on the Type=.
  • None

    No preference.

  • Offensive

    Use the the offensive cell if set by Map Action 135. Use Map Action 136 to clear the offensive cell.

  • Defensive

    Use the the defensive cell if set by Map Action 140. Use Map Action 141 to clear the defensive cell.

New in version 0.2.

Changed in version 3.0.

Mechanisms

There are several mechanisms to select a target, but three of them are notable, because they are recurring.

The Ion Cannon targeting rules assigns each valid object a value, which is determined by the [General]►AIIonCannon... tags. A target is picked randomly from all objects with the highest score.

The base center is determined by the game and updated whenever a player builds or loses buildings. The base center can be manually set and cleared using map actions 137 and 138 respectively.

The preferred target by type is set by map action 35. The game looks at the first team on the map owned by the firing player and has the team leader acquire a target of the preferred type. A value of 1 means to use the special firing behavior, which usually is Ion Cannon targeting or base center selection.

Note

Currently, Ares does not support preferred types other than 1. The super weapons might not check ranges, designators, and inhibitors, and fire regardless of any restriction.

Defaults

The following table lists the defaults for the AI targeting tags depending on SW.AITargeting, as well as some general properties that affect targeting.

Note that the defaults used depend on the super weapon’s Type, and the type always takes precedence. See the specific super weapon type documentation for the actual values. If no specific value is given, the value from this table is used.

Most targeting modes support the new extra features added by Ares. That is maximum and minimum ranges, designators and inhibitors. Note that if a preferred target type is set using map action 35, they are not checked.

SW.AITargeting SW.AIRequiresTarget SW.AIRequiresHouse SW.AITargeting.Constraints SW.AITargeting.Preference Extras
None N/A N/A none none N/A
Nuke infantry,units,buildings enemies enemy offensive yes
LightningStorm infantry,units,buildings enemies enemy,lightningstorm_inactive offensive yes
PsychicDominator infantry,units all enemy,dominator_inactive,offensive_cell_clear none yes
GeneticMutator infantry all offensive_cell_clear none yes
IronCurtain do not use do not use none none no
ForceShield do not use do not use none defensive yes
ParaDrop do not use do not use none offensive yes
DropPod do not use do not use enemy none yes
Offensive infantry,units,buildings enemies enemy none yes
MultiMissile buildings none enemy offensive yes
HunterSeeker N/A N/A enemy N/A no
NoTarget N/A N/A none N/A no
Stealth infantry,units,buildings enemies none none yes
Self none1) do not use none none yes
Base do not use do not use none none yes
EnemyBase do not use do not use enemy none yes
LightningRandom N/A N/A none none yes

If you define the SW.AIRequiresTarget or SW.AIRequiresHouse when the table says do not use, you might render the super weapon unable to fire.

1) Self always only checks buildings owned by the owning player. You can only use land, water, and none here. All other values are invalid.

Warning

If a targeting mode is constrained to require (enemy), the targeting mode might not work if this constraint is not defined. For example, if the mode by design only considers the buildings owned by the favorite enemy, there’s nothing to chose from, thus no target can be picked.