[WIP/MOD] Supply And Trade Routes (including build supply and mining)

The place to discuss scripting and game modifications for X4: Foundations.

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

TheDeliveryMan
Posts: 255
Joined: Sat, 10. Dec 11, 04:10
x4

[WIP/MOD] Supply And Trade Routes (including build supply and mining)

Post by TheDeliveryMan » Tue, 11. Dec 18, 22:20

Default Order: Trade Route

This is work in progress and still needs a lot of testing, but it's looking good so far. Especially the UI part was way easier than expected :)

Features:
  • trade one ware
  • set max buying price
  • set min selling price
  • set max amount to trade
  • set min amount to trade
  • buy from up to ten sellers (depends on skill)
  • sell to up to ten buyers (depends on skill)
Screenshot

Update:

An alpha version of this MOD is now available at: https://github.com/TheDeliveryMan/TDM_S ... radeRoutes
  • SnTR Trade:
    • buy one ware from a number of NPC or player stations
    • sell that ware to a number of NPC or player stations
    • focus is on profit
  • SnTR Build:
    • buy one ware from a number of NPC or player stations
    • sell that ware to a number of NPC or player station build storages
    • focus is on getting the job done (ie. deliver that one missing Hull Part)
  • SnTR Mine:
    • mine one resource at a number of locations marked by resource probes
    • sell mined resource to a number of NPC or player stations
    • focus is on profit
    Use at your own risk and back up your saves.

    As it is an alpha version, there are still issues, especially with the route setup via the UI. But once setup it usally runs fine.

    A brief quick start:
    • have an empty freighter ready, set default behaviour to Hold position and clear any remaining orders from Order Queue
    • look at the map and find a profitable deal from factory A to factory B (these can be NPC or player factories)
    • open the Behaviours menu of the freighter
    • change Default Behaviour to SnTR Trade (Alpha 0)
    • set the ware you want to trade
    • max amount is fine for now, you might need to reduce min amount
    • you can adjust buying and selling price, but give it some margin for price variations
    • set Vendor 1 to the factory you want to buy from (click on blue button next to Vendor 1, zoom to the factory and right click -> Select on it)
    • set Customer 1 to the factory you want to sell to (click on blue button next to Customer 1, zoom to the factory and right click -> Select on it)
    • set Enable vendors to 1
    • set Enable customers to 1
    • click Confirm
    For build supply:
    • basically like above
    • the station you are building should already have a working dock and manager, otherwise you cannot select it
    • for Default Behaviour select SnTR Build
    For mining:
    • basically like above
    • mark resource deposits with a resource probe and select that probe just like a vendor station
    • for Default Behaviour select SnTR Mine
Last edited by TheDeliveryMan on Sat, 22. Dec 18, 19:15, edited 3 times in total.

idragon
Posts: 16
Joined: Fri, 17. Mar 17, 16:37
x4

Re: [WIP] Default Order: Trade Route

Post by idragon » Wed, 12. Dec 18, 05:51

TheDeliveryMan wrote:
Tue, 11. Dec 18, 22:20
Default Order: Trade Route

This is work in progress and still needs a lot of testing, but it's looking good so far. Especially the UI part was way easier than expected :)

Features:
  • trade one ware
  • set max buying price
  • set min selling price
  • set max amount to trade
  • set min amount to trade
  • buy from up to ten sellers (depends on skill)
  • sell to up to ten buyers (depends on skill)
Screenshot
Nice man, one of the things we really need. GL:)

lavak9
Posts: 44
Joined: Fri, 7. Dec 18, 00:38
x4

Re: [WIP] Default Order: Trade Route

Post by lavak9 » Wed, 12. Dec 18, 09:35

Nice work. Very much will appreciate having this.

User avatar
nidaren
Posts: 66
Joined: Wed, 27. Nov 13, 15:33
x4

Re: [WIP] Default Order: Trade Route

Post by nidaren » Wed, 12. Dec 18, 10:08

Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.

2m0re
Posts: 3
Joined: Sat, 8. Dec 18, 10:57
x4

Re: [WIP] Default Order: Trade Route

Post by 2m0re » Wed, 12. Dec 18, 12:00

nidaren wrote:
Wed, 12. Dec 18, 10:08
Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.
yeah thats what i want to see, a comma d line works as loop(mine, trade , fly to).

greetz

TheDeliveryMan
Posts: 255
Joined: Sat, 10. Dec 11, 04:10
x4

Re: [WIP] Default Order: Trade Route

Post by TheDeliveryMan » Wed, 12. Dec 18, 12:16

nidaren wrote:
Wed, 12. Dec 18, 10:08
Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.
Yes, a mining variant of the trade route script is already on my list of future possible additions. Semi-automated mining will probably even work right out of the box with the current trade route order. Set up a default route to a couple of stations buying the resource, then issue a one time minging order to the miner. If it has completed it will switch to default behaviour and look for a place to sell.

