Jump to content

SAM: Difference between revisions

From ModEnc²
en>Testid123
mNo edit summary
Rain-Islet (talk | contribs)
m [bot] Batch update {{Bugs}} templates.
 
(11 intermediate revisions by 4 users not shown)
Line 12: Line 12:
|ares=yes
|ares=yes
}}
}}
Can be set to ''' 'yes' ''' or ''' 'no' ''' and determines that this BuildingType is a SAM '''(surface to air missile launcher)''' and thus its weapons can only fire at AircraftTypes.<br>
Can be set to <tt>yes</tt> in order to restrict a defensive [[BuildingType|structure]] to being a SAM (surface to air missile launcher) site. When enabled, the weapons can only fire at [[AircraftTypes|aircraft]] and not at [[Hover|hovering]]/flying [[VehicleTypes|vehicles]], nor at airborne [[InfantryTypes|infantry]].
NOTE: this is unused in [[Red Alert 2]] as the use of this means that the structure will not fire [[InfantryTypes]],[[VehicleTypes]] with {{f|JumpJet|yes|link}} set or acquire them as targets - it will only target [[AircraftTypes]].<br>
----
(For [[YR]] only) Because the [[SAM]] tag has many limitations. If you would like to [[BuildingTypes]] '''(AA Tower)''' The fake '''SAM=yes''' effect can be used<br> I recommend that you use the {{f|Natural|yes|link}} tag for [[BuildingTypes]] '''(AA Tower)'''
And use the tag {{f|Unnatural|yes|link}} for [[InfantryTypes]],[[VehicleTypes]],[[AircraftTypes]] All that can fly.<br>[[File:Fake '''Sam''' effect.gif]]<br>


==Note==
==In {{ra2}}==
Aircraft designated as targets must not exist in the [General]►{{f|PadAircraft|link}} list;
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 <tt>SAM</tt> won't. It is generally better to use [[Armor|armor]] for target filtering.
*otherwise, the SAM will not even aim.


Aircraft designated as targets cannot have a valid building in their {{f|Dock|link}} list;
==In {{yr}}==
*otherwise, the SAM can only rotate its turret but cannot actually fire.
With the addition of {{f|Natural|yes|link}} tag to defensive structures or AA units, a kind of inbetween scenario can be achieved. [[TechnoTypes]] with <tt>Natural</tt> will not attack others with {{f|Unnatural|yes|link}}. With some clever application a modder can more finely tune which targets are valid for a defender.


However, even so, the SAM can only fire its weapons normally when the target aircraft is in a hover state.
=={{bugs}}==
One quirk of the way AA [[Weapons|weapons]] are handled, is that [[Paradrops|paradropped]] infantry cannot be fired upon by the defender, unless it has {{f|LandTargeting|1|link}}, and the weapon has <tt>AG=yes</tt> on their [[Projectile|projectile]]. This seems to be because the falling infantry is still considered a 'ground' unit.


Once the aircraft moves, it will only occasionally fire a few shots under specific conditions.
While <tt>SAM=yes</tt> 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 <tt>SAM</tt> 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]].
 
At the same time, the frequency of re-locking and turret rotation in this case does not adhere to the weapon's {{f|ROF|link}} settings, nor is it a fixed value.
 
Even the aforementioned situation of suddenly firing two rounds can occur without facing the target, even if there is no [Weapon] > {{f|OmniFire|yes|link}}.
 
Additionally, SAM enforces attacks only on aerial targets, meaning it cannot fire at targets that have landed on the ground, even if they do not have {{f|LandTargeting|1|link}}.
 
 
In other words, SAM targets can only be Aircraft that have {{f|AirportBound|yes|link}}, {{f|Dock|none|link}}, and have taken off.
 
 
Currently measured:
 
In the YR1.001+Ares3.0p1+PhobosBuild#45 environment
 
it is functioning normally.
 
 
In the YR1.001+Ares3.0p1+KratosPPv0.1.15 environment
 
the SAM building will be prohibited from acquiring targets
 
*(the author of KratosPP stated that this part was not modified at all, and the author does not understand this logic either).
 
 
In the YR1.001+Ares3.0p1+PhobosBuild#45+KratosPPv0.1.15 environment
 
the SAM can acquire targets normally
 
but firing will immediately trigger a Fatal Error, and the EIP address is not in gamemd.exe (the record doesn't really mean much, hence it's not included in the EIP page.).

Latest revision as of 17:48, 2 July 2025

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.