[MOD] Mules and Warehouses v4.0

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

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

Browser_ice
Posts: 485
Joined: Sun, 5. Feb 06, 17:15
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Browser_ice » Sun, 23. Jun 19, 23:04

ThePiercdPrnc wrote:
Sun, 23. Jun 19, 21:55
Browser_ice wrote:
Sun, 23. Jun 19, 21:39
Hi, started using your MOD yesterday but I am having some issues. Most of my trader ships are not doing anything on Station Mule and Distribute Mule. Out of 5 traders, only one was doing anything and that was on Station Mule; the others seam to just stay there doing nothing. Travel Mule seams to be working but I only used it on one trader.

It is the only MOD I use.

I have 3 stations in the same sector:
- one shipyard not yet fully built but has a manager and ship trader
- one yard not yet fully built but has a manager and ship trader
- one fully built producing every parts 2x needed for both above and self sufficient
How much money do you have in your budget and do you have buy orders for the things you need in your warehouse? I had an issue where my mules wouldn't move product it was due to not having enough money in the budget. I have a warehouse with 85m storage and i need about 150m in the budget to get them to move everything sufficently. The factories have a budget of 1m credits (to make it easy for me to keep track if it moves) and they buy from the warehouse just fine. But the warehouse needs a large budget due to all the different wares I'm sending to it.
The station to which my Distribute Mules are assigned is the one producing every parts and has 2 times the budget needing for operating (43M for operating). It sells a lot and buys a few.

@Ramokthan, I do not understand. Where is this max trade option? When I change the default behavior to distribute, the only infos I change are the source station and add 2 target stations, nothing else. If you are talking about the general filter options (upper right icon), it is set to a max price = $5000, min vol=none and nb displayed trades=5.

Since my post, I rebooted the game and moved all my Distribute mules to station mules. Now they are doing something.
Steam X-Superbox, XR, playing X4
WIndows-10
Intel I7-3770
16Gb Memory
Nvgidia GTX-1060

Ramokthan
Posts: 107
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Sun, 23. Jun 19, 23:30

Sorry i was not clear enough, the tip was regarding my BuyerMule script posted in the thread, but its not jet implemented officially int he mules, so its kind an "addon"

ThePiercdPrnc
Posts: 18
Joined: Fri, 21. Jun 19, 08:25

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Mon, 24. Jun 19, 01:01

Browser_ice wrote:
Sun, 23. Jun 19, 23:04


Since my post, I rebooted the game and moved all my Distribute mules to station mules. Now they are doing something.
I've noticed that distribute mules don't tend to do much. To work around this issue I've got station mules assigned to my defense platform, and they do a good job moving things around where needed. Esp my hull parts to new factories.

Kamuchi_
Posts: 174
Joined: Fri, 7. Dec 18, 05:04
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Kamuchi_ » Mon, 24. Jun 19, 07:55

Thanks for the mod and adding to it :)

I just installed it hoping for less "dumb" behavior and to use it as station builders, but that is kinda lacking with only the cluster function.
Maybe an idea for the feature, adding an "Station builder" option that will only check player owned station build storage orders, this way you can build stations anywhere with a dedicated fleet.
I just had to resort back to TaterTrader with 0 sell and max buy distence, but the ships will go apeshit when stations start getting built and befor I have enough stuff being made locally to supply station building priority :|

Ramokthan
Posts: 107
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Mon, 24. Jun 19, 09:19

The BuyerMule (script is posted here in this thread) is able to do this as soon as the first dock is built.

Unfortunatelly you cant select it as a station before any module is built yet, thats why at least one docking module has to be built.

But after assigning a buyer mule to the station and setting it up correctly it will buy the desired wares in no time.

The stationmule can do this too, but he can only pick up the needed goods from own station, thus its useless if you don't produce these goods yourself.

Kamuchi_
Posts: 174
Joined: Fri, 7. Dec 18, 05:04
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Kamuchi_ » Mon, 24. Jun 19, 15:35

Right, but that's not what I was suggesting.
Using TaterTrader for example, move ships to local, set sell to 0 and buy to max and limit factions to player only and it works just the way you made your script, just for everything in the system.
I'm not worried about npc's supplying some of the initial materials to build the first module(s), but after that, so you could set a number of ships dedicated to a station that will only look at build storages owned by players.
This would work great as warehouse subs as they would always have materials supplied to it from all over the place and if some normal traders would supply materials then so be it, but having dedicated ships that could travel for how long as they want would be great as they won't be skipping their normal duties distributing wares otherwise nearly all the time unless being in the same system :)

Hope you can imagine what I mean a bit better.

Ramokthan
Posts: 107
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Mon, 24. Jun 19, 17:23

No i guess you just confused me more....

