Misunderstood-Wookiee/Mules-and-Warehouses-Extended

[QUESTION]: How does Distribution Mules even work?

FormBurden opened this issue · 5 comments

So I'm having an issue trying to get this thing to work. I know by description that the Distribution pretty much takes wares and distributes them among your Warehouses. But, how do you even get it started? Does one warehouse have to have quite a lot of wares and have quite a number of said wares to get this thing started? Such as for your Target Warehouse? I have a warehouse (pretty much trade station) full of wares, so when I do the "Source >>> default min/max >>> Target the warehouses I want. They just sit idle? I've done it the other way around, still same outcome. The Trade Station has quite a lot of number of each ware, but nothing happens. Unless I'm doing something wrong?

Been experimenting with all kinds of scenarios on how you could use this feature, small ships, big ones, drag the sliders left/right, only have a source and no destination, nothing works.

The three sliders for distribution mule are pretty confusing. I'll print the logic and then explain it:

<do_if value="(not $needFound) and ($sourceCargoRatio gt $staticStorage)">
...
    <do_if value="(not $needFound) and ($targetCargoRatio lt $minStorage or ($sourceCargoRatio gt $maxStorage and $sourceCargoRatio gt ($targetCargoRatio + 10)))">

minStorage: the slider in the UI
staticStorage: the slider in the UI
maxStorage: the slider in the UI
sourceCargoRatio: the % full of the source station for that ware
targetCargoRatio: the % full of the target station for that ware

So, what this logic says:
No trade will happen if the source warehouse is below the % of staticStorage
No trade will happen if the target warehouse is above minStorage, unless the source is above max storage or the 10% above the target warehouses %.

It is tempting to then do something like setting staticStorage to 0, maxStorage to 0, and minStorage to 100. However, this causes the mule to take a ware out to a warehouse, then turn around and bring it right back. That's because for the return trip it simply renames the target to the source, and the source to the target. So it inverts all of the logic.

I didn't write any of this btw. It was the original author of mules.

I have had some luck setting the 3 sliders, in order, to something like 50,51,52. But honestly, I don't even use this mule, because of all the quirks in the logic that result from those three sliders and that but of logic above.

Yeah, I know most of you guys haven't really touched the Distribution side of the mod (from what I'm aware of), but it seems like Distribution needs some work, or completely re-written. Because even if it does work, whatever config is needed seems impossible to even find when doing all different kind of scenarios. I've tried what you stated above, but still no luck. Oh well lol

Thanks for the feedback. I agree on re-writing distribution mule, but we're working through updates to the supply mule and 3.2 trade rules at the moment. Then we need to do a refactor on travel mule using changes implemented for the supply mule.

On top of that, most of us working on the code seem to be sort of on-hold waiting for Ego to work out all of their own bugs in 3.2. It's hard to do long-term development work when the game is changing rapidly and frequently bugged during Beta.

No problem. Yeah I understand, Ego really seems to be pushing all sorts of changes, that effect the UI, different lines of code/changing the code, etc. All good though, waiting isn't an issue at all. Focus on your current projects :)

You guys are great. Keep it up!

Made #74 as a response to this. Thanks again for the feedback.