[Script] TerraCorps Fleet Package

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

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

yusep
Posts: 35
Joined: Thu, 22. Jan 09, 19:37

Post by yusep »

Ok, no problem.
Ey thx for all eladan, ure the best 8)
User avatar
angelSak
Posts: 252
Joined: Tue, 5. Jul 05, 21:33
x3tc

Post by angelSak »

Hola Yusep, ese script y otros los puedes encontrar en la página del foro off topic

http://universo-x.forospanish.com

pero si quieres el script todavía lo puedes encontrar aqui

http://rs363.rapidshare.com/files/13815 ... Armada.exe

un saludo
User avatar
angelSak
Posts: 252
Joined: Tue, 5. Jul 05, 21:33
x3tc

Post by angelSak »

Hello

I have a suggestion to improve the script, the idea is:

When you hire a pilot in Terracorp you can see his skills (born leader, brilliant etc ) from him form the first time.

Them players can save, hire a pilot and if there does not have a good skills, can load and return to try, you can have a fleet of Born Leaders.

My idea is that the skills of the pilots appears when the pilot reaches a certain range (Ensing for example). So the player does not know the skills of his pilots and takes care and protects them until it has a sufficient level to defend itself.

thanks for all
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

It would be a very trivial change to implement that - would just need to change the cplilot report to not display the trait if the rank was below ensign. But... I'm not usually in favour of putting in restrictions simply to stop people from using workarounds - if people really want to reload until they get all born leaders, well, that's up to them. I wouldn't do it, but I don't see that as a reason to stop them from doing it in their game.

If you want, I can tell you what to change and where, but I doubt I'd incorporate it into the main package.
User avatar
angelSak
Posts: 252
Joined: Tue, 5. Jul 05, 21:33
x3tc

Post by angelSak »

Do not worry, it was only a suggestion. In addition could feel the range seeing the points of leadership (10 = born leader 5 = brilliant, etc).

I would like it is to know how modify plugin.cpilot.report.xml in order that the file log08069.txt shows more information (Combat Tour, age, etc) to be able to take a better control of my pilots.

Thank you for everything
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

I'll have to refresh my memory before I can tell you what you need to do, sorry. :) Haven't had a look at it for a while.

Give me a day or two.
User avatar
angelSak
Posts: 252
Joined: Tue, 5. Jul 05, 21:33
x3tc

Post by angelSak »

three o four, o five o six dont worry
Mahijiru
Posts: 17
Joined: Mon, 24. Oct 05, 09:29
x3

Questions about XP and more

Post by Mahijiru »

First things first: Nice scripts, very nice. Thanks to everyone involved.

I try to understand the XP gaining system (which member of a task force gets how many XP when and for what?). Skimmed the scripts and came up with the following conclusions (or errors probably :)) and questions.

TF leader: gets one XP for every mission one of his minions finishes (recon, patrols, escort jobs etc.). If not personally involved there are no xp for kills, no gaining of leadership (unless the traitrun.script is called). As detailed in addon.cpilots.TF.manager.

TF members:
escort: 3 XP per finished mission. No XP for possible kills. No leadership (addon.cpilots.TF.escort)
recon: 3 XP per finished mission. No leadership. No xp for kills, well, there won’t be many anyway.... (addon.cpilots.TF.scout)
patrols and attacking: patrol (attack) leader: 5 XP per finished mission, 1 leadership, 6 XP for any enemy personally vanquished.
followers: 3 + x XP (x depending on the leadership value of the patrol leader and depending on rank differences), no leadership, 6 XP for own kills.
Is that right?


In addon.cpilots.TF.manager the escort job is finished after 15 minutes (lines 6 and 244), the attack job after 30 minutes (lines 5 and 266).
In addon.cpilots.TF.escort I found 15 HOURS (line 14 and 20) for the escort job and in addon.cpilots.TF.attack 15 minutes (lines 1 and 76) for the attacking job. :?

Sorry for the somewhat lengthy post but I like this package and really want to know how it works.

Thanks in advance.
R.
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

