Jump to content

WeaponN: Difference between revisions

From ModEnc²
ATHSE (talk | contribs)
No edit summary
ATHSE (talk | contribs)
fixes
Line 10: Line 10:


==IFV Logic==
==IFV Logic==
Weapon number 'N' (ie. Weapon1=someweapon) specifies the weapon available on the named turret with the value of 'N', 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.
Weapon number 'N' (ie. Weapon1=someweapon) specifies the weapon available on the named turret with the value of 'N', 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 can be up to a maximum of 13 IFV turrets, in the original RA2, and up to 17 in YR, with the [[TurretCount]] matching the [[WeaponCount]]. 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 [[NormalTurretIndex]] which applies without a passenger too.  
There are 13 IFV turrets in the original RA2, expanded to 17 in YR, defined by [[TurretCount]], but not necessarily matching the [[WeaponCount]] as there can be more weapons than turrets. 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 the appropriate turret number, and thus which weapon the IFV will have when loaded. Worth noting is that IFVMode starts at 0, and the corresponding value will always be 1 less than the turret/weapon number on the IFV.
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 [[OpenToppedWeapon]] instead.}}
{{HorizontalBar|[[Image:Cc_documentinfo.png‎|24px]] In YR there is a similar but unrelated [[OpenTopped]] logic, where infantry specify their [[OpenToppedWeapon]] instead.}}
Line 24: Line 24:


The charge turret logic can also be used more simply to mimic loaded and unloaded stated, similar to [[NoSpawnAlt]] on {{f|Spawner|yes|link}} vehicles, with turret 1 art showing a loaded state, and turret 2 showing unloaded. The main behavioural difference, aside from the projectile not being an independent spawned [[AircraftTypes|aircraft]], is that because it is a turret, it can face the target without the whole unit having to turn.
The charge turret logic can also be used more simply to mimic loaded and unloaded stated, similar to [[NoSpawnAlt]] on {{f|Spawner|yes|link}} vehicles, with turret 1 art showing a loaded state, and turret 2 showing unloaded. The main behavioural difference, aside from the projectile not being an independent spawned [[AircraftTypes|aircraft]], is that because it is a turret, it can face the target without the whole unit having to turn.
==Gattling Tank Logic==
See: [[IsGattling]]


{{Bugs}}
{{Bugs}}
In the original games, there can be only one IFV unit, hardcoded to the unit named FV.
In the original games, there can be only one IFV unit, hardcoded to the unit named FV.
*Ares fixes this, and allows any vehicle to function as an IFV: https://ares-developers.github.io/Ares-docs/new/gunner.html
*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

Revision as of 04:25, 6 April 2025

Tiberian Dawn Red Alert Tiberian Sun Firestorm Red Alert 2 Yuri's Revenge
Flag: WeaponN
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.

IFV Logic

Weapon number 'N' (ie. Weapon1=someweapon) specifies the weapon available on the named turret with the value of 'N', 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, but not necessarily matching the WeaponCount as there can be more weapons than turrets. 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 OpenToppedWeapon instead.

Charge Turret Logic

This use of WeaponN 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 'cooldown' turret, 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.

The charge turret logic can also be used more simply to mimic loaded and unloaded stated, similar to NoSpawnAlt on Spawner=yes vehicles, with turret 1 art showing a loaded state, and turret 2 showing unloaded. The main behavioural difference, aside from the projectile not being an independent spawned aircraft, is that because it is a turret, it can face the target without the whole unit having to turn.

Gattling Tank Logic

See: IsGattling

Bugs/Side-Effects/Unexpected Limitations In the original games, there can be only one IFV unit, hardcoded to the unit named FV.