Bridge Commander Central

BC Forums => BC Scripting => Topic started by: Kirk on April 30, 2008, 01:38:30 AM

Title: Submenu for stock ships.
Post by: Kirk on April 30, 2008, 01:38:30 AM
Is there a way to force stock ships, ie nebula, BOP, into a submenu? Simply adding a submenu into the ships plugin doesn't work.
Title: Re: Submenu for stock ships.
Post by: JimmyB76 on April 30, 2008, 08:15:25 AM
ya thats easy...

add this to the top of the stock ship's plugin (in scripts/custom/ships):
(this case being my stock galaxy, in my game under a "warships" submenu)
Code: [Select]
Foundation.ShipDef.Galaxy.SubMenu = "Warships"
such that it looks like this:
Code: [Select]
import Foundation
import App
Foundation.ShipDef.Galaxy.SubMenu = "Warships"

try that - if youre still stuck, upload the ship's plugin here :)
Title: Re: Submenu for stock ships.
Post by: MLeo on April 30, 2008, 11:08:31 AM
I knew explaining it to you a couple of times would pay off! Thanks Jimmy!
Title: Re: Submenu for stock ships.
Post by: JimmyB76 on April 30, 2008, 12:38:50 PM
 lol   see?  youve taught me a number of things all these years! :D
Title: Re: Submenu for stock ships.
Post by: Kirk on May 02, 2008, 03:47:15 PM
Worked perfectly, thanks guys :), though, for some unthinkable reason, when I corrected a mistake I made to the plugin for my BOP and added the submenu, it only recognized the icon name change I made until I deleted the .pyc. Enjoy your new cookie Jimmy!

Edit: Having a problem with the BOP plugin.
Title: Re: Submenu for stock ships.
Post by: JimmyB76 on May 02, 2008, 05:56:39 PM
ok try this...  and if this doesnt work, i have one more idea...
Title: Re: Submenu for stock ships.
Post by: Kirk on May 02, 2008, 10:37:20 PM
It didn't, but I figured it out. The long name was supposed to be "BOP." The displayed name, "Bird of Prey," comes from the TGL, I think.

Edit: Now I'm having trouble with the dry dock. All I have is what I need, and now I get a BSOD on startup.
Title: Re: Submenu for stock ships.
Post by: MLeo on May 04, 2008, 07:00:49 AM
Mostlikely either DryDock doesn't exist, or it doesn't exist yet.

Add, below the import Foundation:
import StaticDefs
Title: Re: Submenu for stock ships.
Post by: Kirk on May 04, 2008, 04:06:41 PM
Mleo, how would I be able to tell what Dry Dock's name is? I checked the name of the ship file in script/ships, and it is DryDock. Would the name be inside the ship file?
Title: Re: Submenu for stock ships.
Post by: MLeo on May 04, 2008, 05:32:24 PM
It's "Drydock" not "DryDock"
Title: Re: Submenu for stock ships.
Post by: Kirk on May 04, 2008, 05:37:34 PM
Aaah! That would cause a problem. As soon as I get to my home PC, I will try that out.

It worked, thanks MLeo.
Title: Re: Submenu for stock ships.
Post by: tiqhud on July 09, 2008, 10:50:21 AM
might have to do this, later