new pirateAI / pirates following player

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

new pirateAI / pirates following player

Post by Commander McLane »

The new feature of pirates being able to follow the player through a wormhole has a slightly odd side effect.

Whenever a pirate is in attack mode and the player jumps out, the pirate can follow. This means—I witnessed this yesterday—that if a pirate is attacking an NPC-trader and the player just happens to be in the vicinity and make a hyperjump, the pirate will emerge on the other side.

This is a little odd, because it would require the pirate to break off his fight and head straight for the wormhole of an unrelated ship at the edge of his scanner range, instead of finishing off his current prey and scooping its cargo. I don't think it's a rational behaviour from the pirate's point of view.

The cause is that the pirateAI attempts to follow whenever a player-wormhole is sighted. I think the AI method perhaps has to be changed a little. The pirate should only head for the wormhole and follow if his current target jumps out. If he happens to target the player, he should follow the player. But if he is busy with another ship it makes no sense to forget all about it and follow the player. He should however follow this other NPC if that happens to jump out.

We probably need a new TARGET_WITCHSPACE (or TARGET WITCHSPACE, depending on the current policy on underscores) for that, in conjunction with enterTargetWormhole.

The current PLAYER WITCHSPACE --> enterPlayerWormhole re-introduces an odd element of player-centeredness to Oolite.
Switeck
---- E L I T E ----
---- E L I T E ----
Posts: 2411
Joined: Mon May 31, 2010 11:11 pm

Re: new pirateAI / pirates following player

Post by Switeck »

This also means with an intentional misjump you can introduce pirate/s to Thargoids...where hopefully they fight each other. :twisted:

As you've noticed,
"PLAYER WITCHSPACE" = (enterPlayerWormhole);
...doesn't give the pirate (or whoever uses it) time to evaluate anything. They are forced to take the wormhole if they can reach it regardless of other circumstances.
User avatar
Commander McLane
---- E L I T E ----
---- E L I T E ----
Posts: 9520
Joined: Thu Dec 14, 2006 9:08 am
Location: a Hacker Outpost in a moderately remote area
Contact:

Re: new pirateAI / pirates following player

Post by Commander McLane »

Switeck wrote:
"PLAYER WITCHSPACE" = (enterPlayerWormhole);
...doesn't give the pirate (or whoever uses it) time to evaluate anything.
That has nothing to do with time, but only with how this message and method are coded. The code doesn't evaluate anything. It has plenty of time to do so.
Post Reply