Wing Equip Like fix and extension v0.03 [BETA] 11/20/08

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

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Wing Equip Like fix and extension v0.03 [BETA] 11/20/08

Post by morbideth » Mon, 17. Nov 08, 09:50

This a replacement and extension of the standard wing equip like command in that it includes cargo, engine, and rudder upgrades. This command can be found in the special menu of the wing command console, it requires at least one ship in the wing with supply command software. When you use the command you will be asked to select the ship you with to use as a template for the ships in the wing.

How it works:
Once you have chosen your template ships all ships in the wing with both supply command software and a transporter device will be temporally removed from the wing. Since I've been using Luckie's scripts so much lately I will call this group the supplier group. The ships remaining in the wing will be referred to as the consumer group.

The script then checks to see if any of the consumers are without shields, if so the suppliers supply all the consumers with the shield of the template ship.

Following that, all the consumers will then fly to the nearest station that sells cargo, engine, and rudder upgrades and buy the max their ship can have. The consumers will then fly around from station to station buying all the same equipment the template ship has. Equipment in this sense means the software type upgrades, fight command software mk1, navigation command software mk1, ect. that are listed in the ship equipment section of the in-game encyclopedia. During this period the suppliers will remain idle. Once a consumer has finished buying all the equipment it needs it will return to where it started.

After all consumers have purchased the required equipment the suppliers will equip all the consumers with all the remaining items that the template ship has and they do no: weapons, ammo, missiles, shields, and anything else in the template ships cargo hold. Once a supplier is finished with a consumer it will be assigned another one until all consumers have or have had a supplier assigned to them.

Each consumer is only assigned one supplier to equip it, regardless of whether or not the supplier has enough cargo space, or the right size of cargo hold to perform the task.

If no ships in the wing have both supply command software and a transporter device, only the upgrades and equipment portion of the script will have any effect.

Once all consumers have been equipped the suppliers will be returned to the wing and the script will exit. If you stop the script before this happens the suppliers will not be automatically returned to the wing.

Note: Suppliers will not equip each other, nor will they purchase upgrades or equipment, this is intentional.


Uninstall previous versions before installing this version.
v0.03 Script pack Download:
[ external image ]


This is a fully functional version, just need more people to test it.

Change log:

v0.03
-Combined previous two scripts into one command.
-Fixed a bug that would cause a ship to be skipped.
-Fixed a bug that would case a ship to skip buying some equipment if the next item on its list was at its current station.


Older versions:
morbideth wrote:This is an extension of the equip like command. It add an addition command in the wing -> special menu, "Equip like ext". When used this will command all ships in the wing to go buy each software upgrade the selected ship has, but first they will go buy the max amount of cargo, engine, and rudder upgrades they can. (the amount is hard coded atm, it will be changed in later version) Once a ship has finished buying all the equipment it will return to where it started.

This only works for upgrades and equipment; lasers, missiles and other cargo are not considered.

At least one ship in the wing must have supply command software. This command will still run on all ships if they don't have supply command software, but one ship must have it in order to tell the others where to go.

Script pack Download:
[ external image ]

If you find any bugs please inform me here.


Commands
WING_COMMAND_SPECIAL_29

t file
7529

-------------------------------------------------------------------------------------

After further inspection (read I tried to use it) I realized the standard wing equip like command was broken. Below you will find a fix, this is an early release. It has not been extensively tested as I am running out of ships that need equipping and stuff to equip them with.

Also, this is not a complete bug fix for all the equip like problems, it is still only slightly better then the single ship equip like command as it uses egosoft scripts.

How it works: all ships in the wing with BOTH a transporter device and supply command software will be used to equip the other ships, these ships will only be used to equip the others, no be equipped themselves. Each of the ships without those two upgrades will receive one, and only one ship to equip them. If you have more then one ship with both upgrades they will be assigned to different ships. Once a ship finishes equipping another ship it will be assigned to any remaining ships that need equipped within a few seconds.

Unlike the standard command this does not do equipment, you are expected to you the above extension script for that. Like the standard command this does not check the cargo size of the ship before assigning it to equip a ship. Meaning if you try to equip a wing of ships with L and XL size equipment using 2 L cargo size and one XL cargo size ship. It will not use the L cargo size ships to equip what they can, then use the XL size cargo ship to equip the rest. Each ship will be given a different assignment and what the L cargo size ships cant carry will simply be skipped on their ships.

