[3.30] Station Traders and Free Traders alike, ignore player/faction discounts

Ask here if you experience technical problems with X4: Foundations.

Moderator: Moderators for English X Forum

Post Reply
xjibe
Posts: 19
Joined: Thu, 5. Sep 13, 08:27
x3tc

[3.30] Station Traders and Free Traders alike, ignore player/faction discounts

Post by xjibe » Thu, 26. Nov 20, 08:12

Your Station Traders and Free Traders alike, ignore player/faction discounts (e.g. displayed on the map in trade window). Corresponding aiscripts trade.find.commander/trade.find.free and used find_sell_offers function does not take player/faction discounts in account. It only returns a relative price (between min and max)

<find_sell_offer tradepartner="this.ship" wares="$buyoffers.{$i}.ware" space="$buyspaces.{$b}" result="$selloffers" multiple="true">
<relativeprice max="$evalrelprice"/>

As a result available sell offers with player discounts are ignored despite being below automatic or set pricing threshold and station traders sit idle or opt for a more expensive one.

Futher: trade.find.commander aiscript uses "$selloffers.{$j}.volume" in tradevalue calculation/evaluation:

<set_value name="$loctradevalue" exact="[$selloffers.{$j}.amount, this.assignedcontrolled.cargo.{$selloffers.{$j}.ware}.free].min * $selloffers.{$j}.volume * -($selloffers.{$j}.relativeprice - 2)"/>

==> meaning very large stock (even with higher relative price) could be be preferred!

Probably meant to be: "$selloffers.{$j}.ware.volume" or removed all together!?

Post Reply

Return to “X4: Foundations - Technical Support”