(SCR) Shield Power Coupling v0.9

The place to discuss scripting and game modifications for X³: Terran Conflict and X³: Albion Prelude.

Moderators: Scripting / Modding Moderators, Moderators for English X Forum

jahulath
Posts: 39
Joined: Tue, 20. Apr 04, 19:44
x2

(SCR) Shield Power Coupling v0.9

Post by jahulath »

The Boron are developing an upgrade that will allow a ship to divert it's shield generators, via a special power coupling, to fill empty energy cells.
This technology comes on the back of the R&D for the Shield Boost Technology upgrade conceived by LV. :roll:

The unit is good for 100 Ecells - this is a limitation of your cargo bay, due to the way that empty Ecells are stored underneath full ones the power coupling cannot get access to Ecells stored below the first layer.
The unit will produce energy cells in cycles of approximately 5 seconds.
The number of Ecells produced each cycle is dependent on the power of the shields of the ship.
The unit has a safety feature so that it will not drain all power from the shield however the remaining shields are only capable of defending against micro meteors and similar very small hazards.
The unit will only work if there is space in the cargo bay for 100 Ecells (including any existing Ecells).
Once started the unit cannot be manually stopped, it does however have an automatic tripout that will activate when it detects 100 Ecells in the cargo bay. This tripout is designed to prevent catastrophic failure in the event that the unit exceeds it's maximum production of 100 Ecells.

Empty Ecells are always held in the cargo bay when they are depleted, they are automatically handed in for recycling whenever a ship docks, this process is invisible to the pilot however, as the empty Ecells are effectively 0 Volume and 0 value.
If you listen to station announcements you will notice occasional reminders relating to the recycling of empty Ecells. :P

Or at least thats the idea.

To Install...
Install the SPK with Cycrows Plugin Manager - Installer

Open the script editor in game and run "AddSPCtoStation" this will prompt you to shoose a station, choose an Equipment Dock

Set up a hotkey and away you go :)


I apologise for the extra step but I can't get my head around the whole "find station, add ware to station but not if already installed, find another station etc" routine

Download: you'll need to hunt for the link "» Download with FileFactory Basic"
http://www.filefactory.com/file/55a30f/ ... upling.spk

Code: Select all

I used:
T file 9500
Ware Slot 28;0;0;0;0;69;5853;0;5635;1;1;0;5635;-100000;0;0;SS_WARE_SW_NEW11;
Last edited by jahulath on Sat, 29. Nov 08, 19:44, edited 1 time in total.
The greatest tragedy in mankind's entire history may be the hijacking of morality by religion {Arthur C Clark}
User avatar
Nividium
Posts: 800
Joined: Tue, 21. Aug 07, 01:31

Post by Nividium »

Add these lines to your text file to set up custom command slot 738 <t id="738">COMMAND_TYPE_CUSTOM_38</t>

Code: Select all

<!-- Setup Ship Command Button Names in Custom Command Slots -->
<page id="2008" title="Script Object Commands" descr="">
		<t id="738">COMMAND_SHIELD_COUPLING</t>
	</page>

	<page id="2010" title="Script Cmd Names" descr="">
		<t id="738">Shield Power Coupling</t>
	</page>

	<page id="2011" title="Script Cmd Shorts" descr="">
		<t id="738">SPC</t>
	</page>

	<page id="2022" title="Command Info" descr="">
		<t id="738">This area provides space where you can write a description about your command.\n\n</t>
	</page>
Add these lines to your setup script:

Code: Select all

001   load text: id=1234 ie your text file number
002   set script command upgrade: command=COMMAND_TYPE_CUSTOM_38  upgrade=[True] (or pick a ware/equip to upgrade)
003   global script map: set: key=COMMAND_TYPE_CUSTOM_38, class=Moveable Ship, race=Player, script='name.of.your.command.script.here', prio=0
004   
As far as incorporating a new ware for the player to buy in order to use your command, I personnaly wouldn't bother. Just let them know that your script adds new functionality from their existing shield generators and let it go at that.
jahulath
Posts: 39
Joined: Tue, 20. Apr 04, 19:44
x2

Post by jahulath »

Thanks Nividium, Your the man! I actually managed to create it as a ware fairly easily once I had your base code to compare with others, I fell down with tying the code I used for setting up the hotkey to also add this as a product in equipment docks but that's not a surprise... so I cheated. :)
The greatest tragedy in mankind's entire history may be the hijacking of morality by religion {Arthur C Clark}
russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo »

great idea, but how did it end up? is it a ware that we have to purchase, or does it affect all ships as a plugin?
kelmen
Posts: 308
Joined: Tue, 9. Dec 08, 15:11

Post by kelmen »

Interesting. But why not set the limit based on the certain % of ship cargo size instead of fixed at 100?

as bigger ship will use energy at higher scale like for gateless jumping, 100 will not give the same amount of the jumping distance as small ship.
User avatar
Gazz
Posts: 13244
Joined: Fri, 13. Jan 06, 16:39
x4

Post by Gazz »

Why a % of the cargo bay? In that case, make it "enough for x jumps"...

5% of a TL is almost enough to fill a size 1 factory. =)
My complete script download page. . . . . . I AM THE LAW!
There is no sense crying over every mistake. You just keep on trying till you run out of cake.
mutantmessiah
Posts: 17
Joined: Thu, 18. Jun 09, 17:16

Post by mutantmessiah »

hmm, this download is dead... does anyone else have this?
mutantmessiah
Posts: 17
Joined: Thu, 18. Jun 09, 17:16

Post by mutantmessiah »

I suppose that's a no then.

Return to “X³: Terran Conflict / Albion Prelude - Scripts and Modding”