v0.02 is up on Steam, and Nexus
Changes in v0.02
Improved find/prefer own stations for existing cargo irrespective of price
Allowing a ship to sell wares that are resources to its home station will help when you use one station to centrally produce large amounts of one ware, such as Chemical Compounds. The other changes are aimed at emptying out the cargo as quickly as possible to get it back in use but without messing about with tiny trades.
This mod does the following
This reproduces the effect from previous games, like X3TC, where wares were fed directly into other connected stations by using manager trading ships more effectively.
Player stations will actively push goods to other player owned stations to keep all your stations producing and maximise production of the most complex (expensive) wares.
When this mod is first enabled it should generate a flurry of extra trades which will hog the cargo ships while it shifts stock to your other stations. After a while it should have sorted things out and the volume of these trades should reduce giving the cargo ships back to the vanilla rules.
The extra trades that this creates are in addition to the vanilla ones and have a priority mid way between construction vessels and the vanilla trading
It is aimed at players with lots of stations but will still do a couple of useful things with only the plot URV station
Also has a bonus feature which returns ships to their home station when idle (if in home sector) to reduce clutter
Its save game compatible. Although it does generates additional standard trades which are in the save game until they complete. Disabling the mod should still allow these additional trades to complete as they are processd by other vanilla scripts (may take 10 -15 mins).
Things that you should be aware of
The way that funds flow with the extra player to player transactions is the same as in the vanilla game. The vanilla game doesn't appear to charge for transactions between a ship that is commanded by a station and that station but does charge if the ship trades with another station that is not its commander. This can cause you grief with individual manager account balances bouncing up and down.
There are two ways round this that I am aware of
My Free player to player trades which doesn't charge for player to player trades and works by doing custom trades between player assets at 0 Cr.
UniTrader's UTAdvent02 Manager Account Sharing to allow all your stations to share one balance
The Station Push Wares mod
Vanilla trading requires that a station is selling at under average price which means greater than 50% stock and that the buying price is greater than the selling price
This tends to cause a lot of stock to build up at the lower levels of the pyramid before anything is shipped upwards and a lot of supply glitches
The vanilla rules are setup for maximum financial gain which means maximum size transactions, this tends to cause a glut of a particular ware on one station and a shortage of the same ware on another
So for player manager controlled trading ships change the rules to
Code: Select all
When trying to find a buy offer for wares in our ships cargo first *Add*. Find/prefer own stations and CV's for existing cargo irrespective of price
Weeds out trades that are less than 5% of the destinations capacity for the ware to allow the vanilla rule to be reached and the remainder of the cargo to be sold to anyone
Checks all existing cargo in one go and trades the ware with the highest relativeprice (priority)
Code: Select all
When checking if we can sell products from our station somewhere *Change*. Allow player stations to sell wares at 10% stock *Add*. Allow player stations to buy player wares irrespective of price
Min trade 10pc of prod capacity (allows vanilla trading rules to be reached and is much more efficient in the use of the ships)
Limit max trade amount per transaction to 25pc of prod capacity. relativeprice should drop when a station gets its 25% and hopefully the next station will have a higher priority the next time around
Ships also have/had a tendency to go off buying stuff when they should have been selling it up the pyramid
Code: Select all
When checking if we can buy resources for our station somewhere *Change*. Prevent player stations from buying wares above 10% stock if they have a station that produces the ware
Code: Select all
When can't find anything good at the moment... wait a while, then check again *Add*. Return ship to home station when idle if in home sector
There is a circular trading rule that prevents any station from buying and selling to itself which means that it should work fine with warehouses but otherwise doesn't treat them any differently from manufacturing stations
Will still Allow player stations to sell wares at 10% stock and Return ship to home station when idle if in home sector even if you only have one station
Should be multi-lingual as far as the Extensions menu is concerned
To install it extract and copy the "station_push_wares" folder to the "Steam\steamapps\common\X Rebirth\extensions" folder (create the extensions folder if you don't have it already) or subscribe to it from Steam and restart the game.
Compatibility with other mods
This mod patches Egosoft's trade.findtraderun.xml
If another mod replaces trade.findtraderun.xml then this mods code will not be run and will not be compatible with it.
If another mod patches trade.findtraderun.xml then it may or may not be compatible depending on what it changes
Tradestation Network by Marvin Martian also Allows players stations to sell goods at lower stock in this case 30%. The exact value you get will depend on which mod patches first.
Galaxy Station Range by Yorrick Vander allows the station trading range to be set to Galaxy. The two mods seem to work well together and Station Push wares can be used with it to supply a player station in another Galaxy.
Known issues and Gotchas
This mod does not magically create wares, so for maximum effect, you still need to have enough production capacity of all of the required wares. Although it should do some good with just two stations provided that one of them consumes wares that the other produces.
This mod creates extra trades for player stations but still allows trades with player station via the vanilla rules if the price is right. The vanilla rules have no limits on trade amounts. The interaction of these two sets of rules can mean that trade amounts are difficult to predict.
Station trading operational range is enforced and is worth checking if a player station doesn't want to trade with another one.
If neither station or ship has any Cargolifters then the trading ship will still pick up the ware, fly to its destination and dock BUT the trade will fail with "reasoncode 65536 (0x10000 - 0000000000000010000000000000000b)!". The vanilla code does this too.
Diagnosing issues or getting more info on what the mod is doing (trade_findtraderun_debug)
[26/07/2016 CHANGED this section ]
To enable full debuging of all trade transactions (initiated by this mod and the vanilla code) install the optional trade_findtraderun_debug mini mod from Nexus
Its also visible as an Optional file under Station Push wares Files
Start X Rebirth in debug logging mode by adding -debug all -logfile debug.log to the end of the command line
Hope you like the mod
************ Original first Post - Player station subordinates to only sell wares ****************
The title is a bit of a mouthfull
I would like to get bottom up manufacturing going properly. The idea is that I have Basic raw material factories (Solar and food) that have ships and they sell goods to stations higher up the triangle. Then the higher ones sell to the ones above them and so on.
The bottom layer of energy and water works fine because there is either no primary resources or the ware fits in a different storage type than the product. The food layer can be problematical and the next layer above that is even more of a problem as most things use storage containers.
Its possible to do some things with station placement and trading range to help but it still tends to leave a few holes.
The big problem occurs when the product uses the same type of storage as the resources. Then there is a nasty habit of the station subordinate ship going off to buy resources when it should be shipping products to the next layer of my production empire and of course everything grinds to a halt
One possible solution would be to prevent station manager commanded ships from buying resources.
I haven't done any ai script modding yet
I have had a quick look around and identified the trade.station.player ai script as the one that might do the work.
What I was thinking is that if I empty the $resources list then any player station subordinate ships will simply not have any resources to buy.
So if I changed line 38
Code: Select all
<set_value name="$resources" exact="this.station.resources.list" />
Code: Select all
<set_value name="$resources" exact="" />
Am I looking in the right place and is the approach valid or not ?
Has anyone else addressed the problem already ?