How do I add Stations to a Shipyard

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

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

Post Reply
Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

How do I add Stations to a Shipyard

Post by Scoob » Mon, 19. Aug 19, 22:39

Hey all,

Playing X3AP with the Litcube mod again and I wanted to tweak things slightly.

Basically, I'm doing a pirate start role play, just cos, and I'd like to add some basic stations to a couple of the Pirate Shipyards. Namely, I'd love to add a purchasable Pirate Base initially and perhaps some other basic stations, but the Pirate Base is the main one. I'd usually just buy an Argon Trading Station as my first "base" so to speak, but it doesn't seem quite right in this playthrough - plus the Pirates will kill any TL I hire to bring said station to my Pirate Sector home.

Perhaps there are old "cheat" type scripts that allow this, but I'd like some raw code ideally so I could tweak it further.

Soo very long since I did any scripting, so if someone knows how to do this, it'd be great if you could help.

Cheers,

Scoob.

User avatar
Joubarbe
Posts: 4796
Joined: Tue, 31. Oct 06, 12:11
xr

Re: How do I add Stations to a Shipyard

Post by Joubarbe » Mon, 19. Aug 19, 23:17

Not entirely sure if that's the way to add stuff to shipyards:

Code: Select all

$shipyards = find station in galaxy: startsector=[Ianamus Zura] class or type=[Shipyard] race=null flags=[Find.Multiple] refobj=null serial=null max.jumps=50 num=999
$pirateBase = {Pirates Pirate Base (DOCK_PIRATES)}
$pirateBase =  $pirateBase -> get ware type code of object
for each $shipyard in array $shipyards
  $shipyard -> add product to factory or dock: $pirateBase
  = $shipyard -> add 999 units of $pirateBase
end

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: How do I add Stations to a Shipyard

Post by Scoob » Wed, 21. Aug 19, 00:43

Thanks Joubarbe, I'll have a play around with that. I just want to add it to Pirate Shipyards, so hopefully I can refine it a little to do that.

Edit: You know, the single biggest problem with the internal script editor is that you have to find the commands you want!

Appreciate you taking the time.

Scoob.

Post Reply

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