just a sidenote, dont forget to:
-make iron curtian immune to emp
-Cyborg=yes should be affected by emp
-ImmunetyTypes(if u add) should be immune to a warhead emp
I think this Issue needs to be re-visited as there are still problems.
1. CellSpread works but only if you hit a target directly. If you attack the ground, nearby units do not get EMP'd. If you attack a specific target then nearby units do get EMP'd.
2. Attacked a Barracks - nearby units got EMP'd but there is no discernible effect on the Barracks. Never played TS so don't know how this is supposed to work - needs documenting.
3. EMP'd ConYard could not be repacked, at first I thought I'd turned off repack so this should be documented if it is an intended feature.
4. Every time a unit is EMP'd it gains the electrical animation. If you EMP something 5 times, it gets 5 copies of the animation. Clearly the duration of the EMP only gets reset on each shot so there shouldn't be multiple animations attached.
5. Weapon still deals damage even though warhead has EMEffect=yes. Is this intended? How to create an EMP weapon that doesn't deal damage?
Shouldn't Damage= be used for duration instead of the new EMP.Duration flag?
6. Default animation is EMPulseSparkles=EMP_FX01, and is in the old TS palette so needs converting. I know this, but it should be documented for users who don't.
7. It is not clear to me what happens if a unit is first hit by an EMP weapon with duration 900, and then with another EMP weapon of duration 450. I assume that whenever a weapon hits, the EMP duration on the unit is set to the duration of the weapon if and only if the duration on the unit is below the duration of the weapon. This needs documenting.
Edit:
1. Fixed
2. Fixing...
3. That's normal, repacking is an activity. EMP stops those.
4. DCoder is going fix it...
5. Fixing...
6. It will be documented.
7. WW's EMP replaces the duration, so I'll make EMP.AddDuration=y/n
7. AddDuration would be too powerful - if you hit a unit with 9 tanks all at once it'll be EMP'd for ages.
The EMP duration should reset to the new duration, but only if the new duration is better than the duration presently remaining.
I wouldn't recommend removing the ability to de-link Damage and EMP duration. With EMP duration linked to Damage amount, then modders are solely limited to non-damage causing EMP weapons. Whereas, with a separate EMP duration tag, there are many more creative options open. If you don't want an EMP weapon to cause damage, just use Damage=0?
Affected buildings don't display the EMPulseSparkles animation, but stop playing their own animations. There is no clue showing a building is currently down. SHP units/buildings should dim like a disabled voxel.
When being short on power, buildings are toggled of while still playing some animations. EMP stops some of them: Even the flag on the Allied Weapons Factory stops in mid-air. This does not happen during normal power outage.
Factory=s are not be rendered unusable like by using the temporal on them. They can still kick out units.
Refineries are still usable, even if under EMP.
Yuri power plants stop playing animations (but never stop to produce power) => Artmd.ini [YAPOWR] ActiveAnimPowered doesn't exist (default=yes). PowerPlants should not be affected by EMP or stop to produce power.
Super weapons still charge even with EMP'd building.
Harvesters keep playing the "sucking(?) in ore" animation and sometimes won't recover. It seems other harvesters wait for a still paralyzed unit to dump ore at the refinery. Slave miners aren't affected by this.
EMP'd units can still turn their turrets (tested with War Miners).
Slave Miner can't be undeployed, but the slaves keep working. Is this intended?
Only buildings with WorkingSound= and NotWorkingSound= shut down acustically, this doesn't sound right ;-)
The Powered= tag is not honored. At least gattling gun, pillbox, and the robot control center (with all robot tanks) do shut down even if Powered=no. EMP should ignore every building that does not need power to function.
just a sidenote, dont forget to:
-make iron curtian immune to emp
-Cyborg=yes should be affected by emp
-ImmunetyTypes(if u add) should be immune to a warhead emp