[Script] Fighter Base Commander V1.10 (04 Feb 2006)

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

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

Post Reply
Posts: 120
Joined: Wed, 6. Nov 02, 21:31

[Script] Fighter Base Commander V1.10 (04 Feb 2006)

Post by dwgh » Sun, 22. Jan 06, 23:19

I love Myros' TerraCorp Combat Project, but I hate micro-managing fleets :) So after asking Myros if I could pinch some of his code, I came up with this.

It's very much a work in progress, but I'd appreciate some testing to make sure it does what I think it does!


Fighter base commander is an add-on to the TerraCorp Combat Pilot script (written by Myros - kudos to him for letting me adulterate his code). You *must* have this installed to run this script.

Select "Hire Commander" from the station command console. You will need to select the shipyard from which to buy ships, the minimum cash to leave in the station and enter a brief name for your base (the station name will be unchanged, but the base name is used when naming the ships). The commander will then either take a jump equipped TS from the stations owned ships or buy one if needed. This will be used to purchase upgrades for your ships (note that it will also take equipment from the station if present, so an equipment dock is an ideal base).

Essentially, the FBC automatically buys ships, upgrades them, hires TCCP pilots and then trains them up until they can fly M3 class ships. As your pilots become more experienced, they will automatically be given better ships to fly (money allowing). When you have 3 idle ships, they will automatically be formed up into a patrol group.

You can add ships of your own to the base simply by making the station their homebase, these ships will be given pilots and upgraded as usual (the FBC also automatically sends ships to the nominated shipward and repairs them). Note, that apart from the base tender (the TS), only M5, M4 and M3 ships are currently used by the FBC. You can, at anytime, take ships from the station for your own use by changing their home base, thus the FBC can provide a steady stream of new recruits for your fleet. Cycrow's remove homebase script is included and can be activated via the additional commands section of your ships command console.

Currently, the FBC will only have up to 9 M5s, 6 M4s and 3 M3s. It will only buy the latter ships if it has a suitable pilot that can be moved out of a lesser ship - excess M4 and M3 ships you add will be populated as pilots gain rank.

It is recommended that you allow the FBC at least 10 million credits to run his base, although M5 only bases can be run far more cheaply.

You recruit the pilots directly, not via the TerraCorp station (which may mean Myros wont like this). The cost of having a technician setup in your station means that all costs are doubled (ie it's now 200k to install and 100k to move).

You can change the patrol sector by running the advanced options command from another command console slot. This will immediately prompt you for a sector and then send you an incoming message which will ask you if you wish to change the patrol sector. All future patrols will be sent to this new sector.

A log of the FBCs actions is generated in the main game directory as log00010.txt

Script info:
433 COMMAND_TYPE_TRADE_33 Fighter Base Upgrade Tender
1133 COMMAND_TYPE_STATION_33 Fighter Base Commander
1134 COMMAND_TYPE_STATION_34 Fighter Base Commander advanced options
Page ID 7430

Probable to dos:
1. Fix upgrades/pilot transfers (ran into some problems with stations now having a limit to the number of ships docked and having ships stuck in queues rather than upgrading).
2. Revisit the weapons upgrades - currently it just sticks in the biggest laser it can in every slot (IRE, PAC, HEPT only).
3. Add advanced configuration command - allow you to adjust loads of options.
4. Add M6s to possible purchases - will need to allow possibility of sending pilots to enemy sectors for training.
5. Allow carrier support.
6. Integrate with the Task Force Commander script to allow more useful behaviour (eg trader escort).
7. Ware collection in sector.

Version History
First advanced option (change patrol sector) added
Small fixes

Added non-standard freighters to lookup list

Fixed bug with upgrader that couldnt cope with full cargo bays
Cycrow's Remove Homebase now on v1.1

Code generally tidied
Repair script updated
Cycrow's remove homebase command integrated to avoid duplication
More detailed log file information
Tender no longer buys items if it has already managed to load some from its home station

M4s no longer sent on patrol until maxed out laser- and shield-wise
Tender now buys 1MJ shields and IREs in batches of 10 to speed M5 upgrade
Ships should now return to homebase before having pilots installed

Fixed two bugs in the upgrader, one caused the script to only look for 25MJ shields, the other caused the tender to include items that it did not have the notoriety to buy

Fixed a naming error for the upgrade tender

Should now run out of any station, not just factories
Script should now auto-update

Fixed small bug in find upgrade item which caused the first sector on the known list to be ignored
Fixed bug in upgrade script which caused the tender to give away it's shields
Removed some debug logging
Added remove homebase command to all ships (special command menu)
Added a manual script a.reset.pilot which completely removes all traces of a cpilot (very occasionally ships seem to get blocked from allowing new pilots to be hired. Hopefully this will fix that
M3 ships are no longer added to potential patrol groups
Last edited by dwgh on Sat, 4. Feb 06, 10:08, edited 13 times in total.

Posts: 267
Joined: Wed, 8. Jun 05, 18:23

Post by Valen68 » Mon, 23. Jan 06, 00:53

This sounds pretty cool. So does that mean you have to buy your own base (equipment dock)?

Posts: 120
Joined: Wed, 6. Nov 02, 21:31

Post by dwgh » Mon, 23. Jan 06, 01:06

No, it'll run out of any station. Having an equipment dock just makes the upgrading of the fighters easier...

User avatar
Posts: 1527
Joined: Thu, 5. Aug 04, 01:57

Post by NZ-Wanderer » Mon, 23. Jan 06, 01:48

Ohh an end to that micromanaging nightmare in buying new ships, pilots etc... :) :)

