Jump to content

SAM

From ModEnc²
Revision as of 09:07, 12 April 2025 by ATHSE (talk | contribs)
Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
Flag: SAM
File(s): Rules(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: no
Applicable to: BuildingTypes


Can be set to yes in order to restrict a defensive structure to being a SAM (surface to air missile launcher) site. When enabled, the weapons can only fire at aircraft and not at hovering/flying vehicles, nor at airborne infantry.

In Red Alert 2

This tag is unused in RA2, since the many Jumpjet units (like Kirovs) would be untargetable, but is perfectly valid. Adding it to a Patriot battery or Flak gun would drastically reduce their effectiveness, and other units or defenses would be required to fire at the targets the SAM won't. It is generally better to use armor for target filtering.

In Yuri's Revenge

With the addition of Natural=yes tag to defensive structures or AA units, a kind of inbetween scenario can be achieved. TechnoTypes with Natural will not attack others with Unnatural=yes. With some clever application a modder can more finely tune which targets are valid for a defender.

Bugs/Side-Effects/Unexpected Limitations One quirk of the way AA weapons are handled, is that paradropped infantry cannot be fired upon by the defender, unless it has LandTargeting=1, and the weapon has AG=yes on their projectile. This seems to be because the falling infantry is still considered a 'ground' unit.

While SAM=yes functions well on homing-missile based AA units/buildings, the same can't be said for gun based ones like the Flak Cannon. Making the Flak Cannon a SAM will cause it to rotate to follow the airborne target, but not fire unless the trajectory is just right for that rotation. This leads to a case where firing is inconsistent and far below it's expected ROF.