[SCRIPT] Manual Trade Extension v2.3.1 [2010-10-02]

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

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Post by Reisser » Fri, 11. Dec 09, 10:33

One question: I've installed the script by unpacking the zip in my folders. Now I want to uninstall them. Is it ok to stop the commands on all ships, save, quit, delte the script and start again?

(I have to uninstall all last new scripts because my game freezes at a specific time of the game and now have to search for the failur :( )

Another thing I've noticed: I've 2 ships for buying weapons, rockets and shields. There are enough in stock and I've satellites in all sectors. But my traders with your commands on it (buy ware x,y,z for any price is only buying one ware of the list ... When I have enough for this ware I delte it and in this case the ship buys another (one) ware of the list all the time.As long I delete this one too.

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

Post by ThisIsHarsh » Fri, 11. Dec 09, 22:30

Reisser wrote:One question: I've installed the script by unpacking the zip in my folders. Now I want to uninstall them. Is it ok to stop the commands on all ships, save, quit, delte the script and start again?
Yeah, the procedure you mention will work. But, out of interest, why not use Cyrow's package manager to install/uninstall scripts?

Reisser wrote:Another thing I've noticed: I've 2 ships for buying weapons, rockets and shields. There are enough in stock and I've satellites in all sectors. But my traders with your commands on it (buy ware x,y,z for any price is only buying one ware of the list ... When I have enough for this ware I delte it and in this case the ship buys another (one) ware of the list all the time.As long I delete this one too.
I'm not entirely clear what you mean. But I think maybe you want to set 'buy until full' enabled, which will go through the entire list buying, before switching to selling behaviour. It could also be that you just have to wait a while as it searches for the best station to purchase the next ware in the list from. Also, it could be that the freighter is full (I think 4/5 cargo space filled is classed as 'full', to leave room for ecells).



I've just about finished a rather major update to this plugin, which allows you to select preferred sources for wares (which can be player owned ship or station), as well as maximum amounts to store at the homebase ship. So you can effectively use MTX as a resupply ship, or a trader, or even both at the same time...
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Post by Reisser » Sat, 12. Dec 09, 12:25

Ah yes - selecting an amount of wares is exactly what I need! :) (after sitting on about 100 weapons of one type - hehe)

And I use "buy until full" together with a ware-list (e.g. shields, weapons, rockets). I don't sell with your command - I only use it to buy fitting for my ships and "special tasks"). Perhapts "buy until full" is the wrong choice?

The cargo isn't full ... I've 1000 tons cargo and buy only things as shown above. Quite difficult to geht enough 25MW-shields and firestorm-torpedos to make it full ;)

Ok, I wait for your update - sounds very good!

lionheart_001
Posts: 79
Joined: Mon, 12. Oct 09, 18:26

Post by lionheart_001 » Fri, 18. Dec 09, 04:57

Hey all,

May I ask what program I should use to open a MAN file? That is the format which this file is in. I did a scan in Google and it only had a few choices and they kind of worried me.

Is it possible to download this in ZIP or SPK format instead? If not, I understand.


LH

User avatar
Reisser
Posts: 745
Joined: Mon, 28. Feb 05, 15:39
x4

Post by Reisser » Fri, 18. Dec 09, 12:06

Uh? Where in this thread were you downloading a man-file??? In the top-posting there is only a zip and a spk as it should be

:?

By the way:

man: Formatted manual or reference page

But this is now very offtopic :P

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

Post by ThisIsHarsh » Fri, 18. Dec 09, 17:13

Grrr. Annoying this is still happening. You just need to rename from MAN to SPK and it'll work fine.

For some reason when some people download one of my packages from the server the file is renamed to a .man... No idea why. I've PM'd Maeyenie, who graciously hosts my scripts for me, just waiting for a reply.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

lionheart_001
Posts: 79
Joined: Mon, 12. Oct 09, 18:26

Post by lionheart_001 » Sat, 19. Dec 09, 05:27

ThisIsHarsh wrote:Grrr. Annoying this is still happening. You just need to rename from MAN to SPK and it'll work fine.

For some reason when some people download one of my packages from the server the file is renamed to a .man... No idea why. I've PM'd Maeyenie, who graciously hosts my scripts for me, just waiting for a reply.

Ahhh.. roger that. I had seen that it was supposed to be an SPK file. The ending format is .SPK.MAN I'll just erase the .MAN from it and give it a try.

Many thanks for letting me know.


LH

