[MOD] Tradestation Network

The place to discuss scripting and game modifications for X Rebirth.

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

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

[MOD] Tradestation Network

Post by Marvin Martian » Wed, 30. Dec 15, 15:21

Hello,

i'd like to introduce my Tradestation Network Mod.
This improves the Tradeship-Captain- and Manager-Options for trading and allows to share wares of the Warehouses across galaxy.

That means, you have more control what your ships will trade on all of your stations, especially usefull for universal-cargo ships.

On the new Warehouse Stations the ships will try to find the searched ware on other Warehouse-Stations in case it haven't find a trade in Manager-Range (and only if the price is below average)

Image
At Captains/Pilots you have these Options at ships that trade and assigned to a station
  • (weight)Buy/Sell
    • (default) Buy/Sell
    • (more) Buy/Sell [++- at shipname]
    • Buy/(more) Sell [--+ at shipname]
    • (only) Buy [+++ at shipname]
    • (only) Sell [--- at shipname]
  • Tradenetwork config (not avalible at non Tradenetwork Stations)
    • Tradenetwork
      • default (based on Manager setting whitelist/blacklist)
      • yes (always buy on Networkstations - required on whitelist-mode or for m-class)
      • no (never buy - required on blacklist-mode to prevent traveling) [! at shipname]
    • Individual Blacklist of Networkstation-Zones in Range
    • Restrict trade (to faction) buy/sell/all
    • Reset of Blacklist
  • Restrict Warecategories (if possible on actual vesssel)
    • Container*
    • Energy*
    • Bulk*
    • Liquid *
      • Buy/Sell [Warecategorie at shipname, or nothing if no restriction, or "null" if all is blocked <- results in trade all again]
      • disable
      • (only) Buy [Warecategorie with leading "+" at shipname]
      • (only) Sell [Warecategorie with leading "-" at shipname]
  • Option to override Shipname in case the name will not set automaticly (or incorrect)
  • Option to override Manager-Station-Range to {l/xl}Zone/Sector/default, {s/m}Zone/cluster/default(limited to Sector) [r/R at shipname]
  • Job changer (beta)
    • switch job to mining (if possible)
    • switch job to trade (if possible)
    • switch job to patrol (already subordinate of Manager)
    • dock ship if possible (priority at small-ships), or stay close to station (patrol job without attack behavior, only to have a flee AI)
At Captains/Pilots you have these Options at ships that mining and assigned to a station
  • Restrict Warecategories (if possible on actual vesssel)
    • Bulk*
    • Liquid *
      • default
      • disable
    • preselect Ware (from possible list at this vessel)
      • default
      • prioritize (only this ware(s) will collected up to the station is well-stocked, then it works like regular miner/collector)
  • Option to override Shipname in case the name will not set automaticly (or incorrect)
  • Option to override Manager-Station-Range to {l/xl}Zone/Sector/default, {s/m}Zone/default(limited to Sector) [r/R at shipname]
  • Job changer (beta)
    • switch job to mining (if possible)
    • switch job to trade (if possible)
    • switch job to patrol (already subordinate of Manager)
    • dock ship if possible (priority at small-ships), or stay close to station (patrol job without attack behavior, only to have a flee AI)

The name on unnamed (default named) ships will be adjust to the setting on every change, if you rename your ships to what you like, the name should not touched

Image
At Tradestations (actual only Warehouse)
  • Range of Gates the possible Tradepartner can be, only own Stations will be used (default unlimited)
    • add one Gate to range (0-X)
    • *the Textlink forces to update of cached tradezones of this station*
    • subtract (X-0 / set back to unlimited) of Range (0 means no trade with the Network too)
  • Tradenetwork
    • blacklist (default - all capital trade ships who not excluded will search possible buy trades at other Warehouses)
    • whitelist (only capital trade ships who explicit set to "yes" will search possible buy trades at other Warehouses)
  • Blacklist of Stations in Range, global use for all assigned Networktraders.
this Mod is created under XR 4.0.0 (Beta) but should run with lower Version too, only Warehouse won't trade before 4.0.0, but the ship-cargo-features on stations will work

Download:
XR v4.00 Tradenetwork-115.zip v4.10 Tradenetwork-116.zip
  • 1.16 adapted to XR 4.10(Beta 5) - non 4.1 users need to use TN 1.15
  • 1.15 Bugfix, restrict trade to faction buy/sell/all (for ships), added M-ships to tradenetwork by opt-in for 1-gate range
  • 1.14 Zone-Blacklist of Tradenetworkstations
  • 1.12 & 1.13 bugfix for userside overbooked storage
  • 1.11 change at conditions of buy and change at move.idle to stay in half Zonesize (25km) range of center instead of move away
  • 1.10 improved Jobchanger (beta) and new options at miningships (beta)
  • 1.09 improved shipnames, Jobchanger (beta)
  • 1.08 bugfix of buy behavior and range-setting into name
  • 1.07 improved sell/buy behavior, new option to give each ship individual range setting
  • 1.06 ships with sell priority without "under averageprice" limit
  • 1.04 list of ranges from Networkstations
  • 1.03 Language compatibility with HaaS
  • 1.02 Bugfix about ware-based in/out trading
  • 1.0 Initial Release
