defense ships not breaking up attack when I cloak (1.75.2)

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:

defense ships not breaking up attack when I cloak (1.75.2)

Post by Commander McLane »

I just had this strange situation when I attacked a trader in front of the main station. More and more of the station's defense ships were launching. When I wanted to get them off my scent I activated my cloaking device. Only that nothing happened. They still had targeted me and their blips kept blinking. Luckily I had the AI logging activated for one of them. It kept going through this loop while I was cloaked:

Code: Select all

 12:24:45.950 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'ATTACK_SHIP' receives message 'TARGET_CLOAKED'. Context: unspecified, stack depth: 0
12:24:45.950 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'ATTACK_SHIP' receives message 'TARGET_LOST'. Context: flight updates, stack depth: 0
12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action setStateTo: CLEAR_STATION
  12:24:45.950 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'ATTACK_SHIP' receives message 'EXIT'. Context: changing state, stack depth: 1
  12:24:45.950 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'CLEAR_STATION' receives message 'ENTER'. Context: changing state, stack depth: 1
  12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action getWitchspaceEntryCoordinates
  12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action setDestinationFromCoordinates
  12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action setDesiredRangeTo: 100.0
  12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action setSpeedFactorTo: 0.75
  12:24:45.950 [ai.takeAction]: Military Manta Ray 306 to take action performFlyToRangeFromDestination
  12:24:45.951 [ai.takeAction]: Military Manta Ray 306 to take action pauseAI: 5
12:24:45.951 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'CLEAR_STATION' receives message 'GROUP_ATTACK_TARGET'. Context: groupAttackTarget, stack depth: 1
12:24:45.951 [ai.takeAction]: Military Manta Ray 306 to take action switchLightsOn
12:24:45.951 [ai.takeAction]: Military Manta Ray 306 to take action setTargetToFoundTarget
12:24:45.951 [ai.takeAction]: Military Manta Ray 306 to take action setStateTo: ATTACK_SHIP
  12:24:45.951 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'CLEAR_STATION' receives message 'EXIT'. Context: changing state, stack depth: 2
  12:24:45.951 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'ATTACK_SHIP' receives message 'ENTER'. Context: changing state, stack depth: 2
  12:24:45.951 [ai.takeAction]: Military Manta Ray 306 to take action performAttack
12:24:45.970 [ai.message.receive]: AI policeInterceptAI.plist for Military Manta Ray 306 in state 'ATTACK_SHIP' receives message 'TARGET_CLOAKED'. Context: unspecified, stack depth: 0
The loop kept repeating and repeating in intervals of 20 ms. Something (the station?) must have kept sending group attack target messages.

The very strange thing was that it even kept repeating when I paused the game. In the end the log was 3.2MB long!

I'll see whether I can reproduce this.
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: defense ships not breaking up attack when I cloak (1.75.

Post by Commander McLane »

Another test: I couldn't reproduce it. Also, all defense ships were in interceptAI, not policeInterceptAI. When is the latter supposed to be used anyway?
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: defense ships not breaking up attack when I cloak (1.75.

Post by Eric Walch »

Commander McLane wrote:
Also, all defense ships were in interceptAI, not policeInterceptAI. When is the latter supposed to be used anyway?
policeInterceptAI is a very bad chosen name. It is the default AI for station defence ships. Police or not police. A better name would have been stationDefenseAI. I think the name is so because it originally were only police that defended stations.

I don't know what is sending those 'group attack target' messages as none of the default station ships or station should use it. It looks more like a bad custom AI that is using it to much.
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: defense ships not breaking up attack when I cloak (1.75.

Post by Commander McLane »

I could reproduce the bug now.

When I cloaked for the first time, everything was okay. Then more defenders launched while I was still cloaked. As soon as I de-cloaked all defense ships resumed their attack (this is already unusual; normal police ships don't do that). And my next cloaking didn't remove me as their target anymore.
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: defense ships not breaking up attack when I cloak (1.75.

Post by Commander McLane »

I also noticed an OXP bug in the process. It seems there are some military ships which can be selected by the engine as defense ships.

I am getting Military Manta Rays (from Aquatics.oxp) with scanClass CLASS_MILITARY that are launched by the station as defense ships. These go into goToWaypointAI immediately after launch and then vanish in the distance without ever getting out of goToWaypointAI again.

Another Military Manta Ray was launched as a planet patrol ship with primary role "police", but still CLASS_MILITARY.

Both return

Code: Select all

> PS.target.isPolice
false
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: defense ships not breaking up attack when I cloak (1.75.

Post by Eric Walch »

Eric Walch wrote:
I don't know what is sending those 'group attack target' messages as none of the default station ships or station should use it. It looks more like a bad custom AI that is using it to much.
planetPatrolAI.plist does send group attack messages. But that has a long pause and should not do it in intervals of 20 msec
User avatar
JensAyton
Grand Admiral Emeritus
Grand Admiral Emeritus
Posts: 6657
Joined: Sat Apr 02, 2005 2:43 pm
Location: Sweden
Contact:

Post by JensAyton »

Eric Walch wrote:
Commander McLane wrote:
Also, all defense ships were in interceptAI, not policeInterceptAI. When is the latter supposed to be used anyway?
policeInterceptAI is a very bad chosen name. It is the default AI for station defence ships. Police or not police. A better name would have been stationDefenseAI. I think the name is so because it originally were only police that defended stations.
policeInterceptAI is used in two places: launchPolice is called automatically when a station is attacked and only launches police ships with policeInterceptAI, while launchDefenseShip is called by AIs and launches a customizable type of ship, and sets it to policeInterceptAI if it’s a police ship or was selected using the role “hermit-ship”… all in all, pretty nonsensical. I suspect launchPolice was introduced very early, when there were only main stations.

(Oolite2 Issue #12)
Post Reply