Currently these are two separate and independent scripts, they will be bundled into one as soon as I can get them to work together.
[ external image ]
Last edited by morbideth on Thu, 20. Nov 08, 19:33, edited 2 times in total.

StarCrack
Posts: 235
Joined: Thu, 3. Apr 08, 05:27
x3tc

Post by StarCrack » Wed, 19. Nov 08, 05:03

Sweet Thanks

User avatar
Sandalpocalypse
Posts: 4447
Joined: Tue, 2. Dec 03, 22:28
x4

Post by Sandalpocalypse » Wed, 19. Nov 08, 10:49

Is this how the Equip Ship Like command works normally? That explains a lot.
Irrational factors are clearly at work.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth » Wed, 19. Nov 08, 19:54

no, the standard wing equip ship like command is broken... badly... it tries to use your wing to equip 1 ship instead of the other way around.

amirite
Posts: 243
Joined: Thu, 23. Oct 08, 22:01

Post by amirite » Wed, 19. Nov 08, 20:23

I think he's talking about the vanilla SHIP version of the command, not the Wing one. I was confused about how to use it as well.

So by 'selected ship' do you mean the Targeted ship? Or do I need to select the command first, then a template ship?

VVV Sounds perfect, I'm gonna try this tonight!
Last edited by amirite on Wed, 19. Nov 08, 21:44, edited 1 time in total.
-TEVE

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth » Wed, 19. Nov 08, 20:36

amirite wrote:I think he's talking about the vanilla SHIP version of the command, not the Wing one. I was confused about how to use it as well.

So by 'selected ship' do you mean the Targeted ship? Or do I need to select the command first, then a template ship?
You are only given one selection for the wing command, and that selection is the template ship.

For the standard single ship equip like command, the first one is the template and the second is the one you want to equip.

If you are having trouble with the standard single ship command try clearing any homebase assignments. It appears egosoft used an XAI script that was used for something like carriers, so when you have a homebase set it confuses the script and it either starts thinking its working for a carrier and hangs up, or tries to kill john conner... its a toss up.

morbideth
Posts: 391
Joined: Sun, 9. Nov 08, 03:07
x3tc

Post by morbideth » Thu, 20. Nov 08, 19:59

update v.03, bug fixes and combined to use 1 command slot.

ThisIsHarsh
Posts: 1135
Joined: Sun, 19. Oct 08, 18:46
x3tc

Post by ThisIsHarsh » Thu, 20. Nov 08, 21:00

This sounds awsome, exactly the type of script I love. Gonna grab asap... just need a wing to use it on now.

EDIT: Megaupload is not cool. I used to use HyperFileShare, still not perfect, but none of this 'enter letters' and having to wait to download.

Matchimus
Posts: 34
Joined: Wed, 26. Nov 08, 21:06
x3tc

Post by Matchimus » Thu, 27. Nov 08, 01:10

Anyone been having probs with this script? My ships just sit there doing nothing..like for an hour, the supply ship doesnt leave the wing and they are all stationary. I have the supply software and all that, and the are parked on top of an equipment dock. Is there a number limit to the wing? I am trying to 18 ships at once atm. Thanks.

Edit: It JUST started working! Guess I scared em by maiing a post on the forum :P AWESOME script, thanks so much! Now I just need one that duplicates all the turret commands and I am SET for carrier wings!

Jar B
Posts: 292
Joined: Tue, 18. Jan 05, 14:07
x4

Post by Jar B » Sat, 29. Nov 08, 16:57

The Force not strong in megaupload UI is. We shall abandon that space... :)

Jar B
Posts: 292
Joined: Tue, 18. Jan 05, 14:07
x4

Re: Wing Equip Like fix and extension v0.03 [BETA] 11/20/08

Post by Jar B » Sun, 30. Nov 08, 12:16

morbideth wrote: After all consumers have purchased the required equipment the suppliers will equip all the consumers with all the remaining items that the template ship has and they do no: weapons, ammo, missiles, shields, and anything else in the template ships cargo hold. Once a supplier is finished with a consumer it will be assigned another one until all consumers have or have had a supplier assigned to them.
Now that I've read it again I wonder if the cargo hold of a single supplier will be devided by n where n is the number of consumer ships. If so I'll wonder why. Isn't the laser/ammo supply issue for wings one of the tricky things, too? And what about priority upgrades? Upgrading engines first reduces overall round trip times - I haven't checked the code nor managed to get it startet.