Kamuchi_
Posts: 174
Joined: Fri, 7. Dec 18, 05:04
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Kamuchi_ » Mon, 24. Jun 19, 17:31

Alright, never mind then.

SladeTalon
Posts: 5
Joined: Fri, 14. Jun 19, 13:42

Re: [MOD] Mules and Warehouses v4.0

Post by SladeTalon » Tue, 25. Jun 19, 15:00

As much as i love the mod so far, i do wonder upon being able to just assign transports to work for the station, and using the manager to handle all the logistics by just telling him the information. lol i can be lazy at times lol

i have issues with my mules not viewing the buy orders fast enough for build storage but i know that is cause they are off doing other trades

LegionOfOne
Posts: 122
Joined: Sun, 16. Dec 18, 13:16
x4

Re: [MOD] Mules and Warehouses v4.0

Post by LegionOfOne » Tue, 25. Jun 19, 21:28

Ramokthan wrote:
Sun, 23. Jun 19, 22:31
I suggest to wind up the recheck timers a lot... if a lot mules are working and a lot of them are not finding any trade it has a heavy performance impact if you let them check every second.
I won't have time to look at your buyer mule or update the mod until this week-end, but I'd just like to confirm that this is an oversight.
I meant to have 10 seconds between checks, I lowered it during tests and forgot to raise it up again.

I'll correct it in the next version.

I'll also take the time to answer questions this week-end, if the more active forum members haven't answered already (thanks guys and gals).

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Scoob » Wed, 26. Jun 19, 00:29

Hi,

Just started using this - shudda listend to you sooner lol - the TravelMule looks like it meets my needs perfectly.

One thing though... Is there any way to have a Mule that's assigned to work for a station show in the Property list of said station? This is more for neatness than anything as I'm assigning my "normal" station-assigned M-Class Freighters as Mules now, and they're starting to clutter up my unassigned ship list, where they were neatly hidden before.

If this is at all possible, I think it'd keep things looking tidy and leave only ships that are truly unassigned in the Unassigned Ships list.

Note: I did try assigning a station assigned ship as a Mule, but it of course broke the hierarchy...unless perhaps I did something wrong?

Edit: I'm a numpty....I set the ship up as a Mule a second time, and this time it popped right into the Stations subordinates list! Go figure. Either I screwed up (nahhh lol) or that was some RAPID work by yourself ;)

Cheers,

Scoob.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Scoob » Wed, 26. Jun 19, 01:00

Wow, this "just works(tm)" doesn't it? The Travel Mule is exactly what the default station-assigned Freighter behaviour should be. Simple and easy to set up, and does what I want.

I wonder if a "Mining Mule" is in this mods future? Being able to tell ships exactly which resource to collect would be perfect. Default behaviour often goes nuts for a single resource, ignoring all others. It's better than it was for sure, but still needs work. Allowing the player to prioritise which resources to collect via ship assignment would be great.

Thought: Perhaps this is will be unpopular, but I feel that there should be penalties / bonuses based on Captain and Crews experience level. Nothing major, just something like low-level crews have a bit of a wait time between trade jobs - only for the Travel Mule though, as they're directly making profit. The "logistics" type Mules are fine as they are I suspect.

Scoob.

Ramokthan
Posts: 107
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Wed, 26. Jun 19, 15:21

For mining i think there are other mods which can handle the mining more intelligent.

While intelligence is not a property of the Mules.... Will likely never be.

SladeTalon
Posts: 5
Joined: Fri, 14. Jun 19, 13:42

Re: [MOD] Mules and Warehouses v4.0

Post by SladeTalon » Thu, 27. Jun 19, 14:34

using v4

when a StationMule is assigned to the factories as source and the warehouse as target, they do very little unless the another factory needs energy cells.
with the assign to source they just sit around most the time even tho almost all factories are full.
if i take the assign to source off they start filling the build storage. but if its on nothing...
they will buy from the warehouse but will not sell to the warehouse.

things i noticed.
i found a few that had a few pieces of cargo, emptied it and they seem to start working just not with the warehouse.
my warehouse shows on map it will buy just smart chips and drone parts. but sells everything inside.
every warehouse has 2 SM all declare the target as warehouse all using seller priority some set to trade med,food, EC.
The warehouse is made pretty much of only containers of all 3 types attached to a deference station

Every factory has 5 to 10 mill credits and the warehouse 90 mil.

any thoughts?

ThePiercdPrnc
Posts: 18
Joined: Fri, 21. Jun 19, 08:25

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Thu, 27. Jun 19, 22:23

