[Script] HQ build ships - auto upgrade v1.4 [Updated 22/02/2007]

The place to discuss scripting and game modifications for X³: Reunion.

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

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

[Script] HQ build ships - auto upgrade v1.4 [Updated 22/02/2007]

Post by DeltaWolf » Wed, 6. Dec 06, 10:59

Idea came from sc_hornetAMF see this

Readme:

Code: Select all

Auto upgrade and Auto Dock commands v1.4

Two new commands:

1) Auto Upgrade: (v3)
Activated via Station command console

This will upgrade a docked ship with max Engine Tunings, Rudder optimization, and Cargo space, and install Navigation Software, Trade Command Mk1, Trade Command Mk2, Fight command Mk1, Fight Command Mk2 Special Command Software, and Triplex scanner
It will do this for all your ships as long as you've got enough credits.

It will also add the max shields to your ship, if the shields are available on the station.(Bought or made by player)

2) Auto Dock (v2)
Activated via Station command console

This will find all your ships in the same sector as the station, if it is doing noting eg command is NONE, it will tell the ship to dock at the selected station (if possible)

text file / text id used : 8970

Commands used:

<t id="1152">COMMAND_TYPE_STATION_52</t>
<t id="1153">COMMAND_TYPE_STATION_53</t>

Download:

Zip file : here
Spk file: here (plugin manager required from here)

version history:
v1.4 - fix some errors
v1.3 - fix problem with cost being too high
v1.2 - player ship will be ignored when the autodock command is running
v1.1 - fixed small error, improved programming
v1.0 - added shields to upgrades
v0 - initial release
Last edited by DeltaWolf on Thu, 22. Feb 07, 08:26, edited 5 times in total.
Click image below for link to F.A.C.T.S.

Image

djkaos
Posts: 73
Joined: Fri, 5. Mar 04, 01:19
x2

Post by djkaos » Wed, 6. Dec 06, 12:01

Very handy. Good job :thumb_up: Does it give them shields?

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

Post by DeltaWolf » Wed, 6. Dec 06, 12:48

No - you have to install that yourself
Click image below for link to F.A.C.T.S.

Image

User avatar
arcana75
Posts: 2158
Joined: Tue, 2. Dec 03, 10:28
x3tc

Post by arcana75 » Wed, 6. Dec 06, 13:32

djkaos wrote:Very handy. Good job :thumb_up: Does it give them shields?
Extending it shouldn't be a problem! Good job! :thumb_up:

xalien
Posts: 1803
Joined: Fri, 12. Mar 04, 02:03
x3tc

Post by xalien » Wed, 6. Dec 06, 13:32

A suggestion - add an option to install jumpdrive/transporter IF you have a good enough rep with Argons (for jumpdrive only) or Goners (for both) to sort-of buy them.

User avatar
arcana75
Posts: 2158
Joined: Tue, 2. Dec 03, 10:28
x3tc

Post by arcana75 » Wed, 6. Dec 06, 14:19

plugin.upgrade.ship

Code: Select all

118   * --- Fit max shields
119      $money = get player money
120      $shield.type = $ship -> get max. shield type that can be installed
121      $max.shields = $ship -> get number of shield bays
122      $shield.cost = get average price of ware $shield.type
123      $up = $ship -> get true amount of ware $shield.type in cargo bay
124      $cost = $max.shields * $shield.cost
125      if $money > $cost
126       if $up < 1
127        $cost = $cost * -1
128        = $ship -> install $max.shields units of $shield.type
129       end
130      else
131       goto label nomoney
132      end
133   * --- Fit max shields
Hope that works! :D Can't test it cuz I have yet to build anything at my PHQ.

DeltaWolf hope you don't mind...

The same idea can be added to include anything else you want in your PHQ-built ships, as long as the requisite checks are made.

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

Post by DeltaWolf » Wed, 6. Dec 06, 14:51

Yes I do relize that, but the whole idea was to add basic stuff so that you don't have to send the ships you build to an Equipment dock to get Engine Tunings and Rudder optimizations, eg equipment you can't make yourself. It's a balancing question - I don't want to make it too easy for the player.

Shields you can make yourself and transport it to your HQ.

Jumpdrives and other software, you still need to buy at Terracorp HQ or Goner temple (that's the way it's suppose to be :D )

Nothing stops you from adding other equipment to the script yourself.
Click image below for link to F.A.C.T.S.

Image

fud
Posts: 6989
Joined: Wed, 25. Jan 06, 15:26
x3

Post by fud » Wed, 6. Dec 06, 15:05

Wow, long time no see.

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

Post by DeltaWolf » Wed, 6. Dec 06, 15:31

Yes I'm back :twisted:
Click image below for link to F.A.C.T.S.

Image

Cedrk
Posts: 79
Joined: Sat, 8. Jul 06, 01:59
x3tc

Post by Cedrk » Thu, 7. Dec 06, 03:34

Can you make the script check for shields from the station items and install them as well

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

Post by DeltaWolf » Fri, 8. Dec 06, 08:18

Cedrk wrote:Can you make the script check for shields from the station items and install them as well
Done - see new version
Click image below for link to F.A.C.T.S.

Image

Cedrk
Posts: 79
Joined: Sat, 8. Jul 06, 01:59
x3tc

Post by Cedrk » Sat, 9. Dec 06, 01:28

Thanks Delta

I did think about weapons as well but I don’t think it would be a good idea because you might want different weapons on different ships.

User avatar
arcana75
Posts: 2158
Joined: Tue, 2. Dec 03, 10:28
x3tc

Post by arcana75 » Sun, 10. Dec 06, 15:32

DeltaWolf, is it me or did you forget to deduct the credits for some of the software extensions?

User avatar
DeltaWolf
Posts: 594
Joined: Tue, 6. Jul 04, 08:48
x3

Post by DeltaWolf » Mon, 11. Dec 06, 08:27

Yes I did forget :D

Fixed in new version.
Click image below for link to F.A.C.T.S.

Image

rubberman
Posts: 87
Joined: Wed, 6. Nov 02, 21:31
x3tc

Post by rubberman » Mon, 11. Dec 06, 14:10

Auto dock function appears to effect the playership as well, most disconcerting when fighting pirates in the same sector as my HQ to find the autopilot take control and suddenly change course a head for the HQ.


:?

Post Reply

Return to “X³: Reunion - Scripts and Modding”