[Script][V1.7] Trade Command MK1/MK2-Extension + Connect Stations (w/ ship&TL [BETA])

The place to discuss scripting and game modifications for X³: Reunion.

Moderators: Moderators for English X Forum, Scripting / Modding Moderators

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

[Script][V1.7] Trade Command MK1/MK2-Extension + Connect Stations (w/ ship&TL [BETA])

Post by SymTec ltd. » Fri, 2. Mar 07, 20:05

Trading Software MK1/MK2-Extension, Version 1.7 (final)

With the Extended Trade Command Software MK1/MK2, a ship can buy and sell goods at the best price. It always looks to keep a certain percentage stock level of its ware in the station, so that the production can continue and there are alway enough goods present in the station, e.g. to sell them to other traders or keep up the supply chain. A new trade target finding algorithm ensures that, depending upon adjustments, only certain stations are traded with.

The command Connect Stations enables a ship to act like a complex constrcution kit, to build a moving link between two stations. Wherever a ware is needed in one of the stations that is produced by the other station, the ship will move a certain amount of this ware from the second station to the first.

Image

Extended Trading Software MK1:
The ship will buy the entered ware for best price up to a certain stock percentage (1-99%) at its homebase.

Extended Trading Software MK2:
The ship will sell the entered ware for best price up from a certain stock percentage (1-99%) at its homebase.

Special functions:
If you add one of the following numbers to the percentage, special priorities will be used:
  • 100 : Prefer trading with player stations
    200 : Prefer trading with NPC-stations
    300 : Prefer trading with Trade Stations
    400 : ONLY trade with player stations
    500 : ONLY trade with NPC-stations
    600 : ONLY trade with stations every other race could buy, too
    700 : Sell weapons/shields/missiles at EDs that do not even trade with them

    1000-9000 : Adjust Jump Range
    Attention: The jumprange for 0 jumps is 1000, 1 jump 2000, ...
    Adjustment only works up to 8 jumps.
If a wrong percentage number is entered, a warning noise is played.

A list of these special functions appears again if one selects the command in the command menu of a ship and presses "i". Contrary to the normal trade commands, this extension can buy not only resources and sell products, but also in reverse, buy products and sell resources. However, the ship uses its full cargo capacity to buy and sell, so espacially when one uses a big ship and few, small-volume-wares, the percentage will not be met absolutely correctly. The freighter tries to achieve as good a compromise between short flight route and good market price as possible. However, it prefers stations that are not placed in pirate sectors and stations that meet the requirements of the special adjustments mentioned above. The Player HQ is never chosen as target. You have to use the normal softwares there.

The priority whether a ship rather flies a longer way or rather chooses an offer in the closer environment that is slightly worse can still be changed by me later. I calculated it after a relatively short test phase. A short feedback is needed so that I can change the values and publish a new version.

Connect Stations
The ship will now - like a complex construction kit - link two stations. It will buy and sell at the ware price of each station, so that any gains or losses will be carried by the homebase. If there are problems with money, the ship will use the player's bank account or just take and drop the ware. The ship is able to use a jumpdrive.

The command will scan the two stations that are entered and find out which ware is needed by one station and produced by the other. It will then move to the first station, get the ware and move it to the other station. This way, as ship can even supply NPC-stations.

Connect stations with TL: (really: Connect Sectors)
The command needs two sectors and the selection of a ware (at a random station). TL will then use the ships (TS, TP) it owns to buy wares in one sector and sell them in another. For this, EVERY ship involved has to be equipped with the Freight Transporter. TL also needs Trade Command Software MK1 and MK2.

Download V1.7
Image


The script package (.zip) contains:
- many Scriptfiles, 2 Textfiles (one relevant)
- 1 .spk-Script Installer File
- a readme

Resources:
cmd: 441, 442, 445
text: 8760

German Thread
Last edited by SymTec ltd. on Sat, 4. Oct 08, 20:52, edited 11 times in total.

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Wed, 7. Mar 07, 20:07

Version 1.1 released
Updates:
- Performance improvement by using more efficient code
- minor bugfix (ship now ignores homebase as trading partner)
- new mirror file uploaded: Link

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Sun, 25. Mar 07, 00:42

Version 1.2 released
- Improved interaction with the Sector Security Network so that ships really avoid entering any sector an enemy is known to be in...
- General Balancing improvement

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Mon, 26. Mar 07, 11:09

And me again:

Version 1.3 released
-Added another plugin for the latest SSN-Version
-More security and watching out for enemies
-updated ReadMe

-added Poll

-Joshua-
Posts: 124
Joined: Tue, 12. Apr 05, 16:53
x2

Post by -Joshua- » Tue, 27. Mar 07, 19:48

plain awesome
The best way to survive a battle is not getting into it.

Thraxwhirl
Posts: 681
Joined: Fri, 17. Feb 06, 21:54
x3ap

Post by Thraxwhirl » Wed, 28. Mar 07, 13:58

I'd sell my own Grandmother for an adjustment to Trade Mk2 if it allowed TS ships to Buy or Sell "For Best Price", to/from a player-owned Carrier - not just a Station.

Sadly, if your TS has a Carrier as its Homebase, those two commands are unavailable.

However, this would be SOOOOO useful.