SladeTalon, do you have the other mod that allows you to decide what is being sold at your warehouse? Players and warehouses (iirc) I generally use that one to set up the buy/sell order then my mules do their thing. Ive got 27 factories and they all move things to and from the warehouse. Ive currently got 2 medium and one large mule per factory, other than my ice and EC because those things make HUGE amounts of materials so I have a ton of mules for those. My warehouse has about 300m CR in it and it still wont buy water or EC but it still gets moved even though it says it doesnt buy it. Don't put liq/solid storage on your warehouse it's a waste of time, the mules cant move miner only goods only container goods. Also, this might be a dumb question but...do you have managers at all your stations inc the warehouse? If not mules won't do anything.

ThePiercdPrnc
Posts: 18
Joined: Fri, 21. Jun 19, 08:25

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Fri, 28. Jun 19, 08:03

Better example down below so removing this information
Last edited by ThePiercdPrnc on Sat, 29. Jun 19, 09:54, edited 1 time in total.

SladeTalon
Posts: 5
Joined: Fri, 14. Jun 19, 13:42

Re: [MOD] Mules and Warehouses v4.0

Post by SladeTalon » Fri, 28. Jun 19, 13:14

ThePiercdPrnc wrote:
Thu, 27. Jun 19, 22:23
SladeTalon, do you have the other mod that allows you to decide what is being sold at your warehouse? Players and warehouses (iirc) I generally use that one to set up the buy/sell order then my mules do their thing. Ive got 27 factories and they all move things to and from the warehouse. Ive currently got 2 medium and one large mule per factory, other than my ice and EC because those things make HUGE amounts of materials so I have a ton of mules for those. My warehouse has about 300m CR in it and it still wont buy water or EC but it still gets moved even though it says it doesnt buy it. Don't put liq/solid storage on your warehouse it's a waste of time, the mules cant move miner only goods only container goods. Also, this might be a dumb question but...do you have managers at all your stations inc the warehouse? If not mules won't do anything.
Yes, i have a manger in all the warehouses and the player and warehouse mod with the g mod. i built a new factory today and the mules filled it so it can produce. but they still wont fill the warehouse, making me think the buy orders are not set properly.

Scoob
Posts: 9921
Joined: Thu, 27. Feb 03, 22:28
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Scoob » Sat, 29. Jun 19, 01:24

Hello again :)

I think I may have found a very minor issue...

I had to M-Class Freighters assigned to my station, this satisfied the "Assign Subordinate: Trade Ship" mission at said station. Nice.

However, since I changed those Freighter to be Travel Mules, this mission has popped up again as unsatisfied. So, despite the Freighters being subordinate to the station (though I did have an odd issue with this initially you might recall) they're NOT satisfying the mission requirements.

Hopefully this minor issue can be resolved for tidiness, it irks me to have invalid open missions like this lol.

Cheers,

Scoob.

ThePiercdPrnc
Posts: 18
Joined: Fri, 21. Jun 19, 08:25

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Sat, 29. Jun 19, 09:42

Here is one example of some of the issues I'm having, this particular one is where the trade gets stuck. Meaning it won't actually do the trade it just keeps repeating the same command over and over again until I drop the cargo. Now mind you it says I have no EC left to trade, that's not true its got a full load. Another part of this whole thing is the mule that is selling random things to other stations belongs to a station that ACTUALLY needs the things it's selling elsewhere. (Engine part factory wants 700k EC yet my mule is selling 1EC to Hull parts). The similar issue is my mule will take a max load of energy from a station (not my solar plants or Trading station but a production station) then try to sell like 6 EC to another station and then another 6 to another station. This second issue it'll actually do the trade but then my stations fill up with product that isn't getting moved then my trading station cant sell the intermediate items to the other stations and production halts on those stations. I've currently got about 30 stations and 350m CR in the trading station. All other stations have 1m cr (to make it easy to see if it moves). I've got about 230 various mules at least 2 medium (demeter vanguard) and 1 lrg (selene vanguard) for every station plus some have more if they need it. But the Selene's seem to be the ones that bug out more often than the demeters, they MOST of the time actually do what they are supposed to but I'm trying to avoid needing like 10 of those per station by using some L size freighters as well.

Also to clarify, all my managers are 5 star and my captains are 4+ star so that's definitely not the problem. I could see things being less efficient with crappy workers.

TL:DR
  • Mules selling things they shouldn't to stations they shouldn't
  • Mules getting stuck attempting to sell things to stations they should (Repeated failed trades)
  • Result Mules not trading the intermediate products to main warehouse to allow for other ships to grab and bring to production factories
Example image for clarity
Show
Image

Ramokthan
Posts: 107
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Sat, 29. Jun 19, 23:55

Im messing a bit with the station mule, troubleshooting why he sometimes denys delivering anything despite there are wares to deliver...

Really hard to understand that code... i'd say messy if i dare. :|
That loop can be somehow avoided i guess, it makes the thing really hard to track.

And you desperately need to implement logging.

just some tips.

Post Reply

Return to “X4: Foundations - Scripts and Modding”