endless-sky / endless-sky

Space exploration, trading, and combat game.
https://endless-sky.github.io/
GNU General Public License v3.0
5.72k stars 1.02k forks source link

Reassess the use of the "surveillance" personality on fleets #9894

Open Amazinite opened 6 months ago

Amazinite commented 6 months ago

Problem Description

Quoting from #9714,

I'm pretty sure we're overusing the surveillance personality. A ship does not need the surveillance personality in order to scan other ships. All it needs is an outfit or cargo scanner and no hostiles in the system to distract it. The surveillance personality was always a way to make such ships more aggressive in their scanning, hence them scanning every ship personally instead of not scanning ships their government has already scanned. I've maintained the more aggressive scanning behavior of the surveillance personality by giving them a higher threshold for how many ships they can scan, for how long, and how they choose their scan targets, but we may still want to reevaluate the fleets we have given the surveillance personality.

The surveillance personality seems extremely tailored to the story of the main human campaign. The surveillance personality, prior to #9714, can be summarized as doing three things:

  1. Surveillance ships will personally scan every ship in the system if possible, instead of not scanning ships that have already been scanned by the surveillance ship's government.
  2. Surveillance ships will ditch their fighters in the system before leaving.
  3. Surveillance ships will "scan" stellar objects in the system if they have the "atmosphere scan" attribute.

The latter two behaviors are entirely designed around having Navy surveillance fleets ditch surveillance drones for the player to capture in that one Free Worlds intro mission, and also tie into the story of the Navy searching planets for signs of nuclear testing.

Among randomly spawned fleets, the surveillance personality is used by the following:

Related Issue Links

9714

9706

Desired Solution

It seems like there are two reasons that the surveillance personality is being used:

As such, I believe the following changes should be made:

Alternative Approaches

N/A

Additional Context

On the topic of lingering, why is Ship::Linger a thing? Seems like there should just be a map<const Ship *, int> in AI to count this.

ziproot commented 6 months ago

Is there a reason why ships with atmosphere scan have to have the surveillance personality to scan stellar objects?

Amazinite commented 6 months ago

That's simply how it's coded. The atmosphere scan attribute isn't used anywhere else aside from in the surveillance personality logic. There's no particular reason it needs to remain that way, though.

ziproot commented 6 months ago

tl;dr: Every fleet that has the surveillance personality also has a ship with atmosphere scan, though Hai Surveillance only gets one during Hai Reveal. There are many fleets that have ships with atmosphere scan but do not have the surveillance personality.

Fleets with atmosphere scan and no surveillance Large Kimek Large Saryd Saryd Miners Anti-Pirate Hai (Wormhole Travel) Anti-Pirate Hai (No Wormhole Travel) Small Hai Merchant (Human) Large Hai Merchant (Human) Iije (Uninterested) Iije (Swarming) Korsmanath A'awojs Korath Civilian Miners Korath Civilian Large Small Remnant Large Remnant Remnant Transport Light Remnant Defense Heavy Remnant Defense Wanderer Defense Wanderer Kor Efret Traders

Persons with atmosphere scan and no surveillance Prototype B3-CC4 MasterOfGrey Zitchas

Persons with surveillance and no atmosphere scan Cap'n Pester Marauding Max Local God

Fleets with atmosphere scan and surveillance Embershades Hai Surveillance† Iije (Surveillance) Korath Surveillance Korath Rescue Remnant Home Guard Wanderer Drones Navy Surveillance that won't enter the wormhole Navy Surveillance Vyrmeid (Plankton)

* 20-30 days after completing Hai Leaks Respone 4 † 32-42 days after completing Hai Building Mountaintop [3] Furnishings