[Script][v.2.10] Ship trade with 1-3 fixed Stations

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

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

User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

[Script][v.2.10] Ship trade with 1-3 fixed Stations

Post by SuperVegeta »

SuperVegeta HardCode ShipTrade Commands


====================================================
>>>>>>>>>>>>>>>>>>>>>>German Thread<<<<<<<<<<<<<<<<<<<
====================================================





As basis for this, is the EGO.Commands "Buy ware for best price"
and "Sell ware for best price", therefore the commands
function are similarly.
this Script has 3 commands, which makes possible for
ships to buy or sell, on 1-3 specified fixed stations
and to supply their homebase.


Exemple:
You have a complex that ore needs, but in the sector it gives none.
But You have however in the surrounding sectors own ore mines
from those are bring the ore to the complex and not of cheap AI stations,
because the money has finally to remain in the family :arrow: speak: to remain in the company :!:
For this there are now these commands:
1.The ship must have a home base, for which it can trade.
2.The ship must be Typ of TS, TP or P-TS.
3.The ship must have Trading Software MK2.




Router

<-- Consider if you have installed "SuperVegeta GKS Turret Commands" -->
<-- Description CMD.1 -->
<-- Description CMD.2 -->
<-- Description CMD.3 -->
<-- History -->
<-- Technicals -->
<-- Installation -->
<-- Download -->


< Keywords: Scripter SuperVegeta, Script, trade only with your own Stations, Trade, Transporter, self support >
Last edited by SuperVegeta on Tue, 1. Jan 08, 01:55, edited 4 times in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

I have installad SuperVegeta GKS Turret Commands


If you already installed SuperVegeta GKS Turret Commands,
then you must replace the T-file ##8917 by that of this Trading Scripts,
because "SuperVegeta GKS Turret Commands" and "SuperVegeta HardCode ShipTrade Commands" use the same T-File,
but the Commercial entries logically do not be contained, in the older versions as 4.10 of the Turret CMD.
Should you want to install "Turret CMD" later, then play this not a role.
Last edited by SuperVegeta on Sun, 1. Jul 07, 15:48, edited 1 time in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

1. Buy Ware for Best an Stations



This Command is for Buying on fixed Stations.
It needs a Ship of typ TS, TP or Pirat TS with installed
TradingSoftware MK2 and a Homebase (must be Selected),
for those the ship is buy.
You must Select a RessourceWare of the Homebase.
You must 1, but you can to 3 Buystations select:
for that, select over the Galaxy, then SectorMap a Station,
for the 2. and 3. Buystation you must select [Select Station] and
then over the Galaxy and SektorMap a Station select,
if you dont want a 2. and 3., or 3. ........... Station:
then select [null] for those Arguments.


This Command needs min 2x entered Values
1. [Ware] The Trade Ware, that must be a Ressource of the Homebase and the Buystion(s) must be can sell it.
2. [Buy.Station.1] The Station on that becomes buy.
Optional:
3. [Buy.Station.2] the 2. Station on that becomes buy or "null" if not
4. [Buy.Station.3] the 3. Station on that becomes buy or "null" if not


As soon as all inputs are accomplished these for their correctness are examined
How: Homebase exist, Homebase selected, Homebase Buy the Selected TradeWare,
Buystationen Sell the selected TradeWare.
If all correctly, the Command started, else it breaks

In the case of activation of the command the ship will fly as the first to the homebase and
there will wait, to it possible / necessity, to be Trading.
It trading so long to the homebase, it self, or all Buystationen are destroyed,
or the Command from the Player are set OFF.

Should be one of the BuyStations not longer exist,
Exemple: BuyStation.1 then became the next BuyStation (two) this position in the Script,
so that the Slot of the to this time last Station falling down (more infos over this in the Technical space).
The BuyStations are all destroyed then the Ship fly back to the Homebase
and then the Command breaks and the Ship wait of new orders from you.
Last edited by SuperVegeta on Sun, 1. Jul 07, 15:48, edited 1 time in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

2. Sell Ware for Best on Stations



This Command is for Selling on fixed Stations.
It needs a Ship of typ TS, TP or Pirat TS with installed
TradingSoftware MK2 and a Homebase (must be Selected),
for those the ship is sell.
You must Select a ProductWare of the Homebase.
You must 1, but you can to 3 Sellstations select:
for that, select over the Galaxy, then SectorMap a Station,
for the 2. and 3. Buystation you must select [Select Station] and
then over the Galaxy and SektorMap a Station select,
if you dont want a 2. and 3., or 3. ........... Station:
then select [null] for those Arguments.


