Bridge Commander Central

BC Forums => BC Technical Support => Previous "Black Screen of Death" Fixes => Topic started by: 086gf on December 22, 2007, 04:53:32 PM

Title: BSOD - ImportError: No module named BajoranAssault
Post by: 086gf on December 22, 2007, 04:53:32 PM
Or so im guessing thats the problem.

(http://forums.filefront.com/gallery/images/139190/1_ScreenShot006.jpg)
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: MLeo on December 22, 2007, 06:31:29 PM
It's basicly saying that you don't have one of the required ships installed.
In this case, the Bajoran Assault ship.
What mod were you trying out?
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: 086gf on December 22, 2007, 09:27:28 PM
Everything is there though as you can see.

Quote
##### Created by:
##### Bridge Commander Ship Menu Creator v4.0

import App
import Foundation

abbrev = 'BajoranAssault'
iconName = 'PeragrineF1'
longName = 'Bajoran Assault'
shipFile = 'BajoranAssault'
species = App.SPECIES_GALAXY
# SubMenu
menuGroup = 'Other Ships'
playerMenuGroup = 'Other Ships'

Foundation.ShipDef.BajoranAssault = Foundation.ShipDef(abbrev, species, { 'name': longName, 'iconName': iconName, 'shipFile': shipFile })

Foundation.ShipDef.BajoranAssault.fMaxWarp = 9.0 + 0.0 # 0.0 makes sure that the number is a decimal number
Foundation.ShipDef.BajoranAssault.fCruiseWarp = 6.0 + 0.0 # 0.0 makes sure that the number is a decimal number
Foundation.ShipDef.BajoranAssault.desc = 'No Description'

if menuGroup: Foundation.ShipDef.BajoranAssault.RegisterQBShipMenu(menuGroup)
if playerMenuGroup: Foundation.ShipDef.BajoranAssault.RegisterQBPlayerShipMenu(playerMenuGroup)

if Foundation.shipList._keyList.has_key(longName):
Foundation.ShipDef.__dict__[longName].friendlyDetails[2] = Foundation.shipList[longName].friendlyDetails[2]
Foundation.ShipDef.__dict__[longName].enemyDetails[2] = Foundation.shipList[longName].enemyDetails[2]

Quote
import App
import Multiplayer.SpeciesToShip
def GetShipStats():
kShipStats = {
"FilenameHigh": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"FilenameMed": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"FilenameLow": "data/Models/Ships/BajoranAssaultVessel/BajoranAssault.nif",
"Name": "BajoranAssaultVessel",
"HardpointFile": "BajoranAssault",
"Species": Multiplayer.SpeciesToShip.GALAXY
}
return kShipStats
def LoadModel(bPreLoad = 0):
pStats = GetShipStats()
# Create the LOD info
if (not App.g_kLODModelManager.Contains(pStats["Name"])):
# Params are: File Name, PickLeafSize, SwitchOut Distance,
# Surface Damage Res, Internal Damage Res, Burn Value, Hole Value,
# Search String for Glow, Search string for Specular, Suffix for specular
pLODModel = App.g_kLODModelManager.Create(pStats["Name"])
pLODModel.AddLOD(pStats["FilenameHigh"], 10, 200.0, 15.0, 15.0, 400, 900, "_glow", None, "_spec")
pLODModel.AddLOD(pStats["FilenameMed"], 10, 400.0, 15.0, 15.0, 400, 900, "_glow", None, "_spec")
pLODModel.AddLOD(pStats["FilenameLow"], 10, 800.0, 15.0, 30.0, 400, 900, "_glow", None, None)
# kDebugObj = App.CPyDebug()
if (bPreLoad == 0):
pLODModel.Load()
# kDebugObj.Print("Loading " + pStats["Name"] + "\n")
else:
pLODModel.LoadIncremental()
# kDebugObj.Print("Queueing " + pStats["Name"] + " for pre-loading\n")
def PreLoadModel():
LoadModel(1)

(http://forums.filefront.com/gallery/images/139190/1_ScreenShot003.jpg)

(http://forums.filefront.com/gallery/images/139190/1_ScreenShot004.jpg)

(http://forums.filefront.com/gallery/images/139190/1_ScreenShot005.jpg)

Some possibilities but I can't see anything(which is odd for me).

Quote
Usually scripts/ships, but could also be custom/ships. Make sure the paths to the model are correctly spelt and using the same case (ie every capital letter in the actual path to the filename, as well as the filename, must be a capital letter in the path written in the pointer script etc). Make sure if it suggests there should be high, low and medium resolution models that they are either there (even if they are the same model) or the request gets deleted. Computers are very pedantic things and its the easiest thing in the world to look at a script you've just written and simply not noticed a tiny mistake. The computer will notice it.

http://www.bckobayashimaru.de/phpBB3/viewtopic.php?f=30&t=1799

http://forums.filefront.com/st-bc-problems-errors-help/339929-now-what.html
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: MLeo on December 23, 2007, 06:20:30 AM
It's complaining about the ship file, so under scripts/ships.
Do you have a scripts/ships/BajoranAssault.py?
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: 086gf on December 23, 2007, 01:43:28 PM
The hardpoints file is BajoranAssault but the ships file is BajoranAssaultVessel wtf? So I would just remove "Vessel" from both the py and pyc and thats it or would I need to change it in the custom py too?
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: MLeo on December 23, 2007, 02:15:51 PM
Assuming you don't simply miss the ship, I would recommend copying (not renaming, since another ship might be using that one) the scripts/Ships/BajoranAssaultVessel.py to scripts/Ships/BajoranAssault.py and then try again.
Of course, it's possible that the hardpoint name is also named wrong. But we'll have to see if that's the case when you try it.
Title: RE: BSOD - ImportError: No module named BajoranAssault
Post by: 086gf on December 23, 2007, 02:25:50 PM
Trying it now...

EDIT: It works now! Thanks!