WeaponN: Difference between revisions
m 1 revision imported |
rework from deez nuts |
||
| Line 1: | Line 1: | ||
{{ | {{Flag | ||
|files={{Categ|ini=rules}} | |||
|values={{Values|uint}} | |||
|default=0 | |||
|types={{Categ|VehicleTypes}} | |||
|ra2=yes | |||
|yr=yes | |||
}} | |||
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}}. | |||
==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 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. | |||
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. | |||
{{i}} 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 {{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. | |||
{{Bugs}} | |||
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 | |||
Revision as of 04:06, 6 April 2025
|
|
|
|
|
|
| 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 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 EliteWeapon versions. There is also a special case for NormalTurretIndex 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.
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.
Bugs/Side-Effects/Unexpected Limitations
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





