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

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

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

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Sat, 22. Dec 18, 18:19

I've added an default order script for automated mining. See first post for details.

Guest242
Posts: 86
Joined: Sun, 12. Feb 17, 19:11
x4

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

Post by Guest242 » Sat, 22. Dec 18, 19:46

Great mod!
I try to push a shipyard with engine parts because the NPC trader are too slow to supply...
Customer 1 = Of course it's this shipyard.
I would like to set the vendor to "anyone" who fulfil the conditions (max price buy, min price sell, amount and so on...). It would make the configuration easier instead of search the galaxy for specific factory. And maybe for the reverse case customer = anyone. It is possibile?

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Tue, 25. Dec 18, 00:26

Guest242 wrote:
Sat, 22. Dec 18, 19:46
Great mod!
I try to push a shipyard with engine parts because the NPC trader are too slow to supply...
Customer 1 = Of course it's this shipyard.
I would like to set the vendor to "anyone" who fulfil the conditions (max price buy, min price sell, amount and so on...). It would make the configuration easier instead of search the galaxy for specific factory. And maybe for the reverse case customer = anyone. It is possibile?
Well, an "anyone" setting does not fit my personal playstyle, so it's highly unlikely I would add that. However, a feature I am thinking about is an auto-generate function for the vendor/customer lists.

Drake
Posts: 40
Joined: Wed, 28. Nov 18, 14:16
x4

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

Post by Drake » Tue, 25. Dec 18, 10:45

First off thank you for both working on and sharing this mod!

Question I have is if I want to remove this later, is that a realistic thing? I respect the disclaimer about using it at your own risk, I am curious to simply know if clearing say a trader of orders and uninstalling later on is a possibility. I ask because we never know what Egosoft may do in the future and for the time being I simply want to use this mod to automate Engine Part runs to a couple Wharfs that are stuck. Thank you for your time and happy holidays.

Bravari
Posts: 42
Joined: Mon, 15. Jun 09, 20:00
x4

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

Post by Bravari » Tue, 25. Dec 18, 12:39

Does this work with TaterTrader?

Buzz2005
Posts: 2206
Joined: Sat, 26. Feb 05, 01:47
x4

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

Post by Buzz2005 » Tue, 25. Dec 18, 13:08

2 different things tatertrade and this, cant work "together", you can only pick one default behavior
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Tue, 25. Dec 18, 14:48

Drake wrote:
Tue, 25. Dec 18, 10:45
First off thank you for both working on and sharing this mod!

Question I have is if I want to remove this later, is that a realistic thing? I respect the disclaimer about using it at your own risk, I am curious to simply know if clearing say a trader of orders and uninstalling later on is a possibility. I ask because we never know what Egosoft may do in the future and for the time being I simply want to use this mod to automate Engine Part runs to a couple Wharfs that are stuck. Thank you for your time and happy holidays.
I'd need to test this for myself, before giving you a definite answer.

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Tue, 25. Dec 18, 14:55

Bravari wrote:
Tue, 25. Dec 18, 12:39
Does this work with TaterTrader?
I don't think there will be conflicts if you have both MODs installed. Of course, you can only have one of them active on the same ship at any given time.

Buzz2005
Posts: 2206
Joined: Sat, 26. Feb 05, 01:47
x4

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

Post by Buzz2005 » Tue, 25. Dec 18, 15:06

there is no conflict, have both installed
Fixed ships getting spawned away from ship configuration menu at resupply ships from automatically getting deployables.

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Tue, 25. Dec 18, 16:04

TheDeliveryMan wrote:
Tue, 25. Dec 18, 14:48
Drake wrote:
Tue, 25. Dec 18, 10:45
First off thank you for both working on and sharing this mod!

Question I have is if I want to remove this later, is that a realistic thing? I respect the disclaimer about using it at your own risk, I am curious to simply know if clearing say a trader of orders and uninstalling later on is a possibility. I ask because we never know what Egosoft may do in the future and for the time being I simply want to use this mod to automate Engine Part runs to a couple Wharfs that are stuck. Thank you for your time and happy holidays.
I'd need to test this for myself, before giving you a definite answer.
Alright, I just tried to simply remove my mod folder from from extensions and loaded a save. All freighters/miners finished their current order and then switched gracefully to default behaviour "Hold Position". Looking at the behaviours menu before they finished their current order showed no default behaviour, but it was still possible to set a new one. So yes, I think it is realistic that you will be able to remove this mod later.

Drake
Posts: 40
Joined: Wed, 28. Nov 18, 14:16
x4

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

Post by Drake » Wed, 26. Dec 18, 01:29

TheDeliveryMan wrote:
Tue, 25. Dec 18, 16:04
TheDeliveryMan wrote:
Tue, 25. Dec 18, 14:48
Drake wrote:
Tue, 25. Dec 18, 10:45
First off thank you for both working on and sharing this mod!

