Bridge Commander Central

BC Forums => BC Scripting => Topic started by: Billz on April 26, 2009, 08:03:10 AM

Title: Stock Ship Removal
Post by: Billz on April 26, 2009, 08:03:10 AM
Is there a way to remove stock ships?

Most stock ships in the game have better counterparts avaliable for download (DJ Galaxy is a prime example) but there are a few that don't get over-ridden when better community-made ships are installed.

Example:
The stock akira didn't get over-ridden when I installed the SNS Akira pack.

I don't play the campaign anymore. And if I did want to play the campaign, I can just make another install somewhere on my computer with the BC Supermod v3.1 installed.

Title: Re: Stock Ship Removal
Post by: MLeo on April 26, 2009, 08:13:27 AM
The most efficent/robust way is with the latest SubMenu (v3.7 at the very least has this feature), if you add the attribute "Do not display" with a value of 1, then the ship won't be shown in the menu.

For example the Akira:
Code: [Select]
import Foundation

setattr(Foundation.ShipDef.Akira, "Do not display", 1)

Or if you want the not so safe way, replace StaticDef.py with an empty file (or sans the ship definitions), but I honestly can't recommend that!
Title: Re: Stock Ship Removal
Post by: majormagna on April 26, 2009, 01:36:19 PM
 I had a similar problem, where; when implementing my new 'Era Based' menu system, stock ships wouldn't move from their normal positions...
Title: Re: Stock Ship Removal
Post by: MLeo on April 26, 2009, 02:24:54 PM
That is mostlikely because you were creating new ships instead of altering old ones.
Title: Re: Stock Ship Removal
Post by: Kirk on April 26, 2009, 11:42:07 PM
May I interject here for a moment? I have a ship plugin I made up that removes all of the stock ships, so there is a 3rd way. Here's a small part of the code:
Code: [Select]
import Foundation
import App

Foundation.ShipDef.Akira.menuGroup = ""
Foundation.ShipDef.Akira.playerMenuGroup = ""
I guess this is the way to do it without SubMenu installed (though who would honestly not want it?)

Or, for simply moving an existing stock ship, make a plugin like so:
Code: [Select]
import Foundation

Foundation.ShipDef.Akira.SubMenu = "DS9/TNG/VOY"
Foundation.ShipDef.Akira.sBridge = "nebulabridge"
Foundation.ShipDef.Akira.fMaxWarp = 9.3
Foundation.ShipDef.Akira.fCruiseWarp = 6.0

Replacing a stock ship's model/textures and/or hp is as simple as overwriting the originals or redirecting the shipFile (in scripts/Ships) to the correct new files.