Vayde
Posts: 849
Joined: Fri, 6. Feb 04, 21:02
x3tc

Post by Vayde » Mon, 21. Dec 09, 15:05

I try to play the game with as few scripts installed as poss. Those I do install have to have a damned good reason to be there. I only use 1 mod which I've used since X2 days.

This little gem of a collection imo should have been standard ego commands years ago.

Thanks for making my weekends dissapear with less hassle :)
Still life in the old dog yet...

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

Post by mike2003 » Wed, 6. Jan 10, 18:24

i just tested this script and i have some problem.
i send 1 TP only to the sector with all equipments
and start script
TP stay in dock and do nothing

when my ship come to this sector TP starting
if my ship go to another sectror and TP stay 1
it dock to last target station and do nothing

and it cant see good price in sector (if docking and 1 in sector) and try to travel to another sector
(in dock TP buy for 34 cr and go to other sector (jump=2) for 72 cr, but in this sector (jump=0) 78 cr)


may be it go blind to own sector when docking if no other ships in it?

sorry for english

User avatar
nman
Posts: 230
Joined: Mon, 30. Jun 08, 04:34
x3tc

Post by nman » Sat, 9. Jan 10, 06:31

Now, must the home base be a ship, and only a ship? Would it be possible to have the buy/sell loop buy a ware, and then sell it to a specific station you own?

Also, is there a way to limit the distance, or set it to only 1 sector?

Osbot
Posts: 108
Joined: Sun, 10. Jan 10, 19:49
x4

Post by Osbot » Sun, 10. Jan 10, 19:56

There is basically zero documentation on how to use the supply a TL or Station feature. This may seem self explanatory, but I have been using this script for 3 weeks and I still can't get the traders to dump off at a homebase ship. Currently I have 3 Falcon Haulers who are loaded up in a dock/undock loop at a Mammoth TL. They won't unload anything.

Do you set to buy only? Buy and Sell? Do you need to have the wares you wish deposited at the home base in the sell list? How do you get TM's and TP's and TS's to unload at a TL is it even possible?

Some clarification and explanation on the commands for this aspect of the script would be fantastic.

Thanks.

Liquid_Wolf
Posts: 1
Joined: Sun, 17. Jan 10, 11:16

Post by Liquid_Wolf » Sun, 17. Jan 10, 11:51

mike2003 wrote:i just tested this script and i have some problem.
i send 1 TP only to the sector with all equipments
and start script
TP stay in dock and do nothing

when my ship come to this sector TP starting
if my ship go to another sectror and TP stay 1
it dock to last target station and do nothing

and it cant see good price in sector (if docking and 1 in sector) and try to travel to another sector
(in dock TP buy for 34 cr and go to other sector (jump=2) for 72 cr, but in this sector (jump=0) 78 cr)


may be it go blind to own sector when docking if no other ships in it?

sorry for english
I too am having this same issue. It's like the ship just doesn't know how/what to do when it gets docked.

I thought I would do some E-Cells to test it out, but the only way it runs through the script is if I tell the ship to undock from the station, then run it.

It constantly tries to dock at the Argon Equipment Dock if it's closest... for some reason.

Sinnerman49
Posts: 108
Joined: Thu, 20. Sep 07, 17:00
x3

Post by Sinnerman49 » Fri, 30. Apr 10, 05:55

Maybe I'm not doing something correct?

I have 4 mining ships, supplying my Mobile Mining Base-Ship. I want 1 trader to automatically sell the ore that the miners drop off at the MMBS. I've the the MMBS as the trader's homebase, and the trader is equiped with a transporter device.

The first time, I had 1 unit of ore in the trader, and selected that for the wares list. It worked great! The trader loaded up the rest of the ore from the MMBS (it was docked), went out, and sold it for a great profit!

That's when things fell apart....it successfully returned home, but instead of getting the next load of ore, it approached the MMBS (never docked), and then turned around and headed to a nearby Chip-Plant (no clue why, it doesn't even use ore).

Now its just going back and forth between the MMBS and the chiplant, never exchanging any frieght.

What could I have done wrong? Is there a better script for this kind of operation?

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

Post by ThisIsHarsh » Fri, 30. Apr 10, 17:12

Sinnerman49 wrote:Maybe I'm not doing something correct?

I have 4 mining ships, supplying my Mobile Mining Base-Ship. I want 1 trader to automatically sell the ore that the miners drop off at the MMBS. I've the the MMBS as the trader's homebase, and the trader is equiped with a transporter device.

