[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

Crapgame
Posts: 130
Joined: Sat, 3. Jan 09, 15:03
x3tc

Post by Crapgame » Thu, 29. Jan 09, 13:33

Yep, I just reread the original post and it most certainly does not mention that you need to be the owner of one of the factories in question.

Why wouldn't I just use a CAG?

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

Post by apricotslice » Thu, 29. Jan 09, 13:40

A CAG also requires you own the station. CAG buys or sells from a specific station.

As apposed to UT which trades whereever it feels like it.

Most of the trader scripts are designed for player stations. They need to be based at one before they can do anything.

Crapgame
Posts: 130
Joined: Sat, 3. Jan 09, 15:03
x3tc

Post by Crapgame » Thu, 29. Jan 09, 15:09

apricotslice wrote:A CAG also requires you own the station. CAG buys or sells from a specific station.
Understood, which is why I was looking at this script. Since it didn't mention player ownership of the station.

Thanks.

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

Re: [SCRIPT] Manual Trade Extension: Best buy/sell loop v1.0 [2008-11-18]

Post by ThisIsHarsh » Sun, 1. Feb 09, 22:56

Sorry this has taken so long to get a reply. I've been away from X3TC for a while and likely will for a while yet. Anyone else has any issues with my scripts, please PM me, then I'll get an e-mail notifying me, otherwise I wont see forum posts for a while probably.

Anyway:

Firstly, this script has nothing to do with the ship being owned by a station. The only effect the ship belonging to a station will have is that it will use the stations money instead of the players. I think.
Crapgame wrote:Where do I set this "default price"?
Every ware in the game has an average, minimum and maximum price that is hardcoded. Here "default" = "average", I didn't want to say "average" because that might imply it scans for the average price when it doesn't, it simply uses the hardcoded average price.
Crapgame wrote:What if there is another solar plant in the same sector that offers a lower price, will he start going there?
Once the ship has it's mind set on a destination it will go there, even if the station suddenly changes in stock to make it a worse buy/sell. However, once docked he will check the price is equal or better before the final purchase.
Crapgame wrote:If I select crystals, I assume he'll go buy crystals at the best price and bring them back here. How far will he go for that?
Crapgame wrote:Is there a limit to how far he'll go? I set one to buy Teladianium and he's just idling. Granted, there is no Teladianium in that sector to buy, but I assumed he'd go find some.
He will go buy crystals at best price then go sell them at best price and keep looping like that. He will travel as far as necessary (I think it's actually a radius of 50 jumps, which is as big as the galaxy anyway). He won't travel to sectors without a satellite or other property to tell him the prices. If there are a lot of sectors to look through it may take some time since it has to search all viable stations.
Crapgame wrote:When he buys ecells for jump fuel, how much will he buy?
This is determined by refuel settings in the command console. The refuel settings are based on 'jumpsworths' of fuel (so a setting of 5 is enough fuel for 5 jumps). The actual amount used by this script is I think 3x the setting in the command console. Once the ship goes below 1x the refuel setting he will refuel to 3x again.
Crapgame wrote:Does this not work if your have the Trade Command MK3 software installed? I tried to set one of my STs to do this and the command doesn't show.
IIRC it should work, the only possibility is a command slot conflict, which there shouldn't be since MK3 is signed. Not much I can do about it at the moment, but I've noted to check it out when I can.


Hope that all helps.

Dark Kyro
Posts: 19
Joined: Tue, 6. Mar 07, 21:30

Post by Dark Kyro » Mon, 18. May 09, 15:34

ThisIsHarsh

Personally I see no point in your script. Well, maybe stimulating NPC economy by trading E-Cells, but they have so many traders now that this is not necessary.

But IF you made 2 seprarate commands instead - best buy loop and best sell loop, it would be great !!!
Why this is so much better ?

a) Best buy loop
You set the amount of money to spend or number of products to purchase. Great for supplying fleet, or buing rare wares.
a) Best sell loop
You just select the product (or multiple). Great for selling all the trophys you get from captured ships.

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

