Author Topic: Adding Torpedoes  (Read 597 times)

Offline AdmiralWhite

  • Posts: 94
  • Cookies: 0
Adding Torpedoes
« on: August 16, 2019, 03:56:53 PM »
I'm trying to add photons and Quantum Torpedoes to the Post dominion war Excelsior class however for some reason it does not reflect in game; it shows the photons, but won't load the Quantums. see below:

#################################################
Torpedoes = App.TorpedoSystemProperty_Create("Torpedoes")

Torpedoes.SetMaxCondition(1000.000000)
Torpedoes.SetCritical(0)
Torpedoes.SetTargetable(0)
Torpedoes.SetPrimary(1)
Torpedoes.SetPosition(-0.028722, 0.525702, -0.178949)
Torpedoes.SetPosition2D(82.000000, 64.000000)
Torpedoes.SetRepairComplexity(2.000000)
Torpedoes.SetDisabledPercentage(0.750000)
Torpedoes.SetRadius(0.100000)
Torpedoes.SetNormalPowerPerSecond(350.000000)
Torpedoes.SetWeaponSystemType(Torpedoes.WST_TORPEDO)
Torpedoes.SetSingleFire(0)
Torpedoes.SetAimedWeapon(1)
kFiringChainString = App.TGString()
kFiringChainString.SetString("0;Single;12;Dual")
Torpedoes.SetFiringChainString(kFiringChainString)
Torpedoes.SetMaxTorpedoes(1, 175)
Torpedoes.SetTorpedoScript(1, "Tactical.Projectiles.VoyPhoton")
Torpedoes.SetMaxTorpedoes(2, 75)
Torpedoes.SetTorpedoScript(0, "Tactical.Projectiles.Quantum")
Torpedoes.SetNumAmmoTypes(2)
App.g_kModelPropertyManager.RegisterLocalTemplate(Torpedoes)
#################################################

any assistance is greatly appreciated. someone told me how to do this before but I forgot LOL.




Offline KrrKs

  • Posts: 461
  • Cookies: 25
Re: Adding Torpedoes
« Reply #1 on: August 17, 2019, 01:26:36 PM »
You seem to have mixed up the indexes.

Quote
#################################################
Torpedoes = App.TorpedoSystemProperty_Create("Torpedoes")

Torpedoes.SetMaxCondition(1000.000000)
Torpedoes.SetCritical(0)
Torpedoes.SetTargetable(0)
Torpedoes.SetPrimary(1)
Torpedoes.SetPosition(-0.028722, 0.525702, -0.178949)
Torpedoes.SetPosition2D(82.000000, 64.000000)
Torpedoes.SetRepairComplexity(2.000000)
Torpedoes.SetDisabledPercentage(0.750000)
Torpedoes.SetRadius(0.100000)
Torpedoes.SetNormalPowerPerSecond(350.000000)
Torpedoes.SetWeaponSystemType(Torpedoes.WST_TORPEDO)
Torpedoes.SetSingleFire(0)
Torpedoes.SetAimedWeapon(1)
kFiringChainString = App.TGString()
kFiringChainString.SetString("0;Single;12;Dual")
Torpedoes.SetFiringChainString(kFiringChainString)
Torpedoes.SetMaxTorpedoes(0, 175)
Torpedoes.SetTorpedoScript(0, "Tactical.Projectiles.VoyPhoton")
Torpedoes.SetMaxTorpedoes(1, 75)
Torpedoes.SetTorpedoScript(1, "Tactical.Projectiles.Quantum")
Torpedoes.SetNumAmmoTypes(2)
App.g_kModelPropertyManager.RegisterLocalTemplate(Torpedoes)
#################################################

The indexes are zero based, i.e., the first torpedo type has index 0, the next one 1, and so one.

Offline AdmiralWhite

  • Posts: 94
  • Cookies: 0
Re: Adding Torpedoes
« Reply #2 on: August 18, 2019, 02:36:19 PM »
this was very helpful, I figured it out; Thank you very much.