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

WeaponX: Difference between revisions

From ModEnc
Jump to navigation Jump to search
DeathFish (talk | contribs)
mNo edit summary
ATHSE (talk | contribs)
better
Line 1: Line 1:
{{Flag
{{Flag
|name={{PAGENAME}} (substitute X with an integer)
|files={{Categ|ini=rules}}
|files={{Categ|Rules(md).ini}}
|values={{Values|uint}}
|values=strings (names of [[Weapon]]s)
|default=0
|default=none
|types={{Categ|VehicleTypes}}
|types={{Categ|VehicleTypes}}, {{Categ|BuildingTypes}}
|ra2=yes
|ra2=yes
|yr=yes
|yr=yes
|ares=yes
}}
}}
Specifies a special case weapon for this object. Special cases are those which don't use the traditional Primary/Secondary weapon systems, for example, turret-changers ({{f|Gunner|yes|link}}), charge turrets ({{f|IsChargeTurret|yes|link}}), or gattling logic ({{f|IsGattling|yes|link}}).
This tag forms part of the turret changing logic {{ra2}}, either as part of {{f|IsChargeTurret|yes|link}} as in the case of the Prism Tank, or as part of the IFV passenger-based turret logic using {{f|Gunner|yes|link}}. It is also used by the Gattling tank weapon spooling system added in {{yr}}.  


{{bugs}}
==IFV Logic==
In {{ra2}}, the maximum value of {{tt|X}} can reach {{tt|14}}; in {{yr}}, {{tt|X}} can reach a maximum of {{tt|18}}.
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.
*The [[Ares]] expanded this logic in version {{tt|0.E}}, allowing {{t|X}} to reach up to {{tt|127}}.
 
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 [[EliteWeaponX|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.
 
{{HorizontalBar|[[Image:Cc_documentinfo.png‎|24px]] In YR there is a similar but unrelated [[OpenTopped]] logic, where infantry specify their [[OpenTransportWeapon]] instead.}}
 
==Charge Turret Logic==
This use of {{tt|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 {{tt|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}}
In the original games, there can be only one IFV unit, hardcoded to the unit named [FV]. Otherwise, the Turret will not be drawn.
*Ares fixes this, and allows any vehicle to function as an IFV, with more turrets: https://ares-developers.github.io/Ares-docs/new/gunner.html
 
==See Also==
[[IFV Weapon System]]

Revision as of 12:43, 10 April 2025

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.

See Also

IFV Weapon System