First: Your convoy was never programmed to accept a distress message. It misses a "ACCEPT_DISTRESS_MESSAGE" entry. And this is the one that is send to police ships in the area in response to a "sendDistressMessage" command. (see the Wiki)Matt634 wrote:.... I was initially puzzled when you said they didn't respond to the distress call (which needs to be removed), but after pulling apart the AI again I noticed that the ships aren't switching states but switching AI's for gotoWaypoint. The gotoWaypoint AI doesn't contain a scanForOffenders update, and therefore, no response to other transports under attack.
Second: Before version 1.65 the gotoWaypointAI was always wart of the normal AI. In version 1.65 Giles introduced a separate AI for this purpose. It makes the AI's less complex. But as you said, it does no scanning. For rewriting the Behemoth I left the "gotoWaypointAI" method inside the script with scanning functions. But I needed it on tree places now. I was in doubt of making it into a new external "gotoWaypointAI" with scanning options. Maybe I should do it.: "gotoScanningWaipointAI".
The problem is there, for sure. When you fire at one ship, the system will signal this to al ships by setting the "OFFENCE_COMMITTED" flag. All ships will react on this message as you tested. The scanForOffenders on the other hand is a random function. It will not per definition find something on the first scan. (All other scans methods will find their target on the first scan when in range). scanForOffenders subtracts on each new scan a random value between 0 and 256 from the legal status of each ship. Only when the result stays above 0 he will find him that scanning round. I personally find this a very nice method. On average it takes long to find ships with a low bounty as ships with a high bounty are found easily. (With a bounty above the 256 even on he first scan).Matt634 wrote:Eric, I have been unable to recreate the lack of response problem you encountered. The AI seems to be working fine for me. Was the transport that fell under attack out of scanner range relative to the rest of the convoy?
So what I saw was that one of your ships found an offender and your AI issued a groupAttack command. But by placing ships in the normal way in the system they always get different ID numbers and the system will never see them as one group and the groupAttack function will not work to signal something to the others. Tho others were still scanning on their own but were not finding the target with a low legal bounty.
Groups are only created when the system populator adds pirates, when stations or carriers launch defenders and with escorts. To be able to use groupAttack commands, the ships have to be created with one of these methods. The method I outlined uses the escort function to create a group where I later give each a custom AI.
I only forgot about the problem with turrets and escorts. I can't see why it is not working. I created a convoy with your ships as I described with escorts and the whole physical structure of the turret subentity was missing with the escort but present with the mother. (Both were copies of the same ship). Then I gave the ship escorts of weeviloid2's. These ships had their subentities attached. This was observed in the past, but now I've seen it myself. Not firing of escort-turrets I might understand but why the whole structure misses in one case and is present in the other is strange. I can't see why the code sees them different.