Matchimus
Posts: 34
Joined: Wed, 26. Nov 08, 21:06
x3tc

Post by Matchimus » Sun, 30. Nov 08, 19:32

What I do is load up a TL ahead of time with the shields/weapons/missles and park it near a EQ. (I should mention the TL is usually loaded with the fighters I am planning on equiping like. ) I then send the Equip Wing Like command and it takes a bit, but first off the TL beams aboards shields, then they all head merilly to the EQ where they buy extensions, tunings, rudder and all that. After that has finished the TL loads them up with the weapons/missles that I already collected for the fighters. Seems to work fairly efficiently this way. You can also use it more or less the same way to equip M6's for example, I just have the M6's follow the TL (loaded with stuff) to the EQ. Works great and saves my fingers!

tontonfred
Posts: 126
Joined: Mon, 1. Jan 07, 23:43
x3

Post by tontonfred » Tue, 2. Dec 08, 22:36

Matchimus wrote:What I do is load up a TL ahead of time with the shields/weapons/missles and park it near a EQ. I then send the Equip Wing Like command and it takes a bit, but first off the TL beams aboards shields, then they all head merilly to the EQ where they buy extensions, tunings, rudder and all that. After that has finished the TL loads them up with the weapons/missles that I already collected for the fighters. Seems to work fairly efficiently this way. You can also use it more or less the same way to equip M6's for example, I just have the M6's follow the TL (loaded with stuff) to the EQ. Works great and saves my fingers!
That sounds great : I want to equip my fighters, TM and M6 in one go. But I am not clear as to which ship you choose as a template ; if you choose a template fighter, how will the TL know it has to beam the shields/weapons ; and if you choose the TL as template, its weapon/shield loadout won't be the same as they need to be on the consumer ships ?

Matchimus
Posts: 34
Joined: Wed, 26. Nov 08, 21:06
x3tc

Post by Matchimus » Wed, 3. Dec 08, 02:24

Ok, to be a little more clear (I hope) :D I set all of the fighters I want to equip into a wing and I include my TL. I then run the Equip Ships Like... command and choose a ship NOT in the wing. I have several "template ships" that sit at my Equipment Dock and basically do nothing.

So what I do is:

1. Outfit a ship just the way I want it and label it as Template Cutlass (for a Cutlass, obviously) :)

2. Load up a TL with shields/weapons/ missles. For example if I want to outfit 10 Cutlass I load the TL with 60 25MJ shields (10x6), 80 EMP Cannons (10x8), 300 Poltergeist Missles (10x30) and 150 Spectre Missles (10x15).

3. Add the TL, along with the 10 Cutlass "shells" I want to outfit into a single wing. (I leave the Template Cutlass out of this wing.)

4. Run the Equip Ships Like... command

5. Choose the "Template Cutlass" as the template

6. Go kill some stuff while it merrily does it's thing

What will happen first is the TL will load the Cutlass "shells" with shields. The Cutlass "shells" will then proceed to the nearest Equipment Dock and buy the max Cargo bay extension/Engine Tunning/Rudder Optimisation for themselves. After that they buy whatever Ship Extensions are in your template (Fight Command Software MK1, Triplex Scanner etc..). They then return to the TL and the TL loads them up with the rest of the equipment, weapons and missles in my case. Once it is finished (can take some time) I remove all of the ships from the wing. I can then do what I want with them :D It is a brilliant script!!

Edit: I forgot to mention, if executed properly, the TL leaves the wing in the early stages of this process, I cant recall exactly when, but it is an indication that it is working properly.

tontonfred
Posts: 126
Joined: Mon, 1. Jan 07, 23:43
x3

Post by tontonfred » Wed, 3. Dec 08, 08:11

Thanks for the explanation, it's very clear, and it's exactly what I'm after. Now, if only player-owned EQs could deliver tuning upgrades... http://forum.egosoft.com/viewtopic.php?p=2665135

tontonfred
Posts: 126
Joined: Mon, 1. Jan 07, 23:43
x3

Post by tontonfred » Wed, 3. Dec 08, 21:12

Ok, I'm actually having some problems making it work. First, I only managed to completely outfit a wing once, and it was OOS. When I am in sector, the TL leaves the wing, beams the shields/weapons to half the figthers, then goes to the Equipment Dock, undocks, equips the other half, and ends the script. None of the fighters get any tuning upgrades. Doesn't matter if they are docked in the TL or not.

