[MOD] Mules and Warehouses v4.0

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

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

Post Reply
Ramokthan
Posts: 103
Joined: Fri, 22. Apr 16, 21:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Thu, 20. Jun 19, 21:32

This is actually a functionality i already suggested. XD

A "Buy Mule"

But good another one votes for it independently, so it makes the feature more important.
However my idea was having no "price limit" or a configurable one... but i would be fine if the mule would buy at any price, for stockpiling crucial goods and stuff AI doesnt like to deliver at even highest price to factories, so you are able to sustain them with needs that was until you can produce the needs yourself.

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

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Fri, 21. Jun 19, 10:22

First off, I love your mod. It is absolutely what I was looking for. But, currently I'm having some weird issues. I originally wasn't able to keep up with the demand of my energy with one medium mule. So I upgraded to a large freighter. But for some reason even with no in system trades, and food/med disabled it keeps picking up food and trying to deliver it to a station that is NOT my warehouse. This mule's specific purpose is supposed to be pick up 19k EC and drop them at the warehouse so others will pick it up and supply the rest of my businesses. Also for some reason my warehouse isn't buying up to their storage capacity so I get traders that get stuck unable to pickup for example water, I have a HUGE water factory to keep everyone happy and sell to the universe. But my warehouse refuses to accept it unless I do manual ware trading, it wants like 444k water but it wont accept it from my mules unless I do it manually. Now when I originally had things running with medium mules everyone was doing what they were supposed to be doing. But when I upgraded to large they went all wonky. :gruebel:

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

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Fri, 21. Jun 19, 10:54

I have some suggestions:
If the cargo of the large freighter cannot be filled completely, he wont do a run unless "low volume" is activated.
"Include energy cells" onyl includes them, but they wont do only energy cells that way.
if no fitting trade is found the mules search for other trades they are not configured for,unless they are configured "no sector trades"


But i have to admit i also had some wonky behaviours in the past.
For example delivering a need in my factory which was 0 on stock on the factory and sufficient stocked on my warehouse.
Still they denied delivering it. Solution was to set up some lower volume traders. ("low volume trade" didnt do the trick there, because they starte to trade something like 20 silicon wafers and such wonky stuff)
The issue was actually that the factory max stock was LOWER then the cargo space of the mule, so the mule has a logic to fill its cargo almost completely before doing a trade, but if the target stock is less than its max cargo hold it never can fill its cargo full for that ware and thus never trades it, no matter how bad it is needed.

Just some suggestions where to keep an eye on when troubleshooting. :-)

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

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Fri, 21. Jun 19, 12:04

So you are saying you have more than one mule running for a station? I can definitely do that. Just annoying that I have plenty of EC (1.8mil) and the warehouse can hold 444k but for some reason its just not moving it. The weird behavior i was referring to earlier was that it was set to NO in sector trades and NOT set to low volume yet it would pick up 5400 soja husk and attempt to sell it, but the receiver which wasnt even supposed to be seen by that mule was only wanting a small amount so it kept getting stuck. Now I have even more weird issues, my large freighters are refusing to pick up anything. Example my water mule should go to the station and pick up a full load (there is plenty) and deliver it to my warehouse (which wants plenty). Yet it goes to the ice refinery and grabs water then puts it back in an endless loop. But my medium freighter can pick it up and deliver it no problems. Same issue with my solar mule, its now doing the same exact thing, it has the trade orders yet just keeps recycling the buy order and dropping the materials. Also my ice mule is just refusing to do anything even if i have it set to not be a mule and transfer wares, it wont at all do anything. The energy mule will move EC if i do it manually but not if it is set to be a mule. This is really odd behavior. I wondered why everything shut down when i left it running when i went to work. And obviously with no EC being traded all my factories shut down. Which killed my entire population of workers with no food, medical supplies being manufactured for distribution.

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

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Fri, 21. Jun 19, 13:33

So you are saying you have more than one mule running for a station?
Deinitely yes,

It would be impossible to sustain big factories without being several Mules being dedicated to that station
i guess every station of me has at LEAST 6 L freighters working as mule.

I mean for example i am producing almost 800k hull parts per hour in a single factory... in which world one single mule could handle fetching so much hull parts alone. XD
Needless to say the factory also needs refined metals delivered in order to work.

So yes you can assing as much mules as you want to a station.

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

Re: [MOD] Mules and Warehouses v4.0

Post by LegionOfOne » Fri, 21. Jun 19, 19:34

ThePiercdPrnc wrote:
Fri, 21. Jun 19, 10:22
[...] no in system trades, and food/med disabled it keeps picking up food [...]
Aside from everything else, this should not happen. If you do not allow food and meds, they should NEVER pick up food and meds.
A few things to try to debug the rest :
- If the warehouse doesn't have a lot of storage space, it may not leave enough room for E-cells, and thus trades' volumes are too low to be delivered by Mules.

- If the warehouse has a lot of storage, it need a lot of money in budget to publish all buy offers.
As an example, I have a gigantic warehouse with 600 million units of storage.
A budget of 200 million credits is not enough to publish all buy offers !
3 or 4 hundred do the trick.
To check this, right-click on your warehouse and look at the number of units in the BUY column. If some numbers are absent (empty column), then you need more budget.
ThePiercdPrnc wrote:
Fri, 21. Jun 19, 10:22
it wants like 444k water but it wont accept it from my mules unless I do it manually.
This in particular looks like an issue with an insufficient budget.
Don't get me started on station managers, I know :rant:

