Bridge Commander Central

BC Forums => BC Modding => Topic started by: Bat66wat6 on January 24, 2009, 09:44:50 AM

Title: Add a cloaking device to Federation ships?
Post by: Bat66wat6 on January 24, 2009, 09:44:50 AM
I have normal version 1.1 bridge commander and have been trying to add a cloaking device to the Soveriegn with no success. The following steps work on any every other ship I have tried so far (even the Hybrid) without a hitch but won't work on the sovereign.

1) Paste following code from the 'bird of prey.py' into the 'Soveriegn.py' hardpoint file
Code: [Select]
CloakingDevice = App.CloakingSubsystemProperty_Create("Cloaking Device")

CloakingDevice.SetMaxCondition(800.000000)
CloakingDevice.SetCritical(0)
CloakingDevice.SetTargetable(1)
CloakingDevice.SetPrimary(1)
CloakingDevice.SetPosition(0.000000, 0.370000, 0.000000)
CloakingDevice.SetPosition2D(64.000000, 65.000000)
CloakingDevice.SetRepairComplexity(6.000000)
CloakingDevice.SetDisabledPercentage(0.750000)
CloakingDevice.SetRadius(0.070000)
CloakingDevice.SetNormalPowerPerSecond(50.000000)
CloakingDevice.SetCloakStrength(90.000000)
App.g_kModelPropertyManager.RegisterLocalTemplate(CloakingDevice)

2) I copy the co-ordinates of the Sovereign bridge and replace the cloaking device co-ordinates and change them by 1 so the cloak has the following co-ordinates.
Code: [Select]
CloakingDevice.SetPosition(0.000000, 1.900000, 0.170000)
CloakingDevice.SetPosition2D(63.000000, 14.000000)

3) I then paste the following code from the 'bird of prey.py' hardpoint file into the bottom of the 'sovereign.py' hardpoint file.
Code: [Select]
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)

These steps have worked without a problem when used on any other ship that isn't federation, why isn't the Soveriegn cloak working?
Title: Re: Add a cloaking device to Federation ships?
Post by: Kirk on January 24, 2009, 09:49:02 AM
Why not just add it via MPE?
Title: Re: Add a cloaking device to Federation ships?
Post by: MLeo on January 24, 2009, 10:18:54 AM
Hardpoints don't care about ship type.

They also won't mind 2 hardpoints being in exactly the same place.

What they might not like is if the hardpoint is outside of the ship. So please try putting it back to the bridge location.



*Moved to BC Modding*
Title: Re: Add a cloaking device to Federation ships?
Post by: tiqhud on January 24, 2009, 10:56:18 AM
Mleo, is correct that has to be inside the ship, or when it is activated it has Nothing to cloak.
Title: Re: Add a cloaking device to Federation ships?
Post by: Bat66wat6 on January 24, 2009, 12:53:05 PM
No luck.

I set the co-ordinates back to the bridge co-ordinates and the cloak still doesn't work.
 Any other ideas?

One of you mentioned MPE, when do I find that and what does it do? I got it one in an SDK pack but it didn't work.
Title: Re: Add a cloaking device to Federation ships?
Post by: MLeo on January 24, 2009, 12:57:18 PM
Could you attach the hardpoint.

MPE should just work out of the box, have you tried running the registry file?
Title: Re: Add a cloaking device to Federation ships?
Post by: Bat66wat6 on January 24, 2009, 01:31:33 PM
Quote
have you tried running the registry file?
Please explain. I was under the impression that a 'program' or piece of software requires a .exe file.


I have attached the 'Sovereign.py' hardpoint script to this reply.
Title: Re: Add a cloaking device to Federation ships?
Post by: Rob Archer on January 24, 2009, 01:43:54 PM
i think you have the Last three lines in the wrong order

rather than

Code: [Select]
if (prop != None):
pObj.AddToSet("Scene Root", prop)
prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)

it should be

Code: [Select]
prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)
if (prop != None):
pObj.AddToSet("Scene Root", prop)
Title: Re: Add a cloaking device to Federation ships?
Post by: MLeo on January 24, 2009, 01:50:31 PM
Quote
have you tried running the registry file?
Please explain. I was under the impression that a 'program' or piece of software requires a .exe file.


I have attached the 'Sovereign.py' hardpoint script to this reply.
I meant just once, to setup a couple of registry settings.

MPE was never really meant for use outside of Totally Games. They through together the SDK "as is", with a minimum of documentation.
Title: Re: Add a cloaking device to Federation ships?
Post by: Bat66wat6 on January 24, 2009, 02:06:35 PM
Thank you Rob Archer.
 I did as you suggested and changed the:
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)
   prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)

to:
   prop = App.g_kModelPropertyManager.FindByName("Cloaking Device", App.TGModelPropertyManager.LOCAL_TEMPLATES)
   if (prop != None):
      pObj.AddToSet("Scene Root", prop)

And it worked the Soveriegn now cloaks. I am going to have alot of fun playing the Campaign now.