Escort Formations Question

Discussion and information relevant to creating special missions, new ships, skins etc.

Moderators: winston, another_commander

Post Reply
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Escort Formations Question

Post by mandoman »

I searched, but didn't see a thread that dealt with this. When the NPC ships are flying escort, and their group, or mother, is attack by multiple offenders, does each escort ship take on a different attacker, or do they all go after one at a time? It would seem logical that they each take on a separate attacker, unless there are fewer attackers than escorts. Just wondering.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Escort Formations Question

Post by Thargoid »

It depends on the AI they are flying under.

There are various AI commands which deal with this kind of thing, for example ESCORT_ATTACKED which is sent to the mother if her escorts are attacked, and groupAttackTarget which when send causes all AIs in the group to receive a "GROUP_ATTACK_TARGET" message. That can then be used to trigger an attack run.

Hence you can have "single combat" or you can have swarming behaviour, depending on how vicious the AI is set up to be. Examples of the latter are my Swarm.oxp and Killer Wolf's Wasps oxp (which I also wrote the AI for, and on which Swarm was based).

This of course has nothing to do with the escort formation itself by the way.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Escort Formations Question

Post by mandoman »

Okay. I had a feeling it was based on something of that nature. Is there a way to make an override for escorts designed to attend one's own NPC ships, that would have each ship taking on a different aggressor, if there are as many or more aggressors than escorts? Maybe that's the same question, I don't know.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Escort Formations Question

Post by Thargoid »

Only by writing a custom AI, possibly twinned with a script to give more detailed scanning etc. It would be quite a specialised pair.
User avatar
Tricky
---- E L I T E ----
---- E L I T E ----
Posts: 821
Joined: Sun May 13, 2012 11:12 pm
Location: Bradford, UK. (Anarchic)

Re: Escort Formations Question

Post by Tricky »

I don't think JavaScript would need to be involved. Just a slight tweaking of the base AI used by the escort and also the intercept AI used by the escort.
User avatar
Thargoid
Thargoid
Thargoid
Posts: 5528
Joined: Thu Jun 12, 2008 6:55 pm

Re: Escort Formations Question

Post by Thargoid »

For each to take on a random available target it could be done that way, but if each needs to take a unique target as best as possible that would need JS. It depends how far it wants taking and how complex you want to make it.

JS + AI is a very powerful and flexible combination, and not too much of an additional stretch if you know how to code each separately. The JS scanning capabilities specifically can give some nice results.

It'll also be a nice prelude to the long-planned update to how AIs are done generally.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Escort Formations Question

Post by mandoman »

Would it be presumptuous to request such a thing be made into a new oxp? I don't think I could do it, more's the shame. It just seems like a logical, and neat idea, but that's just me. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
Post Reply