=^= Future Technologies Addition 2.0 Modding Info =^=
In the following instructions, "your ship's .py file" refers to your vessel's .py file, not the hardpoint file. (e.g. use bridgecommander/scripts/ships/your ship.py)
This Color
denotes script code.=^= Advanced Armor =^=
To equip your vessel with the advanced armor, just paste the following lines to the bottom of your ship's .py file.
def GetArmorRatio():Now, the number in the line
return 0.1 sets the efficiency at which the armor operates, the higher this number is, the stronger the armor, the lower it is, the weaker. (For example, if you use return 1.0, then the armor will be 10 times stronger than return 0.1, if you use return 10.0, then the armor will be 100 times stronger than return 0.1.=^= Cloaked Torpedo Launching =^=
This technology allows vessels to be equipped with the ability to fire torpedoes while under cloak, the following instructions show you how to enable this for each torpedo tube on your ship. Note that you can optionally give select tubes this ability, while leaving other tubes normal.
To allow a vessel to fire torpedoes while cloaked:
=^= In-Game Disruptor Switching =^=
Because this step can be somewhat complicated, a tool has been provided named DisruptorGen.html located in the same directory as this file.
=^= Script Torpedo Support =^=
The Script Torpedo technology is what all of the weapons included in this mod are based on, all script code that give those weapons their unique functionality are contained in the WeaponFired () and TargetHit () handlers in the torpedoes' .py file. Looking at all of these weapons should give you a feel for scripting your own weapons.
The Future Technologies addition looks for two procedures in torpedo files:
TargetHit (pObject, pEvent) and WeaponFired (pObject, pEvent). If it finds them:WeaponFired (pObject, pEvent)
will be called when the torpedo is fired.TargetHit (pObject, pEvent)
will be called when the torpedo hits an object.The Future Technologies Addition calls the procedures of the torpedo only when that torpedo was fired, or hit.
If my poor explanation was insufficient, there are several example torpedo files included, as well as a skeleton you can fill in, you might look at these to get the general idea.
Included in this mod is the .py file for the stock bird of prey that has been equipped with the armor, disruptor switching, and cloaked firing to illustrate the use of FTA.