1.73 AI bug ENTER WORMHOLE

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

Moderators: winston, another_commander, Getafix

Post Reply
Screet
---- E L I T E ----
---- E L I T E ----
Posts: 1883
Joined: Wed Dec 10, 2008 3:02 am
Location: Bremen, Germany

1.73 AI bug ENTER WORMHOLE

Post by Screet »

Hi,

just had some more pirates which did not defend themselves. Turns out that they were either IDLE or trying to fly to destination...they obviously got hung up when their pirateAI did go for "ENTER WORMHOLE":

Code: Select all

	"ENTER_WORMHOLE" =
	{
		ENTER = (setDestinationToTarget, "setDesiredRangeTo: 1.0", "setSpeedFactorTo: 1.0", performFlyToRangeFromDestination);
		"PLAYER WITCHSPACE" = (enterTargetWormhole);
	};
I don't see any code to handle the following cases:
1) The ship becomes attacked
2) The wormhole closes

No wonder that they did not return fire...

Screet
User avatar
Eric Walch
Slightly Grand Rear Admiral
Slightly Grand Rear Admiral
Posts: 5536
Joined: Sat Jun 16, 2007 3:48 pm
Location: Netherlands

Re: 1.73 AI bug ENTER WORMHOLE

Post by Eric Walch »

Screet wrote:
I don't see any code to handle the following cases:
1) The ship becomes attacked
2) The wormhole closes

No wonder that they did not return fire...
You are right, therefor I had a proposal for changing the 1.73 pirateAI to:

Code: Select all

    "ENTER_WORMHOLE" = {
		ENTER = (setDestinationToTarget,
			"setDesiredRangeTo: 1.0",
			"setSpeedFactorTo: 1.0",
			performFlyToRangeFromDestination
		);
        	"DESIRED_RANGE_ACHIEVED" = ("setStateTo: LURK"); 
		"PLAYER WITCHSPACE" = (enterTargetWormhole);
    }; 
This was tested to work. When arriving at the location of a collapsed wormhole it starts with the lurk code. Reaction on attacks on its way to the hole seems bad as it has an flee option by entering the wormhole.

It is in the newAI file you have. (but only will work with 1.72 in its current form)

---
btw. I never saw this bug with pirates but regularly with escorts of leaving traders near the station. (However they use the same code here, so a bug in one means also a bug in the other code)

Around the station the problem is that escorts sometimes start escorting a ship that never was defined to have escorts. e.g. an adder or a moray. When such a small trader ship leaves the system its wormhole often collapses before its escorts reach the wormhole. This way it often leaves behind the escorts in a state you mention. This situation was reproducible enough for me to do actual tests with different AI codes.

Pirates jumping out is rare, and only one it defined by the system as group leader. And only when the leader has its hold full and jumps out, the other pirates start following. With the new code I noticed pirates jumping out sometimes, but never the leader himself. (quite rare event)
Post Reply