Page 2 of 3

Posted: Tue Aug 25, 2009 10:43 am
by Disembodied
Eric Walch wrote:
Currently we have a command to check the odds for an attack. Pirates use it to compare its own group size against the victim group size. For cargo I would use the same check again and go for the cargo when the odds are bad.
Would that alter pirate behaviour when attacking a player? The player's group size is always going to be 1, isn't it? Not that I know anything about the mechanics of this, of course! :) But maybe each cargo canister ejected could increase the chance that a pirate group would break off the attack. It would make sense for pirates to let ships escape, even with some cargo left, instead of destroying everything they meet. They'd want to encourage traders to co-operate.

Posted: Tue Aug 25, 2009 11:06 am
by phonebook
not so sure- after all i still kill a ship even if it does eject its cargo- and then kill the escape pod too!!!

Posted: Tue Aug 25, 2009 11:23 am
by Eric Walch
Disembodied wrote:
Would that alter pirate behaviour when attacking a player? The player's group size is always going to be 1, isn't it?
No, currently the code already adds a random number on both group sizes before comparing them. So it is still possible a lonely pirate is attacking a well escorted trader. It is just less likely than a pirate group attacking. Same will be with a trader attack. This part stays as it is. I was just thinking how dealing with ejected cargo as the pirate should go after it on a random way. This existing command will already add a random effect in deciding in going for cargo in a logic way.
phonebook wrote:
not so sure- after all i still kill a ship even if it does eject its cargo- and then kill the escape pod too!!!
Killing escape pods? When delivering them at a station you can get up to 500 credits insurance for a trader. And when delivering a pirate pilot for its bounty, make sure to deliver at a stable government. Corporate states give a much higher bounty for captured criminals.

Posted: Tue Aug 25, 2009 11:32 am
by Disembodied
phonebook wrote:
not so sure- after all i still kill a ship even if it does eject its cargo- and then kill the escape pod too!!!
:D OK ... individual psychopaths aside, it's in the long-term interests of professional pirates – the kind who hang around in gangs, and presumably have bases of operation and more-or-less local cruising grounds – to encourage traders to co-operate. If they try to slaughter everyone who comes by, then a) trade will drop off, and b) the traders they do catch will fight to the death because they've got nothing to lose. If, however, they extract a toll from passing shipping, then everybody's happy. Well, not happy, but happier than they would be if they were dead, anyway.

Which is not to say that there won't be fights to the death. Not all merchant captains will be prepared to drop their cargo. And sometimes, too, pirates might not be thrown off the scent by, say, ten tons of food, when they think that the ship they're attacking could be carrying 80 tons of luxuries as well. Or if pickings have been thin of late, then pirate captains would be under pressure to make a big score.

Posted: Tue Aug 25, 2009 11:33 am
by Disembodied
Eric Walch wrote:
No, currently the code already adds a random number on both group sizes before comparing them. So it is still possible a lonely pirate is attacking a well escorted trader. It is just less likely than a pirate group attacking. Same will be with a trader attack. This part stays as it is. I was just thinking how dealing with ejected cargo as the pirate should go after it on a random way. This existing command will already add a random effect in deciding in going for cargo in a logic way.
Ah, I see! You know, this programming stuff really is quite clever ... :D

Posted: Tue Aug 25, 2009 12:26 pm
by Sendraks
Disembodied wrote:
:D OK ... individual psychopaths aside, it's in the long-term interests of professional pirates – the kind who hang around in gangs, and presumably have bases of operation and more-or-less local cruising grounds – to encourage traders to co-operate. If they try to slaughter everyone who comes by, then a) trade will drop off, and b) the traders they do catch will fight to the death because they've got nothing to lose. If, however, they extract a toll from passing shipping, then everybody's happy. Well, not happy, but happier than they would be if they were dead, anyway.
This would be a welcome and sensible addition to Oolite, particularly if accompanied with a few communications from the pirates along the lines of "drop your cargo commander and you'll get out of here alive" or some such. Basically as you say, the sensible behaviour of a pirate who is trying to make a living from piracy.

