 |
Bridge Commander Universe ...welcome to the new world.
|
View previous topic :: View next topic |
|
Author |
Message |
Dragon
TERTIARY X-1


Age: 25
Zodiac: 
Joined: 30 Mar 2004
Posts: 803
Location: UK Stoke-on-Trent

|
|
|

|
|
|
Ok, I thought id make this quick guide on how to modify a torpedo since quite a few people dont know how to do this...I will assume that you know what a script is and the basic structure of Bridge Commander...
1) Opening the Script
Go into scripts/Tactical/Projectiles and open up PhotonTorpedo.py OR open up the file included with this guide using a text editor such as WORDPAD.
http://www.universeatwar.org/dgproductions/files/Dragon/PhotonTorpedo.py
2) Torpedo Structure
Torpedoes are usually made up of 3 layers:
Core = The central part of the torpedo.
Glow = A pulsating glow which eminates from the core.
Flare = Small strands which emerge from the core outwards
You can see these parts on the picture below...
IMPORTANT NOTE: The core texture is the one which determines the flares. BC does not allow for seperate flare textures.
3) Editing the Colours
The first section of the script deals with the colours of the torpedo. The Core, Glow and Flare colour...
Quote: | kCoreColor = App.TGColorA()
kCoreColor.SetRGBA(255.0 / 255.0, 255.0 / 255.0, 128.0 / 255.0, 1.000000)
kGlowColor = App.TGColorA()
kGlowColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000)
kFlareColor = App.TGColorA()
kFlareColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000) |
Each of the layers contains the following information:
Quote: | SetRGBA(255.0 / 255.0, 255.0 / 255.0, 128.0 / 255.0, 1.000000) |
RGBA = Red, Green, Blue, Alpha
In order to edit the colours of each layer, simply edit the values to increase or decrease the RGB (Red, Green, Blue) to create a specific mixture of colours...make sure that you edit each of these in the following way...
For example, if you wanted to make the core of the torpedo to be very RED, you simply increase the value for the red and decrease the value of the other colours accordingly...
Quote: | SetRGBA(855.0 / 255.0, 20.0 / 255.0, 20.0 / 255.0, 1.000000) |
Please note: only edit the value before the "/". e.g. 855.0 / 255.0 and leave the 255.0 as it is. (im not sure what this does exactly)
Now you can edit the colour of the torpedo for the 3 layers. Remember that for the Core, Glow and Flare the same rules apply, as can be seen below...
Quote: | kCoreColor = App.TGColorA()
kCoreColor.SetRGBA(255.0 / 255.0, 255.0 / 255.0, 128.0 / 255.0, 1.000000)
kGlowColor = App.TGColorA()
kGlowColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000)
kFlareColor = App.TGColorA()
kFlareColor.SetRGBA(255.0 / 255.0, 128.0 / 255.0, 0.0 / 255.0, 1.000000) |
The ALPHA values simply refer to the transparency of that colour...so a high ALPHA means that the colour is less visable and more transparent...simply experement with these values...
4) Editing the physical makup
The next part of the script deals with the physical makeup of the torpedo, from the amount of flares, to the speed of the glow pulse...I will simply explain what each of the values refer to...
You will see something like this:
Quote: | pTorp.CreateTorpedoModel(
"data/Textures/Tactical/TorpedoCore.tga",
kCoreColor,
0.115,
6.0,
"data/Textures/Tactical/TorpedoGlow.tga",
kGlowColor,
1.0,
0.2,
0.3,
"data/Textures/Tactical/TorpedoFlares.tga",
kFlareColor,
42,
0.42,
0.1) |
The first thing to note is that as I have said previously, there are 3 parts to every torpedo (Core, Glow and Flares)
However each of these layers are first determined by a texture file which is stored in the following filepath within bridge commander.
data\Textures\Tactical
This guide is not concerned with these textures, however it might be useful to open them to see what they look like inside to help to form the torpedo you want...
One of the first lines of this section looks like this
Quote: | "data/Textures/Tactical/TorpedoCore.tga", |
As you can see this determines the texture file which is used for the torpedo CORE.
Quote: | "data/Textures/Tactical/TorpedoGlow.tga", |
Torpedo glow...
Quote: |
"data/Textures/Tactical/TorpedoFlares.tga", |
And torpedo flares...
In order to change the textures for each of these parts, simply rename the texture file that you wish like below...
Quote: | "data/Textures/Tactical/DragonsFlares.tga", |
Make sure you keep the .tga at the end, because this is the format of the texture files...
In order to simplify this guide and to avoid explaining each value that you must change, I will list what each of the values mean for this section...
Quote: | "data/Textures/Tactical/TorpedoCore.tga", = Core Texture File
kCoreColor,
0.115, = The Scale of the core in relation the the rest of the torpedo. (Larger = Bigger Core)
6.0, = The rate at which the torpedo rotates ingame. This affects flares and how fast the rotate(Larger = Faster)
"data/Textures/Tactical/TorpedoGlow.tga", = Glow Texture File
kGlowColor,
1.0, = Specifies the rate at which the glow will pulsate. (Larger = Faster Pulse)
0.2, = The Minimum size of the glow. (Larger=Bigger Glow)
0.3, = The Maximum size of the glow. (Determines how much the glow will increase from the minimum size to the large size)
"data/Textures/Tactical/TorpedoFlares.tga", = Flare Texture File
kFlareColor,
42, = The Maximum number of flares that spawn from the core. (Larger = More Flares)
0.42, = The length of the individual flares. (Larger = Longer Flares)
0.1) = The amount of time that the flares will last until they spawn again elsewhere. (Larger = Longer Existence) |
Ok, you have now just configured how the torpedo will behave ingame...but remember that this section is a matter of trial and error...Now we will move onto properties ot the torpedo, or as you might consider, the Tactical Data...
5) Configuring the Tactical Data
The following code is what you will see now or similar
Quote: | pTorp.SetDamage( GetDamage() )
pTorp.SetDamageRadiusFactor(0.15)
pTorp.SetGuidanceLifetime( GetGuidanceLifetime() )
pTorp.SetMaxAngularAccel( GetMaxAngularAccel() )
# Multiplayer specific stuff. Please, if you create a new torp
# type. modify the SpeciesToTorp.py file to add the new type.
import Multiplayer.SpeciesToTorp
pTorp.SetNetType (Multiplayer.SpeciesToTorp.PHOTON) |
There are only two things which need to be edited here...
a) This line determines the radius area effect of the torpedo. It will affect the visual ship damage ingame and the radius surrounding the impact zone.
Quote: | pTorp.SetDamageRadiusFactor(0.15) |
The 0.15 can be changed to increase or decrease the radius of the torpedoes impact...Increasing the value increases the radius, and Visa Versa.
b) This next line is a little more complicated and is becomming more utilised in advanced technologies (which I wont/cant explain here)
Quote: | pTorp.SetNetType (Multiplayer.SpeciesToTorp.PHOTON) |
The best way to put it is that this line determines the TYPE of torpedo that you wish to create...the only word that requires changing is the one underlined and it also must be kept in capitals...Since im unsure of ALL the types of Stock torpedoes and their effects, I will simply list the ones in which you can choose to use...just change the word accordingly...
The torpedoes that are present within the stock BC are as follows:
* ANTIMATTER
* CARDASSIANDISRUPTOR
* CARDTORP
* DISRUPTOR
* FUSIONBOLT
* KESSOKDISRUPTOR
* KLINGONTORP
* PHASEDPLASMA
* PHOTON
* POSITRON
* PULSEDISRUPT
* QUANTUM
Im not certain of the effects of each type of weapon. but make sure the name is entered correctly...
The next section is quite simple and sets up the speed, damage and sound for the torpedo...Simply edit the values as you desire to set up your torpedoes ingame abilities...
Quote: | def GetLaunchSpeed():
return(50.0) = Determines the speed that the torpedo is launched, higher values equal faster speed.
def GetLaunchSound():
return("Photon Torpedo") = Determines the SFX that is played when the torpedo is launched. This is set up using sound plugins and is NOT the name of the SFX file itself...
def GetPowerCost():
return(5.0) = Determines the power that is used by the torpedo. This applies mainly to disruptors or pulse weapons and is not used for Torpedoes unless they are pulse torps. Higher values means that the weapon uses more power.
def GetName():
return("Photon Torpedo") = Determines the name of the torpedo that appears ingame.
def GetDamage():
return 600.0 = Determines the damage that the torpedo does per hit. Higher values cause more damage to shields and hull.
def GetGuidanceLifetime():
return 6.0 = Determines how long the torpedo exists once it has been fired. I think this is in seconds?
def GetMaxAngularAccel():
return 2.5 = Determines the speed in which the torpedo can turn to track its target. Higher values mean that the torpedo can maneuver more efficiently. |
Thats everything for now, i hope that this will help alot of people to modify their own torpedoes...Now when your torpedo is ready, make sure you rename it to a unique name, remember that Photon Torpedo is already used, so if you want it as a unique weapon, rename it to something new. We (D&G Productions) always put a DG tag before all of our weapons...
Ive told you how to set up a torpedo, now all there remains to do is to add the torpedo to a ship. In order to do that, you will need to add it using the MPE...I wont explain how to do that here now.
One final issue to mention. All scripts within BC can be edited in their .PY state, however once they are loaded ingame a .PYC is created. Make sure you delete this each time you edit the .PY as a precaution...
If you have any questions please ask away...
Dragon
Thanks to Durandals guide which helped me out alot...
|
_________________
Torpedo Modding Guide
Shuttle Launching Guide
|
|
Back to top |
|
 |