Question I have is if I want to remove this later, is that a realistic thing? I respect the disclaimer about using it at your own risk, I am curious to simply know if clearing say a trader of orders and uninstalling later on is a possibility. I ask because we never know what Egosoft may do in the future and for the time being I simply want to use this mod to automate Engine Part runs to a couple Wharfs that are stuck. Thank you for your time and happy holidays.
I'd need to test this for myself, before giving you a definite answer.
Alright, I just tried to simply remove my mod folder from from extensions and loaded a save. All freighters/miners finished their current order and then switched gracefully to default behaviour "Hold Position". Looking at the behaviours menu before they finished their current order showed no default behaviour, but it was still possible to set a new one. So yes, I think it is realistic that you will be able to remove this mod later.
Thank you for checking that sir and Happy Holidays!

Conbadicus
Posts: 217
Joined: Sat, 13. Feb 10, 09:31

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

Post by Conbadicus » Wed, 26. Dec 18, 18:19

Just picked up your mod as I am looking for something that I can use to set up supply routes from my stations to other stations - the only issue Im running into right now is that the stations still need money because teh haulers are acting as traders looking for price - Can you add logistics hauler mode? Instead of making trades simply have the hauler run the command "trade ware" ? (EDIT: Transfer ware instead of trade ware")

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Thu, 27. Dec 18, 12:25

Conbadicus wrote:
Wed, 26. Dec 18, 18:19
Just picked up your mod as I am looking for something that I can use to set up supply routes from my stations to other stations - the only issue Im running into right now is that the stations still need money because teh haulers are acting as traders looking for price - Can you add logistics hauler mode? Instead of making trades simply have the hauler run the command "trade ware" ? (EDIT: Transfer ware instead of trade ware")
Yes, right now they need buy/sell offers at your own stations and the manager does need money to create these offers, altough there is actually no money transfered when a trade is done with a player station. Having the traders react to prices has the advantage that you can influence their priorities.

Regarding ware transfer, I can think of a couple of situations where it would come handy and I'll probably implement it eventually. Unfortunately, ware transfer opens up a whole new can of worms. Manager decisions are bypassed and you can end up with stations that have no storage space left for vital resources or products.

leecarter
Posts: 379
Joined: Sat, 9. Sep 06, 22:35
x3tc

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

Post by leecarter » Fri, 28. Dec 18, 14:46

TheDeliveryMan wrote:
Thu, 27. Dec 18, 12:25
Regarding ware transfer, I can think of a couple of situations where it would come handy and I'll probably implement it eventually. Unfortunately, ware transfer opens up a whole new can of worms. Manager decisions are bypassed and you can end up with stations that have no storage space left for vital resources or products.
I just made a new request post asking for exactly this. I'm perfectly fine draining one station of selected wares, in fact in some scenarios that exactly what I want

* Station A and B produce wares for building my own stations (or ships) and does not sell them to other factions, station C serves as a storage depot for those wares. Just keep draining stations A and B until C is full.

* Station A is located in a remote sector with high resources. Stations B and C are in other sectors with higher profits but lower resources. Just keep draining the resources from A into B and C.

If I overfill a station with something that's my problem for not being a diligent dictator. :D

This way you could build hubs that distribute resources empire-wide.

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Fri, 28. Dec 18, 17:12

leecarter wrote:
Fri, 28. Dec 18, 14:46
TheDeliveryMan wrote:
Thu, 27. Dec 18, 12:25
Regarding ware transfer, I can think of a couple of situations where it would come handy and I'll probably implement it eventually. Unfortunately, ware transfer opens up a whole new can of worms. Manager decisions are bypassed and you can end up with stations that have no storage space left for vital resources or products.
I just made a new request post asking for exactly this. I'm perfectly fine draining one station of selected wares, in fact in some scenarios that exactly what I want

* Station A and B produce wares for building my own stations (or ships) and does not sell them to other factions, station C serves as a storage depot for those wares. Just keep draining stations A and B until C is full.

* Station A is located in a remote sector with high resources. Stations B and C are in other sectors with higher profits but lower resources. Just keep draining the resources from A into B and C.

If I overfill a station with something that's my problem for not being a diligent dictator. :D

This way you could build hubs that distribute resources empire-wide.
Alright, noted as frequently made feature request ;)

leecarter
Posts: 379
Joined: Sat, 9. Sep 06, 22:35
x3tc

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

Post by leecarter » Fri, 28. Dec 18, 20:12

TheDeliveryMan wrote:
Fri, 28. Dec 18, 17:12
Alright, noted as frequently made feature request ;)
As I play this afternoon my "station building supply" station is providing me with an obscene amount of turret and shield components. What would be cool is if I could set up a station with nothing but storage and call it the over stock station. I would manually dump wares into the overstock when I had enough on hand. Then I would have these aforementioned "direct transfer" ships set up to snag the wares from the overstock station (a station with no prices associated to it) and distribute them to various stripped down stations throughout the galaxy. So like a station with nothing but a dock, storage, and a shield component module sitting in Profit Center that doesn't produce anything, just waits for overstock to appear and then sells it, you could also associate tater traders to those stations for selling.

