Bridge Commander Central

BC Forums => BC Scripting => Topic started by: TParis on June 17, 2007, 03:56:22 PM

Title: [Foundation Tech] Damper Weapon Problems
Post by: TParis on June 17, 2007, 03:56:22 PM
First of all: Using latest FTECH build (20051126).

I added the code for the damper weapon to my breen torpedo projectile... but when i fire the weapon with my Breenship, the game crashes :( Plz help!
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: MLeo on June 17, 2007, 05:14:34 PM
I hope to put out a new FoundationTechnologies version soon.
Hopefully this is corrected then. Though I never recalled having this problem myself.
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: Nighthawk on June 17, 2007, 05:43:27 PM
that kind of failure sometimes happens when you put a different torpedo file in your HP.
be sure the type of torpedo in the Breen ship is BreenDrain and not BreenDrainer, for example.
you need to have the same name in the ship and in the projectile folder, whichever it is.
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: MLeo on June 17, 2007, 05:47:21 PM
Your right.

I think this classifies as a "whoops" moment.
BC crashes (ATM, I'm looking at improving this ;) ) when it can't find a torpedo script (as in, tries to use it anyway). It's the most likely cause of BC crashes during battle.
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: TParis on June 18, 2007, 06:59:45 AM
Ye it's BreenDrain in the Hardpoint aswell. Just noticed that the Torpedo doesnt show up ingame X_X .

Tried another torpedo type and that one is working perfectly.
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: MLeo on June 18, 2007, 07:11:35 AM
How did you add it to the hardpoint?
And what is the exact path to the torpedo script?
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: TParis on June 18, 2007, 07:18:33 AM
1. How i added (from foundation tech readme ^.^ ):

Quote
You can add the Breen Damper to your projectile by adding the following code to the bottom of your projectile script:

sYieldName = ?Damper Weapon?
sFireName = None

try:
   import FoundationTech
   try:
      oFire = FoundationTech.oTechs[sFireName]
      FoundationTech.dOnFires[__name__] = oFire
   except:
      pass

   try:
      oYield = FoundationTech.oTechs[sYieldName]
      FoundationTech.dYields[__name__] = oYield
   except:
      pass
except:
   pass

2. Where the script is:

Bridge Commander\scripts\Tactical\Projectiles\BreenDrain.py

Humm ye when i remove the code, the Torpedo is workin again. SRy if i did sth stupid but im just getting into modding :) .
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: Nighthawk on June 18, 2007, 07:07:44 PM
that exception handler should cause no problem with the script. if it failed, it should just skip it over.
might be another thing.
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: TParis on June 19, 2007, 06:53:34 AM
Uhhhhh... exeption handler? ^^
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: MLeo on June 19, 2007, 06:58:06 AM
The try: except:
Title: Re: [Foundation Tech] Damper Weapon Problems
Post by: Nighthawk on June 21, 2007, 12:56:45 PM
another "whoops" common error:
are you sure the torpedo is a .py file?
kinda obvious, but I just recalled an error I suffered once lol.