IFV Weapon System
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
Flag: | IFV Weapon System |
File(s): | Rules(md).ini |
Values: | ERROR – No value types set! Please edit this page and fix the Flag template! |
Default: | none |
IFV Overview
First thing to note is that Red Alert 2 is hardcoded to IFV behaviour for the unit named [FV] in rules(md).ini. This means that while it is possible to alter the existing IFV a great deal, it is not possible to create other IFV units with this system, without using an engine extension such as Ares (for YR).
IFVMode
This tag applied to infantry and determines into which weapon/turret 'mode' the IFV will spring when the concerned infantry (or vehicle) enters it. Note that the mode of the IFV is determined by the passenger in the 'Gunner' slot of the IFV. If an IFV is set to have more than one passenger, the Gunner slot will be represented by a "pip" on the Passenger PipScale that will be seperated from the rest of the scale and is usually filled with the first passenger to enter the vehicle when it's empty.
- Note: IFVMode, like YTurretWeapon and YTurretIndex (see below) is floored at 0. That means that IFV mode 0 (the default mode of an IFV when empty) will use Weapon1, mode 1 will use weapon 2, etc. IFVMode=0 is also the default of this flag when it is omitted, meaning such infantry will not cause any change to the IFV mode when entering it.
- Note: If the IFV has more than one passenger, the Gunner position also has to be vacated seperately - if other passengers are inside the vehicle, normally unloading the vehicle will unload the other passenger slots first, while the Gunner will remain inside the vehicle and can only be unloaded by unloading the vehicle AGAIN after all other passenger slots have been cleared.
Gunner
IFV behaviour for the unit is specified using Gunner=yes. This may also activate additional logic related to the DeathWeapon set on an IFV, ensuring it is only triggered if the current weapon or elite weapon has Suicide=yes set. Perhaps ensuring it will only take effect if the vehicle is piloted by a Crazy Ivan or possibly Terrorist infantry unit. Note that the method of how the IFV DeathWeapon logic is implemented is poorly understood at the moment.
Turrets
TurretCount determines how many turrets the engine will load for the unit. In order for proper IFV behaviour, this setting must be present and greater than zero. However, since the turret types are reference by name and hardcoded, TurretCount must be less than or equal to what the game comes hardcoded with, 13 for RA2, and 17 for YR.
The YTurretWeapon and YTurretIndex settings control which turret and weapon is used by which IFVMode. The IFV turret will switch to the turret art specified in YTurretIndex, associated with YTurretWeapon with the same value of Y, where the IFVMode matches the YTurretWeapon value.
The available IFV turrets in Red Alert 2:
NormalTurretIndex NormalTurretWeapon RepairTurretIndex RepairTurretWeapon MachineGunTurretIndex MachineGunTurretWeapon SniperTurretIndex SniperTurretWeapon ExplodeTurretIndex ExplodeTurretWeapon TerroristExplodeTurretIndex TerroristExplodeTurretWeapon ChronoTurretIndex ChronoTurretWeapon PistolTurretIndex PistolTurretWeapon BrainBlastTurretIndex BrainBlastTurretWeapon FlakTurretIndex FlakTurretWeapon ShockTurretIndex ShockTurretWeapon RadCannonTurretIndex RadCannonTurretWeapon CowTurretIndex CowTurretWeapon
The additional IFV turrets in Yuri's Revenge:
InitiateTurretIndex InitiateTurretWeapon VirusTurretIndex VirusTurretWeapon YuriPrimeTurretIndex YuriPrimeTurretWeapon GuardianTurretIndex GuardianTurretWeapon
Summary
[FV]
...
MachineGunTurretIndex=1
MachineGunTurretWeapon=8
[E1]
...
IFVMode=8
Now, when our little GI (E1) enters the IFV, the IFV will spring into 'Mode 8', and will use Weapon9. The game then subtracts -1 from the number of the currently-used weapon (9), and checks which YTurretIndex is equal to the result of the calculation (8). MachineGunTurretWeapon qualifies, as it is set to 8. The 'swapping factor', the Y of the YTurretWeapon, here is MachineGun, so the game looks for the corresponding YTurretIndex with an equal value of Y, and finds it in MachineGunTurretIndex. It then checks the number specified in that index - which is 1 - and changes the turret to the turret with that number - FVTUR1. Now, you may be wondering why MachineGunTurretWeapon=7 springs in effect when the IFV is using Weapon9. This is because (as detailed above), the YTurretWeapon and YTurretIndex settings are floored at 0, whereas the modes and WeaponX are floored at 1, so that the WeaponX the IFV gets when entered by the GI is Weapon8, however in YTurretWeapon, it is counted as 'Weapon 7'. Weapon1 would be counted as 0, Weapon2 as 1, Weapon3 as 2, etc. Always one less than the acctual WeaponX.
- Note the YTurretWeapon will correspond to an IFVMode, but the WeaponX invoked by that mode is always +1 higher.
Bugs/Side-Effects/Unexpected Limitations
Erratic behaviour may result from setting multiple YTurretIndex to the same number.
While VehicleTypes can have an IFVMode set and enter the IFV, Size and SizeLimit permitting, and can even change its weapon and turret, the tooltip will always display "Rocket IFV" when hovering over it. UseOwnName might be a workaround for this.
If the IFV has a TurretCount value higher than the available turrets, and is entered by infantry with an IFVMode using one of those high values, it may cause the IFV and/or its turret to be completely invisible in-game.
- Ares can enable any vehicle to become an IFV with Gunner=yes, and will allow up to 127 turrets/weapons for it.