Cochrane
Ensign


Joined: 25 Dec 2004
Posts: 104
Location: Mantua (Italy)

|
|
|

|
|
|
Great guide Dragon, it will save many people (like me ) trying to learn bc modding a lot of time and let us understand it better.
Thank you! 
|
|
|
Back to top |
|
 |
Dragon
TERTIARY X-1


Age: 25
Zodiac: 
Joined: 30 Mar 2004
Posts: 803
Location: UK Stoke-on-Trent

|
|
|

|
|
|
Cochrane wrote: | Great guide Dragon, it will save many people (like me ) trying to learn bc modding a lot of time and let us understand it better.
Thank you!  |
Your welcome, I have been meaning to write it for a while now but never got round to it...
|
_________________
Torpedo Modding Guide
Shuttle Launching Guide
|
|
Back to top |
|
 |
Cpt_Fleming
Lieutenant JG


Age: 22
Zodiac: 
Joined: 24 Apr 2002
Posts: 267
Location: London, england

|
|
|

|
|
|
i think this should be made a sticky. its a great guide thanks man
|
_________________

|
|
Back to top |
|
 |
Dragon
TERTIARY X-1


Age: 25
Zodiac: 
Joined: 30 Mar 2004
Posts: 803
Location: UK Stoke-on-Trent

