[Script] TerraCorps Fleet Package

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

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

RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Well, I have the collect graduates command working. I think I DO need to add code so it will only work if you select an M1 class carrier. It's too easy to send way too many ships to dock at the same ship unless it is a carrier. Maybe M1s and TLs like the Elephant. Are there other TLs that can carry 10 or more ships? I only use the Elephant...

Does anyone know of a way so that you can ONLY select player owned M1? I couldn't find anything that quit worked that way. Something like a "Select player owned ship of class M1"
--RRRoamer
JackSlaughter
Posts: 80
Joined: Thu, 22. Jun 06, 04:53
x3

Post by JackSlaughter »

RRRoamer,

Just curious, why arn't you just allowing the FBC to handle all the hiring and training?

Is it that the Task Force trains them faster???

I just recently got 2 Captains. Thats my highest rank.

Also, Maybe RRRoamer you and Siath could work in collaboration together on the updating of this Script. My thinking was maybe those one time commands you just wrote could be implemented into the Task Force Leaders abilities. What I mean to say is that he can do those automatically without the player's help.

1. What you could do is. When you create a Task Force you could set a number of ships that TF should have. So the TF Leader will use those commands to stay at that level. When the Leader gets promoted a message will popup asking you to reset your limit.
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

JackSlaughter,

Saith is working on a complete rewrite of the TCCP/TF scripts. He may or may not use any of my ideas (here and previous posts) in his new version, that will be his call.

But, there isn't a timeline when the new version will be out nor is there a definitive list of what it can and can not do. So, I'm adding a few additional commands to the current V1.50 package to help people manage their growing TFs.

As for the FBC, I gave up on them a LONG time ago. I never could get them to work properly for me and it took FOREVER to get that first Captain. In fact, this led to my first attempt at hacking the TCCP scripts: I modded the plugin.cpilots.tour script so it had an automatic restart built into it. I was trying to keep 10 to 20 combat patrols active at all times so I could build up a few people. It was killing me! MUCH easier with my modded combat tour code!

Once I have a couple of Captains (and DEFINITELY when I have a couple of Commodores or better!), they do a pretty good job of keeping all my M5s flying around working their way up to an Admiralty.
--RRRoamer
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Patch update:

Good News: I have finished writing all four commands. They seem to work very well on all of my own TF (I have tested them on eight or more different TF with no issues).

Bad News: Because the v1.50 is so old, the current version of Cycrow's script packager will not work with it.

So....

I unpackaged the TCCPTF v1.50.spk and then repackaged it as TCCPTF v1.51 with the newest packager. I was then able to create my patch to the "new" TCCPTF.

Installation was very straight forward. I just uninstalled the v1.50 spk (heck, I even had my game still open, but not active!) then installed TCCPTF v1.51 followed by the TCCPTF Additional Commands v1.0. A quick reinit cache when I went back to the game and all was up and running like nothing had changed.

Except for those four new commands in my TF leader's additional ship commands menu that is.

What this means is if you want to use my additional commands and install it with Cycrow's script installer, then you will have to "update" your TCCPTF to version 1.51 as well. And needless to say, v1.50 and v1.51 are EXACTLY the same, only packaged with a different packager.

So, I'll try to get these hosted and post the links to TCCPTF v1.51 and TCCPTF Additional Commands V1.0 here. But that will have to wait until tomorrow morning some time. Sorry!

Saith, Eladan,

If either of you have issues with me posting these spks, please speak up ASAP. I have no issue keeping distribution of these mods to PM only if you wish. And, of course, if you have any other issues with what I am doing here, SPEAK UP! I don't want to step on anyone's toes, intentionally or not.
--RRRoamer
russbo
Posts: 862
Joined: Sat, 12. Nov 05, 21:53
x4

Post by russbo »

Great job man.

any issues with existing task forces getting "annoyed" with the upgrade? I have twenty task forces running....
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

russbo wrote:Great job man.

any issues with existing task forces getting "annoyed" with the upgrade? I have twenty task forces running....
My game didn't blink and I have 10 or so TF running. Basically, you are removing a set of files when you uninstall v1.50, but then you reinstall the EXACT same files in the EXACT same place when you install v1.51. I guess if you were running the game in windowed mode and actually had the game RUNNING when uninstalled v1.50, it might cause a problem. Of course, the way scripts get cached, it might not even be an issue then.

