[SCRIPT] Collect Wares in Sector (modified)

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

Post Reply
User avatar
Graxster
Posts: 817
Joined: Sat, 14. Oct 06, 01:01
x3tc

[SCRIPT] Collect Wares in Sector (modified)

Post by Graxster » Sat, 15. Nov 08, 19:31

Collect Wares in Sector (modified)
  • Moves the script into a standard script instead of being in the preload script.
  • Changes behavior so when using "Collect wares in sector..." the ship stops when done and notifies the player (if you have that option selected on the ship's command console).
I tend to forget that I left a ship running on "Collect wares in sector..." and it ends up wandering around the sector forever, usually getting itself into trouble with Pirates. So I rewrote the script to stop when done.

Technical:

You'll notice that most of the !ship.cmd.(command) scripts have two versions, the ones ending in .pl and the ones ending in .std. The .pl stands for "preload", .std for "standard". The preload scripts are a very small bit of info that the game loads when you start the game. This tells the game what script to run when you select a command from the command menu. This way you have only a small bit of memory taken up. In the case of the Special command, "collect wares in sector..." there is no .std command, the entire script is in the preload file. This means the game is loading the entire script into memory even if you're not using it.

For those who are picky, like me... enjoy!

-Grax

SPK

[ external image ]

RAR archive

[ external image ]

User avatar
Idea
Posts: 516
Joined: Fri, 24. Oct 08, 12:14
x4

Post by Idea » Sat, 15. Nov 08, 19:58

I AM PICKY:D
THANKS

madpainter
Posts: 25
Joined: Sat, 6. Dec 08, 04:13
x3tc

Post by madpainter » Mon, 22. Dec 08, 21:39

Same as that
This is what scripts are for, little tweaks that stamp on the things that annoy you :lol:

User avatar
apricotslice
Posts: 14129
Joined: Sun, 16. May 04, 13:01
x4

Post by apricotslice » Wed, 24. Dec 08, 00:33

My main bugbear with the vanilla script is that it uses the ships top speed, which can cause it to just run around in circles. (especially when you have supertuned it).

It needs some smarts. Top speed to within 1km of the container, then slow to something below 100kph for the pickup.

If it fails to pickup, it reduces speed and tries again, and reduces again and tries again etc.

Also, there needs to be an abort option built into the code, so if the container is somewhere where the auto-pilot cannot go because of collision avoidance, then it will give up.

I gave up on this altogether and use the transporter instead now. :D

Jelani Gunju
Posts: 43
Joined: Mon, 1. Dec 08, 09:36

Post by Jelani Gunju » Wed, 31. Dec 08, 08:20

Very Cool!!! I'm the same... ships just drifting around waiting for a nice Xenox attack to notify me that I forgotten about him :)
Jelani Gunju
*A Wise Man Once Said: A Strong Man Never Gives Up.

*A Strong Man Once Said: A Wise Man Knows when to Move On!

Cycrow
Moderator (Script&Mod)
Moderator (Script&Mod)
Posts: 22227
Joined: Sun, 14. Nov 04, 23:26
x4

Re: [SCRIPT] Collect Wares in Sector (modified)

Post by Cycrow » Sat, 13. Jun 09, 19:13

Graxster wrote: Technical:

You'll notice that most of the !ship.cmd.(command) scripts have two versions, the ones ending in .pl and the ones ending in .std. The .pl stands for "preload", .std for "standard". The preload scripts are a very small bit of info that the game loads when you start the game. This tells the game what script to run when you select a command from the command menu. This way you have only a small bit of memory taken up. In the case of the Special command, "collect wares in sector..." there is no .std command, the entire script is in the preload file. This means the game is loading the entire script into memory even if you're not using it.
i just saw this and through i would correct the misinformation.

Firstly, .pl files does not stand for preload, alot some of them do act as a preload script. .pl actually stands for player, and .std is standard.

the AI, will use the standard scripts, but for some commands, they might have additional abilites or different argumetns to use etc, so a .pl exists, most of the time these just get the arguments required for the player and then call the .std script

as this command is only used for the player, the script is named .pl. The naming of the script actually makes no difference, its just a convention, and the game doesn't care what you call them

Secondly, you are way wrong about what preloads actually are. all command scripts, standard, player, preload, check scripts, etc, are all cached at the beginning, so switching it from a preload to a normal one will make no difference to the memory footprint.

of course, simply change a script from .pl to .std makes absolutily no difference at all, the game doesn't see a difference between them.

preload scripts are actually scripts that are "preloaded" before the command is run. Basically, this allows the command to use an advanced menu before running the actual command.

what happens, is when you run a command, if theres a preload, that will run first, if it returns the correct values, then the command script will be run, if not, the command is rejected.

if u just use a standard command and create you menu system for that command, when the command is run, any old command that was running will be stoped to run your new one, so if the player quits from the menu, ie they dont want to run the command in the end, the script will stop, but any previous commands will also be stopped. With a preload, the old command will not be stopped until the preload has returned its arguments

like i said, as far as memory usage and performance goes, there is no real difference between them, any difference there is would actually be in the preloads favour, not the other way around

mike2003
Posts: 21
Joined: Wed, 6. Jan 10, 18:10

Post by mike2003 » Mon, 11. Jan 10, 15:18

maybe add check for full cargo? (notification, stop)

Arraamis
Posts: 179
Joined: Sun, 17. Dec 06, 23:42
x3tc

Post by Arraamis » Mon, 19. Jul 10, 07:44

I installed this script and cannot seen to get it working ....

Firstly, thanks for the script ....


Now, can someone add a little more info on usage. Prior to upgrading to 2.7.1. I was using Graxster's old collect wares in sector {Which had a menu command} worked as expected.

With this ..... I'm not getting a menu command and running the script via the editor = nothing.

Thanks for any help.

Arraamis
Posts: 179
Joined: Sun, 17. Dec 06, 23:42
x3tc

Ware collection that works with Version-2.7.1

Post by Arraamis » Tue, 20. Jul 10, 04:12

Hey guys,

I'm coming off a long layoff from X3. And I've just reinstalled X3:TC with all the newest patches ..... The one favorite script that I've always used is the ware collector {Which transports all the containers to the ship} instead of having to fly over each container individually {Which gets boring fast}. Only this time I'm unable to find one that works with the newest version 2.7.1.

I've installed "Collect Wares in Sector (modified)" by Graxster .... But I'm not getting a menu command.

Has anything changed or is that just not compatible with 2.7.1.

Any info appreciated.


Hopefully this isn't a dup post\thread.

Solomon Short
Posts: 797
Joined: Wed, 25. Mar 09, 07:00
x4

Post by Solomon Short » Tue, 20. Jul 10, 09:21

Check LV's Freight Transporter Upgrade, I believe it got an update in the last couple of days.

It does charge a tariff in eCells to use though (IIRC it's 5eCells per Container/Drone), & I don't know if your remote ships can use it automagically.

Arraamis
Posts: 179
Joined: Sun, 17. Dec 06, 23:42
x3tc

Post by Arraamis » Tue, 20. Jul 10, 10:41

Solomon Short wrote:Check LV's Freight Transporter Upgrade, I believe it got an update in the last couple of days.

It does charge a tariff in eCells to use though (IIRC it's 5eCells per Container/Drone), & I don't know if your remote ships can use it automagically.
Thanks ..... It took a long while for me to search through all the scripts I've collected since X2 - But I found what I was looking for:

Apricots CBeam {Best script to use when there's a lot of containers scattered around}

jlehtone
Posts: 21809
Joined: Sat, 23. Apr 05, 21:42
x4

Re: Ware collection that works with Version-2.7.1

Post by jlehtone » Tue, 20. Jul 10, 21:28

Arraamis wrote:I've installed "Collect Wares in Sector (modified)" by Graxster .... But I'm not getting a menu command.

Has anything changed or is that just not compatible with 2.7.1.

Any info appreciated.

Hopefully this isn't a dup post\thread.
[url=http://forum.egosoft.com/viewtopic.php?t=216696][b]T[/b][b]C[/b] [b]S[/b]&M Posting [b]R[/b]ules[/url] Rule #1 and so forth ... merged.

By the name of the script it probably replaces stock game files. Stock game files can be changed by patches too. And MSCI has certainly changed within patches, obsoleting some script codes.

[url=http://forum.egosoft.com/viewtopic.php?t=216690]TC Download Library[/url] has the CBeam in the same section as Graxter's script. Section called "Gathering". LV's ship upgrade in in another section; it is hard to organize scripts into intuitive heaps.

Anyway, whether any of those do any good any more, their threads should reveal that. For example, due to merge we now have in Graxter's thread the observation that the script probably is broken in 2.7.1.

Post Reply

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