|
|
|

|
|
|
Cpt_Fleming wrote: | i think this should be made a sticky. its a great guide thanks man |
Your welcome...I think i might have posted it in the wrong section, this belongs in scripting...oops. (can someone move it please, thx)
|
_________________
Torpedo Modding Guide
Shuttle Launching Guide
|
|
Back to top |
|
 |
Nebula
CA/KM/BCS:TC Mod Team Member Moderator


Age: 22
Zodiac: 
Joined: 04 Oct 2002
Posts: 21131
Location: Michigan

|
|
|
|
Back to top |
|
 |
JimmyB76
Fleet Admiral

Age: 33
Zodiac: 
Joined: 30 Jun 2003
Posts: 13365
Location: Rhode Island, USA

|
|
|

|
|
|
*moved to scripting*
sim rex can determine whether or not it should be stickied...
|
_________________ --------------------
|
|
Back to top |
|
 |
Dragon
TERTIARY X-1


Age: 25
Zodiac: 
Joined: 30 Mar 2004
Posts: 803
Location: UK Stoke-on-Trent

|
|
|
|
Back to top |
|
 |
Sim Rex
Moderator


Age: 26
Zodiac: 
Joined: 11 Apr 2002
Posts: 1714

|
|
|

|
|
|
Guess I missed this.. Still, it hasn't been a *whole* year!
Stickied!
|
_________________ "Could it be it's the end of our world? All the things that we cherish and love
Nothing left but to face this all on my own, cause I am the chosen one!"
-- The Fallen Angel - Iron Maiden(Smith/Harris)
For beginner scripters - The BCU Mission Scripting Lessons
|
|
Back to top |
|
 |
Dragon
TERTIARY X-1


Age: 25
Zodiac: 
Joined: 30 Mar 2004
Posts: 803
Location: UK Stoke-on-Trent

|
|
|
|
Back to top |
|
 |
Shinzon
CA Mod Team Member Admiral


Age: 19
Zodiac: 
Joined: 30 Sep 2004
Posts: 4020
Location: Toronto, Canada

|
|
|

|
|
|
LMAO nice
|
|
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
Bridge Commander Universe is a Nightsoft
company. All rights reserved.
|