You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the national stockpile a player can manually set a desired maximum (if buying) or minimum (if selling) quantity.
This can be set in the trade screen (picture below).
When selling, every tick the country should sell any amount that exceeds the minimum amount.
This is done by placing a MarketSellOrder with quantity set to current stockpiled quantity minus minimum quantity.
The revenue from the sale must go into the cash_stockpile and must be stored in a new fixed_point_t PROPERTY (named something like national_stockpile_balance). Any unsold amount must be returned to the stockpile.
After the possible budget cuts are taken into account, a BuyUpToOrder must be placed with max_quantity being the desired maximum quantity minus the current stockpiled quantity and the money_to_spend being the max_quantity * max_next_price (unless restricted by budget cuts).
Note automated goods are outside the scope of this task.
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
In the national stockpile a player can manually set a desired maximum (if buying) or minimum (if selling) quantity.

This can be set in the trade screen (picture below).
When selling, every tick the country should sell any amount that exceeds the minimum amount.
This is done by placing a
MarketSellOrder
withquantity
set to current stockpiled quantity minus minimum quantity.The revenue from the sale must go into the
cash_stockpile
and must be stored in a newfixed_point_t PROPERTY
(named something likenational_stockpile_balance
). Any unsold amount must be returned to the stockpile.When buying, every tick the country should project the expenses. The projected expenses may be cut if there isn't enough budget.
Currently it's not clear whether national stockpile is cut first or only after other expenses are cut, see also https://discord.com/channels/1063392556160909312/1105422859641290803/1358814641790255134 .
After the possible budget cuts are taken into account, a
BuyUpToOrder
must be placed withmax_quantity
being the desired maximum quantity minus the current stockpiled quantity and themoney_to_spend
being themax_quantity * max_next_price
(unless restricted by budget cuts).Note automated goods are outside the scope of this task.
The text was updated successfully, but these errors were encountered: