I'm sorry I'm not good with this but it seems to lack appropriate targeting data, namely what targets are allowed. You need to have the ability target the ship, not the ability. You need to set a condition so that when shields = 0, a timer starts and after a set time, the ability effect take place and shields are set to 25%. From my knowledge, the effect would have to autocast when shields = 0, then a delay counts down, then the shields are restored. Also, you need to do something with base shield regeneration so that it doesn't happen when shields = 0. Unfortunately, I think shields need to be up before a ship will open fire. I made a mod with a .1 second cooldown for TEC autocannons, expecting it to constantly fire. However, it would not fire with lowered shields. This may be hardcoded to allow the emergency shield mitigation when the hulls are taking damage. Or I just may suck at coding. Either way, I don't know of a way to let shields = 0 and still have ships fire at it.