Of course, I WOULD recommend you do any updates with the game NOT running. Just to be safe!
--RRRoamer
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

RRRoamer wrote:If either of you have issues with me posting these spks, please speak up ASAP. I have no issue keeping distribution of these mods to PM only if you wish. And, of course, if you have any other issues with what I am doing here, SPEAK UP! I don't want to step on anyone's toes, intentionally or not.
On my part, I don't have any problems with it. :)
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

RRRoamer wrote:Well, I have the collect graduates command working. I think I DO need to add code so it will only work if you select an M1 class carrier. It's too easy to send way too many ships to dock at the same ship unless it is a carrier. Maybe M1s and TLs like the Elephant. Are there other TLs that can carry 10 or more ships? I only use the Elephant...
That I can think of off the top of my head, the Elephant has 14, the Orca has 10 and the Mammoth has only 5 (I have those TL's in my current fleet). Not sure atm on the Teladi or Paranid stuff.

Running this on a carrier might be fine as far as capacity goes, but you'll need a very high ranking pilot to run it with. At least with a TL, you can use a Captain. Maybe if you could put a cap limit on hiring based on docking bay slots available?
kamov23
Posts: 23
Joined: Tue, 25. Mar 08, 23:58
x4

Post by kamov23 »

Hi, um, i'm kinda new here. One question:

What does this mod do? - I've poked around in this thread, but can't seem to find the answer to my question.

Second question:
Are some Terran ships included in the base version of x3? And if not where do i get them?
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Jumbled,

Actually, the commands I wrote do not require the transport vessel to be either a combat pilot nor part of a TF. I use my personal M1 for transporting ships around as it has the capacity I want (60 ships). Considering you are still managing the TF yourself and the whole process is not automated via the TF, I do not see any reason at all for the transport to be a combat piloted ship.

kamov23,

One, this isn't a mod, just a script package. Mods a whole different animal.

What it does is kind of up to you. In general, you can create and train combat pilots to be part of larger task forces. The TFs can be assigned to protecting up to 5 sectors (I never have more than three sectors assigned and always double up on the "home" sector). Once you have a well equipped TF up and running, you can use to to perform sector assaults to wipe out any enemies there and you can use "set race as ..." setting to set some other race as enemies when you are ready to go at them.

All in all, it's wide open!
--RRRoamer
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

eladan wrote:
RRRoamer wrote:If either of you have issues with me posting these spks, please speak up ASAP. I have no issue keeping distribution of these mods to PM only if you wish. And, of course, if you have any other issues with what I am doing here, SPEAK UP! I don't want to step on anyone's toes, intentionally or not.
On my part, I don't have any problems with it. :)

I HAVE ISSUES!!!!........ eehhh.. wait a minute!!

:lol:
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Ok. Here we go. Sorry I didn't get these posted yesterday, but I got busy with 4th of July "stuff" that started at 11 and and didn't get finished until 1:30 am on the 5th. But it was fun...

As a reminder, you have to install TCCPTF v1.51 package before you install the TCCPTF Additional Commands package. There is absolutely NO differences between TCCPTF v1.50 and TCCPTF v1.51 OTHER than the version of Cycrow's script packager used to create it. Removing v1.50 and then installing v1.51 should not result in any changes in your game. All the TFs will be there and they will all be doing what they were doing before. The TCCPTF Additional Commands does not overwrite any other scripts in your game, so you can install it or remove it at will with no impact to your combat pilots.

Step 1) Close your game (I didn't, but why take the chance?)
Step 2) Using Cycrow's Script Installer, remove TCCPTF v1.50
Step 3) Install TCCPTF v.1.51
Step 4) Install TCCPTF Additional Commands v1.00
Step 5) Restart your game
Step 6) Enjoy. Or not. Your call.

There are four new commands available in a TF leader's Additional Ship Commands menu:

