Misunderstood-Wookiee/Mules-and-Warehouses-Extended

[Potential Bug]: Error while parsing expression & supply mules not working with AI stations

altmank opened this issue · 13 comments

Seeing this in my debug logs for the 6.3.3 build. I'm also having some issues with supply mules not finding trades:
[=ERROR=] 256318.07 extensions\mules_and_warehouses_extended\aiscripts\station_mule.xml(422): Error while parsing expression: Operator expected

  • Input: $targetIsResource and (not $targetIsProduct))
  • Pos: ^
    [General] 256318.07 ======================================
    [General] 256318.07 ======================================
    [=ERROR=] 256318.07 extensions\mules_and_warehouses_extended\aiscripts\station_mule.xml(423): Error while parsing expression: Operator expected
  • Input: $(not targetIsResource) and ($targetIsProduct))
  • Pos: ^
    [General] 256318.07 ======================================
    [General] 256318.07 ======================================
    [=ERROR=] 256318.07 extensions\mules_and_warehouses_extended\aiscripts\station_mule.xml(425): Error while parsing expression: Operator expected
  • Input: $targetIsWare and (not $targetIsResource) and (not $targetIsProduct))
  • Pos:

the error is due to a missing parentheses but the variables are for debug only, they aren't used in the logic.

You're going to have to be way more specific on the supply mules

Okay, I thought that might be my root cause. I'm reverting to 6.3.2 to see if my issue persists. I didn't see good logging when I was running debug for 6.3.3 related to supply mules. Not sure why not.

In my current game, 6.3.3 version of mules. I can assign a supply mule to my PHQ, serve source only and allowed to check AI wares. It fails to find any trades to buy any of the research wares. If I set the same trader to just "Trade for" the PHQ, it finds wares to goes out to buy.

Hmmm, no change in 6.2.2.

Here are my settings for supply mule:
https://i.imgur.com/vVcDMXb.png
https://i.imgur.com/nT3f9lq.png

Here is the same trader then set to trade for the station and finding the wares to buy:
https://i.imgur.com/IK1QBSm.png

The problem here is with the fact that I had hardcoded the supply mule to require at least 75% full cargo. In the next release there's a slider that let's you drop that down as low as 25%. I wasn't comfortable taking it much lower because I didn't want people complaining about supply mule moving 10 wares.

I had a lot of trouble getting the PHQ research requirements filled as well. What I ended up doing was using 2 small traders, one autotrader, and one supply mule. With the next update, set the supply mule to 25% cargo requirement and you should be able to fill everything, if the auto trader doesn't cover it for you.

Unfortunately I don't know of a way to check that a trade is "special" for fulfilling research, or I would just ignore the cargo requirement for research trades. I already do that for build storage.

Ahhhh, I was seeing this all of a sudden in other scenarios and I think it relates to installing a mod that 5X cargo size for traders. I'm guessing they can't get enough cargo from the AI.

ah, yeah, that makes a lot of sense. I think @Misunderstood-Wookiee is putting out the patch soon here, that'll let you use the slider.

Awesome. Is this the only line I need to tweak at the moment if I want to manually adjust it?

<set_value name="$minCargoSize" exact="0.75*($ShipCapacity)f / $maxTrades" />

yep

Thank you!

Alright, I learned the bare minimum to mod in a percent slider by following the playerbuymod code as an example. Set to 1 percent and my little guy is off to buy me some wares with his super big cargo hold.

CargoPct

Awesome! Appreciate your time and the mod.