Author Topic: no module named null/"weapon name"  (Read 1607 times)

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
no module named null/"weapon name"
« on: June 25, 2008, 02:49:05 PM »
And this:
Code: [Select]
ImportError: No module named (null)means a pulse weapon without a projectile file.
And this:
Code: [Select]
ImportError: No module named LargeMissile"Simply" means a missing projectile file.

In either case, this ought to just crash as soon as you use a projectile or a pulse weapon (both as player and as AI).

Contact the author for a fix.

But what if the projectile files ARE in the scripts/tactical/projectiles folder?
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #1 on: June 25, 2008, 02:51:20 PM »
Except for the (null), which really is a missing projectile, put up the LargeMissile and I'll take a look as to why it won't import.
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #2 on: June 25, 2008, 10:22:38 PM »
Except for the (null), which really is a missing projectile, put up the LargeMissile and I'll take a look as to why it won't import.

lol thats from before I joined here.


How do I get the actual console dump text file? Nothing in the sticky about this.

Im not attachting any of the files until I know exactly which ones are borked.


EDIT: And short of contacting the author of the ship/station(for the ones that come up "null") why not just use whats already installed(copy, paste then rename what I need too)?


EDIT2: I had to restart the game and now im getting a DOS prompt lol. I don't know which ship caused it but, I will go find out right now.


EDIT3: This is the ship. http://bridgecommander.filefront.com/file/Husnock_Battlecruiser;5428

The wave sound file for its pulse weapons was encoded in an odd codec so it can't be used. I've uploaded both the sound file and the tactical/projectiles file.
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #3 on: June 26, 2008, 03:37:53 AM »
It currently looks like the ImportError: No module named (null) is caused by a pulse (or torpedo) launcher with no projectile module name (or a torpedo launcher slot with no module name).

And in case of: ImportError: No module named LargeMissile
It could mean that a projectile or torpedo launcher slot didn't specify the entire module name, only the "local" name (so it didn't prepend it with Tactical.Projectiles.).
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #4 on: June 26, 2008, 03:17:13 PM »
I think I found part of the problem.

Quote
Pulse = App.WeaponSystemProperty_Create("Pulse ")



EDIT: Got rid of the extra space but that made no difference.

These all seem to be fine.

Quote
Pulse = App.WeaponSystemProperty_Create("Pulse")

Pulse.SetMaxCondition(4000.000000)
Pulse.SetCritical(0)
Pulse.SetTargetable(0)
Pulse.SetPrimary(1)
Pulse.SetPosition(0.000000, 0.000000, 0.030000)
Pulse.SetPosition2D(0.000000, 0.000000)
Pulse.SetRepairComplexity(7.000000)
Pulse.SetDisabledPercentage(0.750000)
Pulse.SetRadius(0.400000)
Pulse.SetNormalPowerPerSecond(300.000000)
Pulse.SetWeaponSystemType(Pulse.WST_PULSE)
Pulse.SetSingleFire(0)
Pulse.SetAimedWeapon(0)
kFiringChainString = App.TGString()
kFiringChainString.SetString("")
Pulse.SetFiringChainString(kFiringChainString)
App.g_kModelPropertyManager.RegisterLocalTemplate(Pulse)

Quote
Pulse1 = App.PulseWeaponProperty_Create("Pulse 1")

Pulse1.SetMaxCondition(1200.000000)
Pulse1.SetCritical(0)
Pulse1.SetTargetable(1)
Pulse1.SetPrimary(1)
Pulse1.SetPosition(0.000000, 3.000000, -1.800000)
Pulse1.SetPosition2D(0.000000, 0.000000)
Pulse1.SetRepairComplexity(1.000000)
Pulse1.SetDisabledPercentage(0.500000)
Pulse1.SetRadius(0.250000)
Pulse1.SetDumbfire(1)
Pulse1.SetWeaponID(0)
Pulse1.SetGroups(0)
Pulse1.SetDamageRadiusFactor(0.300000)
Pulse1.SetIconNum(370)
Pulse1.SetIconPositionX(76.000000)
Pulse1.SetIconPositionY(60.000000)
Pulse1.SetIconAboveShip(1)
Pulse1.SetFireSound("")
Pulse1.SetMaxCharge(2.000000)
Pulse1.SetMaxDamage(2025.000000)
Pulse1.SetMaxDamageDistance(100.000000)
Pulse1.SetMinFiringCharge(1.000000)
Pulse1.SetNormalDischargeRate(1.000000)
Pulse1.SetRechargeRate(0.300000)
Pulse1.SetIndicatorIconNum(0)
Pulse1.SetIndicatorIconPositionX(0.000000)
Pulse1.SetIndicatorIconPositionY(0.000000)
Pulse1Forward = App.TGPoint3()
Pulse1Forward.SetXYZ(0.000000, 1.000000, 0.000000)
Pulse1Up = App.TGPoint3()
Pulse1Up.SetXYZ(0.000000, 0.000000, 1.000000)
Pulse1.SetOrientation(Pulse1Forward, Pulse1Up)
Pulse1.SetArcWidthAngles(-0.383972, 0.383972)
Pulse1.SetArcHeightAngles(-0.383972, 0.209440)
Pulse1.SetCooldownTime(0.300000)
Pulse1.SetModuleName("Tactical.Projectiles.husnockpulse")
App.g_kModelPropertyManager.RegisterLocalTemplate(Pulse1)