Post by ThisIsHarsh » Fri, 17. Jul 09, 20:30

Update v2.0

:arrow: Complete revamp. Now you are able to select which wares to buy/sell, the price (relative to average price), as well as use the ship's homebase as a storage depot. Check the OP for detailed description and screenshots.

Logain Abler
Posts: 2255
Joined: Mon, 31. Oct 05, 08:44
x4

Post by Logain Abler » Fri, 17. Jul 09, 20:43

ThisIsHarsh wrote:Update v2.0

:arrow: Complete revamp. Now you are able to select which wares to buy/sell, the price (relative to average price), as well as use the ship's homebase as a storage depot. Check the OP for detailed description and screenshots.
I so need to try this, looks mint :)

LA

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

Post by ThisIsHarsh » Sat, 18. Jul 09, 19:19

Update v2.0.1

:arrow: Minor bugfix release. Rare case of no station in known galaxy that sells a ware caused premature termination of a loop.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Sat, 18. Jul 09, 20:14

Thanks for this script, I think this is exactly what I was looking for.

I do not have any stations yet, but I'd like to buy many adv. satellites so I
can to deploy a good network. With this script I can send some M3s on trade
runs and let them deliver the satellites to their homebase M1 or TL.

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

Post by ThisIsHarsh » Sun, 19. Jul 09, 11:18

ThomasAH wrote:Thanks for this script, I think this is exactly what I was looking for.

I do not have any stations yet, but I'd like to buy many adv. satellites so I
can to deploy a good network. With this script I can send some M3s on trade
runs and let them deliver the satellites to their homebase M1 or TL.
Y'know, hadn't considered stockpiling satellites as one of the 'implicit modes of operation', might have to add that.

*Ad alert*
Oh, and of course there is always Deploy Satellite Network replacement, which will 'best buy' satellites, and use/refuel jumpdrive to deploy satellites in the known universe.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Sun, 19. Jul 09, 12:43

ThisIsHarsh wrote:
ThomasAH wrote:I do not have any stations yet, but I'd like to buy many adv. satellites so I can to deploy a good network. With this script I can send some M3s on trade runs and let them deliver the satellites to their homebase M1 or TL.
Y'know, hadn't considered stockpiling satellites as one of the 'implicit modes of operation', might have to add that.
Tested it last night, it works ok, but there is room for improvement: I used an M3 (Mamba Raider) with "use homebase" enabled to fetch satellites, currently it jumps to a sector with a station selling them, docks, buys, undocks, jumps home, delivers sats.

Fine until now, but now it goes shopping for ecells, despite the homebase TL having plenty of ecells and supply software installed.

After this the loop restarts.

Another improvement could be to try to fill more of the cargo space before jumping home by visiting other selling stations.
ThisIsHarsh wrote: *Ad alert*
Oh, and of course there is always Deploy Satellite Network replacement, which will 'best buy' satellites, and use/refuel jumpdrive to deploy satellites in the known universe.
Currently I'm using MARS for semi automatic deployment, but I already noticed and downloaded (though not yet installed) your script as something which may be very useful :)

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

Post by ThisIsHarsh » Sun, 19. Jul 09, 13:37

Using energy cells from the homebase is something I'll add for sure.

Doing multiple runs before dumping at homebase is a good idea, though less useful in some cases - I'll have to add that as an option.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Sun, 19. Jul 09, 16:11

ThisIsHarsh wrote:Doing multiple runs before dumping at homebase is a good idea, though less useful in some cases - I'll have to add that as an option.
Maybe I'll just turn off "Use homebase" for now and from time to time manually
instruct the ship to deliver the sats. Should this work?

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

Post by ThisIsHarsh » Sun, 19. Jul 09, 20:54

ThomasAH wrote:
ThisIsHarsh wrote:Doing multiple runs before dumping at homebase is a good idea, though less useful in some cases - I'll have to add that as an option.
Maybe I'll just turn off "Use homebase" for now and from time to time manually
instruct the ship to deliver the sats. Should this work?
Yeah that'll work fine.