1) Rebuild Task Force - (I REALLY like this one!) Basically, after selecting this command, you select the sector where the TF leader should look for more recruits. He will then go through all the ships flying in that sector (he will NOT check for ships that are docked at other ships or at stations!) and add them to his TF if they are a combat pilot and if they are not already part of an existing TF. It uses the standard TF "addto" script and actually calls it with each and every ship in the sector. It is the standard "addto" scripts protections that are keeping unallowed ships from being added, so after it is run, there is a very good chance you will have a lot of messages in your logbook saying why different ships can't be added to the TF. But all the "free" ships will have been added, up to the TF leaders command ability.

2) Collect Graduates - After selecting this command, you have to select a suitable transport vessel. Use an M1 is you have it, or possibly an Elephant. The transport does NOT have to be a combat pilot nor does it have to be part of a TF. Once you have made your selection, the TF leader will go through his entire pilot roster and will "graduate" any Lt Commander and above who is flying an M3 ship. He/she will be removed from the TF and then ordered to dock at your transport. Finally, the TF Leader will write a message to your log book to tell you how many graduates there were in this class. What you do with the graduates after that is, of course, up to you.

3) Pilots Ready For Promotion? - This command does not have any additional inputs to it. Once you select it, the TF Leader will go through his entire pilots roster and check to see if a pilot is at his max rank. There are three checks performed: a) Is the pilot at his/her max rank based on trait? b) Is the pilot at his/her max rank based on the ship class they are currently flying (eg: Captain still in an M3 can not be promoted)? and c) Are they at their max rank because the next promotion would put them at the same rank as the TF Leader (which is not allowed)? Once the TF Leader has vetted his pilots, he generates a nicely formatted letter and sends it to you via the logbook. This command DOES still have a bug in it: It will flag Commodore's flying in M6 just like a Captain in an M3. It's fairly rare that I have Commodore's in M6, but I'll fix that this weekend and post a v1.01

4) Hire Multiple Combat Pilots - This is a fairly simple command. Let's say you just bought 30 of those nice, new maxed out Harriers. You need to hire combat pilots for each of them, but you are NOT looking forward to the 150+ keystrokes required to do this. Select this command, select the ship or station where you "empty" M5s are docked, then select the transport vessel of choice (M1 is definitely preferred...) and the TF Leader will spend HIS time hiring each of the combat pilots and ordering them to dock at your transport. Of course, you STILL get the bill for each of the combat pilots, but I suspect you knew the TF Leader was not going to pay for them out of HIS pocket! This command does have a very minor bug: It is currently only available from the TF Leaders additional ship commands menu. I intended for this command to be available from ANY player owned ship's additional ship command menu. Again, I'll fix this for the v1.01 release later this weekend.

So, without further discussion, here are the packages you need:

:arrow: Download: TCCPTF v1.52

:arrow: Download: TCCPTF Additional Commands v1.13

Update Version 1.13:
T file edits only. Consistently used he/she or his/her instead of only male pronoun. Spelled out "percentage" because the % sign was causing issues with the string parser in the game. Updated the name "TerraCorp Combat Pilots Logistics Division" to a clearer "TerraCorp Combat Pilots Task Force Recruitment Division". Corrected the spelling of "TeraCorp" to "TerraCorp". Thanks for pointing out the issues and the name suggestion Erilaz!

Update Version 1.12:
(Pulling from memory, so...) Fixed a bug in the Rebuild TF script that caused script to try to add combat pilots for full task forces. None fatal as the "addto" script prevented it, but it DID throw off the new combat pilots count! Minor changes to the messages sent for various commands. Added a auto updater that should allow the commands to be restarted with a new version when it is available.

Update Version 1.11:
Fixed a bug where a Commodore flying in an M6 would be flagged as being blocked from promotion due to his ship class. Corrected the bug where the "hire mass pilots" command was only available from TF leader ships.

Update Version 1.01:
Minor bug fix, but I don't remember what all was fixed!

Update Version 1.00:
Initial release


Known Bugs:
The "Collect Graduates" command does not always find ALL LCmds in M3 ships like it should. No impact to the game, but you will manually have to remove that pilot from his training TF and move him to your transport vessel. I think the issue is because I am using the cpilots.TF.members array of ships instead of going through the complete Player array of ships and looking for the TF id. This will be corrected in a future version.