This Command needs min 2x entered Values
1. [Ware] The Trade Ware, that must be a Product of the Homebase and the Sellstion(s) must be can Buy it.
2. [Sell.Station.1] The Station on that becomes Sell.
Optional:
3. [Sell.Station.2] the 2. Station on that becomes Sell or "null" if not
4. [Sell.Station.3] the 3. Station on that becomes Sell or "null" if not


As soon as all inputs are accomplished these for their correctness are examined
How: Homebase exist, Homebase selected, Homebase Sell the Selected TradeWare,
Sellstations Buy the selected TradeWare.
If all correctly, the Command started, else it breaks

In the case of activation of the command the ship will fly as the first to the homebase and
there will wait, to it possible / necessity, to be Trading.
It trading so long to the homebase, it self, or all Sellstationen are destroyed,
or the Command from the Player are set OFF.

Should be one of the SellStations not longer exist,
Exemple: SellStation.1 then became the next SellStation (two) this position in the Script,
so that the Slot of the to this time last Station falling down (more infos over this in the Technical space).
The SellStations are all destroyed then the Ship fly back to the Homebase
and then the Command breaks and the Ship wait of new orders from you.
Last edited by SuperVegeta on Sun, 1. Jul 07, 15:49, edited 1 time in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

3. Buy Amount of Ware for Best on Stations




This Command is special for the Player HQ
This Command is for Buying on fixed Stations.
The HQ is not as condition for the Command, its runnig with every Station.
It needs a Ship of typ TS, TP or Pirat TS with installed
TradingSoftware MK2 and a Homebase (must be Selected),
for those the ship is buy.
You must Select a RessourceWare of the Homebase.
You must 1, but you can to 3 Buystations select:
for that, select over the Galaxy, then SectorMap a Station,
for the 2. and 3. Buystation you must select [Select Station] and
then over the Galaxy and SektorMap a Station select,
if you dont want a 2. and 3., or 3. ........... Station:
then select [null] for those Arguments.
Next you must select the maximum store amount on the home base, up to which is to buy.


This Command needs min 2x entered Values
1. [Ware] The Trade Ware, that must be a Ressource of the Homebase and the Buystion(s) must be can sell it.
2. [Buy.Station.1] The Station on that becomes buy.
Optional:
3. [Buy.Station.2] the 2. Station on that becomes buy or "null" if not
4. [Buy.Station.3] the 3. Station on that becomes buy or "null" if not
must:
5. [Station.Store.Amount] maximum store amount on the home base, up to which is to buy. (min=1)


As soon as all inputs are accomplished these for their correctness are examined
How: Homebase exist, Homebase selected, Homebase Buy the Selected TradeWare,
Buystationen Sell the selected TradeWare.
If all correctly, the Command started, else it breaks

In the case of activation of the command the ship will fly as the first to the homebase and
there will wait, to it possible / necessity, to be Trading.
It trading so long to the homebase, it self, or all Buystationen are destroyed,
or the Command from the Player are set OFF.

Should be one of the BuyStations not longer exist,
Exemple: BuyStation.1 then became the next BuyStation (two) this position in the Script,
so that the Slot of the to this time last Station falling down (more infos over this in the Technical space).
The BuyStations are all destroyed then the Ship fly back to the Homebase
and then the Command breaks and the Ship wait of new orders from you.
Last edited by SuperVegeta on Sun, 1. Jul 07, 15:49, edited 1 time in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

History


Version 2.10
add entries of SuperVegeta Turret Commands
add entries of SuperVegeta Rocket Cruiser


Version 2.00
add Auto Updater for a Version higher as 2.00


Version 1.00
Release Version


Version 0.01
BETA Produktion
Last edited by SuperVegeta on Tue, 1. Jan 08, 01:58, edited 3 times in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Technicals


Commando Slot:
454 == Buy Ware for Best on Stations
455 == Sell Ware for Best on Stations
446 == Buy Ware for Best to max Num by Homebase Store amount


Scripts:
init.SV.Stationship.Hard.Trade
trade.buy.on.Stations.dummy.sv
trade.buy.on.Stations.cmd.sv
trade.sell.on.Stations.dummy.sv
trade.sell.on.Stations.cmd.sv
trade.buynum.on.Stations.dumy.sv
trade.buynum.on.Stations.cmd.sv
trade.HardCode.CMD.Updater.sv