2m0re
Posts: 3
Joined: Sat, 8. Dec 18, 10:57
x4

Re: [WIP] Default Order: Trade Route

Post by 2m0re » Wed, 12. Dec 18, 12:26

TheDeliveryMan wrote:
Wed, 12. Dec 18, 12:16
nidaren wrote:
Wed, 12. Dec 18, 10:08
Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.
Yes, a mining variant of the trade route script is already on my list of future possible additions. Semi-automated mining will probably even work right out of the box with the current trade route order. Set up a default route to a couple of stations buying the resource, then issue a one time minging order to the miner. If it has completed it will switch to default behaviour and look for a place to sell.
nice to hear

Then why not creating a default route, where u can add stations with warez(like station button , wares button, buy or sell button and a add button for the next row),
same for miner select area, ressource and the station to sell or refill owned station.

TheDeliveryMan
Posts: 255
Joined: Sat, 10. Dec 11, 04:10
x4

Re: [WIP] Default Order: Trade Route

Post by TheDeliveryMan » Wed, 12. Dec 18, 12:32

2m0re wrote:
Wed, 12. Dec 18, 12:00
nidaren wrote:
Wed, 12. Dec 18, 10:08
Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.
yeah thats what i want to see, a comma d line works as loop(mine, trade , fly to).

greetz
Fully programmable loops need a different approach. For now, I want to keep it simple.

TheDeliveryMan
Posts: 255
Joined: Sat, 10. Dec 11, 04:10
x4

Re: [WIP] Default Order: Trade Route

Post by TheDeliveryMan » Wed, 12. Dec 18, 12:38

2m0re wrote:
Wed, 12. Dec 18, 12:26
TheDeliveryMan wrote:
Wed, 12. Dec 18, 12:16
nidaren wrote:
Wed, 12. Dec 18, 10:08
Great idea!

Would you consider doing the miner edition as well? In the current build, AutoMine can be very hectic, oftentimes going all over the map.

It would be great to have selection similar to your Trader: Gather Area 1, Seller 1 etc.

If the above is not to viable, maybe command limiting the mining zone to X km from sector centre and selling to one selcted buyer.
Yes, a mining variant of the trade route script is already on my list of future possible additions. Semi-automated mining will probably even work right out of the box with the current trade route order. Set up a default route to a couple of stations buying the resource, then issue a one time minging order to the miner. If it has completed it will switch to default behaviour and look for a place to sell.
nice to hear

Then why not creating a default route, where u can add stations with warez(like station button , wares button, buy or sell button and a add button for the next row),
same for miner select area, ressource and the station to sell or refill owned station.
Not sure if that is possible with the current UI.

AlienM1nd
Posts: 25
Joined: Mon, 3. Dec 18, 00:38
x4

Re: [WIP] Default Order: Trade Route

Post by AlienM1nd » Thu, 13. Dec 18, 21:37

This is exactly what I needed the other day and it wasn't in the game. And now it's here. Wohoo!

aerojet029
Posts: 78
Joined: Tue, 20. Aug 13, 14:36
x4

Re: [WIP] Default Order: Trade Route

Post by aerojet029 » Fri, 14. Dec 18, 09:02

I like the idea of tighter control, but what happens when none of your listed buyers happens to want to buy microchips (because of a stalled economy)

I would mostly be interested in a sector limiter. my traders keep going into hostile pirate space and I have to keep coming to their rescue

TheDeliveryMan
Posts: 255
Joined: Sat, 10. Dec 11, 04:10
x4

Re: [WIP] Default Order: Trade Route

Post by TheDeliveryMan » Sun, 16. Dec 18, 02:28

Alright, I made progress. The prototype of the mining route default order is basically working. The miner requires a list of deployed resource probes and a list of stations to sell to.

One thing I have not yet figured out is how to fully automate the supply of construction materials to a build storage. Using the trade route to buy the materials works just fine, but the transfer to the build storage has to be ordered manually.

ApoxNM
Posts: 729
Joined: Wed, 5. Dec 18, 07:17

Re: [WIP] Default Order: Trade Route

Post by ApoxNM » Sun, 16. Dec 18, 12:34

That's great (should be in the base game :evil: ).

Could please, pretty please add the ability to add and remove sectors?

reqw
Posts: 102
Joined: Sat, 13. Jan 07, 16:23
x4

Re: [WIP] Default Order: Trade Route

Post by reqw » Sun, 16. Dec 18, 13:14

I might be stupid
Mumbels " you are no question asked "

Were can i get this trade route add on plz PRITY PLEAS

barra
Posts: 14
Joined: Tue, 31. Jan 17, 08:58
x4

Re: [WIP] Default Order: Trade Route

Post by barra » Sun, 16. Dec 18, 14:01

looks promising, please release it :)

Post Reply

Return to “X4: Foundations - Scripts and Modding”