Enjoy!
Last edited by RRRoamer on Wed, 9. Jul 08, 07:12, edited 2 times in total.
--RRRoamer
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

In case anyone has any conflicts with other scripts installed in there game, here are the command slots I used:

Code: Select all

<t id="1250">CC_REBUILD_TF</t>
<t id="1251">CC_COLLECT_GRADUATES</t>
<t id="1252">CC_READY_PROMOTION</t>
<t id="1253">CC_CPILOTS_HIRE_MASS</t>
--RRRoamer
User avatar
ezra-r
Posts: 3423
Joined: Fri, 14. Oct 05, 21:04
x4

Post by ezra-r »

There was an error processing your request. The error message is:

Permission denied!

This might be a temporary problem. Please try again. If you see this message again, please report the detailed problem to webmaster@drivehq.com. We appreciate your help as we work hard to improve our web site.

I get this ^^ trying to download
jumbled
Posts: 320
Joined: Mon, 28. Jun 04, 08:22
x4

Post by jumbled »

RRRoamer wrote:In case anyone has any conflicts with other scripts installed in there game, here are the command slots I used:

Code: Select all

<t id="1250">CC_REBUILD_TF</t>
<t id="1251">CC_COLLECT_GRADUATES</t>
<t id="1252">CC_READY_PROMOTION</t>
<t id="1253">CC_CPILOTS_HIRE_MASS</t>
Well, it doesn't bother me, but according to the sticky with the slot numbers in it, it does have potential...but then that's what you get in this game. :) From what I hear, free slots are as tough to find as snowballs in hell.

Then again, some people are just lucky. Like me... I can find a snowball in hell, usually thrown in my face. :(
JackSlaughter
Posts: 80
Joined: Thu, 22. Jun 06, 04:53
x3

Post by JackSlaughter »

I too am getting the Error message for downloading.
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Sorry guys. I'll try to get that fixed.
--RRRoamer
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

Ok. Try it again. I hosted them on another service.
--RRRoamer
knieschuss
Posts: 98
Joined: Tue, 19. Jun 07, 15:47
x3

Post by knieschuss »

Hello all. I test the new version and if a pilot promoted move the task leader the pilot to m4 but he dont hire a new pilot. and i get a message like this------>>>This ship is already occupied by Rookie Ben xavier, only vacant ships may be integrated. I make mistaken or is that a script error? Or is this the xtm mod? I didnt try it in simply game yet. please help me.



Edit: Ok i look a little later and i see the task leader send the ships with no pilots to recon. In the 1.50 was that not i think.


greetings
knieschuss
RRRoamer
Posts: 332
Joined: Sat, 21. Feb 04, 02:27
x4

Post by RRRoamer »

knieschuss,

I don't see how the additional commands could cause the TF leader to send a ship on patrol with no pilot. The reason I say that is the way the rebuild script works: It only creates a list of ships, filters out who is NOT eligible to be part of a TF, then has each remaining ship call the standard "addto" script.

That script is what implements all of the "normal" checks on if a ship is eligible or if the TF leader can add another ship to his TF. Because I am calling the default scripts to add the pilots to the TF and not "rolling my own", there isn't any way for this script to mess up the local variables on each ship (which control things like if there is a pilot, rank, kill, TF, etc.).

I have seen the "This ship is already occupied by ..." error before in the plain game. I THINK what is happening is this: the TF leader finds ship A that needs to move to a bigger ship. It tells him to us ship X and dock at Y. Before ship X is docked, it finds ship B also needs to move to a bigger ship. And it finds ship X is free in space with no combat pilot, so it tells ship B to dock at Y and upgrade to ship X.

Of course, generally, the first ship A will upgrade into ship X when it arrives at Y. But, once ship B arrives at Y, it sees that ship X (now occupied by another combat pilot) is already there, so IT tried to upgrade to ship X.

The upgrade script checks to make sure the ship if available right before it performs the swap, so it sees that there is already a combat pilot in X and sends out the "This ship is already occupied by..." message instead.

If my memory is correct, you can manually do the exact same thing and get the same error message. I've encountered it a couple of times while doing mass upgrades on 10 or so ships and loose count on which "free" ship is next.
--RRRoamer

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