I've added an option to 'refuel at homebase', and added the options to 'buy until full' and 'sell until empty'. Still testing, but I've ironed out most bugs now, be ready in next day or two.

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

Post by ThisIsHarsh » Tue, 21. Jul 09, 21:37

Update v2.1

:arrow: Added option to refuel from homebase, rather than at docks.

:arrow: Added "Task" option giving three possible modes - "Buy only", "Sell only" and "Buy + Sell". This is useful for temporarily stopping your freighter from buying/selling, without needing to erase the ware list.

:arrow: Added option to "Buy until full". This means the freighter will continuously buy wares from the "Buy" list until it is 4/5 full, or it cannot find any valid deals. At which point it dumps the wares at the homebase (if enabled) and switches to selling (if there is anything in the "Sell" list).

:arrow: Added option "Sell until empty". This means the freighter will continuously sell wares from the "Sell" list until there are no more onboard, or it cannot find any valid deals. At which point it dumps any remaining wares at its homebase (if enabled) and switches to buying (if there is anything in the "Buy" list).

Check OP for updated screenshot of menu.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Wed, 22. Jul 09, 08:19

ThisIsHarsh wrote:Update v2.1
NIce changes, thanks :)

Meanwhile my known universe no longer contains any noteworthy amounts of advanced satellites, hammer heavy torpedoes and flail barrage missles :)

... and no IBLs, but that's because I haven't discovered Yaki space yet and the pirate sector only has one IBL factory. Is there some script to notify me when it has another IBL on sale?

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Wed, 22. Jul 09, 08:32

Hi!

I get an error when extracting plugin.mtx.buy.xml of the 2.1 version.

I'm not using the plugin manager, but the SPK explorer, but I never had problems with that.
All other files can be extracted fine, and in older versions of your script above file could be extracted, too.

Do you (or anyone else) get the same problem using the plugin manager?
Can you make the plugin (or just the file) available as .zip?

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

Post by ThisIsHarsh » Wed, 22. Jul 09, 12:21

ThomasAH wrote:Hi!

I get an error when extracting plugin.mtx.buy.xml of the 2.1 version.

I'm not using the plugin manager, but the SPK explorer, but I never had problems with that.
All other files can be extracted fine, and in older versions of your script above file could be extracted, too.

Do you (or anyone else) get the same problem using the plugin manager?
Can you make the plugin (or just the file) available as .zip?
That's wierd, confirmed the problem, yet I could open the file in notepad and the SE fine. Anyway, re-saved the file and replaced it in the package, that's sorted it. Redownload, should be fine now.


If anyone experiences problems (particularly with wierd buying behaviour), redownload - possible corrupt script file.

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

Post by ThisIsHarsh » Wed, 22. Jul 09, 12:25

ThomasAH wrote:
ThisIsHarsh wrote:Update v2.1
NIce changes, thanks :)

Meanwhile my known universe no longer contains any noteworthy amounts of advanced satellites, hammer heavy torpedoes and flail barrage missles :)

... and no IBLs, but that's because I haven't discovered Yaki space yet and the pirate sector only has one IBL factory. Is there some script to notify me when it has another IBL on sale?
I use 'Universal Best buys/sells'. Doesn't notify you, but does tell you if any are available and at what price and amount (provided you have property in the sector). Probably not what you were asking though.

You could dock a ship at that pirate base, using this plugin to continuously buy for 'any price', then as soon as they come in stock it will pick it up.

User avatar
ThomasAH
Posts: 147
Joined: Wed, 3. Sep 08, 10:46
x4

Post by ThomasAH » Thu, 23. Jul 09, 14:28

ThisIsHarsh wrote:
I use 'Universal Best buys/sells'. Doesn't notify you, but does tell you if any are available and at what price and amount (provided you have property in the sector). Probably not what you were asking though.

You could dock a ship at that pirate base, using this plugin to continuously buy for 'any price', then as soon as they come in stock it will pick it up.
I use Universal Best Buys, too, but I'll try your suggestion to dock and use the by-for-any-price-loop, at least with the IBLs.

Post Reply

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