Destination and tactical target are two different things. The destination is the target that you are heading towards to attack, in this case destroyers. Because no destroyer is currently in range, the ships will take a pot shot at anything that is in range, otherwise its just wasting potential damage capability. So it will engage those fighters with its turrets while it heads towards the intended target.
This is from memory, I’m at GDC, can’t check the code today…
Thank you for clarifying the difference between Destination and Tactical Target. I fully agree with what you are saying, but in my test case it doesn’t work like this. My cruisers with only 1 order (100% to ‘attack destroyers’), does not only fire at fighters (this is ok), but it also navigates to them. Its Destination is set close to the fighters.
Test challenge online
I uploaded challange no. 5189749, so everyone can play against the same test fleet. At the south, there is an immobile dreadnought with 2 squads of fighters escorting it. In the north, there are 4 immobile destroyers. All ships have (minimal) weapons to simulate a real battle.
After downloading the challenge no. 5189749, you have to set up your own fleet to play against the aforementioned fleet. Design a cruiser* with the following properties:
maximum speed: 0.18
Deploy 1 cruiser at the very south (closer to the dreadnought than to the destroyers). Set the following order and delete all other orders:
- ‘Attack destroyers’: priority 100%, range 800 (try range 100 if you can’t observe the same bug as I do)
When starting the battle, my cruiser has Destination and Tactical Target set to the destroyers. But after 10 seconds, it switches to the fighters for both, Tactical Target and Destination. This means it navigates towards the fighters and never reaches the destroyers in the north. It never switches back to the destroyers.
name = danous test cruiser
guiname = danous test cruiser
hull = F1_CruiserC
description = test cruiser
I can confirm this behavior in selecting the destination. Here is the setup I used against Danou’s test challenge:
The single cruiser is set to engage destroyers at 100%, with no orders to engage other ship classes. Below you can see three snapshots during the battle:
At the very beginning of the battle, the ship’s destination is set near the destroyers. However, it quickly changes to be near the dreadnought group. The destination is reset fairly frequently (every few seconds), but at some points is actively pointing the ship away from the destroyer group at the top (third snapshot, destination is pointed downward to the right).
Well that is a bug that is easier to describe than fix. Look at it this way, do you want ships to never fire at a target they are not heading towards? if you have 10 anti-fighter turrets and are heading off to attack some gunships with them, but some fighters fly by, should they be ignored?
But then when you try to nail the difference (in pure AI terms) between that scenario and the ‘don’t fire plasma torpedoes at fighters’ instruction, things get very fuzzzy indeed. To what extent can we really define what is an optimal target? its very much a matter of opinion. It gets into real fuzziness in terms of 'I am X meters away from my chosen target, the alternative target chance to hit is Y, my reload time is Z, the chosen targets speed towards me and facing is V and W…
Its sadly and annoyingly not as simple as it sounds
in my perfect world, all that would be required should be the speed of the target, if not that then the ability to hardcode weapons to not fire on a specific class of ship.
(case in point, if you have little to no probability of hitting the target, just dont waste the ammo, its alot better then the alternative)
because i fully believe there is no excuse whatsoever for a dreadnought to fire of its massive ship destroying super missiles, that can maneuver as well as an oversized barge with 2 paddles for turing of at a single lone fighter, JUST before the other dreadnought got into range. (it gives me nightmares just typing it)