Page 1 of 1

Convoy AI

Posted: Sun Jun 10, 2007 3:58 pm
by johnsmith
I'm trying to set up a convoy of fugitives. Using linerAI.plist
and linerescortAI.plist results in mayhem, with everyone trying to kill everyone else. If I remove the bounty from each ship, they seem to gather together, but if you attack them Oolite crashes. Any ideas?

Posted: Sun Jun 10, 2007 4:20 pm
by Uncle Reno
Well, my first guess would be to look how the escorts determine their targets, perhaps that will point the way to why you get infighting.

What error message, if any, do you get before it crashes?

Posted: Sun Jun 10, 2007 10:13 pm
by LittleBear
Are you calling the escorts as escorts in Shipdata? If so they go to escortAI even if you give them a different one. escortAI can switch to route1patrolAI, which has a ScanforOffenders in it. That would explain why they are attacking each other. Maybe spawn them together with an AddShipsWithinRadius using a custom role with script and have a scanforNearestShipwithRole : specialpirate (or whatever) and a setdesiredrange to in AI might keep 'em together.

Posted: Sun Jun 10, 2007 10:48 pm
by johnsmith
Thanks guys. Looks like I will have to develop my own custom AI for this then, will post results when I have them. This mission is top secret!

convoy

Posted: Mon Jun 11, 2007 10:40 am
by Arexack_Heretic
You may want to look in the scripters' cove,
I started on a convoyAI there (WIP).
They basically each scan for all ships with rank above them and follow the first found.

Re: convoy

Posted: Tue Jun 12, 2007 9:09 pm
by Commander McLane
Arexack_Heretic wrote:
You may want to look in the scripters' cove,
I started on a convoyAI there (WIP).
They basically each scan for all ships with rank above them and follow the first found.
@ johnsmith: A well-meant advice:
If you copy and use A_H's code, make sure you have eliminated the bugs in it. :wink:

@ A_H: Happy birthday, Arnoud! (I haven't forgotten you.) :D

And BTW, the convoyAI is not in the scripter's cove.

Posted: Wed Jun 13, 2007 8:07 am
by Arexack_Heretic
yeah I really am a [edit: 30year-old] bug-lover. ;)

Not in there?
I'll have to put it there then....I thought I started out with convoys as an example project.
I'll have to exhume it, polish it some and then post it before JS does. ;)

Posted: Wed Jun 13, 2007 8:34 am
by Commander McLane
Not quite, you started it with a sript that should disable legalStatus in anarchy systems, but restore it in lawfull systems as an example project, and no other examples were added later, apart from a few lines of code.