Page 1 of 1
Fleet Cohession
Posted: Sat May 11, 2013 6:05 pm
by mandoman
I have been working on putting together a fleet, with carriers, destroyers, gunships, and fighters. It would be the MandotechFleet, and would only be found in those systems that Mandotech Stations are located, not meant to supplant the official Naval Fleet. It is intended to be in cooperation with GalCop, and Naval Fleets, helping to keep the systems as safe as possible.
Here's the catch, though I can get the game to clear the scripts I made for the carriers, I can't seem to locate any examples of how to create a cohesive group of ships, that would be comprised of certain individual ships, Mandotech in nature. I have noticed, many times, that the Navy Fleets are comprised of various types of ships, that all seem to patrol along side a Behemoth Carrier, or patrol nearby.
How is this done? Is it a script action, or an AI, or a combination of both, or something I don't seem to be able to recognize? I guess I'm asking for help with this, though I know the script experts are very busy with their own projects. I truly wish I could wrap my brain around how to put scripts, and AIs together, but somehow the logic eludes me. Any help would be much appreciated.
Re: Fleet Cohession
Posted: Sat May 11, 2013 6:29 pm
by spara
mandoman wrote:
Here's the catch, though I can get the game to clear the scripts I made for the carriers, I can't seem to locate any examples of how to create a cohesive group of ships, that would be comprised of certain individual ships, Mandotech in nature. I have noticed, many times, that the Navy Fleets are comprised of various types of ships, that all seem to patrol along side a Behemoth Carrier, or patrol nearby.
In GalNavy a group is formed in shipdata.plist like this:
Code: Select all
"navy-Colossus-battlegroup" = {
"escort_role" = "navy-battlegroup-escort";
"escorts" = "14";
"like_ship" = "behemoth-Colossus";
...
"roles" = "navy-behemoth-battlegroup";
};
Then the escorts are formed using a correct role like this:
Code: Select all
"navy-viper-battlegroup" = {
...
"like_ship" = "navy-viper";
"roles" = "navy-battlegroup-escort(4)";
...
};
And the whole group is then added to the game by spawning with the role "navy-behemoth-battlegroup". So the escorts are a bit random, depending on how many ships have the role "navy-battlegroup-escort". GalNavy also uses special AIs, but that's not my cup of tea
.
Re: Fleet Cohession
Posted: Sat May 11, 2013 7:52 pm
by Commander McLane
In short: any accompanying ships are simply escorts of the main ship, just like the escorts for instance of an Anaconda.
Like spara described above, you can make sure in your shipdata that only ships from your OXP are used as escorts for your carrier, not ordinary Cobra I or Mambas.
Re: Fleet Cohession
Posted: Sat May 11, 2013 8:01 pm
by spara
GalNavy also makes chains of escort definitions, where mother has an escort, that has an escort and so on. BTW, what will happen to an escort of an escort it the chain breaks? Does the lower escort move up in chain or does is switch it's role to something generic?
Edit: Does not work like this. Oolite does no chain escorts.
Re: Fleet Cohession
Posted: Sat May 11, 2013 8:16 pm
by cim
Oolite won't add escorts to a ship which is itself an escort. This is to stop an infinite number of escorts being added. So the ones in Galnavy will only appear if the ship is appearing in a non-escort role.
Re: Fleet Cohession
Posted: Sat May 11, 2013 8:31 pm
by spara
cim wrote:Oolite won't add escorts to a ship which is itself an escort. This is to stop an infinite number of escorts being added. So the ones in Galnavy will only appear if the ship is appearing in a non-escort role.
Ok. Makes sense.
Re: Fleet Cohession
Posted: Sat May 11, 2013 10:40 pm
by mandoman
cim wrote:Oolite won't add escorts to a ship which is itself an escort. This is to stop an infinite number of escorts being added. So the ones in Galnavy will only appear if the ship is appearing in a non-escort role.
So, am I back to where I started? How does one get several huge ships, but only one Behemoth size, to fly in formation, performing system sweeps for bad guys, and Thargoids (bad bugs?)? All the other ships in the formation can be player ships, but I want them to also have NPC roles as part of one of the fleet formations.
Re: Fleet Cohession
Posted: Sat May 11, 2013 10:46 pm
by cim
mandoman wrote:cim wrote:Oolite won't add escorts to a ship which is itself an escort. This is to stop an infinite number of escorts being added. So the ones in Galnavy will only appear if the ship is appearing in a non-escort role.
So, am I back to where I started? How does one get several huge ships, but only one Behemoth size, to fly in formation, performing system sweeps for bad guys, and Thargoids (bad bugs?)? All the other ships in the formation can be player ships, but I want them to also have NPC roles as part of one of the fleet formations.
So long as all the ships in the formation are either the Behemoth-size one, or an escort of that ship, they'll stay in formation.
spara's first post shows the bits of Galnavy that do something similar, and that will work (and while the AI is a bit more complicated there, you could get reasonable patrol behaviour for the formation just by giving the main ship
route1patrolAI.plist
)
The catch is that you can't easily control exactly what ships escort the Behemoth - they'll be drawn from the role you specify, but you can't say "exactly two of these, and four of those, and three of the others" without some complicated scripting.
Re: Fleet Cohession
Posted: Sat May 11, 2013 11:16 pm
by mandoman
Okay, that's what I was afraid of. Thanks cim.
Re: Fleet Cohession
Posted: Sun May 12, 2013 4:10 pm
by Commander McLane
On the other hand, the good news is that you can specify any formation shape you like. You're not limited to the standard v-shape of escorts around the mothership. It also takes some code to do that, but that code also already exists and can be copied.
Re: Fleet Cohession
Posted: Sun May 12, 2013 11:11 pm
by mandoman
Okay, so what spara said in his first post was correct? I just can't tag an escort ship onto another escort ship, right? I'll study those scripts a bit closer and see if I can splice something together. I got the LatestLog to stop throwing a "Non-script" error at me, when I spliced together a script for the specific systems I want the ships to appear. I'll keep working on it.
Re: Fleet Cohession
Posted: Mon May 13, 2013 10:33 am
by Commander McLane
mandoman wrote:Okay, so what spara said in his first post was correct? I just can't tag an escort ship onto another escort ship, right?
Yep. You'll have one mothership, and you can give it up to 16 (off the top of my head I believe that's the maximum) escorts. Without further scripting, they will appear in the familiar v-shape behind the mothership, one half to the left and the other half to the right.
If you don't care which ship types the escorts are, all it takes is the line
(or any lower number) in the mothership's shipdata.
If you want specific ship types as escorts, see the instructions in spara's post.