angelSak wrote:I would like it is to know how modify plugin.cpilot.report.xml in order that the file log08069.txt shows more information (Combat Tour, age, etc) to be able to take a better control of my pilots.
Sorry it took so long.

Essentially, the 8069 log file is an undocumented feature. I had been working on it, but the fact that I couldn't get rid of the colour codes being shown (and incidentally making the log file fairly difficult to read) led me to postpone it until a planned rewrite of the naming code.

Adding combat tours is easy enough - simply replace the first of the null arguments on $second.txt at line 94 with the $tours variable. You'll probably also want to replace the corresponding null entry on the $second.txt at line 60 with a string 'Tours'.

For age, you'd need to add a couple of lines in the group of 'get local variable' statements after line 68:

Code: Select all

$birthday = [THIS] -> get local variable: name='birthday'
$age = $galaxyage - $birthday + 17
Then, do the same as with tours - change the next null argument in line 60 with string 'Age', and in line 94 with the $age variable.

Adding any other vars is much the same. Basically, the top part of the script (lines 1-57) are to do with writing that individual pilot report to the message log, while the rest of the script is for the log file. If you want stuff like the medal info, it's a bit more tricky - the lines controlling it in the pilot report are 15 (reading the medal info) then 29-49 for processing the medal info into a printable string $fourth. You would need to reproduce those lines in the 'get local variable' area after line 68, and add $fourth in the same way as $age and $tours.

If you run out of nulls to replace on the $second.txt strings at lines 60 and 94, things get a little trickier - you'd have to create a $third.txt and either edit the t files to add another line, or just use the standard sprintf (non page id/t id) and then replace the next null in line 95 with $third.txt

Hopefully, I haven't confused you totally. The report script is a bit of a mess, which makes explaining it somewhat difficult.
Mahijiru wrote:TF leader: gets one XP for every mission one of his minions finishes (recon, patrols, escort jobs etc.). If not personally involved there are no xp for kills, no gaining of leadership (unless the traitrun.script is called). As detailed in addon.cpilots.TF.manager.
Correct.
TF members:
escort: 3 XP per finished mission. No XP for possible kills. No leadership (addon.cpilots.TF.escort)
Correct.
recon: 3 XP per finished mission. No leadership. No xp for kills, well, there won’t be many anyway.... (addon.cpilots.TF.scout)
Correct.
patrols and attacking: patrol (attack) leader: 5 XP per finished mission, 1 leadership, 6 XP for any enemy personally vanquished.
followers: 3 + x XP (x depending on the leadership value of the patrol leader and depending on rank differences), no leadership, 6 XP for own kills.
Correct.
In addon.cpilots.TF.manager the escort job is finished after 15 minutes (lines 6 and 244), the attack job after 30 minutes (lines 5 and 266).
Correct.
In addon.cpilots.TF.escort I found 15 HOURS (line 14 and 20) for the escort job and in addon.cpilots.TF.attack 15 minutes (lines 1 and 76) for the attacking job.
For the attack job, correct. For the escort job, it's probably safe to ignore that value. While the check is there, it really isn't necessary - it's meant to last as long as the ship being escorted is in sector.

The values in the manager script are really supposed to be safeties - the manager script checks how long the job has been running, and if it's overtime, it will pull the ship off it. That's why the values don't necessarily match the ones in the actual job scripts.
Mahijiru
Posts: 17
Joined: Mon, 24. Oct 05, 09:29
x3

Post by Mahijiru »

Hi eladan,
thanks for answering.

Well, out of this long list of developers/contributors/supporters you seem to be the last of the mohicans. So, I guess you have the questionable honour of being my contact person :wink: .
Have you any further plans for this package? Are you interested in reports of oddities, possible bugs, simple questions about parts of the code or requests of additional features? In times of TC I don’t want to bother you with relics...
eladan
Posts: 7168
Joined: Sat, 7. Jan 06, 16:01
x4

Post by eladan »

No, I've currently no further plans.

I'll certainly hear any oddities/bugs or requests for new features, yes, on the understanding that they may or may not be acted upon. :)

