ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

NavalTargeting

From ModEnc
Jump to navigation Jump to search
Tiberian Dawn The Covert Operations Red Alert Counterstrike Aftermath Tiberian Sun Firestorm HyperPatch Red Alert 2 Yuri's Revenge Ares Generals Zero Hour Tiberium Wars Kane's Wrath
Flag: NavalTargeting
File(s): rules(md).ini
Values: Unsigned integers: All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967295. (Limited to: 0 to 7)
Default: 0
Applicable to: TechnoTypes:

AircraftTypes, BuildingTypes, InfantryTypes and VehicleTypes



This flag determines whether an object can fire on naval units (as opposed to land units) or not. It has several more options to choose from than LandTargeting, and YR expanded it by one more, adding the possible restriction to only use the primary weapon on naval targets.

This flag, along with LandTargeting, was likely introduced because technically, ships are ground-level units as well, and a simple AG=yes would have does allow Submarines, for example, to fire torpedoes through the water, over the ground, into a tank. This, of course, is not desired. Therefore, the additional target area distinction between "Land" and "Naval" was created. The originally intended AN and AS were probably dismissed because they were not "complex" enough, allowing only a simple "Can fire on submarines? Yes." rather than something like "Can fire on submarines? Yes, but only with it's Secondary.".

Value Basic game interpretation Explanation from rules
0 UNDERWATER_NEVER Cannot attack UNDERWATER which have not been released from cloaking.

Normally for other.

1 UNDERWATER_SECONDARY Use Second weapon against underwater

Normally for other.

2 UNDERWATER_ONLY Can only use Primary shoot underwater

Can not attak other.

3 ORGANIC_SECONDARY Use second Weapon on ORGANIC or UNNATURAL

Use Primary for other

4 SEAL_SPECIAL Primary on ORGANIC or HOVER

Use Secondary for other

5 NAVAL_ALL Go ahead and shoot everything with Primary
6 NAVAL_NONE Can not shoot into the water


What is the difference between 5 and 7

By analyzing the operation mode of the program, it can be seen that this is actually a multi branch selection structure, but the special value is 012346. Other values are the same, such as -1, 5, 7, 8, etc. Correspondingly, there is no difference between NavalTargeting=5 and 7 in fact. The comment on line 3684 of YR1.001-rulesmd.ini was completely written by Westwood haphazardly, and it also misled many authors of tutorials and editing manuals. Whether not actively attacking targets on land or using Secondary on targets on land, they are controlled by LandTargeting=2 instead ofNavalTargeting=7.

Primary/Secondary Land/Naval issues

NavalTargeting=1
LandTargeting=2
NavalTargeting=3
LandTargeting=2
NavalTargeting=7
LandTargeting=1
NavalTargeting=4
LandTargeting=2

This section is just ment to show that Naval- & LandTargeting aren't mutually exclusive, and can confuse the hell out of you as well as the game. Apart from the usual checks, you should watch them double closely if you're doing any extended Primary/Secondary magic.

Notes

The logic only operating when the target is on cell which LandType is water or beach.

And actually executed after LandTargeting.(although not conflicting)

For a VehicleType that uses a Spawner launcher weapon as Secondary (such as [DEST]), if it simultaneously sets NavalTargeting=5 (or 7, 8, -1 and etc.) and LandTargeting=2, then as long as the carrier based aircraft(not missiles) is launched once, even if it switches to using Primary for fire, the SpawnLauncher will continue to load and issue attack commands to the carrier based aircraft.

See Also