For starters, your TS could go and repeatedly buy weapons for all the fighters aboard the Carrier. It could keep on aquiring "perishables", like Mass Driver Ammo, or Energy Cells.

It could also Sell off unwanted equipment "For best price" - like the weapons you HAD been using, but which are now obsolete. Eg. Perhaps you'd bought a load of Alpha PPCs, but now you've found a place where you can buy Beta or Gamma, so you want the Alphas removed and sold.

In addition... you could have a STATIONARY Carrier, equipped with weapons and fighters, stocked up with various goods, and you could use it as a Trading Station.

Granted, OTHER races couldn't dock at it, BUT its TS vessels could import and export to and from.

This would have significant advantages over the Free Argon Trading Station(for example), which you buy and deploy...

Such as:

Gun ports for defence.
No quota limit for individual types of cargo. Stations hold a max of each TYPE, but Carriers just have a limit for ALL stuff.
No need to transfer cash. Carriers and their TS/TPs just use your player funds.

The only downside is you couldn't set a MAX jumps range for the onboard TSs, so I guess they'd use the Default(9), unless somehow the Carrier itself could have "Adjust Max Jump Range" put in its additional commands... but even if it couldn't, a fixed 9 would be ok.

That's my thought anyway. Enabling "Buy for Best" and "Sell for Best" aboard TS Ships that have Carriers as their Homebases would be incredibly useful IMHO, and I'd REALLY be appreciative of anyone able to facillitate it.

Just an idea for you. ;)

Adam.

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Mon, 2. Apr 07, 00:49

Well, fleet supply is a completely different chapter. It is pretty hard to simulate a station if you only have a ship. Maybe in real distant future...

Version 1.4 released
- Added adjustment of jump range
- smaller updates with the calculations
- new feature/command:

Connect Stations
The ship will now - like a complex construction kit - link two stations. It will buy and sell at the ware price of each station, so that any gains or losses will be carried by the homebase. If there are problems with money, the ship will use the player's bank account or just take and drop the ware. The ship is able to use a jumpdrive.

The command will scan the two stations that are entered and find out which ware is needed by one station and produced by the other. It will then move to the first station, get the ware and move it to the other station. This way, as ship can even supply NPC-stations.

bob hope
Posts: 1431
Joined: Wed, 6. Nov 02, 21:31
x3

Post by bob hope » Sun, 8. Apr 07, 10:32

you know, i was going to get this, but it says that it wont work with the PHQ, which is exactly what i wanted this script for :(
About the name - i was lost for a name on the forum and looking round, then a Bob Hope film came on, and i thought "that will do nicely"

i was born and raised argumentative i dont mean to offend ...... sorry

MJALowe
Posts: 461
Joined: Fri, 5. Jan 07, 07:27
x3

Post by MJALowe » Sun, 8. Apr 07, 10:54

from what i can tell, the phq has the same problem that a carrier/tl would have...no preset wares or limits on said wares (other than the cargo cap)

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Sun, 8. Apr 07, 11:04

It will (afaik - never tried :D ) work at the PHQ - but normal ships won't move to the PHQ. 100% of a stock level at PHQ is, of course, not 500.000, at PHQ, ships says 100% is 1000 volume units, 10.000 for EC.

Might have a look over that, too ;)

The TL-script is almost done (final betatests) :)

bob hope
Posts: 1431
Joined: Wed, 6. Nov 02, 21:31
x3

Post by bob hope » Sun, 8. Apr 07, 11:08

ah, its just a thought for when you start building ships there instead of having to just sit there trying to get all the stuff you need and manually transfer it there so that no one else nicks it all or so its not overfilled
About the name - i was lost for a name on the forum and looking round, then a Bob Hope film came on, and i thought "that will do nicely"

i was born and raised argumentative i dont mean to offend ...... sorry

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Sun, 8. Apr 07, 15:01

Version 1.5 released
* Added TL ability
* SHQ: percentage calculation works with dock ware manager
* Library update

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Fri, 13. Apr 07, 19:31

Version 1.6 released
* Increased waiting time in case no target station has been found, increasing performance
* Prefer urgent buy/sell: If the ship finds a (player owned) target station that sells and has got over 80% full stock or buys and stock is lower than 20%, it will get a way higher priority to be selected as trade target.
* Security checks: Even without SSN-adjustments, ship will not fly to or through sectors that have any kind of satellites in them if ship has got no scanner installed
* Library update

User avatar
SymTec ltd.
Posts: 4389
Joined: Mon, 11. Apr 05, 21:11
x3tc

Post by SymTec ltd. » Wed, 2. May 07, 12:23

Version 1.7 released
* Ship is now able to sell weapons/shields/missiles to EDs that do not not trade with these items. A small toll; the difference between normal price and minimum price will be deducted for every flight.
* Library update

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

Post by jlehtone » Wed, 2. May 07, 13:50

SymTec ltd. wrote:A small toll
That is a nice idea. :thumb_up:

The toll should be equal to the work needed to manually sell.

But there is problem that one can sell only limited amount manually; the limit is how much you manage sell when you hit the keyboard continuously. Even with toll, there is no similar limit, unless the toll is progressive. If one could see how many ships are running "700" and use that ... nah, even that can be worked around.
Goner Pancake Protector X
Insanity included at no extra charge.
There is no Box. I am the sand.

Post Reply

Return to “X³: Reunion - Scripts and Modding”