You definitely need more than one Mule per factory, unless their production is very small.
I tend to use mostly M freighters, they are much faster, particularly in docking/undocking and going through gates.
Things got a little better for L freighters now that Mules don't undock between trades, though.

Also : I noticed the second request for the Buyer Mule.
I'll work on it in the next few weeks, although I won't be able to maintain the pace of updates of the first ten days, because life and dayjob.
But I'm not going anywhere.

Cyron43
Posts: 64
Joined: Sun, 6. Jan 19, 18:30
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Cyron43 » Fri, 21. Jun 19, 19:47

LegionOfOne wrote:
Fri, 21. Jun 19, 19:34
Also : I noticed the second request for the Buyer Mule.
I'll work on it in the next few weeks, although I won't be able to maintain the pace of updates of the first ten days, because life and dayjob.
But I'm not going anywhere.
Thank you. :)

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

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Sat, 22. Jun 19, 02:31

Thanks for the information, I added medium mules, and upped my budget and things seem to be working much better :) . No more odd trading and my factories are no longer dieing due to no food/meds. I love the new mules, the trader especially since tater trader is meh at best after you can produce your own materials. But I have a feature request, like in tater trader and several other mods there is a "copy preset" and a few lists of materials (legal, illegal, refined, etc) that make setting up trading much easier. I don't want my traders selling energy because i have better things to sell, but i have a lot of them so I dont want to have to pick each one individually just to avoid selling energy if it is at all possible. I assume you could probably look at the other mods for ideas on how to implement such a system.

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

Re: [MOD] Mules and Warehouses v4.0

Post by LegionOfOne » Sat, 22. Jun 19, 11:38

ThePiercdPrnc wrote:
Sat, 22. Jun 19, 02:31
"copy preset"
If you don't select wares at all, all are selected by default.
If you do select wares, there is a checkbox at the very top of the list that selects every ware.
So, to set up a mule to sell everything but E-cells, that would only take 3 clicks : open ware list, select all, unselect E-cells.

Because of that, I'm not going to include the "copy presets" like in Tatertrade.

BUT : I am trying to modify the "defend" order, so that if you take a freighter, right-click a Mule and order the freighter to "Defend", that freighter will copy the Mule's order and every option.
That way you will be able to set up one Mule, then select a group of freighters and give them all the same order very simply.
I haven't made it work yet, though.

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

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Sat, 22. Jun 19, 13:19

Even though i dont find the current setup routine not too heavy, it can be tempting setting up hundreds of them..
Would be a nice quality of life improvement. :-)

+1

I let my traders trade everything... a full load of EC does give a good amount of money too and i generally tend to think its better my factories run non stop rather then emptying epensive wares to 0 and let EC run full.
After all Solar plants have the best Cost/Income effiency, i mean it does provide almost 200k income and its not very expensive to build them and thy dont need an input like in x3 (if someone remembers).

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

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Sat, 22. Jun 19, 16:13

Ahh excellent, I didn't notice the select all option. And the reason I don't want them selling all my EC is because I managed to run out, lol due to all my traders selling EC and nothing else. My 10 solar plant couldn't keep up with demand from my factories and my traders. Also while it is about 200k a load, i can make a LOT more selling other things. But since i usually have a ton of extra energy my traders tend to see this as the best sales deal and ignore all my other sales materials.

Azran_Zala
Posts: 69
Joined: Tue, 13. Mar 18, 01:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Azran_Zala » Sat, 22. Jun 19, 17:11

No Matter what settings I try my mule appears hell-bent on hauling Ecells. Ideas?

Below is what im trying to go for (I've tried even with all settings off except for source and target with same result).

Image

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

Re: [MOD] Mules and Warehouses v4.0

Post by ThePiercdPrnc » Sat, 22. Jun 19, 17:59

What else is stored at your warehouse that the factory might need? If nothing then turn off two-way trade because its just trying to supply what it thinks you need. I dont see any space for food/meds in your storage.

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

Re: [MOD] Mules and Warehouses v4.0

Post by Ramokthan » Sat, 22. Jun 19, 18:30

Is is possible to implement the sector bans or do threy already respect them?

Btw im trying to do the Buyer Mule for lolz.
:-D

Azran_Zala
Posts: 69
Joined: Tue, 13. Mar 18, 01:25
x4

Re: [MOD] Mules and Warehouses v4.0

Post by Azran_Zala » Sat, 22. Jun 19, 22:45

ThePiercdPrnc wrote:
Sat, 22. Jun 19, 17:59
What else is stored at your warehouse that the factory might need? If nothing then turn off two-way trade because its just trying to supply what it thinks you need. I dont see any space for food/meds in your storage.
There is no Food in the source because I've never bothered filling it [yet *tm] (it does have 4x large habitats though).
The warehouse was freshly built; completely empty, just storage and a dock (and a manager with 1mil dosh).
I've tried with just setting a source and target without checking any other options; 4/5 times it wants to move the e-cells; but if I delete the orders occasionally it picks up engine parts or antimatter converters instead.

Post Reply

Return to “X4: Foundations - Scripts and Modding”