Installation:
Extract and copy the mm_tradenetwork/ into extensions/ folder of Rebirth


Modding:
to add own station macros to the Tradestationnetwork add an MD like

Code: Select all

<cue name="MyMod_init_MMTN">
	<conditions>
		<check_any>
			<event_cue_signalled cue="md.Setup.GameStart"/>
			<event_game_loaded />
		</check_any>
	</conditions>
	<delay min="1s"/>
	<actions>
		<do_if value="global.$tradestationnetwork?">
			<do_if value="global.$tradestationnetwork.indexof.{macro.struct_bt_my_tradestation_macro}" negate="true">
				<append_to_list name="global.$tradestationnetwork" exact="macro.struct_bt_my_tradestation_macro"/>
			</do_if>
		</do_if>
		<do_else>
			<reset_cue cue="this" />
		</do_else>
	</actions>
</cue>
Last edited by Marvin Martian on Wed, 26. Apr 17, 15:37, edited 18 times in total.

CommanderTM
Posts: 567
Joined: Mon, 20. May 13, 09:18
xr

Post by CommanderTM » Wed, 30. Dec 15, 15:42

I cant find it from description. Does this require new DLC or it is your own version of Warehouse and works without DLC?

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 10. Feb 16, 19:32

added a list with distance of called station to all networkstations with indication if (like configuration) they are in range or not

SyberSmoke
Posts: 650
Joined: Sat, 11. Feb 12, 04:03
x4

Post by SyberSmoke » Wed, 2. Mar 16, 20:06

How effeciant is this mod at distributing a ware like...E-Cells to other player owned stations? Apparently my Energy carries do not want to give energy to my stations any more. So can this be used to force better reliability in distributing wares?

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Thu, 3. Mar 16, 08:17

the tradescript is the vanilla one, the only difference would be to decide what ware-type each ship should sell/buy (especially at Universal-Cargo)
and that you can produce (or only buy) ware in one cluster and over the tradestations it can distributed to other clusters with demand

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Fri, 18. Mar 16, 18:06

Update the mod
- to "fix" some actual vanilla limits (problems) at manual prices (no sell by station ships in case the price is above base)
- and prevent ships from endless sell and buy the same stuff between another tradestation

- also add the ability to override the station range for each ship indivial, this can help to force "galaxy-network traders" to buy at the network instead of local dealers when you set them the range to zone

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Fri, 18. Mar 16, 18:31

What do ya think about Marvin (I think is not possible)

Its possible to make an hybrid station production-warehouse?

Thanks

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Fri, 18. Mar 16, 18:57

possible yes, good idea - i don't think so

because of Egosoft give you production overlay or tradeware overlay

you could in case of a production station with additional tradeware (like mod-shipyards) add an own link to the tradeware menu but this isn't a good idea for an mod, where people press every button and "manage" everything like a boss what is not expected to get managed - so it isn't foolproof enough to do this in my opinion

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Fri, 18. Mar 16, 19:17

Ok thanks :)

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 21. Mar 16, 18:14

new recommended update with bugfix of buy behavior

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Mon, 21. Mar 16, 19:14

Marvin said:

"Modding: to add own station macros to the Tradestationnetwork add an MD like"


If I understand correctly, the code below this phrase is for a modded custom warehouse to be recognized by the game as a warehouse?

Thanks :)

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Mon, 21. Mar 16, 19:51

the game recognize all stations without production as warehouse, this entry is only required to add the station macro into tradestation network

antoniut
Posts: 198
Joined: Sat, 4. Oct 14, 13:07
xr

Post by antoniut » Mon, 21. Mar 16, 19:53

So are the production modules that "blocks" or tells to the game that there are production stations no warehouses...

Ok, thanks :)

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Wed, 23. Mar 16, 18:37

the game decide what wareoverlay you will see, the tradeware -, or production/ressource-price

----

new update
at station assigned ships is now a option to change the ship job, so it may possible to let a mining vessel trade in case there is no mining required
or simple parking (small-ships will try do dock at the station)
but this feature isn't tested much, so be carefull
and at switch to "mining" the ship cargo except of fuel will be removed (at first try to store the stuff at the station, but if not possible, simply deleted)

