sobisonator / imp19c

Imperator 19th century mod
11 stars 15 forks source link

Alternative trading simulation #383

Open sobisonator opened 1 year ago

sobisonator commented 1 year ago

To avoid performance issues from exchanging stockpiles, it may be wise to use an alterantive trade system.

The system could work like so:

Tradegoods do not have stockpiles, only rates of production. The difference between production and demand in a governorship is the deficit or surplus.

When a governorship has deficit, it loses wealth every quarter to the tune of the tradegood's wholesale price times the deficit.

When a governorship has surplus, it makes wealth every quarter to the tune of the tradegood's wholesale price times the surplus.

The wholesale price of a good is unique to every governorship (effectively, every tradezone within a country). It is derived from the following:

International trade income

For every trade good, every country's deficit total (i.e. sum of all deficit minus surplus from governorships) gets totalled up and distributed to all trade partners in a ratio based on the trade partner's total surplus (i.e. sum of all surplus minus deficit from governorships)

sobisonator commented 1 year ago

This does jeopardise the transport cost simulation, so we would need a way to re-introduce that.

sobisonator commented 1 year ago

This will need a way of integrating trade infrastructure capacity.

The obvious answer is that trade infrastructure capacity caps the surplus bonus for the purpose of all surplus calculations.

In terms of imports, trade infrastructure capacity which is less than the deficit could result in critical shortage events or modifiers