T-File:
448917
498917
same as SuperVegeta GKS Turret Commands
same entries at Turret CMD Version 4.10 and Trade CMD Version 1.00


Lokale Variable:
HardCodeShipTradeCommandLocalVarText




Sequence of selection by the HardCode Buy-Sellstations

The choice of the station to is flown, becomes selected by points, which are assigned.
There are altogether 4 criteria for the selection of the station to that fly the ship.

The 1. criteria is, fixed from starting by th Command without a Tradingstation are destroyed,
It's the Sequence form your selection of the TradingStationen,
on this selection sequence, they are also preferred to fly to them
speak: the first selected Station has higher Priority as the 2. and 3. Station and
the 2. higher as the 3. Station.

The 2. criteria is the Store Amount of Buy-Sellstation,
the Stations became 1-3 Points:
at Buystation has won those with the highest and at Sellstation those with the smallest, Store Amount.

The 3. criteria is the Price by the Buy-Sellstation
the Stations became 1-3 Points:
at Buystation has won those with the smallest and at Sellstation those with the highest, Price.

The 4. criteria is the Distance (in Sector jumps) of the Buy-Sellstation,
the Stations became 1-3 Points:
es gewinnt die Station mit der geringsten Sprungentfernung zur Heimatbasis.
the Station with the smallest distance has won.


The points from the criteria 2-4 are added and compared,
those Station with the most points has won.
Have some Stations the same number of points, then becomes the 1. Criterion also included.
If no approach goal should come out nevertheless, some time is waited and the selection process begins again.


With the 1. criteria "Sequence of your Selection" you can for exemple the 4. criteria "The Distance" set repealed:
if you select first those Station with the highest distance (those Station with the 2.highest dist select as 2 and those Station with smallest dist select as 3)
the two criteria balance out themselves mutually and
so that then are only considered price and store amount in the selection formula.
Last edited by SuperVegeta on Sat, 7. Jul 07, 14:17, edited 3 times in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Installation


1. Installation:
>Copy the content of the "scripts" folder into the "scripts" folder of X3
>Copy the content of the "t" folder into the "t" folder of X3

Target directorys will be found in the X3 main directory:
HDD:/.../X3Reunion/....
1. "scripts"
2. "t"


or you use the Scriptinstaller Version with the Cycrow Scriptinstaller


2. Enabling the script editor:
>you have to be in a ship outside a station
>you have to change ur player name (not the ships name) to "Thereshallbewings"
>save your game
>quite the game
>load saved game



3. Uninstallation:
>Set Off those Commands of all Ships
>Save Game
>Delete all Scripte and T-File (T-File not delete if you want to use the SuperVegeta GKS Turret Commands)

>File list in Technical space


4. Update

>1.00 to 2.00
>you must at all Ships they are use the Commands, give the Command again and then save the Game
>for Updates from 2.00 to a higher version you must do noting without the installation
Last edited by SuperVegeta on Sat, 7. Jul 07, 14:17, edited 2 times in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Download

DL.Pack is a rar.Archiv in this are a rar.Archiv.Version and SPK.Version inside.

Script Trade CMDs

Textfile.8917 Version.1.20 for: (Supported the highest Versions of this Products)
Rocket Cruiser + Battleship Turret CMDs + Manual Ship Trade CMDs

[*]Download on the:
:arrow: X3-Reunion SuperVegeta Index Topic
Last edited by SuperVegeta on Sat, 7. Feb 09, 14:59, edited 9 times in total.
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Reservepost
Last edited by SuperVegeta on Sun, 1. Jul 07, 15:51, edited 1 time in total.
User avatar
KanineLupus
Posts: 591
Joined: Tue, 8. Mar 05, 07:47
x2

Post by KanineLupus »

Why reserve 9 posting slots?? Just put it all in the main subject body and be done with it
Ooops!!
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Release Version 1.00
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Release Version 2.00

Version 2.00
add Auto Updater for a Version higher as 2.00


look in the "Installation Part" for more Infos
User avatar
SuperVegeta
Posts: 1611
Joined: Tue, 20. Dec 05, 11:13
x3tc

Post by SuperVegeta »

Update
Version 2.10 at 01.01.2008
--> T-File add entries of SuperVegeta Turret Commands
--> T-File add entries of SuperVegeta Rocket Cruiser

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