ZeroK-RTS/Zero-K

Ignore Bad Targets - Light Still Targeting Fleas

Opened this issue · 1 comments

Seen this in several games, most recently at about 11 minutes into https://zero-k.info/Battles/Detail/2054826, phantoms that have avoid bad targets set to light (yellow) still target fleas.

They were set to Attack Move and that's how Attack Move works. In part it depends what you want from Attack Move. I tend to use it to keep units at a distance while I do other things, so I'm fairly happy for my Phantom to waste shots not walking into a line of Fleas. There are two other options.

  1. Completely ignore bad targets. This would unfortunately result in Phantom walking into a lone Glaive in the middle of nowhere and dying.
  2. Run from bad targets, but don't fire. This would have the downside of units getting stuck doing absolutely nothing, which looks like a bug and runs up against Levels of UI Customisation, so we'd have to be careful with letting players know what they are getting into. Also, this option is probably good for Phantom, but possibly not so much for Ronin.

I don't know of nice ways to implement 1 or 2. The hardcoded version of 1 is implemented via noChaseCats in the unitdef, This is what causes units to avoid stopping to fire at Solars. A nice way to get 1 might be an engine feature that allows units to change their noChaseCats, and then give units categories that correspond to the anti-bait levels. We could implement a basic version of 2 via script.BlockShot. I'm not all that keen though. A unit that is supposed to be not firing at a target shouldn't be aiming at the target.

A janky version of completely avoiding a target is implemented for Don't Fire At Radar, but I wouldn't want to apply it more broadly. But someone could look into new tech that might enable better ways to do 1 or 2, and improve Don't Fire At Radar. An issue to be aware of is that Attack Move works by letting units give themselves Attack commands, and this is done based on proximity. This is good for Attack Move since it is supposed to be attacking the first thing you see, but it might cause issues when targets are meant to be ignored.