Bridge Commander Central

BC Forums => BC Technical Support => Topic started by: AdmiralWhite on September 11, 2017, 07:16:11 AM

Title: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 11, 2017, 07:16:11 AM
The sabre class that comes with the Kobayashi Maru mod doesn't have Torpedoes, is there a way to fix this?
Title: Sabre Class that comes with KM doesnt have Torpedoes
Post by: KrrKs on September 11, 2017, 09:34:23 AM
IIRC that Sabre has its torpedoes set up as pulse weapon system. Default key for that is the middle mouse button, i believe.

Otherwise you'd hat to download the BCSDK from somewhere (It is not on here yet?!  :lostit: ) and use the model property editor to add a torpedo system and launcher.
Title: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 11, 2017, 11:50:00 AM
IIRC that Sabre has its torpedoes set up as pulse weapon system. Default key for that is the middle mouse button, i believe.

Otherwise you'd hat to download the BCSDK from somewhere (It is not on here yet?!  :lostit: ) and use the model property editor to add a torpedo system and launcher.
Correct.  It's a pulse weapon system that can be activated either by middle clicking or using the "G" button by default.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 13, 2017, 03:04:43 PM
Is there a way to also install a Cloaking device to the Saber class?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 13, 2017, 09:09:34 PM
Is there a way to also install a Cloaking device to the Saber class?
Yes, you'll need to update the hardpoint file.  Since you're running KM you'll first need to access the .py file in the "src/scripts/ships/hardpoints" folder in your BC directory.  Find the "Sabre.py" file and open it up in Notepad.  I'll walk you through it step by step.

To add a cloaking device, you'll first need to pull the necessary info out of a ship that has one.  I'll have you pull it out of the Defiant's hardpoint for simplicity.  Open up the "Defiant.py" file and the cloaking device info should be right on top.  Copy the following info:

Code: [Select]
CloakingDevice = App.CloakingSubsystemProperty_Create("Cloaking Device")

CloakingDevice.SetMaxCondition(3000.000000)
CloakingDevice.SetCritical(0)
CloakingDevice.SetTargetable(1)
CloakingDevice.SetPrimary(1)
CloakingDevice.SetPosition(0.003367, -0.053731, 0.080000)
CloakingDevice.SetPosition2D(64.000000, 65.000000)
CloakingDevice.SetRepairComplexity(7.000000)
CloakingDevice.SetDisabledPercentage(0.750000)
CloakingDevice.SetRadius(0.030000)
CloakingDevice.SetNormalPowerPerSecond(500.000000)
CloakingDevice.SetCloakStrength(100.000000)
App.g_kModelPropertyManager.RegisterLocalTemplate(CloakingDevice)
#################################################
Paste that into the Sabre hardpoint, so that way it'll look something like this:

Code: [Select]
#################################################
Bridge = App.HullProperty_Create("Bridge")

Bridge.SetMaxCondition(11000.000000)
Bridge.SetCritical(1)
Bridge.SetTargetable(1)
Bridge.SetPrimary(0)
Bridge.SetPosition(0.000000, 0.996919, 0.130000)
Bridge.SetPosition2D(65.000000, 11.000000)
Bridge.SetRepairComplexity(4.000000)
Bridge.SetDisabledPercentage(0.000000)
Bridge.SetRadius(0.030000)
App.g_kModelPropertyManager.RegisterLocalTemplate(Bridge)
#################################################
CloakingDevice = App.CloakingSubsystemProperty_Create("Cloaking Device")

CloakingDevice.SetMaxCondition(3000.000000)
CloakingDevice.SetCritical(0)
CloakingDevice.SetTargetable(1)
CloakingDevice.SetPrimary(1)
CloakingDevice.SetPosition(0.003367, -0.053731, 0.080000)
CloakingDevice.SetPosition2D(64.000000, 65.000000)
CloakingDevice.SetRepairComplexity(7.000000)
CloakingDevice.SetDisabledPercentage(0.750000)
CloakingDevice.SetRadius(0.030000)
CloakingDevice.SetNormalPowerPerSecond(500.000000)
CloakingDevice.SetCloakStrength(100.000000)
App.g_kModelPropertyManager.RegisterLocalTemplate(CloakingDevice)
#################################################
The next step is to locate the following towards the bottom of the Defiant hardpoint:

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
Copy and paste that into your Sabre hardpoint as well, so the final result is something like this:

