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

WeaponX

From ModEnc
(Redirected from Weapon17)
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: WeaponX
File(s): rules(md).ini
Values: Unsigned integers: All non-negative whole numbers from 0 to either 32767, 2147483647 or 4294967295.
Default: 0
Applicable to: VehicleTypes


This tag forms part of the turret changing logic Red Alert 2, either as part of IsChargeTurret=yes as in the case of the Prism Tank, or as part of the IFV passenger-based turret logic using Gunner=yes. It is also used by the Gattling tank weapon spooling system added in Yuri's Revenge.

IFV Logic

Weapon number 'X' (ie. Weapon1=someweapon) specifies the weapon available on the named turret with the value of 'X', for example ShockTurretWeapon. One possibly confusing aspect is that the turret used, as defined by the named turret index doesn't have to match the weapon number, many of the IFV weapons actually use the same turret art.

There are 13 IFV turrets in the original RA2, expanded to 17 in YR, defined by TurretCount, each with its own weapon. In RA2 this means there are Weapon1 through Weapon13 tags on the IFV, along with EliteWeapon versions. There is also a special case for NormalTurretWeapon which applies without a passenger too.

Infantry meant to board the IFV must have IFVMode set to to select the weapon the IFV will have when loaded. Importantly, the IFVMode value applies to the IFV turret weapon, not the turret index, so while the Initiate has IFVMode=13, matching InitiateTurretWeapon=13, it does not match InitiateTurretIndex=3.

In YR there is a similar but unrelated OpenTopped logic, where infantry specify their OpenTransportWeapon instead.

Charge Turret Logic

This use of WeaponX is decoupled from the turret changing, and instead only uses 1 weapon for multiple turrets, and as such WeaponCount will always be 1, while TurretCount will always be higher.

Charge turret logic also works backwards, and should be considered more like a recoil or cooldown animation, with the turret changing sequence happening after the weapon is fired. In the case of the Prism Tank, the reflective flap is closed until fired, then fully opened immediately after, slowly closing thereafter, rather than getting into a firing state just before firing.

Gattling Logic

Every two WeaponX will form a group to handle the AG and AA tasks in each phase of Gattling. For specific operational details, please refer to IsGattling.

Bugs/Side-Effects/Unexpected Limitations

In the original games, there can be only one IFV unit, hardcoded to the unit named [FV]. Otherwise, the Turret will not be drawn.

Note

When activating the WeaponX system using any flag including IsGattling, flags like NoAmmoWeapon can specify any valid WeaponX weapon index. Among various systems, the native rules of the Gattling Weapon System most closely resemble the Primary/Secondary system logic when WeaponX is inactive, making the Gattling Weapon System with WeaponStages-imposed stage limitations the optimal choice.

  • Note: WeaponX invoked by other flags remains unaffected by WeaponStages.

Phobos resolves the issue where odd/even weapon sequences in Gattling systems couldn't toggle like traditional dual-weapon systems. Weapon1 and Weapon2 can now operate like native dual weapons, while flags such as NoAmmoWeapon , DeployFireWeapon , ForceWeapon.UnderEMP(Phobos) , and ForceWeapon.InRange(Phobos) allow specifying dedicated weapons for scenarios like ammunition depletion or target is under EMP.

See Also

IFV Weapon System

Gattling Weapon System

Units equipped with six types of weapons