Make an EMP Weapon
by Comrade Jerkov


This is actually pretty easy (hey, even I can do it. That's going some), and features in Tiberian Alert. The best bit is that unlike with the RepairBullet, it can be given to an infantry unit (as I have to the Cyborg Commando) as easily as it can be given to a vehicle or structure .

First, give your unit the following weapon:

Primary=EMPulseWeapon

Then find the Weapon entry for EMPulseWeapon. It will look like this in an unedited Rulesmd.ini:

[EMPulseWeapon]
Damage=1200 ; Damage is duration for EM Pulse
ROF=1
Speed=25
Warhead=EMPuls
Projectile=PulsPr
Range=40 ; was 30
Lobber=yes
Report=PLSECAN2

Now, as it is, this weapon will simply annihilate anything bar a CY (Damage=1200) in one shot (The Nuclear Missile's impact shot does 1500 to whatever it lands on, not including splash-damage). Edit it so as it looks something like this:

[EMPulseWeapon]
Damage=1
ROF=100
Speed=10
Warhead=EMPuls
Projectile=PulsPr
Range=20
Lobber=yes
Report=PLSECAN2

Damage=1 just means that the weapon will now do minimal actual damage to its target, as opposed to destroying its component parts (for an EMP, that wouldn't do). Now, go to the EMPuls Warhead entry, and it will look like this:

; EM Pulse cannon warhead.
[EMPuls];gs disabled in code
;Spread=11 ; Spread is radius of EM pulse effect.
EMEffect=yes
;GEF AnimList=PULSEFX1,PULSEFX2

Now, the REASON it's disabled in code is that it has no Verses= tags, and half of the necessary is missing. For a really good effect, set up the Verses= tags as shown below:

Verses=0%,0%,0%,2%,2%,2%,0%,0%,0%,0%,0%

This will mean that it only affects vehicles. It also means that the Damage=1 tag is basically that the weapon is doing something like 0.02 damage. For a unit to even register that damage is being done, it has to be more than this.
To enable the disabling of units, the tag: EMEffect=yes has to be included. Here's my Cyborg Commando entry for his EM Pulse Cannon:

; EM Pulse cannon warhead.
[EMPuls]
EMEffect=yes
Verses=0%,0%,0%,2%,2%,2%,0%,0%,0%,0%,0%
DirectRocker=yes

I haven't added the AnimList= tag because I haven't finalised what I'll use for that yet You can set that up how you want.
The unedited parsing comes as direct residuals from Tib Sun, and doesn't work (True EMP logic is disabled in YR). The modified method works, albeit with the disadvantage that the victim cannot be scrambled while the EMP unit moves on to attack another victim. It's similar to the magnetron in this sense, that it must continually fire to work. However, the Mag can 'let go'.

Bear in mind, people, that this EMP Weapon will do nothing to infantry or structures. It will also render the unit that fired the pulse immobile (as it has to constantly keep tagging the victim unit to keep the EMP working) until it is selected and the Stop command is given (default Keybind: 'S'), the unit being EMP'd is destroyed or until another target is selected.
To enable an EMP-equipped unit to do damage to other things, you must make another Weapon to give to its Secondary= , and also give that Weapon a Verses= tag that means it cannot do anything to vehicles. Otherwise it could override the EMP. Other than that, the Secondary= can do whatever you want it to.