Endless Sky

Endless Sky

Rogue Jan 17, 2020 @ 1:00am
How do pirates pick a ship to target in a fleet?
I have a fleet of some 30 or so ships, a mix of heavy, medium, and light warships. Personally I am sitting in one of the mediums just because the heavies have next to no room for extra crew to steal ships. Every time I get into a combat situation it seems that all enemy ships will go to hell and back to target the ship that I am specifically in, even though they could not reasonably know where I am, or aside from fourth wall breaking reasons even have a good reason to single me out because even if I die all the other ships in the fleet will keep fighting. My ship is not the easiest or hardest ship in the fleet to take out, nor is it the most or least heavily armed, and I carry no cargo.

So why do they home in on me like that, to the extent that many of the ships die before inflicting a single point of damage because they are coming from an angle where they have to go through so many other ships first? It's silly, and unbelievably annoying.
Originally posted by Amazinite:
Here's a link to the current FindTarget method for NPCs.
https://github.com/endless-sky/endless-sky/blob/addfe8134c5f12f2f617acc669c5982921900f38/source/AI.cpp#L1015

Converting that to English, where's what the method does:
1. A ship with no government or with the pacifist personality doesn't target anything.
2. If the ship is yours and you have given it an order to target a ship, it targets that ship.
3. If a ship has no weapons, it doesn't target anything.
4. Find the closest ship within a given range (based off of the ship's personality, weapon ranges, and more). If the ship is much stronger (strength being measured by the ship's worth), find a weaker target. Ships that are armed, are weaker in terms of total HP, or have plundered friendly ships (e.g. if the player plunders pirates) are more likely to be chosen.

The rest of the method deals with some stuff we don't really need to worry about here. I think the last two bits of 4 there are what's making your medium warship flag a bigger target. It's weaker than some of your escorts, so the pirates see it as an easier target.
< >
Showing 1-11 of 11 comments
Zarinthal Jan 17, 2020 @ 5:34am 
The whole point of the game is building a fast reputation, pirates love killing people like that
Rogue Jan 17, 2020 @ 6:23am 
Why would they? Stereotypical piracy is more linked to being opportunistic and preying on the weak for the purpose of monetary gain, not assassination of prominent figures. It makes more sense for bounty hunters, but that's not what they are. It also doesn't explain how they would even know which ship to target since they aren't telepathic. If scanners are required to tell pretty much anything about a ship, it's odd that you can just tell who's on one by eyeballing it.

Those things aside, whether they want the praise for offing someone famous or the spoils from taking a ship out, they actually have to be alive in order to reap the rewards and charging through a mass of other warships in order to reach a specific one is not conducive to that outcome. It really makes no sense unless they are under some form of extreme duress but realistically that won't apply to such a huge amount of pirates.
Zarinthal Jan 17, 2020 @ 6:41am 
well the pirates in this game are crazy suicidal which may be because the system authorities indiscriminately obliterate them, child slave crews and all. considering their attacks are more terrorist than your classic "loot n pillage" then it makes sense that they would target anyone who asserts independant power in "their" territory. you may not be the best target, but they run headfirst into navy cruisers with sparrows, and youre not the navy. i just assume they are somehow ideologically driven to help my brain bypass their wholly illogical behavior. plus there are space drugs, so they could just all be reeeeallly high
Rogue Jan 17, 2020 @ 9:01am 
People being hunted would usually hide. You say they are more terrorist in nature than anything but I don't really feel much in the game supports that. Between being more likely to see pirate encounters when you have a higher cargo capacity, pirates being distracted if you jettison cargo, being allowed onto pirate worlds with a bribe, and the text lines of pirates on said pirate worlds, I just don't think that's something being backed up by the game. They aren't ideological fanatics as a whole, just people desperate to survive.