Code: [Select]
# Property load function.
def LoadPropertySet(pObj):
"Sets up the object's properties."
prop = App.g_kModelPropertyManager.FindByName("Bridge", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
After that save the changes to your desktop as "Sabre.py" (this way you don't overwrite the original file) and then drag and drop the updated hardpoint to the "scripts/ships/hardpoints" folder of your BC directory.  If you did everything right next time you start up BC you'll have a cloaking Saber class.

Let me know if you have any questions!
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 13, 2017, 09:24:50 PM
can you also walk me through on how to add a Torpedoes system and Launcher. when I start up the game with the Saber the weapons readout says I have 400 Torpedoes but it doesn't show the type.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 14, 2017, 12:37:12 AM
can you also walk me through on how to add a Torpedoes system and Launcher. when I start up the game with the Saber the weapons readout says I have 400 Torpedoes but it doesn't show the type.
That's because there is a standard torpedo system in the Saber's hardpoint, but it's not used because of the torpedoes firing as pulse weapons; it's only there so the weapons crosshair in quickbattle shows a full targeting readout.  I recommend just ignoring it.

There's some benefits to having the torpedoes fire as pulse-weapons - wider firing arcs and more rapid firing to be exact.  However, if you are adamant about replacing the pulse-fire torpedoes with a normal torpedo system I'll happily write up some instructions for you, but be aware you'll need a few things as it's not going to be all copy/paste like it was with the cloaking device.  You'll need the Bridge Commander SDK (link below) and the Model Property Editor that is found within - this is so you can ensure that the launchers you add fire from the correct places on the ship model itself (if you just copy/paste from another hardpoint you'll have torpedo launchers in weird places since their aligned to that specific ship).

Let me know what you wanna do.  In the meantime, I suggest just looking at the hardpoints in the KM src folder I directed you to earlier, you'll get an idea as to how the hardpoints work and you'll get an idea how to tweak things to your liking.  The KM Saber is a good one to start with since you appear to be passionate about tweaking it and the hardpoint itself is pretty well organized - it should be easy enough to navigate.  Load it up in the SDK's Model Property Editor and you'll get a better idea as to firing arcs, locations, etc.

BC SDK:  http://www.moddb.com/games/star-trek-bridge-commander/downloads/star-trek-bridge-commander-sdk-v11
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 14, 2017, 08:14:27 AM
I have the BCSDK and Model Property editor, I just added the slipstream drive to the Saber. Id like to go in that direction with adding torpedo system and launcher
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 14, 2017, 12:15:55 PM
I have the BCSDK and Model Property editor, I just added the slipstream drive to the Saber. Id like to go in that direction with adding torpedo system and launcher
It's your BC installation, so lets get started  :wink:

For simplicity and consistency, we'll be copying the necessary hardpoint properties from the Defiant hardpoint again.  First, lets get the individual launchers copied over to the Sabre.py hardpoint.  This process will be similar to how you copied over the cloaking device.

The Saber by default has three forward launchers all firing from the same location to simulate a single rapid-fire turret.  However, this isn't necessary for standard torpedo launchers, so you just need to copy one forward launcher from the Defiant.

Code: [Select]
#################################################
FwdTorpedo1 = App.TorpedoTubeProperty_Create("Fwd Torpedo 1")

FwdTorpedo1.SetMaxCondition(3200.000000)
FwdTorpedo1.SetCritical(0)
FwdTorpedo1.SetTargetable(1)
FwdTorpedo1.SetPrimary(1)
FwdTorpedo1.SetPosition(-0.194336, 0.269000, 0.037419)
FwdTorpedo1.SetPosition2D(65.000000, 21.000000)
FwdTorpedo1.SetRepairComplexity(4.000000)
FwdTorpedo1.SetDisabledPercentage(0.750000)
FwdTorpedo1.SetRadius(0.003000)
FwdTorpedo1.SetDumbfire(1)
FwdTorpedo1.SetWeaponID(1)
FwdTorpedo1.SetGroups(1)
FwdTorpedo1.SetDamageRadiusFactor(0.200000)
FwdTorpedo1.SetIconNum(370)
FwdTorpedo1.SetIconPositionX(69.000000)
FwdTorpedo1.SetIconPositionY(35.000000)
FwdTorpedo1.SetIconAboveShip(1)
FwdTorpedo1.SetImmediateDelay(0.300000)
FwdTorpedo1.SetReloadDelay(30.000000)
FwdTorpedo1.SetMaxReady(2)
FwdTorpedo1Direction = App.TGPoint3()
FwdTorpedo1Direction.SetXYZ(0.000000, 1.000000, 0.000000)
FwdTorpedo1.SetDirection(FwdTorpedo1Direction)
FwdTorpedo1Right = App.TGPoint3()
FwdTorpedo1Right.SetXYZ(0.000000, 0.000000, -1.000000)
FwdTorpedo1.SetRight(FwdTorpedo1Right)
App.g_kModelPropertyManager.RegisterLocalTemplate(FwdTorpedo1)
You'll notice I'm having you copy the top "###" and not the bottom ones; this is because we'll be placing the launchers at the bottom of the subsystems below the torpedo system.  So on the Sabre.py file, you should have some thing like this:

Code: [Select]
#################################################
Torpedosystem = App.TorpedoSystemProperty_Create("Torpedo system")

Torpedosystem.SetMaxCondition(5000.000000)
Torpedosystem.SetCritical(0)
Torpedosystem.SetTargetable(0)
Torpedosystem.SetPrimary(1)
Torpedosystem.SetPosition(0.000000, 0.500000, 0.050000)
Torpedosystem.SetPosition2D(0.000000, 0.000000)
Torpedosystem.SetRepairComplexity(1.000000)
Torpedosystem.SetDisabledPercentage(0.250000)
Torpedosystem.SetRadius(0.100000)
Torpedosystem.SetNormalPowerPerSecond(1.000000)
Torpedosystem.SetWeaponSystemType(Torpedosystem.WST_TORPEDO)
Torpedosystem.SetSingleFire(1)
Torpedosystem.SetAimedWeapon(0)
kFiringChainString = App.TGString()
kFiringChainString.SetString("")
Torpedosystem.SetFiringChainString(kFiringChainString)
Torpedosystem.SetMaxTorpedoes(0, 0)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.Dummy")
Torpedosystem.SetNumAmmoTypes(1)
App.g_kModelPropertyManager.RegisterLocalTemplate(Torpedosystem)
#################################################
FwdTorpedo1 = App.TorpedoTubeProperty_Create("Fwd Torpedo 1")

FwdTorpedo1.SetMaxCondition(3200.000000)
FwdTorpedo1.SetCritical(0)
FwdTorpedo1.SetTargetable(1)
FwdTorpedo1.SetPrimary(1)
FwdTorpedo1.SetPosition(-0.194336, 0.269000, 0.037419)
FwdTorpedo1.SetPosition2D(65.000000, 21.000000)
FwdTorpedo1.SetRepairComplexity(4.000000)
FwdTorpedo1.SetDisabledPercentage(0.750000)
FwdTorpedo1.SetRadius(0.003000)
FwdTorpedo1.SetDumbfire(1)
FwdTorpedo1.SetWeaponID(1)
FwdTorpedo1.SetGroups(1)
FwdTorpedo1.SetDamageRadiusFactor(0.200000)
FwdTorpedo1.SetIconNum(370)
FwdTorpedo1.SetIconPositionX(69.000000)
FwdTorpedo1.SetIconPositionY(35.000000)
FwdTorpedo1.SetIconAboveShip(1)
FwdTorpedo1.SetImmediateDelay(0.300000)
FwdTorpedo1.SetReloadDelay(30.000000)
FwdTorpedo1.SetMaxReady(2)
FwdTorpedo1Direction = App.TGPoint3()
FwdTorpedo1Direction.SetXYZ(0.000000, 1.000000, 0.000000)
FwdTorpedo1.SetDirection(FwdTorpedo1Direction)
FwdTorpedo1Right = App.TGPoint3()
FwdTorpedo1Right.SetXYZ(0.000000, 0.000000, -1.000000)
FwdTorpedo1.SetRight(FwdTorpedo1Right)
App.g_kModelPropertyManager.RegisterLocalTemplate(FwdTorpedo1)
There are two aft launchers on the Saber in groups of three on the aft end; these are coming from the dorsal surface on what appears to be small bumps, so the pulse weapons gives the illusion of rotary turrets on the hull to give a wider firing arc - that's gonna go away with the standard launchers.  You'll copy the aft launchers over from the Defiant hardpoint the same way as you did with the forward one, so find the aft launcher properties on the Defiant and copy them over so the final result looks like this:

Code: [Select]
#################################################
Torpedosystem = App.TorpedoSystemProperty_Create("Torpedo system")

Torpedosystem.SetMaxCondition(5000.000000)
Torpedosystem.SetCritical(0)
Torpedosystem.SetTargetable(0)
Torpedosystem.SetPrimary(1)
Torpedosystem.SetPosition(0.000000, 0.500000, 0.050000)
Torpedosystem.SetPosition2D(0.000000, 0.000000)
Torpedosystem.SetRepairComplexity(1.000000)
Torpedosystem.SetDisabledPercentage(0.250000)
Torpedosystem.SetRadius(0.100000)
Torpedosystem.SetNormalPowerPerSecond(1.000000)
Torpedosystem.SetWeaponSystemType(Torpedosystem.WST_TORPEDO)
Torpedosystem.SetSingleFire(1)
Torpedosystem.SetAimedWeapon(0)
kFiringChainString = App.TGString()
kFiringChainString.SetString("")
Torpedosystem.SetFiringChainString(kFiringChainString)
Torpedosystem.SetMaxTorpedoes(0, 0)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.Dummy")
Torpedosystem.SetNumAmmoTypes(1)
App.g_kModelPropertyManager.RegisterLocalTemplate(Torpedosystem)
#################################################
FwdTorpedo1 = App.TorpedoTubeProperty_Create("Fwd Torpedo 1")

FwdTorpedo1.SetMaxCondition(3200.000000)
FwdTorpedo1.SetCritical(0)
FwdTorpedo1.SetTargetable(1)
FwdTorpedo1.SetPrimary(1)
FwdTorpedo1.SetPosition(-0.194336, 0.269000, 0.037419)
FwdTorpedo1.SetPosition2D(65.000000, 21.000000)
FwdTorpedo1.SetRepairComplexity(4.000000)
FwdTorpedo1.SetDisabledPercentage(0.750000)
FwdTorpedo1.SetRadius(0.003000)
FwdTorpedo1.SetDumbfire(1)
FwdTorpedo1.SetWeaponID(1)
FwdTorpedo1.SetGroups(1)
FwdTorpedo1.SetDamageRadiusFactor(0.200000)
FwdTorpedo1.SetIconNum(370)
FwdTorpedo1.SetIconPositionX(69.000000)
FwdTorpedo1.SetIconPositionY(35.000000)
FwdTorpedo1.SetIconAboveShip(1)
FwdTorpedo1.SetImmediateDelay(0.300000)
FwdTorpedo1.SetReloadDelay(30.000000)
FwdTorpedo1.SetMaxReady(2)
FwdTorpedo1Direction = App.TGPoint3()
FwdTorpedo1Direction.SetXYZ(0.000000, 1.000000, 0.000000)
FwdTorpedo1.SetDirection(FwdTorpedo1Direction)
FwdTorpedo1Right = App.TGPoint3()
FwdTorpedo1Right.SetXYZ(0.000000, 0.000000, -1.000000)
FwdTorpedo1.SetRight(FwdTorpedo1Right)
App.g_kModelPropertyManager.RegisterLocalTemplate(FwdTorpedo1)
#################################################
AftTorpedo1 = App.TorpedoTubeProperty_Create("Aft Torpedo 1")

AftTorpedo1.SetMaxCondition(3200.000000)
AftTorpedo1.SetCritical(0)
AftTorpedo1.SetTargetable(1)
AftTorpedo1.SetPrimary(1)
AftTorpedo1.SetPosition(-0.233363, -0.270000, -0.051215)
AftTorpedo1.SetPosition2D(65.000000, 78.000000)
AftTorpedo1.SetRepairComplexity(3.000000)
AftTorpedo1.SetDisabledPercentage(0.750000)
AftTorpedo1.SetRadius(0.003000)
AftTorpedo1.SetDumbfire(1)
AftTorpedo1.SetWeaponID(1)
AftTorpedo1.SetGroups(4)
AftTorpedo1.SetDamageRadiusFactor(0.200000)
AftTorpedo1.SetIconNum(370)
AftTorpedo1.SetIconPositionX(75.000000)
AftTorpedo1.SetIconPositionY(105.000000)
AftTorpedo1.SetIconAboveShip(1)
AftTorpedo1.SetImmediateDelay(0.500000)
AftTorpedo1.SetReloadDelay(40.000000)
AftTorpedo1.SetMaxReady(1)
AftTorpedo1Direction = App.TGPoint3()
AftTorpedo1Direction.SetXYZ(0.000000, -1.000000, 0.000000)
AftTorpedo1.SetDirection(AftTorpedo1Direction)
AftTorpedo1Right = App.TGPoint3()
AftTorpedo1Right.SetXYZ(0.000000, 0.000000, 1.000000)
AftTorpedo1.SetRight(AftTorpedo1Right)
App.g_kModelPropertyManager.RegisterLocalTemplate(AftTorpedo1)
#################################################
AftTorpedo2 = App.TorpedoTubeProperty_Create("Aft Torpedo 2")

AftTorpedo2.SetMaxCondition(3200.000000)
AftTorpedo2.SetCritical(0)
AftTorpedo2.SetTargetable(1)
AftTorpedo2.SetPrimary(1)
AftTorpedo2.SetPosition(0.232932, -0.270000, -0.050365)
AftTorpedo2.SetPosition2D(65.000000, 78.000000)
AftTorpedo2.SetRepairComplexity(3.000000)
AftTorpedo2.SetDisabledPercentage(0.750000)
AftTorpedo2.SetRadius(0.003000)
AftTorpedo2.SetDumbfire(1)
AftTorpedo2.SetWeaponID(2)
AftTorpedo2.SetGroups(4)
AftTorpedo2.SetDamageRadiusFactor(0.200000)
AftTorpedo2.SetIconNum(370)
AftTorpedo2.SetIconPositionX(79.000000)
AftTorpedo2.SetIconPositionY(105.000000)
AftTorpedo2.SetIconAboveShip(1)
AftTorpedo2.SetImmediateDelay(0.500000)
AftTorpedo2.SetReloadDelay(40.000000)
AftTorpedo2.SetMaxReady(1)
AftTorpedo2Direction = App.TGPoint3()
AftTorpedo2Direction.SetXYZ(0.000000, -1.000000, 0.000000)
AftTorpedo2.SetDirection(AftTorpedo2Direction)
AftTorpedo2Right = App.TGPoint3()
AftTorpedo2Right.SetXYZ(0.000000, 0.000000, 1.000000)
AftTorpedo2.SetRight(AftTorpedo2Right)
App.g_kModelPropertyManager.RegisterLocalTemplate(AftTorpedo2)
Now we need to copy over the necessary codes for the "loadpropertyset" section at the bottom of the hardpoint - you'll remember this from the cloak.  The final result should look like this:

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Torpedo system", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Fwd Torpedo 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 2", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
Now, we need to make sure that the launchers are positioned properly on the Saber model.  Now, in my half-asleep state last night I didn't remember that you could do this without the MPE by simply copying over the location.  For the forward launcher for example, find the "PhotonTurret1" property and copy the following:

Code: [Select]
SetPosition(0.000627, 1.102950, 0.019482)Go back down to "FwdTorpedo1" and simply replace the corresponding code with that, and it'll move the firing location to where the turret is currently located.  Repeat this process for the aft launchers ("PhotonTurret2" for "AftTorpedo1" and "PhotonTurret3" for "AftTorpedo2".

If you want to have the launchers fire from a different location, you'll need the MPE to help you - the selection tool will give you locations.  This post is already long enough so if you want to do that let me know and I'll update in a separate post.  For now, though, you should be set.  The last thing you have to do is make a decision:  Do you want to delete the pulse-fire system altogether?  Or keep it and have the standard launchers fire another torpedo (allowing you to fire two types of torpedoes at once instead of having to manually switch)?  If you want to delete the pulse-fire system, just delete the properties called "PhotonTorpedoes" and "PhotonTurretX".  If you want to leave them, then just leave them.

Don't forget to ensure that the torpedo system has torpedoes loaded.  You'll need to modify the following:

Code: [Select]
Torpedosystem.SetMaxTorpedoes(0, 0)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.Dummy")
Torpedosystem.SetNumAmmoTypes(1)
You'll replace "Dummy" with whatever torpedo you want there - the torpedoes can be found in the "scripts/tactical/projectiles" folder - If you want it to have standard photons just change "Dummy" to "PhotonTorpedo".  If you want quantum torpedoes change it to "QuantumTorpedo" - these are the names of the projectiles in KM's folder, but there are many different file names for different versions of torpedoes, so go through the src projectiles folder, look at the torpedo scripts, and find which one you like.

Also, change the second number on the "SetMaxTorpedoes" line to however many torpedoes you want it to have; leave the first number alone.

That should do it.  If you have any questions let me know.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 14, 2017, 12:29:23 PM
I don't see the Defiant.py in the script folder theres only the defiant.pyc
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 14, 2017, 12:32:47 PM
I don't see the Defiant.py in the script folder theres only the defiant.pyc
It's in the src folder.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 14, 2017, 12:39:59 PM
Forgive me, Where where would this folder be located, because I don't see it in the BC directory.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 14, 2017, 12:43:57 PM
Forgive me, Where where would this folder be located, because I don't see it in the BC directory.
Should be in the same place where you found the Sabre.py file last night  :P.  If you didn't copy over the src folder you'll have to re-download KM and extract the src folder into a temporary directory.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 16, 2017, 11:29:44 PM
can I send you the Sabre.py file because I think I did something wrong now the ship doesn't load in game.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 17, 2017, 11:37:45 AM
can I send you the Sabre.py file because I think I did something wrong now the ship doesn't load in game.
What is happening when you try to load it up?  Can you get a console report?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 17, 2017, 11:54:00 AM
how do I get a console report? every time I try to load in game it stays on the sovereign bridge and doesn't load to the Sabre.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 17, 2017, 02:15:10 PM
When ingame, you hit the "~" key on your keyboard, this will bring up the console.  Type the word "dump" in and it'll give you a report.  Just get a screenshot of it and post it here, that'll let us know where the error is.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 17, 2017, 03:55:12 PM
How Do I submit the Screen shot? I cant seem to do it when i hit reply
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 17, 2017, 07:25:42 PM
When you hit reply and get the box to type your message, look below. There's a thing you can expand for "Attachments and other options". You can upload the screenshot then.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 17, 2017, 09:14:57 PM
The Attachments and other options tab only show " notify me by Email", " don't use smileys" and " Return to this topic" options. there is no option to upload pictures.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 18, 2017, 02:55:48 AM
Look a little lower
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 18, 2017, 07:27:50 AM
for some strange reason I don't have that option, can I email you the screenshot?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: KrrKs on September 18, 2017, 09:35:25 AM
I believe attachments are disabled until a certain post count is met (50 or so).
But you can also upload the image to another hoster, (e.g., imgur or similar) and link that here.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 18, 2017, 11:45:48 AM
for some strange reason I don't have that option, can I email you the screenshot?
If you can't upload it here just upload it to Imgur and post the link
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 18, 2017, 07:50:50 PM
Ive uploded the Image on Imgur, you should see it there.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 18, 2017, 07:54:02 PM
Here are the links to the images:

(https://i.imgur.com/dA6iZG5.png)
(https://i.imgur.com/jXkLrSW.png)
(https://i.imgur.com/aZ3lTvw.png)
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 18, 2017, 08:25:08 PM
Usually when it looks like that it's something miniscule that BC's antiquated engine is being fussy about, but it's not being specific.  Looks like I'll need to take a look at that hardpoint.  Can you upload it to something like a Google Drive for example and post the download link in your next reply?  I'll be able to skim through it that way.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Mario on September 18, 2017, 08:44:29 PM
The error seems to imply that the scripts\ships\[name of the py].py doesn't have LoadModel function. Can you check and make sure that you didn't accidentally copy the hp to scripts\ships instead of scripts\ships\hardpoints?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 18, 2017, 10:15:29 PM
where do I find the download link???
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 18, 2017, 10:18:16 PM
here's the link: https//doc-08-5c.googleusercontent.com
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 18, 2017, 11:03:12 PM
here's the link: https//doc-08-5c.googleusercontent.com
That aint working bro, it's just giving me search results for that URL.

Do you have a Google account?  If so you can just search for Google Drive and upload from there.  There's online tutorials to show you the process of uploading and retrieving a shareable link.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 07:26:33 AM
is this it? this is both hp file

https://drive.google.com/file/d/0Bz4ISsr3ugK7ZjRockZzOU1PVEU/view?usp=sharing

https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 08:07:05 AM
is this it? this is both hp file

https://drive.google.com/file/d/0Bz4ISsr3ugK7ZjRockZzOU1PVEU/view?usp=sharing

https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
Yes sir!  You got it!

I'm looking through it and it looks like it's just the stock KM hardpoint.  I'm not seeing any of the modifications that you described.  Did you pull this out of your scripts/ships/hardpoints directory or the KM src/scripts/ships/hardpoints directory?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 08:55:11 AM
I thunk it was from script, ships, Hardpoint
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 08:58:49 AM
here's the hp from src, script, hard point:

https://drive.google.com/file/d/0Bz4ISsr3ugK7Z2pOQzlsUF9FVHc/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 12:48:06 PM
here's the hp from src, script, hard point:

https://drive.google.com/file/d/0Bz4ISsr3ugK7Z2pOQzlsUF9FVHc/view?usp=sharing
That's the stock KM one as well, there's no changes in there.  You mentioned adding a cloaking device and the torpedo system.  The modified one is the one we need to see.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 01:10:55 PM
I think I might have saved over it by mistake that one doesn't exist anymore.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 01:11:57 PM
would you be able to send me a clean Sabre.py, I need to start over.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 01:15:21 PM
would you be able to send me a clean Sabre.py, I need to start over.
The ones you posted are the clean Sabre.py, so you can just use those and follow the instructions I gave you in earlier posts.  Drag and drop the finished product into scripts/ships/hardpoints in your BC directory.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 01:36:26 PM
ok, I've replace the HP with the stock and it still won't load in game here is a picture of the Console report:

https://imgur.com/a/xq7oW
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 01:59:44 PM
ok, I've replace the HP with the stock and it still won't load in game here is a picture of the Console report:

https://imgur.com/a/xq7oW
Try changing it from "sabre.py" to "Sabre.py" - capitalize the "S".  BC can get picky about things like that.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 02:16:02 PM
Morgan you are a Genius!!!! thank you LOL please forgive my ignorance as I am a novice at modding LOL that did the trick. now I can add the modifications I want to add. I also would like to increase the shield strength and add ablative armor as well can I do that or would that be more complicated?.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 02:54:14 PM
Morgan you are a Genius!!!! thank you LOL please forgive my ignorance as I am a novice at modding LOL that did the trick. now I can add the modifications I want to add. I also would like to increase the shield strength and add ablative armor as well can I do that or would that be more complicated?.
Happy to be of help!  I started off playing with hardpoints about 15 years ago doing little tweaks to ships like what you're doing, so I've been there.  Just keep reading through the hardpoints - staring at them long enough gives you an idea of how they work and you'll gradually, through lots of trial and error, learn what can be modified and how to do it.   :)

Shield strength is easy, you'll see the shield generator property and see the following:

Code: [Select]
ShieldGenerator.SetMaxShields(ShieldGenerator.FRONT_SHIELDS, 9500.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.REAR_SHIELDS, 9500.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.TOP_SHIELDS, 9500.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.BOTTOM_SHIELDS, 9500.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.LEFT_SHIELDS, 9500.000000)
ShieldGenerator.SetMaxShields(ShieldGenerator.RIGHT_SHIELDS, 9500.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.FRONT_SHIELDS, 12.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.REAR_SHIELDS, 12.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.TOP_SHIELDS, 12.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.BOTTOM_SHIELDS, 12.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.LEFT_SHIELDS, 12.000000)
ShieldGenerator.SetShieldChargePerSecond(ShieldGenerator.RIGHT_SHIELDS, 12.000000)
The values of 9500 are the shield hit points, so increasing that will increase your shield strength for that vector and vice versa.  The recharge rate is just that - how many hit points the shields replenish per second, so same story - higher values yield higher recharge rates.

Adding ablative armor is a similar process to adding the cloak and torpedo launchers I described earlier, but has the added step of needing to modify the ship plugin.  You'll need a hull property labeled as such in the hardpoint, and you also need to make sure that it's not set as your primary hull and non-critical (that way your ship doesn't blow up when the ablative armor fails).  I added ablative armor to my Defiant hardpoint, it looks like this:

Code: [Select]
AblativeArmor = App.HullProperty_Create("Ablative Armor")

AblativeArmor.SetMaxCondition(6000.000000)
AblativeArmor.SetCritical(0)
AblativeArmor.SetTargetable(1)
AblativeArmor.SetPrimary(0)
AblativeArmor.SetPosition(0.000000, 0.000000, 0.000000)
AblativeArmor.SetPosition2D(4.000000, 5.000000)
AblativeArmor.SetRepairComplexity(3.000000)
AblativeArmor.SetDisabledPercentage(0.000000)
AblativeArmor.SetRadius(0.650000)
App.g_kModelPropertyManager.RegisterLocalTemplate(AblativeArmor)
#################################################
Don't forget to add the property code to the bottom of the hardpoint as well:

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Ablative Armor", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
What I recommend doing is just copying that above code and pasting it below your "Hull" property.  The "SetMaxCondition" is how many hit points your armor has, so feel free to change that to your liking.

Now the next step requires that you have BCUT installed - you can find the latest version (1.8.1) in the download section.  You'll be using this to modify the ship plugin.  Since you're running KM there's gonna be a couple extra steps that I'll layout for you to ensure you don't mess up the Saber's ship description.

BCUT should automatically locate your Bridge Commander install.  To check, open up the program and go to the "Options" button.  It should show the path its using.  If that looks like your BC directory you're good.  If not, you can click "automatic" to have it lock onto your most recent BC install.  The "manual" button is just that - you'd specify your BC directory manually (if you only have one copy of BC installed you shouldn't need to use this).

So now that you know how to ensure BCUT is locked to your BC directory, let's back up your KM ship plugin first, we'll need to copy some code out of that later to the new plugin.  Go to your scripts/custom/ships folder and copy the "Sabre.py" file to a temporary directory or your desktop.  Once that's done, we'll go into BCUT.

1.  Click on the BCSMC and select "Advanced BCSMC".

2.  Where it says "ship filename" click the dropdown arrow and locate the Sabre.py file.  Once selected the other fields should auto-populate for you.

3.  Under "menu group", select "Fed Ships"

4.  To add the ablative armor, you'll need to select "Edit FTech Properties".  This will bring up another window for you.

5.  Under technologies, select "ablative armour".  In the box to the right, type in the name of your armor - note in the example above I have it listed as "Ablative Armor" in the first line, so if you copied mine that's what you would type.

6.  Under "tech value", you'll see it's currently listed as -1.  You'll change this to however many hit points your armor has (the "SetMaxCondition" we talked about earlier).  You'll change that -1 to whatever value your armor has - in my example it's set to 6000 so that's what I'd type.  If you change it to 8000 type 8000, etc.

7.  Click "apply changes"

8.  Click "generate plugin"

This will generate a new ship plugin, and BCUT will open up your scripts/custom/ships folder afterwards.  The next step is to go into the backup Sabre.py file we copied earlier, I want you to copy the following:

Code: [Select]
Foundation.ShipDef.Sabre.hasTGLName = 1
Foundation.ShipDef.Sabre.hasTGLDesc = 1

What I would do is just paste it below this line in the new plugin:

Code: [Select]
Foundation.ShipDef.Sabre.desc = 'No Description Available'That should do it!  If you did everything right, when you load up the Saber you should have a grey line indicating your armor strength ingame.  When it's depleted, it'll go back to the default green for your primary hull's life.  Let me know how it goes!
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 06:58:11 PM
ran into another snafu wile adding torpedo, I did everything right here's a pic:

https://imgur.com/a/zRc9s
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 07:10:56 PM
ran into another snafu wile adding torpedo, I did everything right here's a pic:

https://imgur.com/a/zRc9s
Can you post that hardpoint file for me so I can take a look?  The console isn't being too specific.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 07:38:12 PM
here ya go:

https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 08:01:40 PM
here ya go:

https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
That's the regular KM hardpoint again without any of your modifications?  I need to see the one you modified with the changes.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 08:06:52 PM
https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 08:13:44 PM
https://drive.google.com/file/d/0Bz4ISsr3ugK7alNWak1heUhEbGM/view?usp=sharing
Thanks!  I think I see the problem, it's located here:

Code: [Select]
        pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Fwd Torpedo 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
                pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
                pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 2", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
You have an extra that needs to be deleted, just above FwdTorpedo1.  Delete this:

Code: [Select]
        pObj.AddToSet("Scene Root", prop)Leave everything below it alone.  Give that a go and let me know
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 08:31:27 PM
deleted the property, but still not working.

https://drive.google.com/file/d/0Bz4ISsr3ugK7OUE5MUMtOU43WXc/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 08:37:58 PM
deleted the property, but still not working.

https://drive.google.com/file/d/0Bz4ISsr3ugK7OUE5MUMtOU43WXc/view?usp=sharing
Looks like that line you deleted is missing below Aft Torpedo 2.  I should have caught that on the first go.  So this:

Code: [Select]
        pObj.AddToSet("Scene Root", prop)Needs to be below this:

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 2", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
Like how you'll see on the other properties above it. 
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 08:54:26 PM
I followed your instructions, but still no joy, should I have deleted the other photon turrets as well since I deleted the properties?

https://drive.google.com/file/d/0Bz4ISsr3ugK7eHZpc0lQdzA3Zjg/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 09:09:36 PM
I followed your instructions, but still no joy, should I have deleted the other photon turrets as well since I deleted the properties?

https://drive.google.com/file/d/0Bz4ISsr3ugK7eHZpc0lQdzA3Zjg/view?usp=sharing
Since you deleted the properties it doesn't matter that the Photon Turrets are still up there.  However, you see where you added the:

Code: [Select]
        pObj.AddToSet("Scene Root", prop)Now check this out:

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 1", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
                pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Aft Torpedo 2", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
         pObj.AddToSet("Scene Root", prop)
See how the spacing on pObj.AddToSet under Aft Torpedo 2 isn't the same as Aft Torpedo 1?  That's a problem.  Sounds petty but BC is picky like that and you can't argue with a computer sadly.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 19, 2017, 09:23:54 PM
still no joy ;(

https://drive.google.com/file/d/0Bz4ISsr3ugK7RC11RzdtdHZkNHc/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 19, 2017, 10:59:32 PM
still no joy ;(

https://drive.google.com/file/d/0Bz4ISsr3ugK7RC11RzdtdHZkNHc/view?usp=sharing
I don't see anything wrong with it.  To confirm I downloaded it and tested it on my own BC install.  Loaded up and played fine.  What's happening when you try to play it?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 07:45:45 AM
it still doesn't load from the Sovereign bridge, here's the console report:

https://imgur.com/a/vWoo5
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: KrrKs on September 20, 2017, 09:46:58 AM
That looks like you have a 'sabre' instead of 'Sabre' in the plugin file.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 09:57:00 AM
I saved the py file as Sabre.py
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 10:06:06 AM
new console report, I capitalized the "S":

https://imgur.com/a/NJxit
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 10:07:01 AM
where's the plugin file?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 20, 2017, 11:43:09 AM
where's the plugin file?
scripts/custom/ships
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 02:33:02 PM

Ok, I got the ship loading again however when testing out the torpedoes, the targeting seems to be off, and on the torpedo readout type it list projectile substitute. the forward torpedo seems to be off as you can see in the pic. How do I fix the targeting so the torpedoes actually hit the target. and I also want to add Quantum torpedoes as well so I can switch between the two types. see image.

https://imgur.com/a/axG0f
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 20, 2017, 04:30:01 PM
Ok, I got the ship loading again however when testing out the torpedoes, the targeting seems to be off, and on the torpedo readout type it list projectile substitute. the forward torpedo seems to be off as you can see in the pic. How do I fix the targeting so the torpedoes actually hit the target. and I also want to add Quantum torpedoes as well so I can switch between the two types. see image.

https://imgur.com/a/axG0f
That's just the icon, the torpedo launcher itself is functioning normally.  The accuracy of the torpedoes is determined by the projectile itself, not the launcher.  You get best results by waiting to fire until the crosshair is showing the small arrows on each end (see pic for example).

You're getting "ProjectileSubstitute" because the hardpoint is still only loading a placeholder torpedo, not the standard KM photon.  To get the results you'll want, you'll need to edit the following:

Code: [Select]
Torpedosystem.SetMaxTorpedoes(0, 0)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.Dummy")
Torpedosystem.SetNumAmmoTypes(1)
We talked about editing the torpedoes a little bit in an earlier post, but I'll refresh real quick.  You'll want to change these three lines to the following:

Code: [Select]
Torpedosystem.SetMaxTorpedoes(0, 100)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.PhotonTorpedo")
Torpedosystem.SetMaxTorpedoes(1, 100)
Torpedosystem.SetTorpedoScript(1, "Tactical.Projectiles.QuantumTorpedo")
Torpedosystem.SetNumAmmoTypes(2)
Can you spot the differences and see what I did?  "SetNumAmmoTypes(2)", since we have two torpedo types loaded.  The first torpedo load is indicated with a 0 for the first number on the "SetMaxTorpedoes" and "SetTorpedoScript" line; the second torpedo load is indicated with a 1.  If you want a third it would be 2, etc., and you'd set number ammo types to 3 like so.  The second number (100) is simply the number of torpedoes you have of that type - change that to your liking for each one.

The "SetTorpedoScript" line is telling is what projectile you want to use and where it is located, in this case for your photons, the hardpoint will look for a script named "PhotonTorpedo" in the scripts/Tactical/Projectiles folder.

Give those a go real quick and let me know how everything is working :)
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 05:08:20 PM
no joy I did something wrong again.

https://drive.google.com/file/d/0Bz4ISsr3ugK7RC11RzdtdHZkNHc/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 20, 2017, 08:44:02 PM
I followed your instructions, I don't know where I went wrong
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 20, 2017, 11:29:19 PM
I followed your instructions, I don't know where I went wrong
You got a name mismatch.  Take a look:

Code: [Select]
Torpedosystem.SetMaxTorpedoes(0, 100)
Torpedosystem.SetTorpedoScript(0, "Tactical.Projectiles.PhotonTorpedo")
Torpedoes.SetMaxTorpedoes(1, 100)
Torpedoes.SetTorpedoScript(1, "Tactical.Projectiles.QuantumTorpedo")
Torpedosystem.SetNumAmmoTypes(2)
See how everywhere else it says "Torpedosystem", but the line you added starts with "Torpedoes"?  That's where the error lies.  You gotta change those to "Torpedosystem" just like the rest of that property.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 21, 2017, 08:44:12 AM
OK, I changed Torpedoes to Torpedo system and the ship still doesn't load in game. see file

https://drive.google.com/file/d/0Bz4ISsr3ugK7TXVtaF9ObFFwQlE/view?usp=sharing
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 21, 2017, 08:48:13 AM
I also would like to set the option of torpedo spread e.g.: single, dual, and quad. can I also increase the explosive yield as well?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 21, 2017, 02:58:57 PM
Should I also delete the firing chain line?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 21, 2017, 04:34:30 PM
OK, I changed Torpedoes to Torpedo system and the ship still doesn't load in game. see file

https://drive.google.com/file/d/0Bz4ISsr3ugK7TXVtaF9ObFFwQlE/view?usp=sharing
You got a typo on this line:

Quote
Torpedoesystem.SetMaxTorpedoes(1, 150)
It says "torpedoesystem", not "torpedosystem".  Just fix that one line and you should be ok.

Quote
I also would like to set the option of torpedo spread e.g.: single, dual, and quad. can I also increase the explosive yield as well?
Setting up torpedo spreads is a bit complicated and I won't have time to go into detail on how to do that today, but sometime this weekend I'll walk you through the process.  FYI, it's kind of lengthy.

As for the explosive yield of the torpedoes, that requires modifying the individual projectile scripts in scripts/tactical/projectiles.  You can find the .py's in the corresponding KM SRC folder.  Once you pull them up and look at them it should be pretty obvious how to increase the damage :)

Quote
Should I also delete the firing chain line?
No, leave that alone.  Even something that looks miniscule can drastically screw up your game if you mess with it wrong.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 21, 2017, 08:00:47 PM
its woking now. I look forward to your tutorial over weekend on increasing the yield.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 22, 2017, 01:06:18 AM
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 22, 2017, 07:51:24 AM
I also want to add bottom and aft phaser because after doing some testing, I noticed my ship doesn't have any protection there. and I would also like to personalize my ship with its own name. e.g. USS Oberon, NCC-61983. is there a way to do that?
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 22, 2017, 11:47:53 AM
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Nebula on September 22, 2017, 08:38:21 PM
it says right in there it's a case mismatch. Most likely the S on the Py needs to be capitalized.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 24, 2017, 12:59:02 AM
I look forward to your phaser tutorial.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: KrrKs on September 24, 2017, 07:48:40 AM
For phasers you really need to use the SDK's modelpropertyeditor. There should be a "modelpropertyeditor.html" introduction/howto file in the sdk main folder. Especially the faq section at the end is important, w.r.t. the hp size scaling.

To add a phaser you create a new phaserproperty (or similar), or better yet, clone an existing one and move that one. That way, all the variable controlling the look, sound, fire duration and damage will already be set and you only need to change position, size and orientation and what else you want to change. You need to look out a bit with the firing arcs in respect to orientation when you place the phaser.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: JimmyB76 on September 24, 2017, 11:26:37 AM
i think this thread has veered waaaaaay offtopic from its original intent...
has the original question about the Sabre Class been answered and solved somewhere in the last 4 pages?

if so, please create a new thread in Modding forum for any other questions relating to Modding BC...


thx :)
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 24, 2017, 11:50:08 AM
i think this thread has veered waaaaaay offtopic from its original intent...
has the original question about the Sabre Class been answered and solved somewhere in the last 4 pages?

if so, please create a new thread in Modding forum for any other questions relating to Modding BC...


thx :)
The original issue was indeed about adding torpedoes and it seems to have... umm... evolved yes.

AdmiralWhite, if you're still in need of further assistance after reviewing all the tutorials around here and in the SDK as mentioned by KrrKs, by all means feel free to create a new post and we'll all assist as best we can.  If you encounter hiccups be sure to include a console report with any troubleshooting requests.

I know I promised to at least walk you through how to do torpedo spreads, so I'll PM you those instructions when I get time.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 24, 2017, 02:43:37 PM
not a problem, I figured since we were on the topic of torpedoes I wanted to ask about phasers as well. my apologies for deviating.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: JimmyB76 on September 24, 2017, 03:51:46 PM
The original issue was indeed about adding torpedoes and it seems to have... umm... evolved yes.
AdmiralWhite, if you're still in need of further assistance after reviewing all the tutorials around here and in the SDK as mentioned by KrrKs, by all means feel free to create a new post and we'll all assist as best we can.  If you encounter hiccups be sure to include a console report with any troubleshooting requests.
I know I promised to at least walk you through how to do torpedo spreads, so I'll PM you those instructions when I get time.
not a problem, I figured since we were on the topic of torpedoes I wanted to ask about phasers as well. my apologies for deviating.
no problem about straying from the original topic at all!  :)
the posts since have legitimate  and helpful info that is good for reference, i was likely going to split those posts into a new thread of it's own for BC Modding Forum for any future reference someone else in the future may also ask about...
before i did i just wanted to know at which point it started veering a little bit offtopic, where the original topic point had been answered, and split the rest from there into a new thread of its own so this convo can hopefully continue there... :)
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 24, 2017, 05:00:42 PM
no problem about straying from the original topic at all!  :)
the posts since have legitimate  and helpful info that is good for reference, i was likely going to split those posts into a new thread of it's own for BC Modding Forum for any future reference someone else in the future may also ask about...
before i did i just wanted to know at which point it started veering a little bit offtopic, where the original topic point had been answered, and split the rest from there into a new thread of its own so this convo can hopefully continue there... :)
Honestly with how much info I just dumped in this thread about hardpoint modifying I may just start up a basic "how to" thread at some point similar to the one I did about optimizing BC.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 25, 2017, 07:12:41 PM
Morgan,

can you PM me the tutorial about adding phasers.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: JimmyB76 on September 26, 2017, 10:46:35 AM
I may just start up a basic "how to" thread at some point similar to the one I did about optimizing BC.
that would be so very helpful to those who arent sure how to do such things :)
when youre ready, just send me a PM of what to split from this thread and take it Modding Forum :)

Morgan,
can you PM me the tutorial about adding phasers.
any Tutorials made will go onto here at BCC, just keep an eye out if ever it is able to be done...
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: Morgan on September 26, 2017, 12:01:24 PM
that would be so very helpful to those who arent sure how to do such things :)
when youre ready, just send me a PM of what to split from this thread and take it Modding Forum :)
any Tutorials made will go onto here at BCC, just keep an eye out if ever it is able to be done...
Thanks Jimmy.

AdmiralWhite, I'm sorry it's taking me so long to get back to you.  Real life bills come up so I gotta work to make those - half the time I'm posting on BCC it's either from my phone or a different computer, so even though you may see me posting I don't always necessarily have access to all the BC materials I need to effectively teach.  I'll definitely get some information to you.
Title: Re: Sabre Class that comes with KM doesnt have Torpedoes
Post by: AdmiralWhite on September 26, 2017, 07:02:18 PM
OK, no problem Morgan :-) home comes first I know how that is. when ever you get the time, no pressure, thank you for all the help you have provided; I greatly appreciate it. :-)