Author Topic: Shuttle Framework help  (Read 2302 times)

Offline Dalek

  • Posts: 1529
  • Cookies: 206
Shuttle Framework help
« 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?
"To live on as we have is to leave behind joy, and love, and companionship, because we know it to be transitory, of the moment. We know it will turn to ash. Only those whose lives are brief can imagine that love is eternal. You should embrace that remarkable illusion. It may be the greatest gift your race has ever received."

 - Lorien

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Shuttle Framework help
« Reply #1 on: September 06, 2008, 10:41:39 AM »
this tutorial comes with KM...

Offline Dalek

  • Posts: 1529
  • Cookies: 206
Re: Shuttle Framework help
« Reply #2 on: September 06, 2008, 10:53:39 AM »
Oh flip, I never noticed. :oops: I'll go kick myself in the corner...
"To live on as we have is to leave behind joy, and love, and companionship, because we know it to be transitory, of the moment. We know it will turn to ash. Only those whose lives are brief can imagine that love is eternal. You should embrace that remarkable illusion. It may be the greatest gift your race has ever received."

 - Lorien

Offline Dalek

  • Posts: 1529
  • Cookies: 206
Re: Shuttle Framework help
« Reply #3 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)
"To live on as we have is to leave behind joy, and love, and companionship, because we know it to be transitory, of the moment. We know it will turn to ash. Only those whose lives are brief can imagine that love is eternal. You should embrace that remarkable illusion. It may be the greatest gift your race has ever received."

 - Lorien

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Shuttle Framework help
« Reply #4 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).
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline JimmyB76

  • Posts: 6423
  • Cookies: 421
Re: Shuttle Framework help
« Reply #5 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...

Offline Dalek

  • Posts: 1529
  • Cookies: 206
Re: Shuttle Framework help
« Reply #6 on: September 06, 2008, 01:17:29 PM »
Hmm. Didn't work.
"To live on as we have is to leave behind joy, and love, and companionship, because we know it to be transitory, of the moment. We know it will turn to ash. Only those whose lives are brief can imagine that love is eternal. You should embrace that remarkable illusion. It may be the greatest gift your race has ever received."

 - Lorien

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Shuttle Framework help
« Reply #7 on: September 06, 2008, 02:03:14 PM »
Did the console say anything?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Shuttle Framework help
« Reply #8 on: September 06, 2008, 06:56:21 PM »
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline Nexxus21

  • Commanding USS Solaris Mk-I Refit
  • Posts: 115
  • Cookies: 4
  • Our Continuing Mission Of Exploration
Re: Shuttle Framework help
« Reply #9 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......
If we value the pursuit of knowledge, we must be free to follow wherever that search may lead us...-Adlai E. Stevenson Jr.