[slight derailment] One of my biggest gripes with Eve-online was that you had a game tailor made for this sort of piracy, but those kind of player pirates got overshadowed by the gibbering hordes of idiots engaging in psychopathic behaviour because they were in the consequence free environ of a computer game. Piracy consisted of - ambush player ship, stop player from escaping, get player to jettison cargo or pay ransom, then destroy player ship anyway.

Piracy in any meaningful sense was hard to find and eventually most pirates gave up as few player actually believed their ships would be safe post ransoming so fought to the death regardless.[/slight derailment]

Posted: Tue Aug 25, 2009 12:38 pm
by Cody
I agree...a good idea, and in the spirit of the original.

Posted: Tue Aug 25, 2009 1:26 pm
by Cody
Selective ejection of cargo has many uses...and yes, it has been used as a weapon of last resort. In the original it did occasionly distract pirates, just long enough to cut and run.

Posted: Tue Aug 25, 2009 4:57 pm
by zevans
Eric Walch wrote:
Disembodied wrote:
Would that alter pirate behaviour when attacking a player? The player's group size is always going to be 1, isn't it?
No, currently the code already adds a random number on both group sizes before comparing them.
Additionally, you might be in a larger group, for instance when fighting Thargoids in the GN OXP, or part of an Oo-Haul mission... but does the game engine currently know that Eric?

Posted: Tue Aug 25, 2009 5:22 pm
by Eric Walch
zevans wrote:
Eric Walch wrote:
Disembodied wrote:
Would that alter pirate behaviour when attacking a player? The player's group size is always going to be 1, isn't it?
No, currently the code already adds a random number on both group sizes before comparing them.
Additionally, you might be in a larger group, for instance when fighting Thargoids in the GN OXP, or part of an Oo-Haul mission... but does the game engine currently know that Eric?
No the game does not know, so a player is always considered as the most easy target for pirates. :twisted: They always forget the excellent fighting skills of a player compared to NPC opponents. :P

On the other hand, when you would increase the "player-group" with one number for every increase in rank it would consider an elite player as 9 opponents and always flee away. (Probably a good choice for the pirate, but bad for game play)

What also is not considered is the size of ships, only numbers.

Posted: Tue Aug 25, 2009 6:21 pm
by wackyman465
What about with the hired guns oxp?

And also don't forget that there are a lot more players flying around with really good ships/equipment than NPCs...

Posted: Tue Aug 25, 2009 6:59 pm
by Thargoid
wackyman465 wrote:
What about with the hired guns oxp?
They run under their own custom AI, and will attack anything that attack them or their boss (the player). They don't go for cargo though, that's the player's job.

Posted: Tue Aug 25, 2009 8:15 pm
by wackyman465
No but I'm wondering if they count as part of your group size?

Posted: Tue Aug 25, 2009 9:11 pm
by Thargoid
No, they are independent craft. It is explicitly not possible for players to have escorts in the same way that NPC ships can (I believe it's deliberately coded that way).

The Hired Guns are wholely independent ships, it's only their AIs and scripting that make them act like escorts.

Posted: Sat Sep 19, 2009 11:22 am
by Eric Walch
Eric Walch wrote:
Thargoid wrote:
From a quick look at pirateAI.plist under 1.72.2, it only scans for loot when a target is lost or destroyed. But as you say, it wouldn't be too difficult to implement such a change.
......It can easy be changed and if a majority likes it, I'll come up with a changed AI for 1.74. (Or an test oxp that only will working with 1.73)

The purpose of pirates is to plunder cargo and when they can get it without fight, it would only be logic they go for it. By change as some will still go for the kill to get all the cargo.

On second thought: it is not that easy with AI alone. When you do every 10 seconds a scan for cargo during fight, the scan will also find previous floating cargo. Pirates will start breaking of attacks, even when not ejecting cargo. To do it proper we need a code change in the dump cargo routine that sends a "CARGO_DUMPED" message to all nearby vessels.
I just added it for 1.74: player sends: "CARGO_DUMPED" to all nearby ships. It is up to the individual AI to react on it, but pirates with free cargo room can now react on it. Pirates without cargo bay will for obvious reasons ignore this message.