PS - Fell free to modify this mod as you wish. All I ask is that you keep my name in there somewhere.
I just finished my first script. In (very) short, it shunts power from the shields to generate energy cells. I set it to run with energy cells valued at 500 Watts and then everything gets derived from there (with some caps for sanity of course).
Story and Notes:
Teladi Shield Shunt - by Maulkye
Only a few Wazouras ago, a bright young Teladi trader was running weapons through dangerous territory. Seeking to save costs he had taken a route known to be frequented by pirates. His plan was to swing deep into the rarely traveled areas of space to avoid entanglement with raiders, and by his calculations this would still be a shorter route than the safer and more frequented byways.
Unfortunately, a band of pirates returning to a secret base in deep space spotted the young Teladi's ship and it's considerably valuable haul of weapons. Faced by certain death the Teladi pilot quickly engaged the jumpdrive to escape, only to be greeted by a droning computer reminder that he had no jump fuel. Damn! He exclaimed. The Teladi now remembered that he had sold his fuel to increase his free cargo space, so that he could carry more weapons and further increase his profit. Being ages away from help and with death looming on the horizon, the young Teladi did the unthinkable. He offered 50% of his profits to his engineer if he could get them out of there alive.
The engineer quickly consulted his manual (Laforge’s Tips and Tricks volume NCC1701) and determined that he could shunt power from the shields to generate jump fuel. It was risky and the energy balance had to be right, but it could be done. All he had to do was start an energy cascade with a large enough initial drain from the shields, and the process should continue until the buffer storage banks in the shield generators were full. There were no guarantees, but with death as the only alternative, he began right away. After 5 minutes and with the pirates 6km away, the brilliant engineer managed to shunt enough power for the Teladi captain to enagage the drives and flee.
To this day, both Teladi are rich beyond their dreams, and have developed their new technology into a lucrative business. These wonderful devices can be acquired for around 150,000 credits at the Seizewell Equipment Dock, now owned by the two Teladi entrepreneurs. Stop by and say hello!
This script will slowly drain the shields of a ship using the Shunt to provide a limited amount of energy cells. I worked the math out initially to make sense, and then I tweaked it to be a little more fitting of my vision. Here are some notes about the script:
- Uses command 1230 (other ship commands) and thus does not trigger the autopilot
- Uses SS_WARE_SW_NEW11 (about 150k credits)
- Places the Shunt unit at the Teladi Equipment Dock in Seizewell. This sector and station are required in your galaxy (unless you alter the distro script)
- I've only done the English XML, but I think most folks know how to alter this. I haven't actually tried it, but I imagine you just change the XML file name to the appropriate language id (such as 398900.xml) and then change the Lang ID in the file to the same ID (such as 39).
- The shunt process cannot be stopped once it's started. (The energy transfer cascade is too volatile to try to stop once engaged). So, if you start this process in a dangerous area with low shields, you could endanger yourself. Be careful.
- Energy cells were valued at 500 Watts for the purpose of this script
- A minimum of 2500 Watts are need to start the cascade (3MJ shields or more): 500Watts * Production Amount of 5 EC = 2500
- The amount of cells produced during the cascade are based on the max number of megawatts a ships shield can carry + 10. So an M3 with 75MW of shields can create 85 cells if they have enough cargo space
- There is a 1000 Energy Cell cap for the shunt. (Shield buffers of any size have simple not been able to maintain a stable buffer when energy levels reach power levels in excess of 500,000 Watts).
- The shunt will stop if it has not reached it’s maximum output before it has reached the ship's cargo capacity (minus a 5 unit reserve).
- The shunt will terminate if the shields are destroyed or jettisoned such that the ships total shielding power is below the minimum required energy to drive the reaction (prevents endless loops if the shields are lost during shunting).
- The shunt always uses the minimum power required to run one cycle (set to 5 units * 500MW = 2500MW), even if there is only room for less than 5 cells in the ship. (The excess energy is bled into space).
- The Shield Shunt checks the ships actual energy amounts as it processes, so it will continue to run until the ships actual energy cell amounts are maxed.
Well, I think I’ve covered it, and I tested it with each ship type and each condition, but it’s pretty easy to miss stuff so let me know if you find an error.