Quote
Pulse2 = App.PulseWeaponProperty_Create("Pulse 2")

Pulse2.SetMaxCondition(1200.000000)
Pulse2.SetCritical(0)
Pulse2.SetTargetable(1)
Pulse2.SetPrimary(1)
Pulse2.SetPosition(3.200000, -2.550000, -0.400000)
Pulse2.SetPosition2D(0.000000, 0.000000)
Pulse2.SetRepairComplexity(1.000000)
Pulse2.SetDisabledPercentage(0.500000)
Pulse2.SetRadius(0.250000)
Pulse2.SetDumbfire(1)
Pulse2.SetWeaponID(0)
Pulse2.SetGroups(0)
Pulse2.SetDamageRadiusFactor(0.300000)
Pulse2.SetIconNum(370)
Pulse2.SetIconPositionX(97.000000)
Pulse2.SetIconPositionY(90.000000)
Pulse2.SetIconAboveShip(1)
Pulse2.SetFireSound("")
Pulse2.SetMaxCharge(2.000000)
Pulse2.SetMaxDamage(2025.000000)
Pulse2.SetMaxDamageDistance(100.000000)
Pulse2.SetMinFiringCharge(1.000000)
Pulse2.SetNormalDischargeRate(1.000000)
Pulse2.SetRechargeRate(0.300000)
Pulse2.SetIndicatorIconNum(0)
Pulse2.SetIndicatorIconPositionX(0.000000)
Pulse2.SetIndicatorIconPositionY(0.000000)
Pulse2Forward = App.TGPoint3()
Pulse2Forward.SetXYZ(0.000000, 1.000000, 0.000000)
Pulse2Up = App.TGPoint3()
Pulse2Up.SetXYZ(0.000000, 0.000000, 1.000000)
Pulse2.SetOrientation(Pulse2Forward, Pulse2Up)
Pulse2.SetArcWidthAngles(-0.558505, 0.104720)
Pulse2.SetArcHeightAngles(-0.383972, 0.383972)
Pulse2.SetCooldownTime(0.300000)
Pulse2.SetModuleName("Tactical.Projectiles.husnockpulse")
App.g_kModelPropertyManager.RegisterLocalTemplate(Pulse2)

Quote
Pulse3 = App.PulseWeaponProperty_Create("Pulse 3")

Pulse3.SetMaxCondition(1200.000000)
Pulse3.SetCritical(0)
Pulse3.SetTargetable(1)
Pulse3.SetPrimary(1)
Pulse3.SetPosition(-3.200000, -2.550000, -0.400000)
Pulse3.SetPosition2D(0.000000, 0.000000)
Pulse3.SetRepairComplexity(1.000000)
Pulse3.SetDisabledPercentage(0.500000)
Pulse3.SetRadius(0.250000)
Pulse3.SetDumbfire(1)
Pulse3.SetWeaponID(0)
Pulse3.SetGroups(0)
Pulse3.SetDamageRadiusFactor(0.300000)
Pulse3.SetIconNum(370)
Pulse3.SetIconPositionX(56.000000)
Pulse3.SetIconPositionY(90.000000)
Pulse3.SetIconAboveShip(1)
Pulse3.SetFireSound("")
Pulse3.SetMaxCharge(2.000000)
Pulse3.SetMaxDamage(2025.000000)
Pulse3.SetMaxDamageDistance(100.000000)
Pulse3.SetMinFiringCharge(1.000000)
Pulse3.SetNormalDischargeRate(1.000000)
Pulse3.SetRechargeRate(0.300000)
Pulse3.SetIndicatorIconNum(0)
Pulse3.SetIndicatorIconPositionX(0.000000)
Pulse3.SetIndicatorIconPositionY(0.000000)
Pulse3Forward = App.TGPoint3()
Pulse3Forward.SetXYZ(0.000000, 1.000000, 0.000000)
Pulse3Up = App.TGPoint3()
Pulse3Up.SetXYZ(0.000000, 0.000000, 1.000000)
Pulse3.SetOrientation(Pulse3Forward, Pulse3Up)
Pulse3.SetArcWidthAngles(-0.104720, 0.558505)
Pulse3.SetArcHeightAngles(-0.383972, 0.383972)
Pulse3.SetCooldownTime(0.300000)
Pulse3.SetModuleName("Tactical.Projectiles.husnockpulse")
App.g_kModelPropertyManager.RegisterLocalTemplate(Pulse3)
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #5 on: June 26, 2008, 05:35:25 PM »
It's not the name of the master system that could be a problem.


And it could also be the torpedo system.
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #6 on: June 27, 2008, 12:07:27 AM »
It's not the name of the master system that could be a problem.


And it could also be the torpedo system.

