Bridge Commander Central

BC Forums => BC Modding => Topic started by: Dalek on September 06, 2008, 10:18:58 AM

Title: Shuttle Framework help
Post by: Dalek on September 06, 2008, 10:18:58 AM
For my SG/ST ship, I want to be able to launch Puddle Jumpers. I'm guessing you have to edit the Launching-ship's hardpoint and the ship-being-launched HP as well. Help?
Title: Re: Shuttle Framework help
Post by: JimmyB76 on September 06, 2008, 10:41:39 AM
this tutorial comes with KM...
Title: Re: Shuttle Framework help
Post by: Dalek on September 06, 2008, 10:53:39 AM
Oh flip, I never noticed. :oops: I'll go kick myself in the corner...
Title: Re: Shuttle Framework help
Post by: Dalek on September 06, 2008, 11:42:18 AM
Is this right?

Code: [Select]
# A simple example of how to define a custom Carrier with a specified
# compliment of vessels
Carrier = __import__( "ftb.Carrier")
class PendragonX( Carrier.Carrier):
    def __init__( self, pShip):
        Carrier.Carrier.__init__( self, pShip)
        # The script name should be the name of the "ship" script, not the
        # hardpoint (otherwise, you'll crash your BC and this is bad)
        LauncherGroup = __import__( "ftb.LauncherGroup")
        group = LauncherGroup.LauncherGroup()

        LauncherManager = __import__( "ftb.LauncherManager")
        launcher = LauncherManager.GetLauncher( "Shuttle Bay", pShip)
        group.AddLauncher( "Shuttle Bay", launcher)
        #launcher.AddLaunchable( "PuddleJumper", "ftb.friendlyAI", 5)
        launcher.AddLaunchable( "PuddleJumper", "ftb.friendlyAI", 12)

        self.AddLauncher( "Group 1", group)

        # Play with this feature if you dare... MUHAHAHAHAHAHAHAHAHAHAHAHA!!!!!
        #group.SetLaunchMode( LauncherGroup.ALL)

    # Define how much Shuttles we can carry maximal (Return Shuttles script)
    def GetMaxShuttles(self):
    return 50
    # Don't use the following Tractors to Dock:
    def IgnoreTractors(self):   
    return ["Aft Tractor 2", "Forward Tractor 1", "Forward Tractor 2"]

# "Dauntless" is the "ShipProperty" name of the ship to be registered as
# defined in the Hardpoints PY file for your ship
ShipManager = __import__( "ftb.ShipManager")
ShipManager.RegisterShipClass( "PendragonX", PendragonX)
Title: Re: Shuttle Framework help
Post by: MLeo on September 06, 2008, 12:07:24 PM
From what I can see, yes it is. I don't know anything of the ship file names, so I can't tell you anything on that (try it and see if it works or not).
Title: Re: Shuttle Framework help
Post by: JimmyB76 on September 06, 2008, 12:12:20 PM
Oh flip, I never noticed. :oops: I'll go kick myself in the corner...
lol its ok - it is buried inside the Tech Framework folder inside the docs folder...  i actually forgot it was there also until i suddenly remembered...
as far as the setup, i think it looks ok (once youve added in the Shuttle Bay properties and OEP via MPE) but, as MLeo said, your best bet would be to try it out and see how it goes...
Title: Re: Shuttle Framework help
Post by: Dalek on September 06, 2008, 01:17:29 PM
Hmm. Didn't work.
Title: Re: Shuttle Framework help
Post by: MLeo on September 06, 2008, 02:03:14 PM
Did the console say anything?
Title: Re: Shuttle Framework help
Post by: tiqhud on September 06, 2008, 06:56:21 PM
see if this will assist you.
http://bcs-tng.com/forums/index.php?topic=1831.0
Title: Re: Shuttle Framework help
Post by: Nexxus21 on September 07, 2008, 03:57:30 PM
I was able to get Tie fighters to launch from the the Star destroyers by tweaking a shuttle launch script I found for another ship posted on BCFiles.

However when I tried the same process to launch shuttles from the US Oklahoma It didn't work. I racked my brain for a good portion of the day and discovered that in the Hardpoint file under ship property that the ship name wasn't set to match the custom/carrier /script correctly:

oklahoma = App.ShipProperty_Create("oklahoma")

oklahoma.SetGenus(1)
oklahoma.SetSpecies(104)
oklahoma.SetMass(120.000000)
oklahoma.SetRotationalInertia(15000.000000)
oklahoma.SetShipName("Oklahoma") 
[oklahoma.SetModelFilename("data/Models/Ships/Oklahoma/Oklahoma.nif")
oklahoma.SetDamageResolution(10.000000)
oklahoma.SetAffiliation(0)
oklahoma.SetStationary(0)
oklahoma.SetAIString("")
oklahoma.SetDeathExplosionSound("")
App.g_kModelPropertyManager.RegisterLocalTemplate(oklahoma)

Not sure if this is your problem but I hope it helps......