There's a lot of uses for being able to tell a ship "go put this thing in that thing and keep doing it", especially if you want to go the trade empire route. A network of production hubs, storage hubs, both locked to trading with other factions, and then perfectly located little store fronts to sell them in would be so cool to build. Would add a new dimension to the game when I finally go to wipe the Teladi menace from the galaxy too.

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Sat, 29. Dec 18, 18:17

leecarter wrote:
Fri, 28. Dec 18, 20:12
TheDeliveryMan wrote:
Fri, 28. Dec 18, 17:12
Alright, noted as frequently made feature request ;)
As I play this afternoon my "station building supply" station is providing me with an obscene amount of turret and shield components. What would be cool is if I could set up a station with nothing but storage and call it the over stock station. I would manually dump wares into the overstock when I had enough on hand. Then I would have these aforementioned "direct transfer" ships set up to snag the wares from the overstock station (a station with no prices associated to it) and distribute them to various stripped down stations throughout the galaxy. So like a station with nothing but a dock, storage, and a shield component module sitting in Profit Center that doesn't produce anything, just waits for overstock to appear and then sells it, you could also associate tater traders to those stations for selling.

There's a lot of uses for being able to tell a ship "go put this thing in that thing and keep doing it", especially if you want to go the trade empire route. A network of production hubs, storage hubs, both locked to trading with other factions, and then perfectly located little store fronts to sell them in would be so cool to build. Would add a new dimension to the game when I finally go to wipe the Teladi menace from the galaxy too.
What if you could create buy and sell offers at your storage hubs and store fronts?

leecarter
Posts: 379
Joined: Sat, 9. Sep 06, 22:35
x3tc

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

Post by leecarter » Sat, 29. Dec 18, 20:21

TheDeliveryMan wrote:
Sat, 29. Dec 18, 18:17
What if you could create buy and sell offers at your storage hubs and store fronts?
You mean create buy offers for goods you don't actually produce at the station? Yeah that would work too, you could basically make your own trade station then, no need to slap on a factory mod just to be able to sell things. That would be sweet!

TheDeliveryMan
Posts: 705
Joined: Sat, 10. Dec 11, 03:10
x4

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

Post by TheDeliveryMan » Sun, 30. Dec 18, 18:08

leecarter wrote:
Sat, 29. Dec 18, 20:21
TheDeliveryMan wrote:
Sat, 29. Dec 18, 18:17
What if you could create buy and sell offers at your storage hubs and store fronts?
You mean create buy offers for goods you don't actually produce at the station? Yeah that would work too, you could basically make your own trade station then, no need to slap on a factory mod just to be able to sell things. That would be sweet!
Yes, I tested it with a regular player station with just a dock and storage. From a script I use the same function that runs on vanilla trade stations. I can configure it to be a buy, sell, or both offer and I can set the price to be either fixed at average or dynamic. The actual price and amount calculations are then done by the game engine. These offers show up on the map and my trade route freighters reacted to them just as expected, so that seems to work. Unfortunately, the vanilla station overview only displays the sell offer but not the buy offer.

leecarter
Posts: 379
Joined: Sat, 9. Sep 06, 22:35
x3tc

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

Post by leecarter » Sun, 30. Dec 18, 18:17

TheDeliveryMan wrote:
Sun, 30. Dec 18, 18:08
Yes, I tested it with a regular player station with just a dock and storage. From a script I use the same function that runs on vanilla trade stations. I can configure it to be a buy, sell, or both offer and I can set the price to be either fixed at average or dynamic. The actual price and amount calculations are then done by the game engine. These offers show up on the map and my trade route freighters reacted to them just as expected, so that seems to work. Unfortunately, the vanilla station overview only displays the sell offer but not the buy offer.
Can you see them in the right click context -> trade offers dialog? Ideally you'd be able to adjust buying manually, but if they exist and are automatic you've basically just created a player trade station mod! Nice!

I have some X4 time set aside this afternoon and I'd be happy to do some testing if you want to share. I'll post some feedback before I go to bed. Feels like a totally different mod, so maybe create a new thread. Or, just send me a PM with the download link if you want to keep it away from the masses for now.

At any rate, very cool - can't wait to try it!

Post Reply

Return to “X4: Foundations - Scripts and Modding”