I was refering to the extra space lol.

Anyways, I think your right, there is a torpedo system but thats as far as it goes with that.

Quote
# Property load function.
def LoadPropertySet(pObj):
   "Sets up the object's properties."
   prop = App.g_kModelPropertyManager.FindByName("Hull", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Warp Core", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Shield Generator", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Sensor Array", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Torpedoes", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   
   prop = App.g_kModelPropertyManager.FindByName("Pulse", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Impulse Engines", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Port Impulse", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Warp Engines", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Port Warp", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Star Warp", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Probe Launcher", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Bridge", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Repair system", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Husnock", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenForward", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenLeft", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenRight", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenBack", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenUp", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("ViewscreenDown", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("FirstPersonCamera", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Pulse 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Pulse 2", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Pulse 3", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Star Impulse", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Laser Emiter", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Back Phaser", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)

Quote
Torpedoes = App.TorpedoSystemProperty_Create("Torpedoes")

Torpedoes.SetMaxCondition(8000.000000)
Torpedoes.SetCritical(0)
Torpedoes.SetTargetable(0)
Torpedoes.SetPrimary(1)
Torpedoes.SetPosition(0.000000, 0.000000, 0.000000)
Torpedoes.SetPosition2D(0.000000, 0.000000)
Torpedoes.SetRepairComplexity(3.000000)
Torpedoes.SetDisabledPercentage(0.750000)
Torpedoes.SetRadius(0.200000)
Torpedoes.SetNormalPowerPerSecond(100.000000)
Torpedoes.SetWeaponSystemType(Torpedoes.WST_TORPEDO)
Torpedoes.SetSingleFire(0)
Torpedoes.SetAimedWeapon(0)
kFiringChainString = App.TGString()
kFiringChainString.SetString("")
Torpedoes.SetFiringChainString(kFiringChainString)
Torpedoes.SetMaxTorpedoes(0, 0)
Torpedoes.SetTorpedoScript(0, "")
Torpedoes.SetNumAmmoTypes(1)
App.g_kModelPropertyManager.RegisterLocalTemplate(Torpedoes)
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #7 on: June 27, 2008, 03:41:36 AM »
Code: [Select]
Torpedoes.SetTorpedoScript(0, "")There you have the (null) projectile cause. ;)


Oh, and:
Quote
I was refering to the extra space lol.
And then it doesn't fall under "It's not the name of the master system that could be a problem"? ;)
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #8 on: June 27, 2008, 03:49:54 PM »
Code: [Select]
Torpedoes.SetTorpedoScript(0, "")There you have the (null) projectile cause. ;)

So just remove it then?

Quote
Oh, and:
Quote
I was refering to the extra space lol.
And then it doesn't fall under "It's not the name of the master system that could be a problem"? ;)

oooooooooooooohhhhhhhhhhhhhh
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #9 on: June 27, 2008, 03:53:22 PM »
Code: [Select]
Torpedoes.SetTorpedoScript(0, "")There you have the (null) projectile cause. ;)

But there are other ships that have unused torpedo systems(KM 8472 bioship for one) and there are no problems with any of them...how odd. So just remove it then?
Nah, it's just annoying I suppose. I didn't think of this (didn't know it was allowed) when I wrote that script. Do know, this is an _old_ script. ;)


As for the other torpedo mentioned, either a wrong path, or a really missing torpedo. ;)
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #10 on: June 27, 2008, 05:54:08 PM »
Whos the sound person around here? Who can re-encode the sound file for me?
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #11 on: June 27, 2008, 06:00:47 PM »
When did this became a sound problem?
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #12 on: June 27, 2008, 06:10:34 PM »
Read the entire third post slower lol.
All hail the messiah!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: no module named null/"weapon name"
« Reply #13 on: June 27, 2008, 06:24:26 PM »
Ah, EDITs, remember, there are no notifications for edits. So I didn't even notice them.


A short search found this thread:
http://bc-central.net/forums/index.php?topic=566.msg10036#msg10036

There are 2 issue's there, but at the lower part are all the settings required for a working MP3.
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 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #14 on: June 28, 2008, 02:14:58 PM »
Ok I will try that.
All hail the messiah!

Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #15 on: June 28, 2008, 03:17:24 PM »
I have no idea what im doing with this.

I downloaded the latest version btw.
All hail the messiah!

Offline Adonis

  • Ze Meister xP
  • Posts: 670
  • Cookies: 84
  • Da Death Squad ???
    • Star Trek Excalibur
Re: no module named null/"weapon name"
« Reply #16 on: June 28, 2008, 03:52:42 PM »
Dude, for sounds you only need it in mono, not stereo. And also, either 8bit or 16bit, best to use 22khz.
Easy is the path to wisdom for those not blinded by themselves.


Offline 086gf

  • Location: United Socialist States of America!
  • Posts: 1357
  • Cookies: 32
Re: no module named null/"weapon name"
« Reply #17 on: June 28, 2008, 04:42:07 PM »
The first pic was the mp3 settings for when I converted it and the second is where I currently am(ie lost).
All hail the messiah!