Bridge Commander Central

BC Forums => BC Scripting => Topic started by: martyr on July 09, 2008, 03:57:34 PM

Title: removing a stock ship
Post by: martyr on July 09, 2008, 03:57:34 PM
i want to remove the hybrid cardassian ship because i hate how its always in the random defence force when i invade cardassian territory.

or if the cardassian ships in the dominion wars pack be renamed as the cardassians and then i can turn stock ships off
Title: Re: removing a stock ship
Post by: JimmyB76 on July 09, 2008, 04:58:19 PM
Random Defense Force is a part of the Galaxy Charts mod...
you should post your question at USS Frontier's forum as well...
http://bcs-tng.com/forums/index.php?board=53.0
Title: Re: removing a stock ship
Post by: MLeo on July 09, 2008, 05:52:13 PM
*Moved to scripting*

I haven't seen the code of RDF, so I can't tell how to help you exactly.
Title: Re: removing a stock ship
Post by: Captain_April on July 21, 2008, 04:29:36 PM
to remove the Hybrid, go into BCDirectory/scripts/custom/ships
and remove the file CardHybrid.py and CardHybrid.pyc

I think its possible to remove it from the RDF list, too, I know it has to do with the Hybrid being in the Races plugin...
yes, it is.

to remove the Hybrid from RDF, Go to BCDirectory/scripts/custom/QBAutostart/Libs/Racesd
and open Cardassian.py
scroll down about half way, then look for something that looks like this:
Quote
########
## list of the ship script name  of ships of this race, to be added manually (that is, besides looking in the above
## mentioned menu)
lDefaultShips = ["Galor", "Keldon", "Hideki", "Hutet", "CardHybrid",  "CowpAsteroid", "cOWP", ]
and just remove "CardHybrid",, so that it looks like
Quote
########
## list of the ship script name  of ships of this race, to be added manually (that is, besides looking in the above
## mentioned menu)
lDefaultShips = ["Galor", "Keldon", "Hideki", "Hutet","CowpAsteroid", "cOWP", ]
That should do it.
however, copying the code from here won't work, because of how the site displays texts, with spaces after commas.
Title: Re: removing a stock ship
Post by: MLeo on July 21, 2008, 07:41:38 PM
Ehhh..... CardHybrid is a _stock_ ship, meaning it doesn't have a plugin file.


Btw, the code in the quotes, replace it with code and it will also work. Besides, there isn't anythng wrong with it as it is.

_But_! In my copy of the Cardasian.py file, from the same location, it doesn't have those lines, in fact, it's not a static list.


So, to remove it from both the ship list and the RDF would seem to be the following (assuming you have the recent SubMenu mod):
Code: [Select]
import Foundation
Foundation.ShipDef.CardHybrid.__dict__["Do not display"] = 1
Foundation.ShipDef.CardHybrid.menuGroup = "Other Ships"
Put that in a file in scripts/Custom/Ships/
Title: Re: removing a stock ship
Post by: martyr on August 09, 2008, 08:14:36 AM
how would i make that file?
Title: Re: removing a stock ship
Post by: MLeo on August 09, 2008, 09:35:23 AM
Well, create a file in scripts/Custom/Ship/ call it CardHybridRemoval.py

And paste the code I put above in that and save it.

[EDIT] You will need a recent version of SubMenu for this.