Am in the middle of one of the missions in the plot atm so can't help, but as soon as I can get back to the game and finish the mission I'm on will gladly give this a go.. :)

Posts: 183
Joined: Thu, 11. Dec 03, 22:43

Post by djssuk » Mon, 23. Jan 06, 02:09

I will spare a few hours over the next week testing.

Sounds great...

Posts: 183
Joined: Thu, 11. Dec 03, 22:43

Post by djssuk » Mon, 23. Jan 06, 21:41

I can't seem to find the 'Hire Comander' anywhere. I will try again...

Posts: 120
Joined: Wed, 6. Nov 02, 21:31

Post by dwgh » Mon, 23. Jan 06, 21:46

Just to check... you have the 447430.xml file in your t directory and so on?

It should appear in the station command console (just click on any of the slots to get the list of potential commands).

Posts: 183
Joined: Thu, 11. Dec 03, 22:43

Post by djssuk » Tue, 24. Jan 06, 00:00

Checked again and no command.

I have checked my T files and your fils is there and starts with

<?xml version="1.0" encoding="UTF-8" ?>
- <language id="44">
- <page id="7430" title="Fighter Base" descr="">

And all of the Fighter.Base files are in the Scripts folder.

I have looked at station command closts for a Trading station n Home of Light and nothing was there, so I tried a Cahoona Bakery in Argon Prime and it was not there.

Also, my Discos at TerraCorp also can no longer 'Hire a Combat Pilot' anymore as the command for this has also vanished.

I have tried jumping to Argon Prime to see if anything changes.

I hav not yet tried saving and reloading yet, but will try this in a bit.

Thanks for looking as I do like the idea of this and do hope to get it working.

P. S. I tried the Zip file and the spk versions.

Posts: 120
Joined: Wed, 6. Nov 02, 21:31

Post by dwgh » Tue, 24. Jan 06, 00:57

Note to self, try to include all the files in the pack... doh!

Forgot to add the setup file, will update the links when I've uploaded the complete packs. No idea why that should have affected your discos though as I left the original cpilot scripts untouched.

Anyway, shouldnt be more than 5 minutes...

Posts: 183
Joined: Thu, 11. Dec 03, 22:43

Post by djssuk » Tue, 24. Jan 06, 14:29

Many thanks.

I will try again tonight.

The Disco thing was a coincidence... a timing thing...

Posts: 120
Joined: Wed, 6. Nov 02, 21:31

Post by dwgh » Tue, 24. Jan 06, 19:28

Small update

Posts: 245
Joined: Sat, 14. Feb 04, 12:15

Post by Blinki1984 » Tue, 24. Jan 06, 19:42

nice work

Posts: 183
Joined: Thu, 11. Dec 03, 22:43

Post by djssuk » Tue, 24. Jan 06, 23:44

I was using 1.01 with a few mixed results so far.

Firstly, the command only seems to be available in goods based shipyards such as solar plants. It is also available at 'HQ'. It is therefore not avaialbe at Trading Statinos, or so it appears.

The Command 'Hire Commander' is not present at any station, although I have a Fleet Command option (can't remember the name). Triggering this seems to do the job.

I waited a while after selecting a Shipyard in Trinity Sanctum (my base in Home of Light) but nothing hapened, so I purchased a few M4 Pegasus ships and assigned the home as my chosen station. This renamed the ships to the chosen (typed in) name and the number afterwards. I waited a while but nothing occured.

I have also assigned an Argon Mercury as to my station (home) but this did not move from the Shipyard.

Anyway, I will now try version 1.02 and have another go.

Comments to follow...

Posts: 1263
Joined: Sat, 3. Dec 05, 04:40

Post by Saint-Ashley » Wed, 25. Jan 06, 00:43

Code: Select all

012   global script map: set: key=COMMAND_FB_HIRE_COMMANDER, class=Factory, race=Player, script='fighter.base.automate', prio=0

Inside your Script setup.fighter.base line 12 if you change the Class value to Equipment Dock or possibly Station? The hire commander command will appear under that classes additional commands. I set it to Equipment Dock personally and hired a commander at a dock.

Script seems to work good so far... but if everyone is takeing your suggestion about equipment docks they will not see the hire commander command as of yet...

Also fellow gamers upon hireing a commander at a station a map will pop up asking to select a position select the shipyard that you wish your commander to use, the rest is self explanitory.

Planning on further tests later tonight...
Last edited by Saint-Ashley on Fri, 27. Jan 06, 19:18, edited 1 time in total.

User avatar
Posts: 910
Joined: Tue, 13. Apr 04, 23:08

zip file corrupt

Post by Malakie » Wed, 25. Jan 06, 06:06


The zip file is corrupt. I needed it because I wanted the text file readme. I normally use the package tool script installer but that says there is no readme even though it lists one.

So, You might want to update both packages!


Post Reply

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