Behaviour: Keep Distance From X

Right now, the best way to try and steer your frigates around cruisers towards target frigates is to set them to attack cruisers at a large distance and a higher priority than attacking frigates.
However, this is still working out to be sub-optimal, and your ships will sometimes ignore the presence of cruisers when flying over to their targeted frigate.
Or they’ll turn towards their target (when flying along) even though their target is heading straight for them.

With this new behaviour, any movement that decreases the distance below X to any ship of that class is penalized, thereby preferring moving away from ships of class X.
Of course, if you set conflicting orders (Attack frigates at range 400, keep distance from frigates 600), the attacking rule gets prioritized.
In case of conflicts between different classes (Attack frigates at 400, keep distance from cruisers 1000), the distance rule gets prioritized (since the whole idea is to keep your ships from flying towards certain doom) and the ship will try to fly around the cruiser to get to the target frigate (as long as the frigate is hiding behind the cruiser).
Well, the whole game is about ships flying towards certain doom, but I hope you’ll catch my drift :slight_smile:

Blending range priorities doesn’t currently work as a solution because the driver selects a single target at a time. Any decent solution probably needs to involve dynamically switching the driving target around, which we as players can’t realistically do.

Players have been begging for minimum range orders for quite a while now. I’d really like to get Cliffski’s commentary on the subject.

It might not be an issue with the target on itself, but more the route to take towards the target.
If you keep a list (per ship) of the distances (and directions) to the closest nearby enemy ship (one per class), you could estimate if your set course (direction, speed) (or current course for that matter) violates any of the “keep distance”-rules.
If so, course corrections are neccesary (preferring corrections that lessen the penalty given by violating the rules).