[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: 2651
Joined: Sun, 8. Apr 12, 09:40

[MOD] Tradestation Network

Post by Marvin Martian » Wed, 30. Dec 15, 16: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: 541
Joined: Mon, 20. May 13, 09:18

Post by CommanderTM » Wed, 30. Dec 15, 16: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Wed, 10. Feb 16, 20: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: 633
Joined: Sat, 11. Feb 12, 05:03

Post by SyberSmoke » Wed, 2. Mar 16, 21: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Thu, 3. Mar 16, 09: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Fri, 18. Mar 16, 19: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: 197
Joined: Sat, 4. Oct 14, 13:07

Post by antoniut » Fri, 18. Mar 16, 19: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Fri, 18. Mar 16, 19: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: 197
Joined: Sat, 4. Oct 14, 13:07

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

Ok thanks :)

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

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

new recommended update with bugfix of buy behavior

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

Post by antoniut » Mon, 21. Mar 16, 20: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Mon, 21. Mar 16, 20: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: 197
Joined: Sat, 4. Oct 14, 13:07

Post by antoniut » Mon, 21. Mar 16, 20: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: 2651
Joined: Sun, 8. Apr 12, 09:40

Post by Marvin Martian » Wed, 23. Mar 16, 19: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: 3894
Joined: Sat, 7. Feb 04, 03:47

Post by caysee[USC] » Thu, 15. Dec 16, 20: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 QuadCore Intel Core i5-4690K, 3900 MHz (39 x 100)
Grafikkarte NVIDIA GeForce GTX 950 (2 GB)
Arbeitsspeicher 24467 MB (DDR3 SDRAM)
Win 10 64 bit

https://www.dropbox.com/s/b1n584jlklvkd ... g.txt?dl=0

Post Reply

Return to “X Rebirth - Scripts and Modding”