Fleet Cohession

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

Fleet Cohession

Post 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. :)
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Fleet Cohession

Post 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 :D.
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: Fleet Cohession

Post 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.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Fleet Cohession

Post 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.
Last edited by spara on Sat May 11, 2013 8:33 pm, edited 1 time in total.
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Fleet Cohession

Post 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.
User avatar
spara
---- E L I T E ----
---- E L I T E ----
Posts: 2691
Joined: Wed Aug 15, 2012 4:19 am
Location: Finland

Re: Fleet Cohession

Post 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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Fleet Cohession

Post 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.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
User avatar
cim
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 4072
Joined: Fri Nov 11, 2011 6:19 pm

Re: Fleet Cohession

Post 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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Fleet Cohession

Post by mandoman »

Okay, that's what I was afraid of. Thanks cim.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
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: Fleet Cohession

Post 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.
User avatar
mandoman
---- E L I T E ----
---- E L I T E ----
Posts: 1385
Joined: Thu Apr 28, 2011 3:17 pm

Re: Fleet Cohession

Post 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.
Mandotech Industries Wiki Page.

http://wiki.alioth.net/index.php/User:Mandoman
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: Fleet Cohession

Post 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

Code: Select all

        escorts = 16;
(or any lower number) in the mothership's shipdata.

If you want specific ship types as escorts, see the instructions in spara's post.
Post Reply