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

UseChargeDrain

From ModEnc
Jump to navigation Jump to 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: UseChargeDrain
File(s): rules(md).ini
Values: Boolean values: yes or no, true or false, 1 or 0
Default: no
Applicable to: SuperWeaponTypes


This flag indicates that the super weapon has an effect that is applied over time instead of in one burst - after it is fired, the super weapon gradually discharges.

Notes

Whilst the super weapon has some charge, it can be fired again to switch its effect off. Once the effect is turned off or the charge is drained completely, it starts recharging again. The super weapon's own RechargeTime determines how long it takes to recharge completely, and [General]ChargeToDrainRatio= is a multiplier to that charge time used to calculate how long it will take the super weapon to drain its charge completely.

Bugs/Side-Effects/Unexpected Limitations

This flag was designed for the Type=Firestorm super weapon and has a lot of hardcoded behaviour related to it. As such, it is not advised to use this flag on other SuperWeaponTypes. For example, using this flag on the Iron Curtain super weapon would allow the owner to fire the Iron Curtain many times during the discharge period, because at no point does firing an Iron Curtain count as switching it off.

Trivia

Some modders may attempt to create multiple Type=LightningStorm or Type=PsychicDominator super weapons that can be launched simultaneously through the effects mentioned in the #Bugs section. However, their conflict behavior is actually controlled by global variables, and whether it's UseChargeDrain=yes or other release methods in engine extension projects like Phobos that can skip relevant checks, they cannot truly achieve parallel release of multiple instances of these two types of super weapons.

  • For example, a Type=PsychicDominator superweapon, even if it bypasses conflict restrictions and is forced to release, only continuously updates the final launch location rather than creating an additional complete SuperWeaponType instance. The same applies to Type=LightningStorm; they only continuously update the location within the original release cycle, and after the location is updated, independent lightning will no longer be created near the old location.
  • Furthermore, UseChargeDrain=yes only allows the same SuperWeaponType to be released again within the effective duration, but for these two types of super weapons, when releasing, the check on other SuperWeaponTypes that use the same Type= value will not be skipped. That is to say, you cannot use it to achieve the release of two SuperWeaponTypes with the same Type=LightningStorm during each other's release period.

See Also