OOS, things fare better, although the script takes it time to perform all the tasks. The fighters go to the EQ by themselves and buy the upgrades ; however, they bought the cargo optimizations too, which weren't on the template ship (they were on the TL, supplier ship).

Another thing : a lot of my other template ships have the MARS upgrades ; for those, even OOS, the script equips them with shields/weapons, but no upgrades. Could it be the script doesn't recognize the software extension and skips the upgrade steps ?

Has anyone encountered these glitches ?
Anyway, this script is already great !

Thanks,
Fred

Matchimus
Posts: 34
Joined: Wed, 26. Nov 08, 21:06
x3tc

Post by Matchimus » Thu, 4. Dec 08, 05:14

Another thing I forgot to mention is that I never tried it in sector.. I guess that part is a little glitched. Happy wing making! WEEEEEEEEEEEEEEE

Edit: Havent tried it with MARS equiped templates either... Still I suppose you could add those after (dont include in template), a pain to be sure, but still easier than doing all of them (upgrades).

VoodooKing
Posts: 45
Joined: Tue, 30. Dec 08, 06:31
x3tc

Re: Wing Equip Like fix and extension v0.03 [BETA] 11/20/08

Post by VoodooKing » Fri, 23. Jan 09, 10:30

Dude, can you upload this somewhere else please? Like filefront or something. I can't download this from Megaupload for days now. Keeps saying my IP is downloading something when I'm not.
morbideth wrote:This a replacement and extension of the standard wing equip like command in that it includes cargo, engine, and rudder upgrades. This command can be found in the special menu of the wing command console, it requires at least one ship in the wing with supply command software. When you use the command you will be asked to select the ship you with to use as a template for the ships in the wing.
[ external image ]
[/quote]

Knetter_Gek
Posts: 216
Joined: Thu, 15. Jan 09, 07:53
x3tc

Post by Knetter_Gek » Fri, 23. Jan 09, 12:20

I found three little imperfections.

I used a terran TL to equip a bunch of Terran M3s. the TL was itself kitted out with M/AM launchers, but it had a hold full of EMPCs for the M3s. The template ship's loadout suggested 8 EPMCs.
The M3s all had transporter devices but no supply software.

First, the TL merrily equipped all M3s with EMPC, but the last one only got 4 instead of 8. It turned out the TL had equipped itself with as many EPMCs as it could hold (6) before kitting out the rest of the ships. So, the supplier was treated as a consumer for determining equipement distribution. And since I was short 4 EMPCs to kit out the wing + the supplier, that part failed.

Second, the TL went off to find the Orbital Defense Station (equipment dock) to buy itself engine and turning upgrades. The M3s all already were at max everything and did not go to the Equipment dock. Again, it seems to have taken the supplier as the consumer. I think this is because of the transporters on board the consumer ships.

Third, and bloody annoying, the TL would not and could not be persuaded to leave the Equipment Dock alone - I had it jump to Argon Prima and it *still* started on a merry trip back to The Moon. sigh.
The fix to that seemed to be to let it dock, spend lots of money on upgrades I did not want it to have, and then since I had already manually sent the M3s off to get a jumpdrive on Earth, the TL followed them to also get some sofware updates (explorer, patrol, etc) and then the script apparently stopped and the TL responded to my suggestions once more.
Something that breaks the script off would be nice :)
//edit - it takes all commands but will not remain docked anywhere :( I thik the script just bleeped my TL... something to stop the script running definitely a good idea. (I already saved, quit, restarted and loaded with no effect)

Otherwise this script is just fabulous - I think you must have added years to the lifespan of my keyboard and mouse by saving me all this hassle with large fighter wings.
:thumb_up:

If you need a host location for the mod file rather than the one it's on now, it isn't large and I can host it for you if you like.
We are all explorers of the deepest reaches of space.
We don't just watch space on our monitors and listen to the sounds in it:
We, all of us, each and every one of us, owns, to a man, as many operational Space Shuttles as NASA does.
Yes, we're all that awesome. Give yourself a hug.

VoodooKing
Posts: 45
Joined: Tue, 30. Dec 08, 06:31
x3tc

Post by VoodooKing » Fri, 23. Jan 09, 15:35

Oh yes. Please do host it somewhere else. Many thanks.

Post Reply

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