[6.20] Discounts are applied twice?

This forum is the ideal place for all discussion relating to X4. You will also find additional information from developers here.

Moderator: Moderators for English X Forum

Post Reply
Wanderer1113
Posts: 1
Joined: Wed, 13. Sep 23, 21:22

[6.20] Discounts are applied twice?

Post by Wanderer1113 » Fri, 10. May 24, 18:07

I am trying to do some modding and created a simple custom trading order script to use on my traders. While testing it I observed some very strange calculation in prices and transaction values for buy trading orders. Here is an example:

Suppose, we want to buy Advanced Electronics from Trading Station. Here is how the trade offer looks like:

https://i.imgur.com/ttDj9Li.jpg

We see that the price is 983.58. With no bonuses from "High/Low Supply" the price should be 1014 because that's average price for Advanced Electronics (using <find_sell_offer> command in my script and outputting the result I could see that the actual unit price in this offer is indeed 1014). So, the discount from "Known Associate" is already applied in the UI - 983.58 is roughly 1014 minus 3%.

Then we try to buy 18 units and look at the transaction log:

https://i.imgur.com/Sm9HTJy.jpg

It can be seen that we spent 17,704Cr (18 unit at discounted price 983.58). But than we received some "Profits from Trade Orders" 548Cr back, which is again - roughly 3% of the money spent. I suppose, that means that the discount was applied the second time (because the initial sum was already discounted). So instead of 983Cr we got 953.. . Ai traders work in the way.

I don't think, that it was intended because I can't find any logical explanation of such logic.
Maybe I am mistaken and those 2 price reductions are entirely different things and it is in fact intended? If not then it's a shame that the core functionality such as trading is currently working in such way(
Last edited by Terre on Fri, 10. May 24, 18:11, edited 1 time in total.
Reason: Images posted directly to the forums should not be greater than 640x480 or 100kb, oversize image now linked

Post Reply

Return to “X4: Foundations”