sobisonator / imp19c

Imperator 19th century mod
10 stars 15 forks source link

Internal trade fulfilments #448

Closed sobisonator closed 1 month ago

sobisonator commented 1 month ago

ATM it's possible for a governorship to have a massive shortage while others in the same customs union have huge surpluses. While this is in some cases realistic, it's silly that governorships are dependent so much on the external trade situation to fulfil their needs and sell their goods.

Suggested change: after completing globaltrade, probably just after GT_set_total_order_size_and_total_global_stockpile_percent_all if any governorship in a customs union has a surplus (i.e. its amount_exported is less than the surplus), and any governorship in a customs union has a deficit (i.e. its order_size is less than the deficit), then add together the surplus from all the governorships with surpluses and add together the deficit from all the governorships with deficits; then transfer the surplus to areas with deficits, in return for wealth per unit at the country_unit_price of the importer.

sobisonator commented 1 month ago

A simpler way to do this might be to make the global market penetration for tradegoods to be the sum of:

sobisonator commented 1 month ago

Now fixed by adjusting max order size up based on the amount for sale in the customs union