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


From ModEnc
Jump to: navigation, 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: DrainWeapon
File(s): rules(md).ini
Values: boolean
Default: no
Applicable to: Weapons

Specifies whether or not this weapon should "drain" a target it is attacking, rather than dealing damage to it. This weapon will only fire against objects with Drainable=yes set and its effect depends on several attributes of the targeted structure:

  • If the target structure is drainable, but has neither a Storage value nor a positive Power value, it will simply be disabled by the attack, as if in a low-power situation.
  • If the target structure is drainable and has a Storage value, the attack will drain money from the building's owner.
  • If the target structure is drainable and has a positive Power value, the entire power of the building's owner will be shut down while the weapon is firing on the structure.

Using DrainWeapon enforces several special cases upon the weapon:

  • Such weapons do not actually fire their projectile or warhead, using it only for targeting purposes.
  • Such weapons are hardcoded to play the "DISKRAY" animation when firing.
  • The engine expects them to be fired vertically downwards from above a building (as when fired by the Floating Disk) and they will hence fail to fire when fired from any other position, or stop firing if the firing unit moves away from a position right above the structure, even if firing was still permitted by their Range. Aircraft cannot fire them either. In essence, this means that you are limited to BalloonHovering JumpJet units to fire such weapons.


  • The parameters for control of the drain effect are determined in the Floating Disk Draining section.
  • While originally intend to fire only upon structures (to which it is limited via Warhead on the only weapon that uses it in vanilla YR, the DiskDrain), it is possible to modify DrainWeapon to fire upon other objects as well by using a warhead that allows targeting other objects and giving them Drainable=yes. However, doing so has no practical effect, as although the unit will accept the Attack mission, the drain effect will not process and even objects with a positive Storage (such as miners) cannot have their ore cargo drained.

See also