[Script] Fighter Base Commander V1.10 (04 Feb 2006)
Posted: Sun, 22. Jan 06, 22: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!
http://www.comp.leeds.ac.uk/dharris/FBC110.zip
http://www.comp.leeds.ac.uk/dharris/FBC110.spk
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
1.10
First advanced option (change patrol sector) added
Small fixes
1.09
Added non-standard freighters to lookup list
1.08
Fixed bug with upgrader that couldnt cope with full cargo bays
Cycrow's Remove Homebase now on v1.1
1.07
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
1.06
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
1.05
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
1.04
Fixed a naming error for the upgrade tender
1.03
Should now run out of any station, not just factories
Script should now auto-update
1.02
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
It's very much a work in progress, but I'd appreciate some testing to make sure it does what I think it does!
http://www.comp.leeds.ac.uk/dharris/FBC110.zip
http://www.comp.leeds.ac.uk/dharris/FBC110.spk
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
1.10
First advanced option (change patrol sector) added
Small fixes
1.09
Added non-standard freighters to lookup list
1.08
Fixed bug with upgrader that couldnt cope with full cargo bays
Cycrow's Remove Homebase now on v1.1
1.07
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
1.06
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
1.05
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
1.04
Fixed a naming error for the upgrade tender
1.03
Should now run out of any station, not just factories
Script should now auto-update
1.02
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