Happy to answer any questions as well.
Mahijiru
Posts: 17
Joined: Mon, 24. Oct 05, 09:29
x3

Post by Mahijiru »

Last words first ( to all those people not knowing the package):
If this post seems to indicate that this package doesn’t work well, I did something wrong. These scripts are just great. I had and have a lot of fun watching my cpilots bringing peace and order to the universe.


Hi eladan
during the last days I unintentionally managed to set up a nice testing ground for one of my TFs. Bulks of pirates in Ianamus Zura and New Income confronting a Commodore and his TF.

My observations (please forgive me when I mention things well known to you, I failed in digging through all posts of this topic.).

a)
A squad of three Medusas got slaughtered (painfully slow by M4s and M5s) without defending themselves. The squad leader’s menu showed Command: none and Action: none, his followers were set to attack the same target. According to the TF report of the TF leader, those three ships should be on sector patrol. Well, they weren’t.
After reloading and intervening personally to protect them I just waited. Two ingame hours later they still did nothing, while the TF report still mentioned them as on patrol duty.
When I made them leave and rejoin the TF, they were being sent into the fray very soon.
Maybe this defencelessness is the explanation for several losses of TF pilots assigned to M3+ fighters I found surprising. The standard pirate patrols shouldn’t be able to kill a TF squad of fully equipped LX or Medusas, not when they are fighting back. Well, they could be killed while resting/being off duty and having no carrier to dock to.
Is it possible without too much effort to make TF members capable of reacting to such “personal” threats, maybe via your signal when targeted scripts? No cpilot should be a sitting duck...

b)
Not so rarely a patroling/attacking TF squad attacks and kills one or more enemy fighters out of a larger group. But instead of finishing the job and killing all of them they move on with their patrol, leaving the enemy alone (even if they’re pursued by the leftovers). The leader’s menu shows Command: Attack Pirate Nova (eg) while Action is: move to Ianamus Zura or flying to position. Sometimes it is difficult to determine (too many Pirate Novas in the sector) but I’m quite sure the ship they “targeted” still exists. This occurs also with standard (non TF) patrols. I used the built-in debugging tools to get some enlightenment about this behaviour. To no avail, all I found was that sometimes the go.combat.scipt “activates” the fight mode, sometimes not. I have no clue why...

c)
Every now and then a whole TF is doing nothing. All members are either off duty or resting for hours of ingame time. When I checked the TF leader (sitting in a M6) I learned that he is looping through one of the addon.cpilots. TF.automove files. I got rid of this nuisance by substituting “Carrier” by “M1” in the TF.tracker file (line 175 ff). Well, it seems to work, at least for now....

d)
I also encountered the good old FBC shutting itself down problem. I have 4 bases, all of them stopped working somewhere along the line. One of them after several days, another one after several hours. Stopping the command and restarting it helps for some time. Sooner or later they shut down again, some of them sooner, some of them later. So much for consistency...
When I tried to check I saw that the fighter.base.action script isn’t given the correct number of ships. The loop in line 16 doesn’t start because allegedly there aren’t enough available ships. Maybe because of line 197 ff in the automate.script?

Thank you for still being with me. I would appreciate any kind of tip/hint/explanation you can offer.
Thanks in advance.

R.
dmichailcz
Posts: 170
Joined: Thu, 18. Jun 09, 13:18

Post by dmichailcz »

Hello,

really great script, thanks a lot, but i have small problem and need advice:

I set up a small Task Force - M7 Hyperion with Commodore as Leader, two M5s and two M3+ - and assigned them sectors to patrol. M5 have docked with M7, that's good, and now problems began - M7 went to first selected sector and is just sitting there now and watching Pirates attacking Argon stations in that sector. I requested report from leader and he is reporting, that all ships are off duty. What do I do wrong? I am newbie, please, help me! :-)
Rive
Posts: 2260
Joined: Fri, 24. Apr 09, 16:36
xr

Post by Rive »

