Bridge Commander Central

BC Forums => BC Modding => Topic started by: AdmiralWhite on December 23, 2018, 08:08:26 PM

Title: Starship Carrier
Post by: AdmiralWhite on December 23, 2018, 08:08:26 PM
OK so I want to make the Galaxy X a Carrier Ship able to Launch and dock Shuttles, I downloaded the Techframework Tutorial on How to make a ship capable of Launching shuttles however I'm having trouble understanding the instructions; I'm not sure how to add a new object Emitter. in the MPE, it appears the ship already has a Shuttle Bay but mot a Shuttle Bay OEP. any help would be greatly appreciated.
Title: Re: Starship Carrier
Post by: King Class Scout on December 24, 2018, 04:46:04 AM
the MPE already has an Object Emitter Property template available to drop into the hardpoint under add property.  once you find it, simply overlap the thing with the ship's shuttle bay location.
please note, that you must size the shuttle bay OEP similarly if not larger than the size designated for the shuttle bay by the original hardpointer. as, often as not, shuttles are scaled a lot larger than they're supposed to be in order to be visible while playing.  I've had sticking problems where the shuttle is scaled too large to go back into the ship afterward:P
afterwards, you must create the plugin that tells the bay what shuttles and how many occupy the bay, usually with BCUT.
Title: Re: Starship Carrier
Post by: Morgan on January 04, 2019, 10:06:44 AM
Here's an example from my Intrepid hardpoint (since it only has one shuttle bay it's the shortest example)

Code: [Select]
ShuttleBay = App.HullProperty_Create("Shuttle Bay")

ShuttleBay.SetMaxCondition(4000.000000)
ShuttleBay.SetCritical(0)
ShuttleBay.SetTargetable(1)
ShuttleBay.SetPrimary(0)
ShuttleBay.SetPosition(0.000000, -1.400000, -0.086990)
ShuttleBay.SetPosition2D(65.000000, 106.000000)
ShuttleBay.SetRepairComplexity(2.000000)
ShuttleBay.SetDisabledPercentage(0.000000)
ShuttleBay.SetRadius(0.135000)
App.g_kModelPropertyManager.RegisterLocalTemplate(ShuttleBay)
#################################################
ShuttleBayOEP = App.ObjectEmitterProperty_Create("Shuttle Bay OEP")

ShuttleBayOEPForward = App.TGPoint3()
ShuttleBayOEPForward.SetXYZ(0.000000, -1.000000, 0.000000)
ShuttleBayOEPUp = App.TGPoint3()
ShuttleBayOEPUp.SetXYZ(0.000000, 0.000000, 1.000000)
ShuttleBayOEPRight = App.TGPoint3()
ShuttleBayOEPRight.SetXYZ(1.000000, 0.000000, 0.000000)
ShuttleBayOEP.SetOrientation(ShuttleBayOEPForward, ShuttleBayOEPUp, ShuttleBayOEPRight)
ShuttleBayOEPPosition = App.TGPoint3()
ShuttleBayOEPPosition.SetXYZ(-0.005075, -1.450000, -0.086990)
ShuttleBayOEP.SetPosition(ShuttleBayOEPPosition)
ShuttleBayOEP.SetEmittedObjectType(ShuttleBayOEP.OEP_SHUTTLE)
App.g_kModelPropertyManager.RegisterLocalTemplate(ShuttleBayOEP)
#################################################

You'll notice how it has the Shuttle Bay hull property, then the Shuttle Bay OEP.  If you have more then one shuttle bay, you'll simply name them Shuttle Bay 1, Shuttle Bay 1 OEP, Shuttle Bay 2, Shuttle Bay 2 OEP, etc., in the same way that is shown above.  You can create the carrier script in BCUT easily.

As KCS noted, make sure that the SetRadius portion of the Shuttle Bay property (not the OEP) is set to be slightly larger than the hull radius of the largest shuttle you plan to have your ship launch.  For example, if you want your Galaxy X to be able to launch Danube's from it's main shuttle bay, you'll want to set the bay's radius to something like 0.250000, as the Danube's hull radius is 0.220000 by default.