Help Thread ... how to add a clocking device 4 replies

Please wait...

Magic (tm)

I post to get attention

50 XP

9th July 2002

0 Uploads

64 Posts

0 Threads

#1 16 years ago

K I read several times thaat people have probs to add a clockingdevice .. this thread will expalin it step by step .. so all you need now is to read it :)

To ways to get the cloacking device working .. first and most simple way is the with MPE .. the modelpropertytool in the sdk. You only need to click on the .reg file then start the tool .. under option you must point where your BC is installed and then open the Sovie model and the .py file also. you you have opened both files click in the right menue to see all the systems of the ship .. just play it bit with this tool to understand how to use it .. or read the readmes in the sdk .. they explain all very closely. ----------------------------------------------------------------------

k but I think you may can't get the MPE to work .. here is the 2. way ..

1.)go into [BC main root] [color=silver]"scripts/ships/hardpoints/"[/color] .. there you must open the sovereign.py [color=red](important: if there is only the sovereign.pyc it will not work you need the .py the make changes with nodpad .. you can find the .py in the sdk for the stock sovereign)[/color] 2.) Open as told the soveriegn.py with nodpad 3.) Now you can see all the systems of the HP file and between each system are ###################### these marks. so when you add the clocking device make sure that system is also surrounded by these ############ k. 4. k I give you now the codeline for a working clocking device, so add the following lines to the script:

[color=yellow]

################################################# CloakingDevice = App.CloakingSubsystemProperty_Create("Cloaking Device")

CloakingDevice.SetMaxCondition(3000.000000) CloakingDevice.SetCritical(0) CloakingDevice.SetTargetable(1) CloakingDevice.SetPrimary(1) CloakingDevice.SetPosition(0.003135, 0.298584, 0.027924) CloakingDevice.SetPosition2D(64.000000, 65.000000) CloakingDevice.SetRepairComplexity(6.000000) CloakingDevice.SetDisabledPercentage(0.750000) CloakingDevice.SetRadius(0.050000) CloakingDevice.SetNormalPowerPerSecond(380.000000) CloakingDevice.SetCloakStrength(100.000000) App.g_kModelPropertyManager.RegisterLocalTemplate(CloakingDevice) ################################################# [/color]

5.) k don't forget to copy also the ########## k well this is a basic clocking device and will work. There are 2 values you can change to make it maybe better work in a way you want.

The first value is in the 2nd last codeline, called "CloakStrength" .. hmm this value I think is how fast the cloack will work or how long you can still lock on the target when its starts clocking .. not sure here.. 100

Thew second value is "SetNormalPowerPerSecond". This vlaue defines how much power the clocking device will needed. You should test what will be the best way for your ship and the warpcore it has.

6.) K well to explain all the other values will take to long normaly the name of the values explains already its function .. for example how strong (hull) the system is how hard it is to repair or how much of the system must be destroyed until its out of order ..

hope this explains you how to add and how to handle a clocking device .. again its easier with the MPE tool but will also work in the second way.




dharbert

GF makes me horny

50 XP

25th August 2002

0 Uploads

93 Posts

0 Threads

#2 16 years ago

I have already tried both methods....they do not work. I added the code you have given to the stock Sovereign.py file that came with the SDK and it did not work. Maybe you could post a Sovereign.py file with the cloak included as an attachment? :)

I have gotten everything else to work, except the cloak. I even took the cloak code straight from a Warbird.py file and pasted it into the Soveriegn.py file and it didn't work.

Here is my stock SDK sovereign.py file with the code that you supplied added to it (attached as a .txt file).




Magic (tm)

I post to get attention

50 XP

9th July 2002

0 Uploads

64 Posts

0 Threads

#3 16 years ago

k I will post a working sovereign.py tomorrow when I find the time to make it .. but I tested the code before writing the post .. and the code work .. hmm well k I did not tested it in a stock sovi as I only hav P81's but it worked .. lets see where the prob is .. in general the oh wait .. heheh

[color=red]I HAVE IT[/color] .. lol I just forgot the system registration .. hehe k well the when you open the file with nodpad scroll down to the bottom or nearly the bottom of the file .. there you will see that all system are registered and defined in the HP file ..

k I will post the working sovi file but would be good you try this first on your own .. so look at the first line of my code = [color=yellow] CloakingDevice = App.CloakingSubsystemProperty_Create("Cloaking Device") [/color] as you can see in the quotes my system is lable as "Cloaking Device" so we need to define this name as a ship system .. k as I said scroll down until you come to the system registration .. the line should look like this

[color=yellow] prop = App.g_kModelPropertyManager.FindByName("Hull", App.TGModelPropertyManager.LOCAL_TEMPLATES) if (prop != None): pObj.AddToSet("Scene Root", prop) [/color] k wel sorry the lines will look a bit different because of the limited space here in the thread ... k well the example defines the name "hull" as a ship property

k the register my code lines of the clocking device you will need to add the following lines add the end of the file .. make sure you have really scrolled the end of the file and :

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

K BUT DO NOT JUST COPY THIS CODE .. plz as I said the code has changed because of the limited space here in the post so LOOK IN THE FILE AND LOOK HOW A CORRECT CODE LOOKS LIKE ... WHERE THE END OF A LINE IS AND SO ON !




dharbert

GF makes me horny

50 XP

25th August 2002

0 Uploads

93 Posts

0 Threads

#4 16 years ago

Yep, that was it! That last bit of code did the trick. There may be a slight bug with it though. Now that I have added the code to my Sovereign, the AI for the ship doesn't seem to want to target starbases. :confused:

I've done other modifications to my sovereign.py file, so it's probably something else I've done with my ship. Thank you very much for the code.

Since you're so helpful and seem to know a bit about the .py files, how would you go about making a tractor beam "push" rather than "pull"? I've already tried making the tractor beam do negative damage (didn't work).

And, one more simple (hopefully) question. Do I have to use QuickBattle 2 to be able to play as a starbase in Quick Battle?

Thank you for all of your help. :)




Magic (tm)

I post to get attention

50 XP

9th July 2002

0 Uploads

64 Posts

0 Threads

#5 16 years ago

Ähm I can't tell you much about QB2 ... I never used it because I was never sure it was compatible with the foundations and mods. Well you must know that the QB2 is overwriting the quickbattle.py and .pyc .. and other mods need that file or the foundation .. so I never used it not to mees all my installed mods ..

Hmm the AI question is really difficult .. would be intressting to first make sure that the starbase is really your enemy and no a friend or a neutral base already in the sy