target_size=CLASS SIZE LIST
where CLASS SIZE LIST is a comma separated list of available class sizes the weapon will target. Alternately the list is of sizes the weapon will NOT targe (whichever is easier for cliffski), the default would be that the weapon targets all sizes unless the line is in the module, so vanilla (extant) modules remain unchanged.
This would override the normal AI, so that the ONLY target might be a fighter, but this weapon system, if not allowed to attack fighters will not attack fighters, PERIOD.
The uses are myriad. Fighters, for example. They could carry a missile/bomb that would only be used vs Frigates or larger, not wasted on the first fighter in range (this is ideal combined with a huge fire interval, so that the weapon can be powerful, but only fired once in a scenario). The same fighter might have a defensive laser that only attacks fighters. You could then have fighter-bombers that would seek their real prey, larger ships, while using defensive weaponry on other fighters—exactly what fighters with a tail gun should do.
Larger ships? Main batteries (with low tracking speeds) that won’t shoot at fighters they can never hit. Other, creative uses can be addressed, surely. Bottom line is this is really needed to make fighters behave as all of us would expect, IMHO.
PS—I’d love to also see “expendable” weapons that have a total count on rounds available to fire (Rounds=2 would mean the weapon shoots twice, then is out of ammo). I realize this is likely far harder to code, since the next step would be for fighters so armed to RTB when the count reaches zero to rearm.