The first time, I had 1 unit of ore in the trader, and selected that for the wares list. It worked great! The trader loaded up the rest of the ore from the MMBS (it was docked), went out, and sold it for a great profit!

That's when things fell apart....it successfully returned home, but instead of getting the next load of ore, it approached the MMBS (never docked), and then turned around and headed to a nearby Chip-Plant (no clue why, it doesn't even use ore).

Now its just going back and forth between the MMBS and the chiplant, never exchanging any frieght.

What could I have done wrong? Is there a better script for this kind of operation?
Its a long time since I wrote this script, and I was at the time, and plan to restart work on it asap, working on an updated version that is much improved. But like I say, it's been a while so I can't remember the exact logic.

I think the logic of MTX ships is basically to approach the home ship and check if it has anything to do (i.e. consult the buy/sell lists, available cargo, etc). If there is nothing to do then dock at a safe station nearby, wait a while, then repeat the process.

I'll have to look into this plugin again closer - I've been on somewhat of an extended X3TC break. But back when I was playing before, and very soon in my current game, it did/will form the backbone of my trading/resupply functions.

I'd be interested to hear if you figure out what went wrong (I mean, I used this script extensively and didn't have problems, but then I knew the inner workings and could make sure everything was set up optimally).

Otherwise, watch this space for an update coming in the not-too-distant future.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

Sinnerman49
Posts: 108
Joined: Thu, 20. Sep 07, 17:00
x3

Post by Sinnerman49 » Mon, 3. May 10, 07:50

Well okay, here's one question - how is the selling jump range determined? I'm mining in Profit Center Alpha, and the only two systems I see my sellers going to are PTNI HQ and Two Grand - both are only 1 jump away.

Whenever they need E-Cells, they always goto Two Grand, even if the e-cells there are 18cr

I'm guessing being limited to this 1jump range is what's making them go sit in a random factory often times (they run out of valid deals)

I've got most of the universe explored, with Adv Sats in almost all sectors.

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

Post by ThisIsHarsh » Sun, 5. Sep 10, 14:46

Update v2.3

:arrow: Note: you now require my JSON parser library v1.1 for the config menu to work.

:arrow: New menu system and some fixes to trading with and refueling Energy Cells.

:arrow: Probably a bunch of other fixes as well from way back. I notice the version posted previously was v2.1.1, yet I have a v2.2 here, so I must have forgot to post it or something.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

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

Post by ThisIsHarsh » Fri, 24. Sep 10, 00:20

Update

:arrow: Left a bit of debug logging text in the menu code. No new version, just redownload.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

User avatar
klaatu
Posts: 316
Joined: Fri, 21. Nov 03, 17:23
x4

Post by klaatu » Sat, 2. Oct 10, 06:59

Seems if I try to set a limit to a ware in the list (change from infinite), it only seems able to change the top entry. Or at least that what displays in the menu. For example if I have 6 things in the list and want to limit the one at the bottom to 2000, when I go to that bottom entry and hit enter then type in "2000", when the menu comes back up it says the top entry is limited to 2000.
"It's so simple. No, wait--it's needlessly complex!"
- Homer Simpson
You need this!: Cargo Delivery Service

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

Post by ThisIsHarsh » Sat, 2. Oct 10, 20:45

Update v2.3.1

:arrow: Fixed bug in menu where you could only change first entry in "homebase max storage quantity". A big thanks to klaatu for reporting it.
There are 10 types of people in the S&M forums - those who understand binary, and those who don't.

Black holes are where God divided by zero.

AyaNeko
Posts: 3
Joined: Mon, 19. Oct 09, 21:40

Post by AyaNeko » Wed, 20. Oct 10, 22:08

Hi, thanks for this nice script! but sadly i have trouble getting it to work properly

My scenario: I got a Zephyrus, and i got a Buster and set his homebase to the Zephyrus.
The Buster got all the neccesary software inkl. Transporter device.

I configure the Buster to buy only mode, and add 25MJ shields and Phased repeater guns. I set the max ammount to 20 for each.

Buy/Sell from Homebase On

then i start the whole thing. It goes buying shields and weapons, then comes back to my Zephyrus and unloads the warez, after that it goes to a solar power plant to refuel, and then comes back to my zephyrus and stands still doing nothing.

i had this happen to me twice now.
Starting it up again does not do anything, i have to reset options to default, and reconfigure the whole thing again. the it makes 1 shoppign run, and gets stuck/stops again.

Post Reply

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