Also, if they were really high that might motivate them to make dumb decisions but I'd argue that also makes it even less likely that they could somehow identify the exact ship the player is on in the midst of massive space combat.
tuk0z Jan 17, 2020 @ 10:30am 
Shadowcloak there's at least one way to have them bad boys stop prioritize our flagship since I use it. It's entirely legit. Changed my life IG when I finally found it. Until then good luck Captain.
The author of this thread has indicated that this post answers the original topic.
Amazinite  [developer] Jan 19, 2020 @ 7:53pm 
Here's a link to the current FindTarget method for NPCs.
https://github.com/endless-sky/endless-sky/blob/addfe8134c5f12f2f617acc669c5982921900f38/source/AI.cpp#L1015

Converting that to English, where's what the method does:
1. A ship with no government or with the pacifist personality doesn't target anything.
2. If the ship is yours and you have given it an order to target a ship, it targets that ship.
3. If a ship has no weapons, it doesn't target anything.
4. Find the closest ship within a given range (based off of the ship's personality, weapon ranges, and more). If the ship is much stronger (strength being measured by the ship's worth), find a weaker target. Ships that are armed, are weaker in terms of total HP, or have plundered friendly ships (e.g. if the player plunders pirates) are more likely to be chosen.

The rest of the method deals with some stuff we don't really need to worry about here. I think the last two bits of 4 there are what's making your medium warship flag a bigger target. It's weaker than some of your escorts, so the pirates see it as an easier target.
Last edited by Amazinite; Jan 19, 2020 @ 7:54pm
Rogue Jan 19, 2020 @ 10:23pm 
Originally posted by Derpy Horse:
Here's a link to the current FindTarget method for NPCs.
https://github.com/endless-sky/endless-sky/blob/addfe8134c5f12f2f617acc669c5982921900f38/source/AI.cpp#L1015

Converting that to English, where's what the method does:
1. A ship with no government or with the pacifist personality doesn't target anything.
2. If the ship is yours and you have given it an order to target a ship, it targets that ship.
3. If a ship has no weapons, it doesn't target anything.
4. Find the closest ship within a given range (based off of the ship's personality, weapon ranges, and more). If the ship is much stronger (strength being measured by the ship's worth), find a weaker target. Ships that are armed, are weaker in terms of total HP, or have plundered friendly ships (e.g. if the player plunders pirates) are more likely to be chosen.

The rest of the method deals with some stuff we don't really need to worry about here. I think the last two bits of 4 there are what's making your medium warship flag a bigger target. It's weaker than some of your escorts, so the pirates see it as an easier target.

Thank you so much. You're a star.
Amazinite  [developer] Jan 19, 2020 @ 11:52pm 
All good. It's just important to note that at no point are NPCs coded to focus on the player's flagship while ignoring other ships (unless they have the nemesis personality, but even then that just means that they focus on the player and the player's escorts if there are other enemies of the NPC in the system, not the flagship specifically).
Rogue Jan 20, 2020 @ 2:39am 
Originally posted by Derpy Horse:
All good. It's just important to note that at no point are NPCs coded to focus on the player's flagship while ignoring other ships (unless they have the nemesis personality, but even then that just means that they focus on the player and the player's escorts if there are other enemies of the NPC in the system, not the flagship specifically).

I was hoping there wouldn't be, which is also why I asked it as a question. I do have a follow-up though, if you don't mind. If I plunder a ship does that aggro transfer to ships that warp into the system after the fact, or only if they're there when it happens?
Amazinite  [developer] Jan 20, 2020 @ 5:27am 
The aggro lasts for the current system, so all hostile ships that enter the system will still have more aggro on you. Changing systems/landing clears the aggro.
Rogue Jan 20, 2020 @ 5:48am 
Originally posted by Derpy Horse:
The aggro lasts for the current system, so all hostile ships that enter the system will still have more aggro on you. Changing systems/landing clears the aggro.

Thank you once again!
< >
Showing 1-11 of 11 comments
Per page: 1530 50

Date Posted: Jan 17, 2020 @ 1:00am
Posts: 11