I have some problems with the fleet too. For a time I manually managed my fighters, and moved some ensigns from a training buster to LX's.
- the empty buster still has the pilot name in the ship name, of course no pilot shown
- the LX still has the original name, pilot is in place
- the patrol leader M6 can't find the wings in the LX -> no duty started.

Finally I started a base commander in my HQ, and some problems are solved, but I still have a buster dedicated to pilot A and flight by pilot B.
Mahijiru
Posts: 17
Joined: Mon, 24. Oct 05, 09:29
x3

Post by Mahijiru »

AFAIK a TF leader will NEVER take part in any activity. He is just sitting in his ship, coordinating operations and issuing orders. I think I've read somewhere in this topic about one exception: When you manually order an assault on a sector, the TF leader will engage. Never tried it though.

About all the TF members being off duty:
You can try to disband and rebuild the TF and/or reassign sectors to the TF.

Hope this helps.
dmichailcz
Posts: 170
Joined: Thu, 18. Jun 09, 13:18

Post by dmichailcz »

@ Mahijiru: Thanks for reply, but i tried to do, what you suggest - Disbanding and rebuilding TF, several times, same with reassigning, still not doing anything.

Even if leader don't participate, he is still just sitting with ship in first sector, watching enemies, his two M5s docked onboard. And if i understand it correctly, he should send M5s to explore sectors for enemies, am I correct?

And i tried command "Assault sector" - TF moved correctly to that sector, engaging enemies (leader too), but after some kills, they stop and leader command is "None Pirate Buster"...

@Rive: Stupid question, but have you waited? It take some time to start the script (i remember three Novas sitting in shipyard for 2 game minutes, even with homebase assigned to training base).
Rive
Posts: 2260
Joined: Fri, 24. Apr 09, 16:36
xr

Post by Rive »

if i understand it correctly, he should send M5s to explore sectors for enemies, am I correct?
Maybe he should send out whole M5 patrols? That means three M5 in a group I think. If there is only two, then he is correct, there isn't enough ship for a patrol. If no patrol, then there is no input about hostiles, so nothing to do...

But I'm only at the starting point, so it is only my humble opinion...

Stupid question, but have you waited? It take some time to start the script ...
Yep. The pilot move was complete, the renaming isn't. I will try it later again, for now the base commander solved the problem. Good to now that there is a competent officer on the salary list :)
dmichailcz
Posts: 170
Joined: Thu, 18. Jun 09, 13:18

Post by dmichailcz »

Good to now that there is a competent officer on the salary list Smile
You are true :-) From my point, there must be error in your script (i am not pretending to understand scripts, just opinion ;-)), maybe conflict between scripts? Just opinion, someone clever can possibly give you advice...
Maybe he should send out whole M5 patrols? That means three M5 in a group I think. If there is only two, then he is correct, there isn't enough ship for a patrol. If no patrol, then there is no input about hostiles, so nothing to do...
I know that this mode use three-member patrols, but somewhere (in readme, i think) is said, that TF leader uses up to M5. I understand that as leader is sending solo scouts to scout sectors for him... But i will try that now and report... Thanks for advice.

EDIT: Yes, problem is not in three-member patrols... Now my TF consist of 3 M5s and M7, i assigned them 5 sectors to patrol, but still, nothing happened...
I am not very good in english, so please, forgive me...
dminor
Posts: 1083
Joined: Sun, 14. Oct 07, 00:16
x3tc

Post by dminor »

Mahijiru

I've seen 'A' in action before. I belive its caused by the hanger bay being full when the patrol is returning. I found that limiting the TF to the amout of hanger space the TFL was a way to work around it.

Eladan

I've been busy with XTC. Did you find the time to include the new patrol script you where working on way back when.
" I'm a Sexy Shoeless GOD of WAR " Belkar
Rive
Posts: 2260
Joined: Fri, 24. Apr 09, 16:36
xr

Post by Rive »

Good to now that there is a competent officer on the salary list :)
Te 'competent officer' simply fired every problematic pilot :evil: Never mess with military personnel.



... Yes, there must be some conflict between scripts. I must find some time to look around it.

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