caysee[USC]
Posts: 5019
Joined: Sat, 7. Feb 04, 02:47
x4

Post by caysee[USC] » Thu, 15. Dec 16, 19:15

moin,moin marvin

is das ganze mit dem neuen patch noch kompatieble?

und ich hab eine schwirigkeit, villt kannste mir da was raten.

ich hab in DV mehrere lager, eins in OL, eins in TO und eins in HL
nun sollen die frachter, die alle auf einkaufen in trastationetwork stehen, die waren von DV nach HdL bringen. bis TO klapppt das auch ganz gut, aber die frachter in TO kaufen in OL und in HdL ein, was natuerlich bloedsinn is. aber ich weiss mir keinen rat mehr, wie ich das zeuges da hin bringen kann.
CPU Typ HexaCore Intel Core i5-8600, 3100 MHz ( Boost 43 x 100)
Grafikkarte XFX Radeon RX 580 8 GB GDDR5
Arbeitsspeicher 32614 MB (DDR4 SDRAM)
Motherboard Name Asus ROG Strix H370-F Gaming
Win 10 64 bit

KEINE MODS

User avatar
Marvin Martian
Posts: 3546
Joined: Sun, 8. Apr 12, 09:40
x4

Post by Marvin Martian » Fri, 16. Dec 16, 06:58

4.1 sollte es funktionieren

das mit den unerwünschten Einkäufen lässt sich höchstens umgehen in dem man eine Blacklist an Stationen/Waren anlegen würde
mangels einer UI das zu konfigurieren, könnte man mittelfristig nur eine Zonenblacklist (je Station/Schiff) einführen wo diese Händler dann eben nicht einkaufen sollen

----

the mod should work at 4.1

to prevent buy from unwanted stations in valid range maybe an blacklist can solve this behavior in an future version

caysee[USC]
Posts: 5019
Joined: Sat, 7. Feb 04, 02:47
x4

Post by caysee[USC] » Fri, 16. Dec 16, 14:51

sowas in der art war auch mein gedanke, schade das man den schiffen nicht sagen kann, das sie NUR mit der einen station handeln sollen..also sprich mit dem lager in OL, und das in TO zu ignorieren, aber so laeufts ja auf das selbe hinaus.
CPU Typ HexaCore Intel Core i5-8600, 3100 MHz ( Boost 43 x 100)
Grafikkarte XFX Radeon RX 580 8 GB GDDR5
Arbeitsspeicher 32614 MB (DDR4 SDRAM)
Motherboard Name Asus ROG Strix H370-F Gaming
Win 10 64 bit

KEINE MODS

Guest

Post by Guest » Fri, 16. Dec 16, 16:56

@caysee

Ich habe für die Problematik eine etwas aufwendige aber akzeptable Lösung gefunden. Meine Handelsschiffe dürfen zum einkaufen nur in das Nachbarsystem fliegen, habe aber den Warenverkehr auf 3 Lager pro System aufgeteilt (schon allein der Übersicht wegen). Mit genügend Einkäufer flutscht es recht gut.
Last edited by Guest on Fri, 16. Dec 16, 22:26, edited 1 time in total.

caysee[USC]
Posts: 5019
Joined: Sat, 7. Feb 04, 02:47
x4

Post by caysee[USC] » Fri, 16. Dec 16, 17:08

aehm. schau dir nochmal meinen post an, und die kette. das problem kannste ohne die zuweisung von gesperrten sektoren oder zuweisung von zulaessigen stationen nicht loesen. weil das lager in TO is auf 2 spruenge eingestellt, und die frachter kaufen ja auch in OL ein, aber eben auch in dem 1 sprung entfernten HdL weil das ja auch in reichweite liegt. dazu kommt, das die schiffe zu erst wohl da einkaufen, wos naeher ist, also in dem fall in Hdl anstatt in OL.
aber ich bin mir sicher, das marvin da was brauchbares einfaellt..:)
CPU Typ HexaCore Intel Core i5-8600, 3100 MHz ( Boost 43 x 100)
Grafikkarte XFX Radeon RX 580 8 GB GDDR5
Arbeitsspeicher 32614 MB (DDR4 SDRAM)
Motherboard Name Asus ROG Strix H370-F Gaming
Win 10 64 bit

KEINE MODS

Guest

Post by Guest » Fri, 16. Dec 16, 17:34

:o hmm, gut in TO hab ich keine Lager (noch nicht), du meinst mit TO nicht zufällig Toride? :oops: (für mich ist TO Teladi Outpost)

Da ich aber eh überall mit allem Handle schon wegen eigener Produktionen funktioniert es mit 3 Lager pro System und Reichweite 1 Sprung recht gut.

Post Reply

Return to “X Rebirth - Scripts and Modding”