Author Topic: Add a cloaking device to Federation ships?  (Read 744 times)

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Add a cloaking device to Federation ships?
« 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?
Great men are not peacemakers! Great men are conquerors!

Offline Kirk

  • Posts: 1438
  • Cookies: 139
    • My Released Mods
Re: Add a cloaking device to Federation ships?
« Reply #1 on: January 24, 2009, 09:49:02 AM »
Why not just add it via MPE?

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Add a cloaking device to Federation ships?
« Reply #2 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*
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline tiqhud

  • BCFiles File Poster
  • Posts: 1763
  • Cookies: 1067
  • San Francisco Shipyards (HPer) file manuiplater
Re: Add a cloaking device to Federation ships?
« Reply #3 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.
TiqHud
you sir, are unable to strike, the port or starboard parts of hull , of a bovine storage facility.
Canon , what people argue exists, that doesn't really  exist.
It is all the little details, that cause headaches.
"Never judge wealth with Money"
'Intelligence has Nothing to do with Politics'
it is Late, Do you know where your Towel is?

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Add a cloaking device to Federation ships?
« Reply #4 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.
Great men are not peacemakers! Great men are conquerors!

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Add a cloaking device to Federation ships?
« Reply #5 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?
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Add a cloaking device to Federation ships?
« Reply #6 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.
Great men are not peacemakers! Great men are conquerors!

Offline Rob Archer

  • Posts: 163
  • Cookies: 545
  • New Frontier MKVI
Re: Add a cloaking device to Federation ships?
« Reply #7 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)

Offline MLeo

  • Retired Staff
  • Posts: 3636
  • Cookies: 833
  • Software Simian
    • the Programming Pantheon
Re: Add a cloaking device to Federation ships?
« Reply #8 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.
I still can't read peoples minds, nor can I read peoples computers, even worse, I can't combine the two to read what is going wrong with your BC install...

"It was filed under 'B' for blackmail." - Morse, Inspector Morse - The dead of Jericho.

Offline Bat66wat6

  • Posts: 144
  • Cookies: 34
  • Running custom BC 1.1
Re: Add a cloaking device to Federation ships?
« Reply #9 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.
Great men are not peacemakers! Great men are conquerors!