[SCR][X3:TC/AP][v0.2][19/04/13] Improved Collect Wares

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

Binesi
Posts: 43
Joined: Mon, 15. Mar 10, 15:50

[SCR][X3:TC/AP][v0.2][19/04/13] Improved Collect Wares

Post by Binesi » Sat, 13. Apr 13, 20:41

Notice: Versions prior to 0.2 must be upgraded.

I'm playing X3 TC now after shelving it for a few years to mature. However I'm getting stuck into fixing things again so maybe I still won't "complete" it. Anyway, this time I will contribute back to the community some of the fixes I make. Here is something I whipped up on a Sunday evening. It should work the same in TC or AP:

Improved Collect Wares (replaces but does not overwrite default collect wares command - so Steam shouldn't erase it):

Improvements:

* Fixes(avoids) the teleporting turret bug affecting SMART and MARS users when running the default "Collect Wares" or any other scripts that use the built in command to collect a ware. Technically it will still happen, but at a short enough range that it is almost like normal behavior. If Egosoft fixes the bug, it will work perfectly.
* Fixes the spin of shame bug which makes "Collect Wares" useless for fast and/or low maneuverability ships. I have not tested this on every ship in every mod so if you still find one that doesn't work right just install a transporter device. Fixing it any further would add too much complication for my purposes.
* Automatically uses the transporter device (with proper effects) if installed for long range collection. No it doesn't require energy or other such nonsense as the transporter doesn't require it for any other function. With a good ship and a transporter device it is typically much faster, more lore friendly and less troublesome than using MARS goblins or similar scripts.
* Will not pick up goods which are illegal in the current sector. These need to be picked up individually if you want them. This makes the command much safer to use.
* Will not collect rudder or engine tunings if found. It could be sad to waste your rare pandora tunings on a collector TS.
* Does not cheat! It will only collect crates which the ship's sensors can see. However it will update that list even as it is collecting. It will not stop until everything legal it sees is collected or it runs out of cargo space (it will pick up everything it possibly can). Also the command will only run on the ships for which the command would normally run on.
* Automatically returns to the ship's homebase when done collecting. If no homebase is set, the collecting ship will dock at the nearest safe station and wait. It will use a jumpdrive if configured using the ship's default jump settings. If the player is driving the ship, the ship will simply stop and notify.
* Will notify player when its done collecting by using the "Cargo Bay Closed" (in whatever language you are running) audio clip.
* Language neutral. Should work the same on any language version of X3 TC or AP.
* Works fine with XRM and XTC and probably most other mods.

Thanks to Lucike, TECSG, Huefte, and Xai Corp who's code I scanned over to learn how to write a script like this... but then I did it my own way. I just can't imagine why no one has bothered to write this before. It was so easy to fix up.

Well, anyway that's it - use it or don't. Like it or forget it. I made it to save me trouble and if it's useful to you, then I'm happy to have improved your game. I will follow this thread for a little bit to see if there are any bugs I want to fix or simple features to add (it should remain simple and universal). After that, just feel free to hack the code to your liking if it doesn't suit you or something breaks in the future. No permissions or credit required.


Image *FIXED 19 Feb 2014* Edit: removed not working download link due to virus alert. X2-Illuminatus

Alternative link from xdownloads:
Image

TO INSTALL: Just unzip archive into your X3 folder. Scripts for TC and AP will both be installed. The plugin manager is fine too.
TO UPGRADE: Overwrite the old files with the new ones.
TO UNINSTALL: Delete the same files that are in the zip archive. Nothing more to it. It shouldn't harm your save game.

If anyone wants to rehost this somewhere else, please feel free to do so. The download link I provided will eventually expire. To contact me if I am no longer using this forum, just use my name@name domain.
  • Changelog
    0.1 Initial Release
    0.1b Small change so that Betty only speaks if the player is in the collecting ship. Accidently left that on for testing. She will still announce "cargo bay closed" whether you are in the ship or not as I find that helpful to know when collection is finished.
    0.2 Reduced Betty verbosity for 4x faster transporter collection. Fixed bug with transporter and empty wares. More closely matched collection range with visible crates range.
Edit: Added alternative xdownloads download link. X2-Illuminatus
Last edited by Binesi on Wed, 19. Feb 14, 15:51, edited 9 times in total.

User avatar
joelR
Posts: 1984
Joined: Mon, 9. Jul 07, 23:33

Post by joelR » Sat, 13. Apr 13, 21:23

Great job. Thanks.

As much as I love the cargo collection function of goblins, Ive always preferred the slower method of using TS to collect wares.

Now I wont have to leave a sector so my salvager wont get stuck in that ridiculous spinning around the crate.

Binesi
Posts: 43
Joined: Mon, 15. Mar 10, 15:50

Post by Binesi » Sat, 13. Apr 13, 22:57

Goblins are very handy but it breaks my immersion to have them mimicking Overlord in space. Cute as that is for the first hour or so...

Anyway, I didn't see much point to using them when as long as you have MARS or SMART turret commands active you can collect a whole zone of space in a few seconds because of the bug with "move to ware object" returning FLRET_FIREFREE before it is anywhere near the object it is collecting while a turret script is active.

Now you can just send out a collector from your carrier or station and it will do it's job quickly and redock back home, wherever that is.

User avatar
joelR
Posts: 1984
Joined: Mon, 9. Jul 07, 23:33

Post by joelR » Fri, 19. Apr 13, 04:40

This isnt working for some reason. I just tested it and can confirm that the ship is collecting the ware but it doesnt show up in the cargohold. It just disappears.

EDIT: Apparently I was using the 0.1 version. Looks like you fixed it in 2. Sadly the link is down. Did you pull it or is that temporary?

Ocede
Posts: 55
Joined: Fri, 23. Sep 11, 22:54

Post by Ocede » Fri, 19. Apr 13, 17:03

Try HERE. The link was missing a colon

User avatar
joelR
Posts: 1984
Joined: Mon, 9. Jul 07, 23:33

Post by joelR » Fri, 19. Apr 13, 18:25

Thanks.

User avatar
Makita
Posts: 123
Joined: Sat, 14. Jan 06, 02:32

Post by Makita » Fri, 19. Apr 13, 19:36

Thanks Ocede, do we know if its compatible with XRM?. Thank you in advance.

User avatar
joelR
Posts: 1984
Joined: Mon, 9. Jul 07, 23:33

Post by joelR » Fri, 19. Apr 13, 20:33

Makita wrote:Thanks Ocede, do we know if its compatible with XRM?. Thank you in advance.
It is. Scripts generally dont have compatibility issues. Mods do though.

User avatar
Makita
Posts: 123
Joined: Sat, 14. Jan 06, 02:32

Post by Makita » Fri, 19. Apr 13, 22:25

joelR wrote:
Makita wrote:Thanks Ocede, do we know if its compatible with XRM?. Thank you in advance.
It is. Scripts generally dont have compatibility issues. Mods do though.

Thank you, guess if i would of read the description properly i could of avoided this minor embarrassment :oops:

User avatar
Familiar
Posts: 244
Joined: Wed, 5. May 10, 09:26

Post by Familiar » Wed, 7. Aug 13, 11:10

As I understand, ship won't collect flying wares seen by your adv. satellite or another ship if flying ware spawned IS out of collector's field view ?

basicz
Posts: 24
Joined: Tue, 27. Dec 11, 16:23

Post by basicz » Thu, 8. Aug 13, 01:38

thanks.
but unfortunately the link is broken..

TheEarl
Posts: 327
Joined: Fri, 3. Aug 07, 17:27

Post by TheEarl » Fri, 16. Aug 13, 12:21

Try this:
http://www.speedyshare.com/GGBsH/Improv ... res0.2.zip
The double "http:" in his link does not work.

Binesi
Posts: 43
Joined: Mon, 15. Mar 10, 15:50

Post by Binesi » Wed, 19. Feb 14, 15:58

Just stopping back on the board after giving Rebirth a go and will put that aside for a few years to let it get fixed. Trying XTC 2.2 now and the script is working fine so far. I will post updates if any bugs are found.

Sorry for the longstanding typo in the download link. Fixed.

As for Familiar's question - the collecting ship will collect anything the player's combined assets can see in the sector.

PDouma39
Posts: 239
Joined: Thu, 26. Aug 10, 04:15

Post by PDouma39 » Wed, 19. Feb 14, 17:29

Thanx for this, was getting bored by SMART allways teleporting all stuff, and now it's even safe to collect dropped stuff, even when illegal goods are dropped between those hard to come by missiles.
Awareness in life is rewarded by many

ASSTEROIDS
Posts: 38
Joined: Tue, 10. May 16, 17:00

Post by ASSTEROIDS » Mon, 16. May 16, 05:07

There ia a folder "addon" and a folder "script" in the .zip, they both contain the same files, does it mean I must install in both the game folder as well as in addon?

Post Reply

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