Still no joy so far... for reference this is the entire script...
import App
import LJTorpLib.LibTorp
sDamage = 100000
def Create(pTorp):
kCoreColor = App.TGColorA()
kCoreColor.SetRGBA(255.0 / 255.0, 255.0 / 255.0, 128.0 / 255.0, 1.000000)
kGlowColor = App.TGColorA()
kGlowColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000)
kFlareColor = App.TGColorA()
kFlareColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000)
pTorp.CreateTorpedoModel(
"data/Textures/Tactical/TorpedoCore.tga",
kCoreColor,
0.04,
0.05,
"data/Textures/Tactical/TorpedoGlow.tga",
kGlowColor,
0.2,
0.04,
0.025,
"data/Textures/Tactical/TorpedoFlares.tga",
kFlareColor,
0,
0.01,
0.01)
#pTorp.SetDamage( GetDamage(pTorp) )
pTorp.SetDamageRadiusFactor(5.0)
pTorp.SetGuidanceLifetime( GetGuidanceLifetime() )
pTorp.SetMaxAngularAccel( GetMaxAngularAccel() )
import Multiplayer.SpeciesToTorp
pTorp.SetNetType (Multiplayer.SpeciesToTorp.PHOTON)
LJTorpLib.LibTorp.AddCreationHandler(pTorp, __name__ + ".AttachSmoke")
return(0)
def AttachSmoke(self, pEvent = None):
pTorpedo = App.Torpedo_Cast(pEvent.GetDestination())
if not pTorpedo:
return (1)
LJTorpLib.LibTorp.SetupSmokeTrail(pTorpedo)
SetDamage(pTorpedo)
return (0)
def SetDamage(self, pEvent = None):
global sDamage
pTorpedo = self
if not pTorpedo:
return (1)
pTargetId = pTorpedo.GetTargetID()
pSet = pTorpedo.GetContainingSet()
lObjects = pSet.GetClassObjectList(App.CT_OBJECT)
for sObject in lObjects:
sOBjectID = sObject.GetObjID()
if (sOBjectID == pTargetId):
import Foundation
import string
if sObject.GetScript():
pShip = string.split(sObject.GetScript(), '.')[-1]
if Foundation.shipList.has_key(pShip):
pFoundationShip = Foundation.shipList[pShip]
if pFoundationShip and hasattr(pFoundationShip, "fTorpedoID"):
pTorpedoeID = pFoundationShip.fTorpedoID
if (pTorpedoeID == "Not-Target"):
Rand = App.g_kSystemWrapper.GetRandomNumber(100)
if (Rand <= 10):
pTorpedo.SetDamage(int(sDamage))
else:
pTorpedo.SetDamage(0.01)
else:
pTorpedo.SetDamage(int(sDamage))
def GetLaunchSpeed():
return(20.0)
def GetLaunchSound():
return("MissileFire")
def GetPowerCost():
return(30.0)
def GetName():
return("Mark 9 Tactical")
def GetDamage():
global sDamage
return int(sDamage)
def GetGuidanceLifetime():
return 8.0
def GetMaxAngularAccel():
return 2.0
sYieldName = ?Horizon?
try:
import FoundationTech
import ftb.Tech.TimedTorpedoes
oFire = ftb.Tech.TimedTorpedoes.MIRVMultiTargetTorpedo(
?Horizon?, {
?spreadNumber?: 6,
?spreadDensity?: 6.5,
?warheadModule?: ?Tactical.Projectiles.Mark9TacticalA?,
?shellLive?: 0,
})
FoundationTech.dOnFires[__name__] = oFire
oYield = FoundationTech.oTechs[Horizon]
FoundationTech.dYields[__name__] = oYield
except:
pass
Ive also tried adding the script to an simple torp script with no success, the one thing that confusses me is the naming of the tech, i put horizon as i assume that the name need not be specific, and also im unsure as to where to insert this name as it only specifies one place in the readme.